[
  {
    "path": "LICENSE",
    "content": "MIT License\n\nCopyright (c) 2023 IGLICT\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
  },
  {
    "path": "README.md",
    "content": "# NeUDF\nWe present an open surface reconstruction method using UDF, called NeUDF, for reconstructing objects with high-fidelity open surfaces from 2D image inputs.\n\n![](./static/teaser.jpg)\n\n## [Project page](http://geometrylearning.com/neudf/) |  [Paper](http://geometrylearning.com/neudf/paper.pdf)\nThis is the official repo for the implementation of **NeUDF: Leaning Neural Unsigned Distance Fields with Volume Rendering** (CVPR 2023).\n\n## Usage\n\n### Setup environment\n\nInstalling the requirements using:\n```shell\npip install -r requirements.txt\n```\n\nTo compile [MeshUDF](https://github.com/cvlab-epfl/MeshUDF) to extract open mesh from the learned UDF field, please run:\n```shell\ncd custom_mc\npython setup.py build_ext --inplace\ncd ..\n```\n\nTo use [PyMeshLab](https://github.com/cnr-isti-vclab/PyMeshLab) and a customized Screened poisson to extract open mesh from the learned UDF field, please run:\n```shell\npip install pymeshlab\n```\nTo build PyMeshLab from source, please refer to [PyMeshLab](https://github.com/cnr-isti-vclab/PyMeshLab).\n\n### Running\n\n- **Train without mask**\n\n```shell\npython exp_runner.py --mode train --conf ./confs/womask_open.conf --case <case_name>\n```\n\n- **Train with mask**\n\n```shell\npython exp_runner.py --mode train --conf ./confs/wmask_open.conf --case <case_name>\n```\n\n- **Extract surface using MeshUDF** \n\n```shell\npython exp_runner.py --mode validate_mesh_udf --conf <config_file> --case <case_name> --is_continue\n```\n\nThe corresponding mesh can be found in `exp/<case_name>/<exp_name>/meshes/mu<iter_steps>.ply`.\n\n- **Extract surface using Screened Poisson** \n\n```shell\npython exp_runner.py --mode validate_mesh_spsr --conf <config_file> --case <case_name> --is_continue\n```\n\nThe corresponding mesh can be found in `exp/<case_name>/<exp_name>/meshes/spsr<iter_steps>.ply`.\n\n- **Extract surface using MarchingCubes** \n\n```shell\npython exp_runner.py --mode validate_mesh --conf <config_file> --case <case_name> --is_continue\n```\n\nThe corresponding mesh can be found in `exp/<case_name>/<exp_name>/meshes/<iter_steps>.ply`.\n\n### Evaluation using pretrained models\n\n- **Without mask setting** \n```shell\npython exp_runner.py --mode validate_mesh_udf --conf ./confs/womask_open.conf --case my_rack_test --is_continue --resolution 512\n```\n\n- **With mask setting** \n```shell\npython exp_runner.py --mode validate_mesh_udf --conf ./confs/wmask_open.conf --case my_whale_test --is_continue --resolution 512\n```\n\n### Datasets and results\n\nYou can download the full datasets and results [here](https://drive.google.com/drive/folders/1g2x5v6QWUdjQkNoszL2d68I2Gp0VRj5E?usp=sharing) and put them in ./public_data/ and ./exp/, respectively.\n\nThe data is organized as follows:\n\n```\npublic_data\n|-- <case_name>\n    |-- cameras_xxx.npz\n    |-- image\n        |-- 000.png\n        |-- 001.png\n        ...\n    |-- mask\n        |-- 000.png\n        |-- 001.png\n        ...\nexp\n|-- <case_name>\n    |-- <conf_name>\n        |-- checkpoints\n            |-- ckpt_400000.pth\n```\n\n### Train NeUDF with custom data\n\nPlease refer to the  [Data Conversion](https://github.com/Totoro97/NeuS/tree/main/preprocess_custom_data) in NeuS.\n\n\n## Citation\n\nCite as below if you find this repository is helpful to your project:\n\n```\n@inproceedings{Liu23NeUDF,\n    author = {Liu, Yu-Tao and Wang, Li and Yang, Jie and Chen, Weikai and Meng, Xiaoxu and Yang, Bo and Gao, Lin},\n    title = {NeUDF: Leaning Neural Unsigned Distance Fields with Volume Rendering},\n    booktitle={Computer Vision and Pattern Recognition (CVPR)},\n    year = {2023},\n}\n```\n\n## Acknowledgement\n\nSome code snippets are borrowed from [NeuS](https://github.com/Totoro97/NeuS), [NDF](https://github.com/jchibane/ndf) and [MeshUDF](https://github.com/cvlab-epfl/MeshUDF). Thanks for these great projects.\n"
  },
  {
    "path": "confs/wmask_old.conf",
    "content": "general {\n    base_exp_dir = ./exp/CASE_NAME/wmask\n    recording = [\n        ./,\n        ./models\n    ]\n}\n\ndataset {\n    data_dir = ./public_data/CASE_NAME/\n    render_cameras_name = cameras_sphere.npz\n    object_cameras_name = cameras_sphere.npz\n}\n\ntrain {\n    learning_rate = 2e-4\n    learning_rate_alpha = 0.05\n    end_iter = 400000\n\n    batch_size = 512\n    validate_resolution_level = 4\n    warm_up_end = 5000\n    anneal_end = 0\n    use_white_bkgd = False\n\n    save_freq = 10000\n    val_freq = 2500\n    val_mesh_freq = 5000\n    report_freq = 100\n\n    mask_weight = 0.1\n    igr_weight = 0.1\n    normal_weight = 0.02\n\n    dist_weight = 0.0\n    geo_reg_weight = 0.0\n    sym_weight = 0.0\n\n    mcube_threshold = 0.005\n\n    up_sample_start = 100000\n\n    perm_num = 8\n    \n}\n\nmodel {\n    nerf {\n        D = 8,\n        d_in = 4,\n        d_in_view = 3,\n        W = 256,\n        multires = 10,\n        multires_view = 4,\n        output_ch = 4,\n        skips=[4],\n        use_viewdirs=True\n    }\n\n    sdf_network {\n        d_out = 257\n        d_in = 3\n        d_hidden = 256\n        n_layers = 8\n        skip_in = [4]\n        multires = 6\n        bias = 0.5\n        scale = 1.0\n        geometric_init = True\n        weight_norm = True\n    }\n\n    variance_network {\n        init_val = 0.3\n    }\n\n    rendering_network {\n        d_feature = 256\n        mode = normal_appr\n        d_in = 9\n        d_out = 3\n        d_hidden = 256\n        n_layers = 4\n        weight_norm = True\n        multires_view = 4\n        squeeze_out = True\n    }\n\n    neus_renderer {\n        n_samples = 64\n        n_importance = 64\n        n_outside = 0\n        perturb = 1.0\n        disturb = 0.0\n        disturb_end = 0\n        up_sample_mode = naive_appr\n\n        up_sample_steps = 2     # 1 for simple coarse-to-fine sampling\n        up_sample_appr_level = 3\n        up_sample_s = 64\n\n        render_mode = div\n    }\n}\n"
  },
  {
    "path": "confs/wmask_open.conf",
    "content": "general {\n    base_exp_dir = ./exp/CASE_NAME/wmask_open\n    recording = [\n        ./,\n        ./models\n    ]\n}\n\ndataset {\n    data_dir = ./public_data/CASE_NAME/\n    render_cameras_name = cameras_sphere.npz\n    object_cameras_name = cameras_sphere.npz\n}\n\ntrain {\n    learning_rate = 2e-4\n    learning_rate_alpha = 0.05\n    end_iter = 400000\n\n    batch_size = 512\n    validate_resolution_level = 4\n    warm_up_end = 5000\n    anneal_end = 0\n    use_white_bkgd = False\n\n    save_freq = 10000\n    val_freq = 2500\n    val_mesh_freq = 5000\n    report_freq = 100\n\n    mask_weight = 0.1\n    igr_weight = 0.1\n    normal_weight = 0.02\n\n    mcube_threshold = 0.005\n\n    up_sample_start = 0\n\n    perm_num = 8\n    \n}\n\nmodel {\n    nerf {\n        D = 8,\n        d_in = 4,\n        d_in_view = 3,\n        W = 256,\n        multires = 10,\n        multires_view = 4,\n        output_ch = 4,\n        skips=[4],\n        use_viewdirs=True\n    }\n\n    sdf_network {\n        d_out = 257\n        d_in = 3\n        d_hidden = 256\n        n_layers = 8\n        skip_in = [4]\n        multires = 6\n        bias = 0.5\n        scale = 1.0\n        geometric_init = True\n        weight_norm = True\n    }\n\n    variance_network {\n        init_val = 0.3\n    }\n\n    rendering_network {\n        d_feature = 256\n        mode = normal_appr\n        d_in = 9\n        d_out = 3\n        d_hidden = 256\n        n_layers = 4\n        weight_norm = True\n        multires_view = 4\n        squeeze_out = True\n    }\n\n    neus_renderer {\n        n_samples = 64\n        n_importance = 64\n        n_outside = 0\n        perturb = 1.0\n        disturb = 0.0\n        disturb_end = 0\n        up_sample_mode = naive_appr\n\n        up_sample_steps = 2     # 1 for simple coarse-to-fine sampling\n        up_sample_appr_level = 3\n        up_sample_s = 64\n\n        render_mode = div\n    }\n}\n"
  },
  {
    "path": "confs/womask_open.conf",
    "content": "general {\n    base_exp_dir = ./exp/CASE_NAME/womask_open\n    recording = [\n        ./,\n        ./models\n    ]\n}\n\ndataset {\n    data_dir = ./public_data/CASE_NAME/\n    render_cameras_name = cameras_sphere.npz\n    object_cameras_name = cameras_sphere.npz\n}\n\ntrain {\n    learning_rate = 2e-4\n    learning_rate_alpha = 0.05\n    end_iter = 400000\n\n    batch_size = 512\n    validate_resolution_level = 4\n    warm_up_end = 5000\n    anneal_end = 10000\n    use_white_bkgd = False\n\n    save_freq = 10000\n    val_freq = 2500\n    val_mesh_freq = 5000\n    report_freq = 100\n\n    mask_weight = 0.0\n    igr_weight = 0.1\n    normal_weight = 0.02\n\n    mcube_threshold = 0.005\n\n    up_sample_start = 100000\n\n    perm_num = 8\n    \n}\n\nmodel {\n    nerf {\n        D = 8,\n        d_in = 4,\n        d_in_view = 3,\n        W = 256,\n        multires = 10,\n        multires_view = 4,\n        output_ch = 4,\n        skips=[4],\n        use_viewdirs=True\n    }\n\n    sdf_network {\n        d_out = 257\n        d_in = 3\n        d_hidden = 256\n        n_layers = 8\n        skip_in = [4]\n        multires = 6\n        bias = 0.5\n        scale = 1.0\n        geometric_init = True\n        weight_norm = True\n    }\n\n    variance_network {\n        init_val = 0.3\n    }\n\n    rendering_network {\n        d_feature = 256\n        mode = normal_appr\n        d_in = 9\n        d_out = 3\n        d_hidden = 256\n        n_layers = 4\n        weight_norm = True\n        multires_view = 4\n        squeeze_out = True\n    }\n\n    neus_renderer {\n        n_samples = 64\n        n_importance = 64\n        n_outside = 32\n        perturb = 1.0\n        disturb = 0.0\n        disturb_end = 0\n        up_sample_mode = naive_appr\n\n        up_sample_steps = 2     # 1 for simple coarse-to-fine sampling\n        up_sample_appr_level = 3\n        up_sample_s = 64\n\n        render_mode = div\n    }\n}\n"
  },
  {
    "path": "custom_mc/_marching_cubes_lewiner.py",
    "content": "import base64\nimport numpy as np\nimport _marching_cubes_lewiner_luts as mcluts\nimport _marching_cubes_lewiner_cy\n\n\ndef marching_cubes_lewiner(volume, level=None, spacing=(1., 1., 1.),\n                           gradient_direction='descent', step_size=1,\n                           allow_degenerate=True, use_classic=False, mask=None):\n    \"\"\"Lewiner et al. algorithm for marching cubes. See\n    marching_cubes_lewiner for documentation.\n    \"\"\"\n\n    # Check volume and ensure its in the format that the alg needs\n    if not isinstance(volume, np.ndarray) or (volume.ndim != 3):\n        raise ValueError('Input volume should be a 3D numpy array.')\n    if volume.shape[0] < 2 or volume.shape[1] < 2 or volume.shape[2] < 2:\n        raise ValueError(\"Input array must be at least 2x2x2.\")\n    volume = np.ascontiguousarray(volume,\n                                  np.float32)  # no copy if not necessary\n\n    # Check/convert other inputs:\n    # level\n    if level is None:\n        level = 0.5 * (volume.min() + volume.max())\n    else:\n        level = float(level)\n        if level < volume.min() or level > volume.max():\n            raise ValueError(\"Surface level must be within volume data range.\")\n    # spacing\n    if len(spacing) != 3:\n        raise ValueError(\"`spacing` must consist of three floats.\")\n    # step_size\n    step_size = int(step_size)\n    if step_size < 1:\n        raise ValueError('step_size must be at least one.')\n    # use_classic\n    use_classic = bool(use_classic)\n\n    # Get LutProvider class (reuse if possible)\n    L = _get_mc_luts()\n\n    # Check if a mask array is passed\n    if mask is not None:\n        if not mask.shape == volume.shape:\n            raise ValueError('volume and mask must have the same shape.')\n\n    # Apply algorithm\n    func = _marching_cubes_lewiner_cy.marching_cubes\n    vertices, faces, normals, values = func(volume, level, L,\n                                            step_size, use_classic, mask)\n\n    if not len(vertices):\n        raise RuntimeError('No surface found at the given iso value.')\n\n    # Output in z-y-x order, as is common in skimage\n    vertices = np.fliplr(vertices)\n    normals = np.fliplr(normals)\n\n    # Finishing touches to output\n    faces.shape = -1, 3\n    if gradient_direction == 'descent':\n        # MC implementation is right-handed, but gradient_direction is\n        # left-handed\n        faces = np.fliplr(faces)\n    elif not gradient_direction == 'ascent':\n        raise ValueError(\"Incorrect input %s in `gradient_direction`, see \"\n                         \"docstring.\" % (gradient_direction))\n    if not np.array_equal(spacing, (1, 1, 1)):\n        vertices = vertices * np.r_[spacing]\n\n    if allow_degenerate:\n        return vertices, faces, normals, values\n    else:\n        fun = _marching_cubes_lewiner_cy.remove_degenerate_faces\n        return fun(vertices.astype(np.float32), faces, normals, values)\n\n\n\ndef udf_mc_lewiner(volume, grads, spacing=(1., 1., 1.),\n                           gradient_direction='descent', step_size=1,\n                           allow_degenerate=True, use_classic=False, mask=None):\n    \"\"\"Lewiner et al. algorithm for marching cubes. See\n    marching_cubes_lewiner for documentation.\n    \"\"\"\n\n    # Check volume and ensure its in the format that the alg needs\n    if not isinstance(volume, np.ndarray) or (volume.ndim != 3):\n        raise ValueError('Input volume should be a 3D numpy array.')\n    if volume.shape[0] < 2 or volume.shape[1] < 2 or volume.shape[2] < 2:\n        raise ValueError(\"Input array must be at least 2x2x2.\")\n    volume = np.ascontiguousarray(volume,\n                                  np.float32)  # no copy if not necessary\n\n    # spacing\n    if len(spacing) != 3:\n        raise ValueError(\"`spacing` must consist of three floats.\")\n    # step_size\n    step_size = int(step_size)\n    if step_size < 1:\n        raise ValueError('step_size must be at least one.')\n    # use_classic\n    use_classic = bool(use_classic)\n\n    # Get LutProvider class (reuse if possible)\n    L = _get_mc_luts()\n\n    # Check if a mask array is passed\n    if mask is not None:\n        if not mask.shape == volume.shape:\n            raise ValueError('volume and mask must have the same shape.')\n\n    # Apply algorithm\n    func = _marching_cubes_lewiner_cy.marching_cubes_udf\n    vertices, faces, normals, values = func(volume, grads, L,\n                                            step_size, use_classic, mask)\n\n    if not len(vertices):\n        raise RuntimeError('No surface found at the given iso value.')\n\n    # Output in z-y-x order, as is common in skimage\n    vertices = np.fliplr(vertices)\n    normals = np.fliplr(normals)\n\n    # Finishing touches to output\n    faces.shape = -1, 3\n    if gradient_direction == 'descent':\n        # MC implementation is right-handed, but gradient_direction is\n        # left-handed\n        faces = np.fliplr(faces)\n    elif not gradient_direction == 'ascent':\n        raise ValueError(\"Incorrect input %s in `gradient_direction`, see \"\n                         \"docstring.\" % (gradient_direction))\n    if not np.array_equal(spacing, (1, 1, 1)):\n        vertices = vertices * np.r_[spacing]\n\n    if allow_degenerate:\n        return vertices, faces, normals, values\n    else:\n        fun = _marching_cubes_lewiner_cy.remove_degenerate_faces\n        return fun(vertices.astype(np.float32), faces, normals, values)\n\n\n\ndef _to_array(args):\n    shape, text = args\n    byts = base64.decodebytes(text.encode('utf-8'))\n    ar = np.frombuffer(byts, dtype='int8')\n    ar.shape = shape\n    return ar\n\n \n# Map an edge-index to two relative pixel positions. The ege index\n# represents a point that lies somewhere in between these pixels.\n# Linear interpolation should be used to determine where it is exactly.\n#   0\n# 3   1   ->  0x\n#   2         xx\nEDGETORELATIVEPOSX = np.array([ [0,1],[1,1],[1,0],[0,0], [0,1],[1,1],[1,0],[0,0], [0,0],[1,1],[1,1],[0,0] ], 'int8')\nEDGETORELATIVEPOSY = np.array([ [0,0],[0,1],[1,1],[1,0], [0,0],[0,1],[1,1],[1,0], [0,0],[0,0],[1,1],[1,1] ], 'int8')\nEDGETORELATIVEPOSZ = np.array([ [0,0],[0,0],[0,0],[0,0], [1,1],[1,1],[1,1],[1,1], [0,1],[0,1],[0,1],[0,1] ], 'int8')\n\n\ndef _get_mc_luts():\n    \"\"\" Kind of lazy obtaining of the luts.\n    \"\"\"\n    if not hasattr(mcluts, 'THE_LUTS'):\n\n        mcluts.THE_LUTS = _marching_cubes_lewiner_cy.LutProvider(\n                EDGETORELATIVEPOSX, EDGETORELATIVEPOSY, EDGETORELATIVEPOSZ,\n\n                _to_array(mcluts.CASESCLASSIC), _to_array(mcluts.CASES),\n\n                _to_array(mcluts.TILING1), _to_array(mcluts.TILING2), _to_array(mcluts.TILING3_1), _to_array(mcluts.TILING3_2),\n                _to_array(mcluts.TILING4_1), _to_array(mcluts.TILING4_2), _to_array(mcluts.TILING5), _to_array(mcluts.TILING6_1_1),\n                _to_array(mcluts.TILING6_1_2), _to_array(mcluts.TILING6_2), _to_array(mcluts.TILING7_1),\n                _to_array(mcluts.TILING7_2), _to_array(mcluts.TILING7_3), _to_array(mcluts.TILING7_4_1),\n                _to_array(mcluts.TILING7_4_2), _to_array(mcluts.TILING8), _to_array(mcluts.TILING9),\n                _to_array(mcluts.TILING10_1_1), _to_array(mcluts.TILING10_1_1_), _to_array(mcluts.TILING10_1_2),\n                _to_array(mcluts.TILING10_2), _to_array(mcluts.TILING10_2_), _to_array(mcluts.TILING11),\n                _to_array(mcluts.TILING12_1_1), _to_array(mcluts.TILING12_1_1_), _to_array(mcluts.TILING12_1_2),\n                _to_array(mcluts.TILING12_2), _to_array(mcluts.TILING12_2_), _to_array(mcluts.TILING13_1),\n                _to_array(mcluts.TILING13_1_), _to_array(mcluts.TILING13_2), _to_array(mcluts.TILING13_2_),\n                _to_array(mcluts.TILING13_3), _to_array(mcluts.TILING13_3_), _to_array(mcluts.TILING13_4),\n                _to_array(mcluts.TILING13_5_1), _to_array(mcluts.TILING13_5_2), _to_array(mcluts.TILING14),\n\n                _to_array(mcluts.TEST3), _to_array(mcluts.TEST4), _to_array(mcluts.TEST6),\n                _to_array(mcluts.TEST7), _to_array(mcluts.TEST10), _to_array(mcluts.TEST12),\n                _to_array(mcluts.TEST13), _to_array(mcluts.SUBCONFIG13),\n                )\n\n    return mcluts.THE_LUTS\n"
  },
  {
    "path": "custom_mc/_marching_cubes_lewiner_cy.c",
    "content": "/* Generated by Cython 0.29.30 */\n\n/* BEGIN: Cython Metadata\n{\n    \"distutils\": {\n        \"depends\": [],\n        \"name\": \"_marching_cubes_lewiner_cy\",\n        \"sources\": [\n            \"_marching_cubes_lewiner_cy.pyx\"\n        ]\n    },\n    \"module_name\": \"_marching_cubes_lewiner_cy\"\n}\nEND: Cython Metadata */\n\n#ifndef PY_SSIZE_T_CLEAN\n#define PY_SSIZE_T_CLEAN\n#endif /* PY_SSIZE_T_CLEAN */\n#include \"Python.h\"\n#ifndef Py_PYTHON_H\n    #error Python headers needed to compile C extensions, please install development version of Python.\n#elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)\n    #error Cython requires Python 2.6+ or Python 3.3+.\n#else\n#define CYTHON_ABI \"0_29_30\"\n#define CYTHON_HEX_VERSION 0x001D1EF0\n#define CYTHON_FUTURE_DIVISION 0\n#include <stddef.h>\n#ifndef offsetof\n  #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )\n#endif\n#if !defined(WIN32) && !defined(MS_WINDOWS)\n  #ifndef __stdcall\n    #define __stdcall\n  #endif\n  #ifndef __cdecl\n    #define __cdecl\n  #endif\n  #ifndef __fastcall\n    #define __fastcall\n  #endif\n#endif\n#ifndef DL_IMPORT\n  #define DL_IMPORT(t) t\n#endif\n#ifndef DL_EXPORT\n  #define DL_EXPORT(t) t\n#endif\n#define __PYX_COMMA ,\n#ifndef HAVE_LONG_LONG\n  #if PY_VERSION_HEX >= 0x02070000\n    #define HAVE_LONG_LONG\n  #endif\n#endif\n#ifndef PY_LONG_LONG\n  #define PY_LONG_LONG LONG_LONG\n#endif\n#ifndef Py_HUGE_VAL\n  #define Py_HUGE_VAL HUGE_VAL\n#endif\n#ifdef PYPY_VERSION\n  #define CYTHON_COMPILING_IN_PYPY 1\n  #define CYTHON_COMPILING_IN_PYSTON 0\n  #define CYTHON_COMPILING_IN_CPYTHON 0\n  #undef CYTHON_USE_TYPE_SLOTS\n  #define CYTHON_USE_TYPE_SLOTS 0\n  #undef CYTHON_USE_PYTYPE_LOOKUP\n  #define CYTHON_USE_PYTYPE_LOOKUP 0\n  #if PY_VERSION_HEX < 0x03050000\n    #undef CYTHON_USE_ASYNC_SLOTS\n    #define CYTHON_USE_ASYNC_SLOTS 0\n  #elif !defined(CYTHON_USE_ASYNC_SLOTS)\n    #define CYTHON_USE_ASYNC_SLOTS 1\n  #endif\n  #undef CYTHON_USE_PYLIST_INTERNALS\n  #define CYTHON_USE_PYLIST_INTERNALS 0\n  #undef CYTHON_USE_UNICODE_INTERNALS\n  #define CYTHON_USE_UNICODE_INTERNALS 0\n  #undef CYTHON_USE_UNICODE_WRITER\n  #define CYTHON_USE_UNICODE_WRITER 0\n  #undef CYTHON_USE_PYLONG_INTERNALS\n  #define CYTHON_USE_PYLONG_INTERNALS 0\n  #undef CYTHON_AVOID_BORROWED_REFS\n  #define CYTHON_AVOID_BORROWED_REFS 1\n  #undef CYTHON_ASSUME_SAFE_MACROS\n  #define CYTHON_ASSUME_SAFE_MACROS 0\n  #undef CYTHON_UNPACK_METHODS\n  #define CYTHON_UNPACK_METHODS 0\n  #undef CYTHON_FAST_THREAD_STATE\n  #define CYTHON_FAST_THREAD_STATE 0\n  #undef CYTHON_FAST_PYCALL\n  #define CYTHON_FAST_PYCALL 0\n  #undef CYTHON_PEP489_MULTI_PHASE_INIT\n  #define CYTHON_PEP489_MULTI_PHASE_INIT 0\n  #undef CYTHON_USE_TP_FINALIZE\n  #define CYTHON_USE_TP_FINALIZE 0\n  #undef CYTHON_USE_DICT_VERSIONS\n  #define CYTHON_USE_DICT_VERSIONS 0\n  #undef CYTHON_USE_EXC_INFO_STACK\n  #define CYTHON_USE_EXC_INFO_STACK 0\n  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC\n    #define CYTHON_UPDATE_DESCRIPTOR_DOC (PYPY_VERSION_HEX >= 0x07030900)\n  #endif\n#elif defined(PYSTON_VERSION)\n  #define CYTHON_COMPILING_IN_PYPY 0\n  #define CYTHON_COMPILING_IN_PYSTON 1\n  #define CYTHON_COMPILING_IN_CPYTHON 0\n  #ifndef CYTHON_USE_TYPE_SLOTS\n    #define CYTHON_USE_TYPE_SLOTS 1\n  #endif\n  #undef CYTHON_USE_PYTYPE_LOOKUP\n  #define CYTHON_USE_PYTYPE_LOOKUP 0\n  #undef CYTHON_USE_ASYNC_SLOTS\n  #define CYTHON_USE_ASYNC_SLOTS 0\n  #undef CYTHON_USE_PYLIST_INTERNALS\n  #define CYTHON_USE_PYLIST_INTERNALS 0\n  #ifndef CYTHON_USE_UNICODE_INTERNALS\n    #define CYTHON_USE_UNICODE_INTERNALS 1\n  #endif\n  #undef CYTHON_USE_UNICODE_WRITER\n  #define CYTHON_USE_UNICODE_WRITER 0\n  #undef CYTHON_USE_PYLONG_INTERNALS\n  #define CYTHON_USE_PYLONG_INTERNALS 0\n  #ifndef CYTHON_AVOID_BORROWED_REFS\n    #define CYTHON_AVOID_BORROWED_REFS 0\n  #endif\n  #ifndef CYTHON_ASSUME_SAFE_MACROS\n    #define CYTHON_ASSUME_SAFE_MACROS 1\n  #endif\n  #ifndef CYTHON_UNPACK_METHODS\n    #define CYTHON_UNPACK_METHODS 1\n  #endif\n  #undef CYTHON_FAST_THREAD_STATE\n  #define CYTHON_FAST_THREAD_STATE 0\n  #undef CYTHON_FAST_PYCALL\n  #define CYTHON_FAST_PYCALL 0\n  #undef CYTHON_PEP489_MULTI_PHASE_INIT\n  #define CYTHON_PEP489_MULTI_PHASE_INIT 0\n  #undef CYTHON_USE_TP_FINALIZE\n  #define CYTHON_USE_TP_FINALIZE 0\n  #undef CYTHON_USE_DICT_VERSIONS\n  #define CYTHON_USE_DICT_VERSIONS 0\n  #undef CYTHON_USE_EXC_INFO_STACK\n  #define CYTHON_USE_EXC_INFO_STACK 0\n  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC\n    #define CYTHON_UPDATE_DESCRIPTOR_DOC 0\n  #endif\n#else\n  #define CYTHON_COMPILING_IN_PYPY 0\n  #define CYTHON_COMPILING_IN_PYSTON 0\n  #define CYTHON_COMPILING_IN_CPYTHON 1\n  #ifndef CYTHON_USE_TYPE_SLOTS\n    #define CYTHON_USE_TYPE_SLOTS 1\n  #endif\n  #if PY_VERSION_HEX < 0x02070000\n    #undef CYTHON_USE_PYTYPE_LOOKUP\n    #define CYTHON_USE_PYTYPE_LOOKUP 0\n  #elif !defined(CYTHON_USE_PYTYPE_LOOKUP)\n    #define CYTHON_USE_PYTYPE_LOOKUP 1\n  #endif\n  #if PY_MAJOR_VERSION < 3\n    #undef CYTHON_USE_ASYNC_SLOTS\n    #define CYTHON_USE_ASYNC_SLOTS 0\n  #elif !defined(CYTHON_USE_ASYNC_SLOTS)\n    #define CYTHON_USE_ASYNC_SLOTS 1\n  #endif\n  #if PY_VERSION_HEX < 0x02070000\n    #undef CYTHON_USE_PYLONG_INTERNALS\n    #define CYTHON_USE_PYLONG_INTERNALS 0\n  #elif !defined(CYTHON_USE_PYLONG_INTERNALS)\n    #define CYTHON_USE_PYLONG_INTERNALS 1\n  #endif\n  #ifndef CYTHON_USE_PYLIST_INTERNALS\n    #define CYTHON_USE_PYLIST_INTERNALS 1\n  #endif\n  #ifndef CYTHON_USE_UNICODE_INTERNALS\n    #define CYTHON_USE_UNICODE_INTERNALS 1\n  #endif\n  #if PY_VERSION_HEX < 0x030300F0 || PY_VERSION_HEX >= 0x030B00A2\n    #undef CYTHON_USE_UNICODE_WRITER\n    #define CYTHON_USE_UNICODE_WRITER 0\n  #elif !defined(CYTHON_USE_UNICODE_WRITER)\n    #define CYTHON_USE_UNICODE_WRITER 1\n  #endif\n  #ifndef CYTHON_AVOID_BORROWED_REFS\n    #define CYTHON_AVOID_BORROWED_REFS 0\n  #endif\n  #ifndef CYTHON_ASSUME_SAFE_MACROS\n    #define CYTHON_ASSUME_SAFE_MACROS 1\n  #endif\n  #ifndef CYTHON_UNPACK_METHODS\n    #define CYTHON_UNPACK_METHODS 1\n  #endif\n  #if PY_VERSION_HEX >= 0x030B00A4\n    #undef CYTHON_FAST_THREAD_STATE\n    #define CYTHON_FAST_THREAD_STATE 0\n  #elif !defined(CYTHON_FAST_THREAD_STATE)\n    #define CYTHON_FAST_THREAD_STATE 1\n  #endif\n  #ifndef CYTHON_FAST_PYCALL\n    #define CYTHON_FAST_PYCALL (PY_VERSION_HEX < 0x030A0000)\n  #endif\n  #ifndef CYTHON_PEP489_MULTI_PHASE_INIT\n    #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000)\n  #endif\n  #ifndef CYTHON_USE_TP_FINALIZE\n    #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1)\n  #endif\n  #ifndef CYTHON_USE_DICT_VERSIONS\n    #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX >= 0x030600B1)\n  #endif\n  #if PY_VERSION_HEX >= 0x030B00A4\n    #undef CYTHON_USE_EXC_INFO_STACK\n    #define CYTHON_USE_EXC_INFO_STACK 0\n  #elif !defined(CYTHON_USE_EXC_INFO_STACK)\n    #define CYTHON_USE_EXC_INFO_STACK (PY_VERSION_HEX >= 0x030700A3)\n  #endif\n  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC\n    #define CYTHON_UPDATE_DESCRIPTOR_DOC 1\n  #endif\n#endif\n#if !defined(CYTHON_FAST_PYCCALL)\n#define CYTHON_FAST_PYCCALL  (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)\n#endif\n#if CYTHON_USE_PYLONG_INTERNALS\n  #if PY_MAJOR_VERSION < 3\n    #include \"longintrepr.h\"\n  #endif\n  #undef SHIFT\n  #undef BASE\n  #undef MASK\n  #ifdef SIZEOF_VOID_P\n    enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) };\n  #endif\n#endif\n#ifndef __has_attribute\n  #define __has_attribute(x) 0\n#endif\n#ifndef __has_cpp_attribute\n  #define __has_cpp_attribute(x) 0\n#endif\n#ifndef CYTHON_RESTRICT\n  #if defined(__GNUC__)\n    #define CYTHON_RESTRICT __restrict__\n  #elif defined(_MSC_VER) && _MSC_VER >= 1400\n    #define CYTHON_RESTRICT __restrict\n  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L\n    #define CYTHON_RESTRICT restrict\n  #else\n    #define CYTHON_RESTRICT\n  #endif\n#endif\n#ifndef CYTHON_UNUSED\n# if defined(__GNUC__)\n#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))\n#     define CYTHON_UNUSED __attribute__ ((__unused__))\n#   else\n#     define CYTHON_UNUSED\n#   endif\n# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))\n#   define CYTHON_UNUSED __attribute__ ((__unused__))\n# else\n#   define CYTHON_UNUSED\n# endif\n#endif\n#ifndef CYTHON_MAYBE_UNUSED_VAR\n#  if defined(__cplusplus)\n     template<class T> void CYTHON_MAYBE_UNUSED_VAR( const T& ) { }\n#  else\n#    define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x)\n#  endif\n#endif\n#ifndef CYTHON_NCP_UNUSED\n# if CYTHON_COMPILING_IN_CPYTHON\n#  define CYTHON_NCP_UNUSED\n# else\n#  define CYTHON_NCP_UNUSED CYTHON_UNUSED\n# endif\n#endif\n#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)\n#ifdef _MSC_VER\n    #ifndef _MSC_STDINT_H_\n        #if _MSC_VER < 1300\n           typedef unsigned char     uint8_t;\n           typedef unsigned int      uint32_t;\n        #else\n           typedef unsigned __int8   uint8_t;\n           typedef unsigned __int32  uint32_t;\n        #endif\n    #endif\n#else\n   #include <stdint.h>\n#endif\n#ifndef CYTHON_FALLTHROUGH\n  #if defined(__cplusplus) && __cplusplus >= 201103L\n    #if __has_cpp_attribute(fallthrough)\n      #define CYTHON_FALLTHROUGH [[fallthrough]]\n    #elif __has_cpp_attribute(clang::fallthrough)\n      #define CYTHON_FALLTHROUGH [[clang::fallthrough]]\n    #elif __has_cpp_attribute(gnu::fallthrough)\n      #define CYTHON_FALLTHROUGH [[gnu::fallthrough]]\n    #endif\n  #endif\n  #ifndef CYTHON_FALLTHROUGH\n    #if __has_attribute(fallthrough)\n      #define CYTHON_FALLTHROUGH __attribute__((fallthrough))\n    #else\n      #define CYTHON_FALLTHROUGH\n    #endif\n  #endif\n  #if defined(__clang__ ) && defined(__apple_build_version__)\n    #if __apple_build_version__ < 7000000\n      #undef  CYTHON_FALLTHROUGH\n      #define CYTHON_FALLTHROUGH\n    #endif\n  #endif\n#endif\n\n#ifndef CYTHON_INLINE\n  #if defined(__clang__)\n    #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))\n  #elif defined(__GNUC__)\n    #define CYTHON_INLINE __inline__\n  #elif defined(_MSC_VER)\n    #define CYTHON_INLINE __inline\n  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L\n    #define CYTHON_INLINE inline\n  #else\n    #define CYTHON_INLINE\n  #endif\n#endif\n\n#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)\n  #define Py_OptimizeFlag 0\n#endif\n#define __PYX_BUILD_PY_SSIZE_T \"n\"\n#define CYTHON_FORMAT_SSIZE_T \"z\"\n#if PY_MAJOR_VERSION < 3\n  #define __Pyx_BUILTIN_MODULE_NAME \"__builtin__\"\n  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\\\n          PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\n  #define __Pyx_DefaultClassType PyClass_Type\n#else\n  #define __Pyx_BUILTIN_MODULE_NAME \"builtins\"\n  #define __Pyx_DefaultClassType PyType_Type\n#if PY_VERSION_HEX >= 0x030B00A1\n    static CYTHON_INLINE PyCodeObject* __Pyx_PyCode_New(int a, int k, int l, int s, int f,\n                                                    PyObject *code, PyObject *c, PyObject* n, PyObject *v,\n                                                    PyObject *fv, PyObject *cell, PyObject* fn,\n                                                    PyObject *name, int fline, PyObject *lnos) {\n        PyObject *kwds=NULL, *argcount=NULL, *posonlyargcount=NULL, *kwonlyargcount=NULL;\n        PyObject *nlocals=NULL, *stacksize=NULL, *flags=NULL, *replace=NULL, *call_result=NULL, *empty=NULL;\n        const char *fn_cstr=NULL;\n        const char *name_cstr=NULL;\n        PyCodeObject* co=NULL;\n        PyObject *type, *value, *traceback;\n        PyErr_Fetch(&type, &value, &traceback);\n        if (!(kwds=PyDict_New())) goto end;\n        if (!(argcount=PyLong_FromLong(a))) goto end;\n        if (PyDict_SetItemString(kwds, \"co_argcount\", argcount) != 0) goto end;\n        if (!(posonlyargcount=PyLong_FromLong(0))) goto end;\n        if (PyDict_SetItemString(kwds, \"co_posonlyargcount\", posonlyargcount) != 0) goto end;\n        if (!(kwonlyargcount=PyLong_FromLong(k))) goto end;\n        if (PyDict_SetItemString(kwds, \"co_kwonlyargcount\", kwonlyargcount) != 0) goto end;\n        if (!(nlocals=PyLong_FromLong(l))) goto end;\n        if (PyDict_SetItemString(kwds, \"co_nlocals\", nlocals) != 0) goto end;\n        if (!(stacksize=PyLong_FromLong(s))) goto end;\n        if (PyDict_SetItemString(kwds, \"co_stacksize\", stacksize) != 0) goto end;\n        if (!(flags=PyLong_FromLong(f))) goto end;\n        if (PyDict_SetItemString(kwds, \"co_flags\", flags) != 0) goto end;\n        if (PyDict_SetItemString(kwds, \"co_code\", code) != 0) goto end;\n        if (PyDict_SetItemString(kwds, \"co_consts\", c) != 0) goto end;\n        if (PyDict_SetItemString(kwds, \"co_names\", n) != 0) goto end;\n        if (PyDict_SetItemString(kwds, \"co_varnames\", v) != 0) goto end;\n        if (PyDict_SetItemString(kwds, \"co_freevars\", fv) != 0) goto end;\n        if (PyDict_SetItemString(kwds, \"co_cellvars\", cell) != 0) goto end;\n        if (PyDict_SetItemString(kwds, \"co_linetable\", lnos) != 0) goto end;\n        if (!(fn_cstr=PyUnicode_AsUTF8AndSize(fn, NULL))) goto end;\n        if (!(name_cstr=PyUnicode_AsUTF8AndSize(name, NULL))) goto end;\n        if (!(co = PyCode_NewEmpty(fn_cstr, name_cstr, fline))) goto end;\n        if (!(replace = PyObject_GetAttrString((PyObject*)co, \"replace\"))) goto cleanup_code_too;\n        if (!(empty = PyTuple_New(0))) goto cleanup_code_too; // unfortunately __pyx_empty_tuple isn't available here\n        if (!(call_result = PyObject_Call(replace, empty, kwds))) goto cleanup_code_too;\n        Py_XDECREF((PyObject*)co);\n        co = (PyCodeObject*)call_result;\n        call_result = NULL;\n        if (0) {\n            cleanup_code_too:\n            Py_XDECREF((PyObject*)co);\n            co = NULL;\n        }\n        end:\n        Py_XDECREF(kwds);\n        Py_XDECREF(argcount);\n        Py_XDECREF(posonlyargcount);\n        Py_XDECREF(kwonlyargcount);\n        Py_XDECREF(nlocals);\n        Py_XDECREF(stacksize);\n        Py_XDECREF(replace);\n        Py_XDECREF(call_result);\n        Py_XDECREF(empty);\n        if (type) {\n            PyErr_Restore(type, value, traceback);\n        }\n        return co;\n    }\n#else\n  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\\\n          PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\n#endif\n  #define __Pyx_DefaultClassType PyType_Type\n#endif\n#ifndef Py_TPFLAGS_CHECKTYPES\n  #define Py_TPFLAGS_CHECKTYPES 0\n#endif\n#ifndef Py_TPFLAGS_HAVE_INDEX\n  #define Py_TPFLAGS_HAVE_INDEX 0\n#endif\n#ifndef Py_TPFLAGS_HAVE_NEWBUFFER\n  #define Py_TPFLAGS_HAVE_NEWBUFFER 0\n#endif\n#ifndef Py_TPFLAGS_HAVE_FINALIZE\n  #define Py_TPFLAGS_HAVE_FINALIZE 0\n#endif\n#ifndef METH_STACKLESS\n  #define METH_STACKLESS 0\n#endif\n#if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL)\n  #ifndef METH_FASTCALL\n     #define METH_FASTCALL 0x80\n  #endif\n  typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs);\n  typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args,\n                                                          Py_ssize_t nargs, PyObject *kwnames);\n#else\n  #define __Pyx_PyCFunctionFast _PyCFunctionFast\n  #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords\n#endif\n#if CYTHON_FAST_PYCCALL\n#define __Pyx_PyFastCFunction_Check(func)\\\n    ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)))))\n#else\n#define __Pyx_PyFastCFunction_Check(func) 0\n#endif\n#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)\n  #define PyObject_Malloc(s)   PyMem_Malloc(s)\n  #define PyObject_Free(p)     PyMem_Free(p)\n  #define PyObject_Realloc(p)  PyMem_Realloc(p)\n#endif\n#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030400A1\n  #define PyMem_RawMalloc(n)           PyMem_Malloc(n)\n  #define PyMem_RawRealloc(p, n)       PyMem_Realloc(p, n)\n  #define PyMem_RawFree(p)             PyMem_Free(p)\n#endif\n#if CYTHON_COMPILING_IN_PYSTON\n  #define __Pyx_PyCode_HasFreeVars(co)  PyCode_HasFreeVars(co)\n  #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno)\n#else\n  #define __Pyx_PyCode_HasFreeVars(co)  (PyCode_GetNumFree(co) > 0)\n  #define __Pyx_PyFrame_SetLineNumber(frame, lineno)  (frame)->f_lineno = (lineno)\n#endif\n#if !CYTHON_FAST_THREAD_STATE || PY_VERSION_HEX < 0x02070000\n  #define __Pyx_PyThreadState_Current PyThreadState_GET()\n#elif PY_VERSION_HEX >= 0x03060000\n  #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()\n#elif PY_VERSION_HEX >= 0x03000000\n  #define __Pyx_PyThreadState_Current PyThreadState_GET()\n#else\n  #define __Pyx_PyThreadState_Current _PyThreadState_Current\n#endif\n#if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT)\n#include \"pythread.h\"\n#define Py_tss_NEEDS_INIT 0\ntypedef int Py_tss_t;\nstatic CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) {\n  *key = PyThread_create_key();\n  return 0;\n}\nstatic CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) {\n  Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t));\n  *key = Py_tss_NEEDS_INIT;\n  return key;\n}\nstatic CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) {\n  PyObject_Free(key);\n}\nstatic CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) {\n  return *key != Py_tss_NEEDS_INIT;\n}\nstatic CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) {\n  PyThread_delete_key(*key);\n  *key = Py_tss_NEEDS_INIT;\n}\nstatic CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) {\n  return PyThread_set_key_value(*key, value);\n}\nstatic CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) {\n  return PyThread_get_key_value(*key);\n}\n#endif\n#if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized)\n#define __Pyx_PyDict_NewPresized(n)  ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))\n#else\n#define __Pyx_PyDict_NewPresized(n)  PyDict_New()\n#endif\n#if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION\n  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_TrueDivide(x,y)\n  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceTrueDivide(x,y)\n#else\n  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_Divide(x,y)\n  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceDivide(x,y)\n#endif\n#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && CYTHON_USE_UNICODE_INTERNALS\n#define __Pyx_PyDict_GetItemStr(dict, name)  _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash)\n#else\n#define __Pyx_PyDict_GetItemStr(dict, name)  PyDict_GetItem(dict, name)\n#endif\n#if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)\n  #define CYTHON_PEP393_ENABLED 1\n  #if defined(PyUnicode_IS_READY)\n  #define __Pyx_PyUnicode_READY(op)       (likely(PyUnicode_IS_READY(op)) ?\\\n                                              0 : _PyUnicode_Ready((PyObject *)(op)))\n  #else\n  #define __Pyx_PyUnicode_READY(op)       (0)\n  #endif\n  #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_LENGTH(u)\n  #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)\n  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u)   PyUnicode_MAX_CHAR_VALUE(u)\n  #define __Pyx_PyUnicode_KIND(u)         PyUnicode_KIND(u)\n  #define __Pyx_PyUnicode_DATA(u)         PyUnicode_DATA(u)\n  #define __Pyx_PyUnicode_READ(k, d, i)   PyUnicode_READ(k, d, i)\n  #define __Pyx_PyUnicode_WRITE(k, d, i, ch)  PyUnicode_WRITE(k, d, i, ch)\n  #if defined(PyUnicode_IS_READY) && defined(PyUnicode_GET_SIZE)\n  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000\n  #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length))\n  #else\n  #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))\n  #endif\n  #else\n  #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != PyUnicode_GET_LENGTH(u))\n  #endif\n#else\n  #define CYTHON_PEP393_ENABLED 0\n  #define PyUnicode_1BYTE_KIND  1\n  #define PyUnicode_2BYTE_KIND  2\n  #define PyUnicode_4BYTE_KIND  4\n  #define __Pyx_PyUnicode_READY(op)       (0)\n  #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_SIZE(u)\n  #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))\n  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u)   ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111)\n  #define __Pyx_PyUnicode_KIND(u)         (sizeof(Py_UNICODE))\n  #define __Pyx_PyUnicode_DATA(u)         ((void*)PyUnicode_AS_UNICODE(u))\n  #define __Pyx_PyUnicode_READ(k, d, i)   ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))\n  #define __Pyx_PyUnicode_WRITE(k, d, i, ch)  (((void)(k)), ((Py_UNICODE*)d)[i] = ch)\n  #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != PyUnicode_GET_SIZE(u))\n#endif\n#if CYTHON_COMPILING_IN_PYPY\n  #define __Pyx_PyUnicode_Concat(a, b)      PyNumber_Add(a, b)\n  #define __Pyx_PyUnicode_ConcatSafe(a, b)  PyNumber_Add(a, b)\n#else\n  #define __Pyx_PyUnicode_Concat(a, b)      PyUnicode_Concat(a, b)\n  #define __Pyx_PyUnicode_ConcatSafe(a, b)  ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\\\n      PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))\n#endif\n#if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains)\n  #define PyUnicode_Contains(u, s)  PySequence_Contains(u, s)\n#endif\n#if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check)\n  #define PyByteArray_Check(obj)  PyObject_TypeCheck(obj, &PyByteArray_Type)\n#endif\n#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format)\n  #define PyObject_Format(obj, fmt)  PyObject_CallMethod(obj, \"__format__\", \"O\", fmt)\n#endif\n#define __Pyx_PyString_FormatSafe(a, b)   ((unlikely((a) == Py_None || (PyString_Check(b) && !PyString_CheckExact(b)))) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))\n#define __Pyx_PyUnicode_FormatSafe(a, b)  ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))\n#if PY_MAJOR_VERSION >= 3\n  #define __Pyx_PyString_Format(a, b)  PyUnicode_Format(a, b)\n#else\n  #define __Pyx_PyString_Format(a, b)  PyString_Format(a, b)\n#endif\n#if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)\n  #define PyObject_ASCII(o)            PyObject_Repr(o)\n#endif\n#if PY_MAJOR_VERSION >= 3\n  #define PyBaseString_Type            PyUnicode_Type\n  #define PyStringObject               PyUnicodeObject\n  #define PyString_Type                PyUnicode_Type\n  #define PyString_Check               PyUnicode_Check\n  #define PyString_CheckExact          PyUnicode_CheckExact\n#ifndef PyObject_Unicode\n  #define PyObject_Unicode             PyObject_Str\n#endif\n#endif\n#if PY_MAJOR_VERSION >= 3\n  #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)\n  #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)\n#else\n  #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))\n  #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))\n#endif\n#ifndef PySet_CheckExact\n  #define PySet_CheckExact(obj)        (Py_TYPE(obj) == &PySet_Type)\n#endif\n#if PY_VERSION_HEX >= 0x030900A4\n  #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt)\n  #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size)\n#else\n  #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt)\n  #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size)\n#endif\n#if CYTHON_ASSUME_SAFE_MACROS\n  #define __Pyx_PySequence_SIZE(seq)  Py_SIZE(seq)\n#else\n  #define __Pyx_PySequence_SIZE(seq)  PySequence_Size(seq)\n#endif\n#if PY_MAJOR_VERSION >= 3\n  #define PyIntObject                  PyLongObject\n  #define PyInt_Type                   PyLong_Type\n  #define PyInt_Check(op)              PyLong_Check(op)\n  #define PyInt_CheckExact(op)         PyLong_CheckExact(op)\n  #define PyInt_FromString             PyLong_FromString\n  #define PyInt_FromUnicode            PyLong_FromUnicode\n  #define PyInt_FromLong               PyLong_FromLong\n  #define PyInt_FromSize_t             PyLong_FromSize_t\n  #define PyInt_FromSsize_t            PyLong_FromSsize_t\n  #define PyInt_AsLong                 PyLong_AsLong\n  #define PyInt_AS_LONG                PyLong_AS_LONG\n  #define PyInt_AsSsize_t              PyLong_AsSsize_t\n  #define PyInt_AsUnsignedLongMask     PyLong_AsUnsignedLongMask\n  #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask\n  #define PyNumber_Int                 PyNumber_Long\n#endif\n#if PY_MAJOR_VERSION >= 3\n  #define PyBoolObject                 PyLongObject\n#endif\n#if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY\n  #ifndef PyUnicode_InternFromString\n    #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)\n  #endif\n#endif\n#if PY_VERSION_HEX < 0x030200A4\n  typedef long Py_hash_t;\n  #define __Pyx_PyInt_FromHash_t PyInt_FromLong\n  #define __Pyx_PyInt_AsHash_t   __Pyx_PyIndex_AsHash_t\n#else\n  #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t\n  #define __Pyx_PyInt_AsHash_t   __Pyx_PyIndex_AsSsize_t\n#endif\n#if PY_MAJOR_VERSION >= 3\n  #define __Pyx_PyMethod_New(func, self, klass) ((self) ? ((void)(klass), PyMethod_New(func, self)) : __Pyx_NewRef(func))\n#else\n  #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)\n#endif\n#if CYTHON_USE_ASYNC_SLOTS\n  #if PY_VERSION_HEX >= 0x030500B1\n    #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods\n    #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)\n  #else\n    #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))\n  #endif\n#else\n  #define __Pyx_PyType_AsAsync(obj) NULL\n#endif\n#ifndef __Pyx_PyAsyncMethodsStruct\n    typedef struct {\n        unaryfunc am_await;\n        unaryfunc am_aiter;\n        unaryfunc am_anext;\n    } __Pyx_PyAsyncMethodsStruct;\n#endif\n\n#if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)\n  #if !defined(_USE_MATH_DEFINES)\n    #define _USE_MATH_DEFINES\n  #endif\n#endif\n#include <math.h>\n#ifdef NAN\n#define __PYX_NAN() ((float) NAN)\n#else\nstatic CYTHON_INLINE float __PYX_NAN() {\n  float value;\n  memset(&value, 0xFF, sizeof(value));\n  return value;\n}\n#endif\n#if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)\n#define __Pyx_truncl trunc\n#else\n#define __Pyx_truncl truncl\n#endif\n\n#define __PYX_MARK_ERR_POS(f_index, lineno) \\\n    { __pyx_filename = __pyx_f[f_index]; (void)__pyx_filename; __pyx_lineno = lineno; (void)__pyx_lineno; __pyx_clineno = __LINE__; (void)__pyx_clineno; }\n#define __PYX_ERR(f_index, lineno, Ln_error) \\\n    { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; }\n\n#ifndef __PYX_EXTERN_C\n  #ifdef __cplusplus\n    #define __PYX_EXTERN_C extern \"C\"\n  #else\n    #define __PYX_EXTERN_C extern\n  #endif\n#endif\n\n#define __PYX_HAVE___marching_cubes_lewiner_cy\n#define __PYX_HAVE_API___marching_cubes_lewiner_cy\n/* Early includes */\n#include <string.h>\n#include <stdio.h>\n#include \"numpy/arrayobject.h\"\n#include \"numpy/ndarrayobject.h\"\n#include \"numpy/ndarraytypes.h\"\n#include \"numpy/arrayscalars.h\"\n#include \"numpy/ufuncobject.h\"\n\n    /* NumPy API declarations from \"numpy/__init__.pxd\" */\n    \n#include <stdlib.h>\n#include \"pythread.h\"\n#include \"pystate.h\"\n#ifdef _OPENMP\n#include <omp.h>\n#endif /* _OPENMP */\n\n#if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)\n#define CYTHON_WITHOUT_ASSERTIONS\n#endif\n\ntypedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding;\n                const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;\n\n#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0\n#define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0\n#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8)\n#define __PYX_DEFAULT_STRING_ENCODING \"\"\n#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString\n#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize\n#define __Pyx_uchar_cast(c) ((unsigned char)c)\n#define __Pyx_long_cast(x) ((long)x)\n#define __Pyx_fits_Py_ssize_t(v, type, is_signed)  (\\\n    (sizeof(type) < sizeof(Py_ssize_t))  ||\\\n    (sizeof(type) > sizeof(Py_ssize_t) &&\\\n          likely(v < (type)PY_SSIZE_T_MAX ||\\\n                 v == (type)PY_SSIZE_T_MAX)  &&\\\n          (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\\\n                                v == (type)PY_SSIZE_T_MIN)))  ||\\\n    (sizeof(type) == sizeof(Py_ssize_t) &&\\\n          (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\\\n                               v == (type)PY_SSIZE_T_MAX)))  )\nstatic CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) {\n    return (size_t) i < (size_t) limit;\n}\n#if defined (__cplusplus) && __cplusplus >= 201103L\n    #include <cstdlib>\n    #define __Pyx_sst_abs(value) std::abs(value)\n#elif SIZEOF_INT >= SIZEOF_SIZE_T\n    #define __Pyx_sst_abs(value) abs(value)\n#elif SIZEOF_LONG >= SIZEOF_SIZE_T\n    #define __Pyx_sst_abs(value) labs(value)\n#elif defined (_MSC_VER)\n    #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))\n#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L\n    #define __Pyx_sst_abs(value) llabs(value)\n#elif defined (__GNUC__)\n    #define __Pyx_sst_abs(value) __builtin_llabs(value)\n#else\n    #define __Pyx_sst_abs(value) ((value<0) ? -value : value)\n#endif\nstatic CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*);\nstatic CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);\n#define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))\n#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)\n#define __Pyx_PyBytes_FromString        PyBytes_FromString\n#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize\nstatic CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);\n#if PY_MAJOR_VERSION < 3\n    #define __Pyx_PyStr_FromString        __Pyx_PyBytes_FromString\n    #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize\n#else\n    #define __Pyx_PyStr_FromString        __Pyx_PyUnicode_FromString\n    #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize\n#endif\n#define __Pyx_PyBytes_AsWritableString(s)     ((char*) PyBytes_AS_STRING(s))\n#define __Pyx_PyBytes_AsWritableSString(s)    ((signed char*) PyBytes_AS_STRING(s))\n#define __Pyx_PyBytes_AsWritableUString(s)    ((unsigned char*) PyBytes_AS_STRING(s))\n#define __Pyx_PyBytes_AsString(s)     ((const char*) PyBytes_AS_STRING(s))\n#define __Pyx_PyBytes_AsSString(s)    ((const signed char*) PyBytes_AS_STRING(s))\n#define __Pyx_PyBytes_AsUString(s)    ((const unsigned char*) PyBytes_AS_STRING(s))\n#define __Pyx_PyObject_AsWritableString(s)    ((char*) __Pyx_PyObject_AsString(s))\n#define __Pyx_PyObject_AsWritableSString(s)    ((signed char*) __Pyx_PyObject_AsString(s))\n#define __Pyx_PyObject_AsWritableUString(s)    ((unsigned char*) __Pyx_PyObject_AsString(s))\n#define __Pyx_PyObject_AsSString(s)    ((const signed char*) __Pyx_PyObject_AsString(s))\n#define __Pyx_PyObject_AsUString(s)    ((const unsigned char*) __Pyx_PyObject_AsString(s))\n#define __Pyx_PyObject_FromCString(s)  __Pyx_PyObject_FromString((const char*)s)\n#define __Pyx_PyBytes_FromCString(s)   __Pyx_PyBytes_FromString((const char*)s)\n#define __Pyx_PyByteArray_FromCString(s)   __Pyx_PyByteArray_FromString((const char*)s)\n#define __Pyx_PyStr_FromCString(s)     __Pyx_PyStr_FromString((const char*)s)\n#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)\nstatic CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) {\n    const Py_UNICODE *u_end = u;\n    while (*u_end++) ;\n    return (size_t)(u_end - u - 1);\n}\n#define __Pyx_PyUnicode_FromUnicode(u)       PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))\n#define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode\n#define __Pyx_PyUnicode_AsUnicode            PyUnicode_AsUnicode\n#define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)\n#define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)\nstatic CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b);\nstatic CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);\nstatic CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*);\nstatic CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);\n#define __Pyx_PySequence_Tuple(obj)\\\n    (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))\nstatic CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);\nstatic CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);\nstatic CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*);\n#if CYTHON_ASSUME_SAFE_MACROS\n#define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))\n#else\n#define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)\n#endif\n#define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))\n#if PY_MAJOR_VERSION >= 3\n#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))\n#else\n#define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))\n#endif\n#define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(x))\n#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII\nstatic int __Pyx_sys_getdefaultencoding_not_ascii;\nstatic int __Pyx_init_sys_getdefaultencoding_params(void) {\n    PyObject* sys;\n    PyObject* default_encoding = NULL;\n    PyObject* ascii_chars_u = NULL;\n    PyObject* ascii_chars_b = NULL;\n    const char* default_encoding_c;\n    sys = PyImport_ImportModule(\"sys\");\n    if (!sys) goto bad;\n    default_encoding = PyObject_CallMethod(sys, (char*) \"getdefaultencoding\", NULL);\n    Py_DECREF(sys);\n    if (!default_encoding) goto bad;\n    default_encoding_c = PyBytes_AsString(default_encoding);\n    if (!default_encoding_c) goto bad;\n    if (strcmp(default_encoding_c, \"ascii\") == 0) {\n        __Pyx_sys_getdefaultencoding_not_ascii = 0;\n    } else {\n        char ascii_chars[128];\n        int c;\n        for (c = 0; c < 128; c++) {\n            ascii_chars[c] = c;\n        }\n        __Pyx_sys_getdefaultencoding_not_ascii = 1;\n        ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);\n        if (!ascii_chars_u) goto bad;\n        ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);\n        if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {\n            PyErr_Format(\n                PyExc_ValueError,\n                \"This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.\",\n                default_encoding_c);\n            goto bad;\n        }\n        Py_DECREF(ascii_chars_u);\n        Py_DECREF(ascii_chars_b);\n    }\n    Py_DECREF(default_encoding);\n    return 0;\nbad:\n    Py_XDECREF(default_encoding);\n    Py_XDECREF(ascii_chars_u);\n    Py_XDECREF(ascii_chars_b);\n    return -1;\n}\n#endif\n#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3\n#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)\n#else\n#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)\n#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT\nstatic char* __PYX_DEFAULT_STRING_ENCODING;\nstatic int __Pyx_init_sys_getdefaultencoding_params(void) {\n    PyObject* sys;\n    PyObject* default_encoding = NULL;\n    char* default_encoding_c;\n    sys = PyImport_ImportModule(\"sys\");\n    if (!sys) goto bad;\n    default_encoding = PyObject_CallMethod(sys, (char*) (const char*) \"getdefaultencoding\", NULL);\n    Py_DECREF(sys);\n    if (!default_encoding) goto bad;\n    default_encoding_c = PyBytes_AsString(default_encoding);\n    if (!default_encoding_c) goto bad;\n    __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1);\n    if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;\n    strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);\n    Py_DECREF(default_encoding);\n    return 0;\nbad:\n    Py_XDECREF(default_encoding);\n    return -1;\n}\n#endif\n#endif\n\n\n/* Test for GCC > 2.95 */\n#if defined(__GNUC__)     && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))\n  #define likely(x)   __builtin_expect(!!(x), 1)\n  #define unlikely(x) __builtin_expect(!!(x), 0)\n#else /* !__GNUC__ or GCC < 2.95 */\n  #define likely(x)   (x)\n  #define unlikely(x) (x)\n#endif /* __GNUC__ */\nstatic CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }\n\nstatic PyObject *__pyx_m = NULL;\nstatic PyObject *__pyx_d;\nstatic PyObject *__pyx_b;\nstatic PyObject *__pyx_cython_runtime = NULL;\nstatic PyObject *__pyx_empty_tuple;\nstatic PyObject *__pyx_empty_bytes;\nstatic PyObject *__pyx_empty_unicode;\nstatic int __pyx_lineno;\nstatic int __pyx_clineno = 0;\nstatic const char * __pyx_cfilenm= __FILE__;\nstatic const char *__pyx_filename;\n\n/* Header.proto */\n#if !defined(CYTHON_CCOMPLEX)\n  #if defined(__cplusplus)\n    #define CYTHON_CCOMPLEX 1\n  #elif defined(_Complex_I)\n    #define CYTHON_CCOMPLEX 1\n  #else\n    #define CYTHON_CCOMPLEX 0\n  #endif\n#endif\n#if CYTHON_CCOMPLEX\n  #ifdef __cplusplus\n    #include <complex>\n  #else\n    #include <complex.h>\n  #endif\n#endif\n#if CYTHON_CCOMPLEX && !defined(__cplusplus) && defined(__sun__) && defined(__GNUC__)\n  #undef _Complex_I\n  #define _Complex_I 1.0fj\n#endif\n\n\nstatic const char *__pyx_f[] = {\n  \"_marching_cubes_lewiner_cy.pyx\",\n  \"stringsource\",\n  \"__init__.pxd\",\n  \"type.pxd\",\n};\n/* MemviewSliceStruct.proto */\nstruct __pyx_memoryview_obj;\ntypedef struct {\n  struct __pyx_memoryview_obj *memview;\n  char *data;\n  Py_ssize_t shape[8];\n  Py_ssize_t strides[8];\n  Py_ssize_t suboffsets[8];\n} __Pyx_memviewslice;\n#define __Pyx_MemoryView_Len(m)  (m.shape[0])\n\n/* Atomics.proto */\n#include <pythread.h>\n#ifndef CYTHON_ATOMICS\n    #define CYTHON_ATOMICS 1\n#endif\n#define __pyx_atomic_int_type int\n#if CYTHON_ATOMICS && __GNUC__ >= 4 && (__GNUC_MINOR__ > 1 ||\\\n                    (__GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL >= 2)) &&\\\n                    !defined(__i386__)\n    #define __pyx_atomic_incr_aligned(value, lock) __sync_fetch_and_add(value, 1)\n    #define __pyx_atomic_decr_aligned(value, lock) __sync_fetch_and_sub(value, 1)\n    #ifdef __PYX_DEBUG_ATOMICS\n        #warning \"Using GNU atomics\"\n    #endif\n#elif CYTHON_ATOMICS && defined(_MSC_VER) && 0\n    #include <Windows.h>\n    #undef __pyx_atomic_int_type\n    #define __pyx_atomic_int_type LONG\n    #define __pyx_atomic_incr_aligned(value, lock) InterlockedIncrement(value)\n    #define __pyx_atomic_decr_aligned(value, lock) InterlockedDecrement(value)\n    #ifdef __PYX_DEBUG_ATOMICS\n        #pragma message (\"Using MSVC atomics\")\n    #endif\n#elif CYTHON_ATOMICS && (defined(__ICC) || defined(__INTEL_COMPILER)) && 0\n    #define __pyx_atomic_incr_aligned(value, lock) _InterlockedIncrement(value)\n    #define __pyx_atomic_decr_aligned(value, lock) _InterlockedDecrement(value)\n    #ifdef __PYX_DEBUG_ATOMICS\n        #warning \"Using Intel atomics\"\n    #endif\n#else\n    #undef CYTHON_ATOMICS\n    #define CYTHON_ATOMICS 0\n    #ifdef __PYX_DEBUG_ATOMICS\n        #warning \"Not using atomics\"\n    #endif\n#endif\ntypedef volatile __pyx_atomic_int_type __pyx_atomic_int;\n#if CYTHON_ATOMICS\n    #define __pyx_add_acquisition_count(memview)\\\n             __pyx_atomic_incr_aligned(__pyx_get_slice_count_pointer(memview), memview->lock)\n    #define __pyx_sub_acquisition_count(memview)\\\n            __pyx_atomic_decr_aligned(__pyx_get_slice_count_pointer(memview), memview->lock)\n#else\n    #define __pyx_add_acquisition_count(memview)\\\n            __pyx_add_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock)\n    #define __pyx_sub_acquisition_count(memview)\\\n            __pyx_sub_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock)\n#endif\n\n/* BufferFormatStructs.proto */\n#define IS_UNSIGNED(type) (((type) -1) > 0)\nstruct __Pyx_StructField_;\n#define __PYX_BUF_FLAGS_PACKED_STRUCT (1 << 0)\ntypedef struct {\n  const char* name;\n  struct __Pyx_StructField_* fields;\n  size_t size;\n  size_t arraysize[8];\n  int ndim;\n  char typegroup;\n  char is_unsigned;\n  int flags;\n} __Pyx_TypeInfo;\ntypedef struct __Pyx_StructField_ {\n  __Pyx_TypeInfo* type;\n  const char* name;\n  size_t offset;\n} __Pyx_StructField;\ntypedef struct {\n  __Pyx_StructField* field;\n  size_t parent_offset;\n} __Pyx_BufFmt_StackElem;\ntypedef struct {\n  __Pyx_StructField root;\n  __Pyx_BufFmt_StackElem* head;\n  size_t fmt_offset;\n  size_t new_count, enc_count;\n  size_t struct_alignment;\n  int is_complex;\n  char enc_type;\n  char new_packmode;\n  char enc_packmode;\n  char is_valid_array;\n} __Pyx_BufFmt_Context;\n\n/* ForceInitThreads.proto */\n#ifndef __PYX_FORCE_INIT_THREADS\n  #define __PYX_FORCE_INIT_THREADS 0\n#endif\n\n/* NoFastGil.proto */\n#define __Pyx_PyGILState_Ensure PyGILState_Ensure\n#define __Pyx_PyGILState_Release PyGILState_Release\n#define __Pyx_FastGIL_Remember()\n#define __Pyx_FastGIL_Forget()\n#define __Pyx_FastGilFuncInit()\n\n\n/* \"../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd\":690\n * # in Cython to enable them only on the right systems.\n * \n * ctypedef npy_int8       int8_t             # <<<<<<<<<<<<<<\n * ctypedef npy_int16      int16_t\n * ctypedef npy_int32      int32_t\n */\ntypedef npy_int8 __pyx_t_5numpy_int8_t;\n\n/* \"../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd\":691\n * \n * ctypedef npy_int8       int8_t\n * ctypedef npy_int16      int16_t             # <<<<<<<<<<<<<<\n * ctypedef npy_int32      int32_t\n * ctypedef npy_int64      int64_t\n */\ntypedef npy_int16 __pyx_t_5numpy_int16_t;\n\n/* \"../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd\":692\n * ctypedef npy_int8       int8_t\n * ctypedef npy_int16      int16_t\n * ctypedef npy_int32      int32_t             # <<<<<<<<<<<<<<\n * ctypedef npy_int64      int64_t\n * #ctypedef npy_int96      int96_t\n */\ntypedef npy_int32 __pyx_t_5numpy_int32_t;\n\n/* \"../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd\":693\n * ctypedef npy_int16      int16_t\n * ctypedef npy_int32      int32_t\n * ctypedef npy_int64      int64_t             # <<<<<<<<<<<<<<\n * #ctypedef npy_int96      int96_t\n * #ctypedef npy_int128     int128_t\n */\ntypedef npy_int64 __pyx_t_5numpy_int64_t;\n\n/* \"../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd\":697\n * #ctypedef npy_int128     int128_t\n * \n * ctypedef npy_uint8      uint8_t             # <<<<<<<<<<<<<<\n * ctypedef npy_uint16     uint16_t\n * ctypedef npy_uint32     uint32_t\n */\ntypedef npy_uint8 __pyx_t_5numpy_uint8_t;\n\n/* \"../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd\":698\n * \n * ctypedef npy_uint8      uint8_t\n * ctypedef npy_uint16     uint16_t             # <<<<<<<<<<<<<<\n * ctypedef npy_uint32     uint32_t\n * ctypedef npy_uint64     uint64_t\n */\ntypedef npy_uint16 __pyx_t_5numpy_uint16_t;\n\n/* \"../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd\":699\n * ctypedef npy_uint8      uint8_t\n * ctypedef npy_uint16     uint16_t\n * ctypedef npy_uint32     uint32_t             # <<<<<<<<<<<<<<\n * ctypedef npy_uint64     uint64_t\n * #ctypedef npy_uint96     uint96_t\n */\ntypedef npy_uint32 __pyx_t_5numpy_uint32_t;\n\n/* \"../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd\":700\n * ctypedef npy_uint16     uint16_t\n * ctypedef npy_uint32     uint32_t\n * ctypedef npy_uint64     uint64_t             # <<<<<<<<<<<<<<\n * #ctypedef npy_uint96     uint96_t\n * #ctypedef npy_uint128    uint128_t\n */\ntypedef npy_uint64 __pyx_t_5numpy_uint64_t;\n\n/* \"../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd\":704\n * #ctypedef npy_uint128    uint128_t\n * \n * ctypedef npy_float32    float32_t             # <<<<<<<<<<<<<<\n * ctypedef npy_float64    float64_t\n * #ctypedef npy_float80    float80_t\n */\ntypedef npy_float32 __pyx_t_5numpy_float32_t;\n\n/* \"../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd\":705\n * \n * ctypedef npy_float32    float32_t\n * ctypedef npy_float64    float64_t             # <<<<<<<<<<<<<<\n * #ctypedef npy_float80    float80_t\n * #ctypedef npy_float128   float128_t\n */\ntypedef npy_float64 __pyx_t_5numpy_float64_t;\n\n/* \"../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd\":714\n * # The int types are mapped a bit surprising --\n * # numpy.int corresponds to 'l' and numpy.long to 'q'\n * ctypedef npy_long       int_t             # <<<<<<<<<<<<<<\n * ctypedef npy_longlong   long_t\n * ctypedef npy_longlong   longlong_t\n */\ntypedef npy_long __pyx_t_5numpy_int_t;\n\n/* \"../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd\":715\n * # numpy.int corresponds to 'l' and numpy.long to 'q'\n * ctypedef npy_long       int_t\n * ctypedef npy_longlong   long_t             # <<<<<<<<<<<<<<\n * ctypedef npy_longlong   longlong_t\n * \n */\ntypedef npy_longlong __pyx_t_5numpy_long_t;\n\n/* \"../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd\":716\n * ctypedef npy_long       int_t\n * ctypedef npy_longlong   long_t\n * ctypedef npy_longlong   longlong_t             # <<<<<<<<<<<<<<\n * \n * ctypedef npy_ulong      uint_t\n */\ntypedef npy_longlong __pyx_t_5numpy_longlong_t;\n\n/* \"../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd\":718\n * ctypedef npy_longlong   longlong_t\n * \n * ctypedef npy_ulong      uint_t             # <<<<<<<<<<<<<<\n * ctypedef npy_ulonglong  ulong_t\n * ctypedef npy_ulonglong  ulonglong_t\n */\ntypedef npy_ulong __pyx_t_5numpy_uint_t;\n\n/* \"../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd\":719\n * \n * ctypedef npy_ulong      uint_t\n * ctypedef npy_ulonglong  ulong_t             # <<<<<<<<<<<<<<\n * ctypedef npy_ulonglong  ulonglong_t\n * \n */\ntypedef npy_ulonglong __pyx_t_5numpy_ulong_t;\n\n/* \"../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd\":720\n * ctypedef npy_ulong      uint_t\n * ctypedef npy_ulonglong  ulong_t\n * ctypedef npy_ulonglong  ulonglong_t             # <<<<<<<<<<<<<<\n * \n * ctypedef npy_intp       intp_t\n */\ntypedef npy_ulonglong __pyx_t_5numpy_ulonglong_t;\n\n/* \"../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd\":722\n * ctypedef npy_ulonglong  ulonglong_t\n * \n * ctypedef npy_intp       intp_t             # <<<<<<<<<<<<<<\n * ctypedef npy_uintp      uintp_t\n * \n */\ntypedef npy_intp __pyx_t_5numpy_intp_t;\n\n/* \"../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd\":723\n * \n * ctypedef npy_intp       intp_t\n * ctypedef npy_uintp      uintp_t             # <<<<<<<<<<<<<<\n * \n * ctypedef npy_double     float_t\n */\ntypedef npy_uintp __pyx_t_5numpy_uintp_t;\n\n/* \"../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd\":725\n * ctypedef npy_uintp      uintp_t\n * \n * ctypedef npy_double     float_t             # <<<<<<<<<<<<<<\n * ctypedef npy_double     double_t\n * ctypedef npy_longdouble longdouble_t\n */\ntypedef npy_double __pyx_t_5numpy_float_t;\n\n/* \"../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd\":726\n * \n * ctypedef npy_double     float_t\n * ctypedef npy_double     double_t             # <<<<<<<<<<<<<<\n * ctypedef npy_longdouble longdouble_t\n * \n */\ntypedef npy_double __pyx_t_5numpy_double_t;\n\n/* \"../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd\":727\n * ctypedef npy_double     float_t\n * ctypedef npy_double     double_t\n * ctypedef npy_longdouble longdouble_t             # <<<<<<<<<<<<<<\n * \n * ctypedef npy_cfloat      cfloat_t\n */\ntypedef npy_longdouble __pyx_t_5numpy_longdouble_t;\n/* Declarations.proto */\n#if CYTHON_CCOMPLEX\n  #ifdef __cplusplus\n    typedef ::std::complex< float > __pyx_t_float_complex;\n  #else\n    typedef float _Complex __pyx_t_float_complex;\n  #endif\n#else\n    typedef struct { float real, imag; } __pyx_t_float_complex;\n#endif\nstatic CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float, float);\n\n/* Declarations.proto */\n#if CYTHON_CCOMPLEX\n  #ifdef __cplusplus\n    typedef ::std::complex< double > __pyx_t_double_complex;\n  #else\n    typedef double _Complex __pyx_t_double_complex;\n  #endif\n#else\n    typedef struct { double real, imag; } __pyx_t_double_complex;\n#endif\nstatic CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double, double);\n\n\n/*--- Type declarations ---*/\nstruct __pyx_obj_26_marching_cubes_lewiner_cy_Cell;\nstruct __pyx_obj_26_marching_cubes_lewiner_cy_Lut;\nstruct __pyx_obj_26_marching_cubes_lewiner_cy_LutProvider;\nstruct __pyx_array_obj;\nstruct __pyx_MemviewEnum_obj;\nstruct __pyx_memoryview_obj;\nstruct __pyx_memoryviewslice_obj;\n\n/* \"../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd\":729\n * ctypedef npy_longdouble longdouble_t\n * \n * ctypedef npy_cfloat      cfloat_t             # <<<<<<<<<<<<<<\n * ctypedef npy_cdouble     cdouble_t\n * ctypedef npy_clongdouble clongdouble_t\n */\ntypedef npy_cfloat __pyx_t_5numpy_cfloat_t;\n\n/* \"../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd\":730\n * \n * ctypedef npy_cfloat      cfloat_t\n * ctypedef npy_cdouble     cdouble_t             # <<<<<<<<<<<<<<\n * ctypedef npy_clongdouble clongdouble_t\n * \n */\ntypedef npy_cdouble __pyx_t_5numpy_cdouble_t;\n\n/* \"../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd\":731\n * ctypedef npy_cfloat      cfloat_t\n * ctypedef npy_cdouble     cdouble_t\n * ctypedef npy_clongdouble clongdouble_t             # <<<<<<<<<<<<<<\n * \n * ctypedef npy_cdouble     complex_t\n */\ntypedef npy_clongdouble __pyx_t_5numpy_clongdouble_t;\n\n/* \"../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd\":733\n * ctypedef npy_clongdouble clongdouble_t\n * \n * ctypedef npy_cdouble     complex_t             # <<<<<<<<<<<<<<\n * \n * cdef inline object PyArray_MultiIterNew1(a):\n */\ntypedef npy_cdouble __pyx_t_5numpy_complex_t;\n\n/* \"_marching_cubes_lewiner_cy.pyx\":83\n * \n * \n * cdef class Cell:             # <<<<<<<<<<<<<<\n *     \"\"\" Class to keep track of some stuff during the whole cube marching\n *     procedure.\n */\nstruct __pyx_obj_26_marching_cubes_lewiner_cy_Cell {\n  PyObject_HEAD\n  struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *__pyx_vtab;\n  struct __pyx_obj_26_marching_cubes_lewiner_cy_LutProvider *luts;\n  int x;\n  int y;\n  int z;\n  int step;\n  double v0;\n  double v1;\n  double v2;\n  double v3;\n  double v4;\n  double v5;\n  double v6;\n  double v7;\n  double *vv;\n  double *vg;\n  double vmax;\n  double v12_x;\n  double v12_y;\n  double v12_z;\n  double v12_xg;\n  double v12_yg;\n  double v12_zg;\n  int v12_calculated;\n  int index;\n  int nx;\n  int ny;\n  int nz;\n  int *faceLayer;\n  int *faceLayer1;\n  int *faceLayer2;\n  float *_vertices;\n  float *_normals;\n  float *_values;\n  int _vertexCount;\n  int _vertexMaxCount;\n  int *_faces;\n  int _faceCount;\n  int _faceMaxCount;\n};\n\n\n/* \"_marching_cubes_lewiner_cy.pyx\":747\n * \n * \n * cdef class Lut:             # <<<<<<<<<<<<<<\n *     \"\"\" Representation of a lookup table.\n *     The tables are initially defined as numpy arrays. On initialization,\n */\nstruct __pyx_obj_26_marching_cubes_lewiner_cy_Lut {\n  PyObject_HEAD\n  struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Lut *__pyx_vtab;\n  signed char *VALUES;\n  int L0;\n  int L1;\n  int L2;\n};\n\n\n/* \"_marching_cubes_lewiner_cy.pyx\":799\n * \n * \n * cdef class LutProvider:             # <<<<<<<<<<<<<<\n *     \"\"\" Class that provides a common interface to the many lookup tables\n *     used by the algorithm.\n */\nstruct __pyx_obj_26_marching_cubes_lewiner_cy_LutProvider {\n  PyObject_HEAD\n  struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *EDGESRELX;\n  struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *EDGESRELY;\n  struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *EDGESRELZ;\n  struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *CASESCLASSIC;\n  struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *CASES;\n  struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *TILING1;\n  struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *TILING2;\n  struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *TILING3_1;\n  struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *TILING3_2;\n  struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *TILING4_1;\n  struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *TILING4_2;\n  struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *TILING5;\n  struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *TILING6_1_1;\n  struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *TILING6_1_2;\n  struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *TILING6_2;\n  struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *TILING7_1;\n  struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *TILING7_2;\n  struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *TILING7_3;\n  struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *TILING7_4_1;\n  struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *TILING7_4_2;\n  struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *TILING8;\n  struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *TILING9;\n  struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *TILING10_1_1;\n  struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *TILING10_1_1_;\n  struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *TILING10_1_2;\n  struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *TILING10_2;\n  struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *TILING10_2_;\n  struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *TILING11;\n  struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *TILING12_1_1;\n  struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *TILING12_1_1_;\n  struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *TILING12_1_2;\n  struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *TILING12_2;\n  struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *TILING12_2_;\n  struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *TILING13_1;\n  struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *TILING13_1_;\n  struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *TILING13_2;\n  struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *TILING13_2_;\n  struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *TILING13_3;\n  struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *TILING13_3_;\n  struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *TILING13_4;\n  struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *TILING13_5_1;\n  struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *TILING13_5_2;\n  struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *TILING14;\n  struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *TEST3;\n  struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *TEST4;\n  struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *TEST6;\n  struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *TEST7;\n  struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *TEST10;\n  struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *TEST12;\n  struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *TEST13;\n  struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *SUBCONFIG13;\n};\n\n\n/* \"View.MemoryView\":105\n * \n * @cname(\"__pyx_array\")\n * cdef class array:             # <<<<<<<<<<<<<<\n * \n *     cdef:\n */\nstruct __pyx_array_obj {\n  PyObject_HEAD\n  struct __pyx_vtabstruct_array *__pyx_vtab;\n  char *data;\n  Py_ssize_t len;\n  char *format;\n  int ndim;\n  Py_ssize_t *_shape;\n  Py_ssize_t *_strides;\n  Py_ssize_t itemsize;\n  PyObject *mode;\n  PyObject *_format;\n  void (*callback_free_data)(void *);\n  int free_data;\n  int dtype_is_object;\n};\n\n\n/* \"View.MemoryView\":279\n * \n * @cname('__pyx_MemviewEnum')\n * cdef class Enum(object):             # <<<<<<<<<<<<<<\n *     cdef object name\n *     def __init__(self, name):\n */\nstruct __pyx_MemviewEnum_obj {\n  PyObject_HEAD\n  PyObject *name;\n};\n\n\n/* \"View.MemoryView\":330\n * \n * @cname('__pyx_memoryview')\n * cdef class memoryview(object):             # <<<<<<<<<<<<<<\n * \n *     cdef object obj\n */\nstruct __pyx_memoryview_obj {\n  PyObject_HEAD\n  struct __pyx_vtabstruct_memoryview *__pyx_vtab;\n  PyObject *obj;\n  PyObject *_size;\n  PyObject *_array_interface;\n  PyThread_type_lock lock;\n  __pyx_atomic_int acquisition_count[2];\n  __pyx_atomic_int *acquisition_count_aligned_p;\n  Py_buffer view;\n  int flags;\n  int dtype_is_object;\n  __Pyx_TypeInfo *typeinfo;\n};\n\n\n/* \"View.MemoryView\":965\n * \n * @cname('__pyx_memoryviewslice')\n * cdef class _memoryviewslice(memoryview):             # <<<<<<<<<<<<<<\n *     \"Internal class for passing memoryview slices to Python\"\n * \n */\nstruct __pyx_memoryviewslice_obj {\n  struct __pyx_memoryview_obj __pyx_base;\n  __Pyx_memviewslice from_slice;\n  PyObject *from_object;\n  PyObject *(*to_object_func)(char *);\n  int (*to_dtype_func)(char *, PyObject *);\n};\n\n\n\n/* \"_marching_cubes_lewiner_cy.pyx\":83\n * \n * \n * cdef class Cell:             # <<<<<<<<<<<<<<\n *     \"\"\" Class to keep track of some stuff during the whole cube marching\n *     procedure.\n */\n\nstruct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell {\n  void (*_increase_size_vertices)(struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *);\n  void (*_increase_size_faces)(struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *);\n  int (*add_vertex)(struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *, float, float, float);\n  void (*add_gradient)(struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *, int, float, float, float);\n  void (*add_gradient_from_index)(struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *, int, int, float);\n  PyObject *(*add_face)(struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *, int);\n  void (*new_z_value)(struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *);\n  void (*set_cube)(struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *, double, int, int, int, int, double, double, double, double, double, double, double, double);\n  void (*add_triangles)(struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *, struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *, int, int);\n  void (*add_triangles2)(struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *, struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *, int, int, int);\n  void (*_add_face_from_edge_index)(struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *, int);\n  int (*get_index_in_facelayer)(struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *, int);\n  void (*prepare_for_adding_triangles)(struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *);\n  void (*calculate_center_vertex)(struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *);\n};\nstatic struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *__pyx_vtabptr_26_marching_cubes_lewiner_cy_Cell;\n\n\n/* \"_marching_cubes_lewiner_cy.pyx\":747\n * \n * \n * cdef class Lut:             # <<<<<<<<<<<<<<\n *     \"\"\" Representation of a lookup table.\n *     The tables are initially defined as numpy arrays. On initialization,\n */\n\nstruct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Lut {\n  int (*get1)(struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *, int);\n  int (*get2)(struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *, int, int);\n  int (*get3)(struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *, int, int, int);\n};\nstatic struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Lut *__pyx_vtabptr_26_marching_cubes_lewiner_cy_Lut;\n\n\n/* \"View.MemoryView\":105\n * \n * @cname(\"__pyx_array\")\n * cdef class array:             # <<<<<<<<<<<<<<\n * \n *     cdef:\n */\n\nstruct __pyx_vtabstruct_array {\n  PyObject *(*get_memview)(struct __pyx_array_obj *);\n};\nstatic struct __pyx_vtabstruct_array *__pyx_vtabptr_array;\n\n\n/* \"View.MemoryView\":330\n * \n * @cname('__pyx_memoryview')\n * cdef class memoryview(object):             # <<<<<<<<<<<<<<\n * \n *     cdef object obj\n */\n\nstruct __pyx_vtabstruct_memoryview {\n  char *(*get_item_pointer)(struct __pyx_memoryview_obj *, PyObject *);\n  PyObject *(*is_slice)(struct __pyx_memoryview_obj *, PyObject *);\n  PyObject *(*setitem_slice_assignment)(struct __pyx_memoryview_obj *, PyObject *, PyObject *);\n  PyObject *(*setitem_slice_assign_scalar)(struct __pyx_memoryview_obj *, struct __pyx_memoryview_obj *, PyObject *);\n  PyObject *(*setitem_indexed)(struct __pyx_memoryview_obj *, PyObject *, PyObject *);\n  PyObject *(*convert_item_to_object)(struct __pyx_memoryview_obj *, char *);\n  PyObject *(*assign_item_from_object)(struct __pyx_memoryview_obj *, char *, PyObject *);\n};\nstatic struct __pyx_vtabstruct_memoryview *__pyx_vtabptr_memoryview;\n\n\n/* \"View.MemoryView\":965\n * \n * @cname('__pyx_memoryviewslice')\n * cdef class _memoryviewslice(memoryview):             # <<<<<<<<<<<<<<\n *     \"Internal class for passing memoryview slices to Python\"\n * \n */\n\nstruct __pyx_vtabstruct__memoryviewslice {\n  struct __pyx_vtabstruct_memoryview __pyx_base;\n};\nstatic struct __pyx_vtabstruct__memoryviewslice *__pyx_vtabptr__memoryviewslice;\n\n/* --- Runtime support code (head) --- */\n/* Refnanny.proto */\n#ifndef CYTHON_REFNANNY\n  #define CYTHON_REFNANNY 0\n#endif\n#if CYTHON_REFNANNY\n  typedef struct {\n    void (*INCREF)(void*, PyObject*, int);\n    void (*DECREF)(void*, PyObject*, int);\n    void (*GOTREF)(void*, PyObject*, int);\n    void (*GIVEREF)(void*, PyObject*, int);\n    void* (*SetupContext)(const char*, int, const char*);\n    void (*FinishContext)(void**);\n  } __Pyx_RefNannyAPIStruct;\n  static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;\n  static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);\n  #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;\n#ifdef WITH_THREAD\n  #define __Pyx_RefNannySetupContext(name, acquire_gil)\\\n          if (acquire_gil) {\\\n              PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\\\n              __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\\\n              PyGILState_Release(__pyx_gilstate_save);\\\n          } else {\\\n              __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\\\n          }\n#else\n  #define __Pyx_RefNannySetupContext(name, acquire_gil)\\\n          __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)\n#endif\n  #define __Pyx_RefNannyFinishContext()\\\n          __Pyx_RefNanny->FinishContext(&__pyx_refnanny)\n  #define __Pyx_INCREF(r)  __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)\n  #define __Pyx_DECREF(r)  __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)\n  #define __Pyx_GOTREF(r)  __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)\n  #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)\n  #define __Pyx_XINCREF(r)  do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)\n  #define __Pyx_XDECREF(r)  do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)\n  #define __Pyx_XGOTREF(r)  do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)\n  #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)\n#else\n  #define __Pyx_RefNannyDeclarations\n  #define __Pyx_RefNannySetupContext(name, acquire_gil)\n  #define __Pyx_RefNannyFinishContext()\n  #define __Pyx_INCREF(r) Py_INCREF(r)\n  #define __Pyx_DECREF(r) Py_DECREF(r)\n  #define __Pyx_GOTREF(r)\n  #define __Pyx_GIVEREF(r)\n  #define __Pyx_XINCREF(r) Py_XINCREF(r)\n  #define __Pyx_XDECREF(r) Py_XDECREF(r)\n  #define __Pyx_XGOTREF(r)\n  #define __Pyx_XGIVEREF(r)\n#endif\n#define __Pyx_XDECREF_SET(r, v) do {\\\n        PyObject *tmp = (PyObject *) r;\\\n        r = v; __Pyx_XDECREF(tmp);\\\n    } while (0)\n#define __Pyx_DECREF_SET(r, v) do {\\\n        PyObject *tmp = (PyObject *) r;\\\n        r = v; __Pyx_DECREF(tmp);\\\n    } while (0)\n#define __Pyx_CLEAR(r)    do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)\n#define __Pyx_XCLEAR(r)   do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)\n\n/* PyObjectGetAttrStr.proto */\n#if CYTHON_USE_TYPE_SLOTS\nstatic CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name);\n#else\n#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)\n#endif\n\n/* GetBuiltinName.proto */\nstatic PyObject *__Pyx_GetBuiltinName(PyObject *name);\n\n/* RaiseArgTupleInvalid.proto */\nstatic void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,\n    Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);\n\n/* RaiseDoubleKeywords.proto */\nstatic void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);\n\n/* ParseKeywords.proto */\nstatic int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\\\n    PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\\\n    const char* function_name);\n\n/* PyDictVersioning.proto */\n#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS\n#define __PYX_DICT_VERSION_INIT  ((PY_UINT64_T) -1)\n#define __PYX_GET_DICT_VERSION(dict)  (((PyDictObject*)(dict))->ma_version_tag)\n#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\\\n    (version_var) = __PYX_GET_DICT_VERSION(dict);\\\n    (cache_var) = (value);\n#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\\\n    static PY_UINT64_T __pyx_dict_version = 0;\\\n    static PyObject *__pyx_dict_cached_value = NULL;\\\n    if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\\\n        (VAR) = __pyx_dict_cached_value;\\\n    } else {\\\n        (VAR) = __pyx_dict_cached_value = (LOOKUP);\\\n        __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\\\n    }\\\n}\nstatic CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj);\nstatic CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj);\nstatic CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version);\n#else\n#define __PYX_GET_DICT_VERSION(dict)  (0)\n#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\n#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP)  (VAR) = (LOOKUP);\n#endif\n\n/* GetModuleGlobalName.proto */\n#if CYTHON_USE_DICT_VERSIONS\n#define __Pyx_GetModuleGlobalName(var, name)  {\\\n    static PY_UINT64_T __pyx_dict_version = 0;\\\n    static PyObject *__pyx_dict_cached_value = NULL;\\\n    (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\\\n        (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\\\n        __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\\\n}\n#define __Pyx_GetModuleGlobalNameUncached(var, name)  {\\\n    PY_UINT64_T __pyx_dict_version;\\\n    PyObject *__pyx_dict_cached_value;\\\n    (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\\\n}\nstatic PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value);\n#else\n#define __Pyx_GetModuleGlobalName(var, name)  (var) = __Pyx__GetModuleGlobalName(name)\n#define __Pyx_GetModuleGlobalNameUncached(var, name)  (var) = __Pyx__GetModuleGlobalName(name)\nstatic CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name);\n#endif\n\n/* PyObjectCall.proto */\n#if CYTHON_COMPILING_IN_CPYTHON\nstatic CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);\n#else\n#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)\n#endif\n\n/* PyFunctionFastCall.proto */\n#if CYTHON_FAST_PYCALL\n#define __Pyx_PyFunction_FastCall(func, args, nargs)\\\n    __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)\n#if 1 || PY_VERSION_HEX < 0x030600B1\nstatic PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs);\n#else\n#define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs)\n#endif\n#define __Pyx_BUILD_ASSERT_EXPR(cond)\\\n    (sizeof(char [1 - 2*!(cond)]) - 1)\n#ifndef Py_MEMBER_SIZE\n#define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member)\n#endif\n#if CYTHON_FAST_PYCALL\n  static size_t __pyx_pyframe_localsplus_offset = 0;\n  #include \"frameobject.h\"\n#if PY_VERSION_HEX >= 0x030b00a6\n  #ifndef Py_BUILD_CORE\n    #define Py_BUILD_CORE 1\n  #endif\n  #include \"internal/pycore_frame.h\"\n#endif\n  #define __Pxy_PyFrame_Initialize_Offsets()\\\n    ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\\\n     (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus)))\n  #define __Pyx_PyFrame_GetLocalsplus(frame)\\\n    (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset))\n#endif // CYTHON_FAST_PYCALL\n#endif\n\n/* PyObjectCallMethO.proto */\n#if CYTHON_COMPILING_IN_CPYTHON\nstatic CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);\n#endif\n\n/* PyObjectCallNoArg.proto */\n#if CYTHON_COMPILING_IN_CPYTHON\nstatic CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);\n#else\n#define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL)\n#endif\n\n/* PyCFunctionFastCall.proto */\n#if CYTHON_FAST_PYCCALL\nstatic CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs);\n#else\n#define __Pyx_PyCFunction_FastCall(func, args, nargs)  (assert(0), NULL)\n#endif\n\n/* PyObjectCallOneArg.proto */\nstatic CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);\n\n/* MemviewSliceInit.proto */\n#define __Pyx_BUF_MAX_NDIMS %(BUF_MAX_NDIMS)d\n#define __Pyx_MEMVIEW_DIRECT   1\n#define __Pyx_MEMVIEW_PTR      2\n#define __Pyx_MEMVIEW_FULL     4\n#define __Pyx_MEMVIEW_CONTIG   8\n#define __Pyx_MEMVIEW_STRIDED  16\n#define __Pyx_MEMVIEW_FOLLOW   32\n#define __Pyx_IS_C_CONTIG 1\n#define __Pyx_IS_F_CONTIG 2\nstatic int __Pyx_init_memviewslice(\n                struct __pyx_memoryview_obj *memview,\n                int ndim,\n                __Pyx_memviewslice *memviewslice,\n                int memview_is_new_reference);\nstatic CYTHON_INLINE int __pyx_add_acquisition_count_locked(\n    __pyx_atomic_int *acquisition_count, PyThread_type_lock lock);\nstatic CYTHON_INLINE int __pyx_sub_acquisition_count_locked(\n    __pyx_atomic_int *acquisition_count, PyThread_type_lock lock);\n#define __pyx_get_slice_count_pointer(memview) (memview->acquisition_count_aligned_p)\n#define __pyx_get_slice_count(memview) (*__pyx_get_slice_count_pointer(memview))\n#define __PYX_INC_MEMVIEW(slice, have_gil) __Pyx_INC_MEMVIEW(slice, have_gil, __LINE__)\n#define __PYX_XDEC_MEMVIEW(slice, have_gil) __Pyx_XDEC_MEMVIEW(slice, have_gil, __LINE__)\nstatic CYTHON_INLINE void __Pyx_INC_MEMVIEW(__Pyx_memviewslice *, int, int);\nstatic CYTHON_INLINE void __Pyx_XDEC_MEMVIEW(__Pyx_memviewslice *, int, int);\n\n/* PyIntBinop.proto */\n#if !CYTHON_COMPILING_IN_PYPY\nstatic PyObject* __Pyx_PyInt_SubtractObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check);\n#else\n#define __Pyx_PyInt_SubtractObjC(op1, op2, intval, inplace, zerodivision_check)\\\n    (inplace ? PyNumber_InPlaceSubtract(op1, op2) : PyNumber_Subtract(op1, op2))\n#endif\n\n/* PyObjectCall2Args.proto */\nstatic CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2);\n\n/* GetItemInt.proto */\n#define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\\\n    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\\\n    __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\\\n    (is_list ? (PyErr_SetString(PyExc_IndexError, \"list index out of range\"), (PyObject*)NULL) :\\\n               __Pyx_GetItemInt_Generic(o, to_py_func(i))))\n#define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\\\n    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\\\n    __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\\\n    (PyErr_SetString(PyExc_IndexError, \"list index out of range\"), (PyObject*)NULL))\nstatic CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,\n                                                              int wraparound, int boundscheck);\n#define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\\\n    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\\\n    __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\\\n    (PyErr_SetString(PyExc_IndexError, \"tuple index out of range\"), (PyObject*)NULL))\nstatic CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,\n                                                              int wraparound, int boundscheck);\nstatic PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j);\nstatic CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,\n                                                     int is_list, int wraparound, int boundscheck);\n\n/* ObjectGetItem.proto */\n#if CYTHON_USE_TYPE_SLOTS\nstatic CYTHON_INLINE PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key);\n#else\n#define __Pyx_PyObject_GetItem(obj, key)  PyObject_GetItem(obj, key)\n#endif\n\n/* ListCompAppend.proto */\n#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS\nstatic CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) {\n    PyListObject* L = (PyListObject*) list;\n    Py_ssize_t len = Py_SIZE(list);\n    if (likely(L->allocated > len)) {\n        Py_INCREF(x);\n        PyList_SET_ITEM(list, len, x);\n        __Pyx_SET_SIZE(list, len + 1);\n        return 0;\n    }\n    return PyList_Append(list, x);\n}\n#else\n#define __Pyx_ListComp_Append(L,x) PyList_Append(L,x)\n#endif\n\n/* ArgTypeTest.proto */\n#define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\\\n    ((likely((Py_TYPE(obj) == type) | (none_allowed && (obj == Py_None)))) ? 1 :\\\n        __Pyx__ArgTypeTest(obj, type, name, exact))\nstatic int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact);\n\n/* KeywordStringCheck.proto */\nstatic int __Pyx_CheckKeywordStrings(PyObject *kwdict, const char* function_name, int kw_allowed);\n\n/* PyThreadStateGet.proto */\n#if CYTHON_FAST_THREAD_STATE\n#define __Pyx_PyThreadState_declare  PyThreadState *__pyx_tstate;\n#define __Pyx_PyThreadState_assign  __pyx_tstate = __Pyx_PyThreadState_Current;\n#define __Pyx_PyErr_Occurred()  __pyx_tstate->curexc_type\n#else\n#define __Pyx_PyThreadState_declare\n#define __Pyx_PyThreadState_assign\n#define __Pyx_PyErr_Occurred()  PyErr_Occurred()\n#endif\n\n/* PyErrFetchRestore.proto */\n#if CYTHON_FAST_THREAD_STATE\n#define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL)\n#define __Pyx_ErrRestoreWithState(type, value, tb)  __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)\n#define __Pyx_ErrFetchWithState(type, value, tb)    __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)\n#define __Pyx_ErrRestore(type, value, tb)  __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)\n#define __Pyx_ErrFetch(type, value, tb)    __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)\nstatic CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);\nstatic CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);\n#if CYTHON_COMPILING_IN_CPYTHON\n#define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL))\n#else\n#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)\n#endif\n#else\n#define __Pyx_PyErr_Clear() PyErr_Clear()\n#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)\n#define __Pyx_ErrRestoreWithState(type, value, tb)  PyErr_Restore(type, value, tb)\n#define __Pyx_ErrFetchWithState(type, value, tb)  PyErr_Fetch(type, value, tb)\n#define __Pyx_ErrRestoreInState(tstate, type, value, tb)  PyErr_Restore(type, value, tb)\n#define __Pyx_ErrFetchInState(tstate, type, value, tb)  PyErr_Fetch(type, value, tb)\n#define __Pyx_ErrRestore(type, value, tb)  PyErr_Restore(type, value, tb)\n#define __Pyx_ErrFetch(type, value, tb)  PyErr_Fetch(type, value, tb)\n#endif\n\n/* WriteUnraisableException.proto */\nstatic void __Pyx_WriteUnraisable(const char *name, int clineno,\n                                  int lineno, const char *filename,\n                                  int full_traceback, int nogil);\n\n/* RaiseException.proto */\nstatic void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);\n\n/* PyErrExceptionMatches.proto */\n#if CYTHON_FAST_THREAD_STATE\n#define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)\nstatic CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);\n#else\n#define __Pyx_PyErr_ExceptionMatches(err)  PyErr_ExceptionMatches(err)\n#endif\n\n/* GetAttr.proto */\nstatic CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *);\n\n/* GetAttr3.proto */\nstatic CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *);\n\n/* IsLittleEndian.proto */\nstatic CYTHON_INLINE int __Pyx_Is_Little_Endian(void);\n\n/* BufferFormatCheck.proto */\nstatic const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const char* ts);\nstatic void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx,\n                              __Pyx_BufFmt_StackElem* stack,\n                              __Pyx_TypeInfo* type);\n\n/* BufferGetAndValidate.proto */\n#define __Pyx_GetBufferAndValidate(buf, obj, dtype, flags, nd, cast, stack)\\\n    ((obj == Py_None || obj == NULL) ?\\\n    (__Pyx_ZeroBuffer(buf), 0) :\\\n    __Pyx__GetBufferAndValidate(buf, obj, dtype, flags, nd, cast, stack))\nstatic int  __Pyx__GetBufferAndValidate(Py_buffer* buf, PyObject* obj,\n    __Pyx_TypeInfo* dtype, int flags, int nd, int cast, __Pyx_BufFmt_StackElem* stack);\nstatic void __Pyx_ZeroBuffer(Py_buffer* buf);\nstatic CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info);\nstatic Py_ssize_t __Pyx_minusones[] = { -1, -1, -1, -1, -1, -1, -1, -1 };\nstatic Py_ssize_t __Pyx_zeros[] = { 0, 0, 0, 0, 0, 0, 0, 0 };\n\n#define __Pyx_BufPtrStrided3d(type, buf, i0, s0, i1, s1, i2, s2) (type)((char*)buf + i0 * s0 + i1 * s1 + i2 * s2)\n/* ExtTypeTest.proto */\nstatic CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type);\n\n/* None.proto */\nstatic CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname);\n\n/* PySequenceContains.proto */\nstatic CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq, int eq) {\n    int result = PySequence_Contains(seq, item);\n    return unlikely(result < 0) ? result : (result == (eq == Py_EQ));\n}\n\n/* Import.proto */\nstatic PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);\n\n/* ImportFrom.proto */\nstatic PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name);\n\n/* HasAttr.proto */\nstatic CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *);\n\n/* GetTopmostException.proto */\n#if CYTHON_USE_EXC_INFO_STACK\nstatic _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate);\n#endif\n\n/* SaveResetException.proto */\n#if CYTHON_FAST_THREAD_STATE\n#define __Pyx_ExceptionSave(type, value, tb)  __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)\nstatic CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);\n#define __Pyx_ExceptionReset(type, value, tb)  __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)\nstatic CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);\n#else\n#define __Pyx_ExceptionSave(type, value, tb)   PyErr_GetExcInfo(type, value, tb)\n#define __Pyx_ExceptionReset(type, value, tb)  PyErr_SetExcInfo(type, value, tb)\n#endif\n\n/* GetException.proto */\n#if CYTHON_FAST_THREAD_STATE\n#define __Pyx_GetException(type, value, tb)  __Pyx__GetException(__pyx_tstate, type, value, tb)\nstatic int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);\n#else\nstatic int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);\n#endif\n\n/* IncludeStringH.proto */\n#include <string.h>\n\n/* BytesEquals.proto */\nstatic CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals);\n\n/* UnicodeEquals.proto */\nstatic CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals);\n\n/* StrEquals.proto */\n#if PY_MAJOR_VERSION >= 3\n#define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals\n#else\n#define __Pyx_PyString_Equals __Pyx_PyBytes_Equals\n#endif\n\n/* UnaryNegOverflows.proto */\n#define UNARY_NEG_WOULD_OVERFLOW(x)\\\n        (((x) < 0) & ((unsigned long)(x) == 0-(unsigned long)(x)))\n\nstatic CYTHON_UNUSED int __pyx_array_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/\nstatic PyObject *__pyx_array_get_memview(struct __pyx_array_obj *); /*proto*/\n/* decode_c_string_utf16.proto */\nstatic CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16(const char *s, Py_ssize_t size, const char *errors) {\n    int byteorder = 0;\n    return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);\n}\nstatic CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16LE(const char *s, Py_ssize_t size, const char *errors) {\n    int byteorder = -1;\n    return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);\n}\nstatic CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16BE(const char *s, Py_ssize_t size, const char *errors) {\n    int byteorder = 1;\n    return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);\n}\n\n/* decode_c_string.proto */\nstatic CYTHON_INLINE PyObject* __Pyx_decode_c_string(\n         const char* cstring, Py_ssize_t start, Py_ssize_t stop,\n         const char* encoding, const char* errors,\n         PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors));\n\n/* RaiseTooManyValuesToUnpack.proto */\nstatic CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);\n\n/* RaiseNeedMoreValuesToUnpack.proto */\nstatic CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);\n\n/* RaiseNoneIterError.proto */\nstatic CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void);\n\n/* SwapException.proto */\n#if CYTHON_FAST_THREAD_STATE\n#define __Pyx_ExceptionSwap(type, value, tb)  __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb)\nstatic CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);\n#else\nstatic CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb);\n#endif\n\n/* FastTypeChecks.proto */\n#if CYTHON_COMPILING_IN_CPYTHON\n#define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)\nstatic CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);\nstatic CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);\nstatic CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);\n#else\n#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)\n#define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)\n#define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2))\n#endif\n#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)\n\nstatic CYTHON_UNUSED int __pyx_memoryview_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/\n/* PyIntBinop.proto */\n#if !CYTHON_COMPILING_IN_PYPY\nstatic PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check);\n#else\n#define __Pyx_PyInt_AddObjC(op1, op2, intval, inplace, zerodivision_check)\\\n    (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2))\n#endif\n\n/* ListExtend.proto */\nstatic CYTHON_INLINE int __Pyx_PyList_Extend(PyObject* L, PyObject* v) {\n#if CYTHON_COMPILING_IN_CPYTHON\n    PyObject* none = _PyList_Extend((PyListObject*)L, v);\n    if (unlikely(!none))\n        return -1;\n    Py_DECREF(none);\n    return 0;\n#else\n    return PyList_SetSlice(L, PY_SSIZE_T_MAX, PY_SSIZE_T_MAX, v);\n#endif\n}\n\n/* ListAppend.proto */\n#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS\nstatic CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) {\n    PyListObject* L = (PyListObject*) list;\n    Py_ssize_t len = Py_SIZE(list);\n    if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) {\n        Py_INCREF(x);\n        PyList_SET_ITEM(list, len, x);\n        __Pyx_SET_SIZE(list, len + 1);\n        return 0;\n    }\n    return PyList_Append(list, x);\n}\n#else\n#define __Pyx_PyList_Append(L,x) PyList_Append(L,x)\n#endif\n\n/* PyObject_GenericGetAttrNoDict.proto */\n#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000\nstatic CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name);\n#else\n#define __Pyx_PyObject_GenericGetAttrNoDict PyObject_GenericGetAttr\n#endif\n\n/* PyObject_GenericGetAttr.proto */\n#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000\nstatic PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name);\n#else\n#define __Pyx_PyObject_GenericGetAttr PyObject_GenericGetAttr\n#endif\n\n/* SetVTable.proto */\nstatic int __Pyx_SetVtable(PyObject *dict, void *vtable);\n\n/* PyObjectGetAttrStrNoError.proto */\nstatic CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name);\n\n/* SetupReduce.proto */\nstatic int __Pyx_setup_reduce(PyObject* type_obj);\n\n/* TypeImport.proto */\n#ifndef __PYX_HAVE_RT_ImportType_proto\n#define __PYX_HAVE_RT_ImportType_proto\nenum __Pyx_ImportType_CheckSize {\n   __Pyx_ImportType_CheckSize_Error = 0,\n   __Pyx_ImportType_CheckSize_Warn = 1,\n   __Pyx_ImportType_CheckSize_Ignore = 2\n};\nstatic PyTypeObject *__Pyx_ImportType(PyObject* module, const char *module_name, const char *class_name, size_t size, enum __Pyx_ImportType_CheckSize check_size);\n#endif\n\n/* CLineInTraceback.proto */\n#ifdef CYTHON_CLINE_IN_TRACEBACK\n#define __Pyx_CLineForTraceback(tstate, c_line)  (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)\n#else\nstatic int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);\n#endif\n\n/* CodeObjectCache.proto */\ntypedef struct {\n    PyCodeObject* code_object;\n    int code_line;\n} __Pyx_CodeObjectCacheEntry;\nstruct __Pyx_CodeObjectCache {\n    int count;\n    int max_count;\n    __Pyx_CodeObjectCacheEntry* entries;\n};\nstatic struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};\nstatic int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);\nstatic PyCodeObject *__pyx_find_code_object(int code_line);\nstatic void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);\n\n/* AddTraceback.proto */\nstatic void __Pyx_AddTraceback(const char *funcname, int c_line,\n                               int py_line, const char *filename);\n\n#if PY_MAJOR_VERSION < 3\n    static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags);\n    static void __Pyx_ReleaseBuffer(Py_buffer *view);\n#else\n    #define __Pyx_GetBuffer PyObject_GetBuffer\n    #define __Pyx_ReleaseBuffer PyBuffer_Release\n#endif\n\n\n/* BufferStructDeclare.proto */\ntypedef struct {\n  Py_ssize_t shape, strides, suboffsets;\n} __Pyx_Buf_DimInfo;\ntypedef struct {\n  size_t refcount;\n  Py_buffer pybuffer;\n} __Pyx_Buffer;\ntypedef struct {\n  __Pyx_Buffer *rcbuffer;\n  char *data;\n  __Pyx_Buf_DimInfo diminfo[8];\n} __Pyx_LocalBuf_ND;\n\n/* MemviewSliceIsContig.proto */\nstatic int __pyx_memviewslice_is_contig(const __Pyx_memviewslice mvs, char order, int ndim);\n\n/* OverlappingSlices.proto */\nstatic int __pyx_slices_overlap(__Pyx_memviewslice *slice1,\n                                __Pyx_memviewslice *slice2,\n                                int ndim, size_t itemsize);\n\n/* Capsule.proto */\nstatic CYTHON_INLINE PyObject *__pyx_capsule_create(void *p, const char *sig);\n\n/* GCCDiagnostics.proto */\n#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))\n#define __Pyx_HAS_GCC_DIAGNOSTIC\n#endif\n\n/* TypeInfoCompare.proto */\nstatic int __pyx_typeinfo_cmp(__Pyx_TypeInfo *a, __Pyx_TypeInfo *b);\n\n/* MemviewSliceValidateAndInit.proto */\nstatic int __Pyx_ValidateAndInit_memviewslice(\n                int *axes_specs,\n                int c_or_f_flag,\n                int buf_flags,\n                int ndim,\n                __Pyx_TypeInfo *dtype,\n                __Pyx_BufFmt_StackElem stack[],\n                __Pyx_memviewslice *memviewslice,\n                PyObject *original_obj);\n\n/* ObjectToMemviewSlice.proto */\nstatic CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dsdsds_float(PyObject *, int writable_flag);\n\n/* ObjectToMemviewSlice.proto */\nstatic CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dsdsdsds_float(PyObject *, int writable_flag);\n\n/* ObjectToMemviewSlice.proto */\nstatic CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dsds_float(PyObject *, int writable_flag);\n\n/* ObjectToMemviewSlice.proto */\nstatic CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dsds_int(PyObject *, int writable_flag);\n\n/* ObjectToMemviewSlice.proto */\nstatic CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_int(PyObject *, int writable_flag);\n\n/* ObjectToMemviewSlice.proto */\nstatic CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_float(PyObject *, int writable_flag);\n\n/* Print.proto */\nstatic int __Pyx_Print(PyObject*, PyObject *, int);\n#if CYTHON_COMPILING_IN_PYPY || PY_MAJOR_VERSION >= 3\nstatic PyObject* __pyx_print = 0;\nstatic PyObject* __pyx_print_kwargs = 0;\n#endif\n\n/* RealImag.proto */\n#if CYTHON_CCOMPLEX\n  #ifdef __cplusplus\n    #define __Pyx_CREAL(z) ((z).real())\n    #define __Pyx_CIMAG(z) ((z).imag())\n  #else\n    #define __Pyx_CREAL(z) (__real__(z))\n    #define __Pyx_CIMAG(z) (__imag__(z))\n  #endif\n#else\n    #define __Pyx_CREAL(z) ((z).real)\n    #define __Pyx_CIMAG(z) ((z).imag)\n#endif\n#if defined(__cplusplus) && CYTHON_CCOMPLEX\\\n        && (defined(_WIN32) || defined(__clang__) || (defined(__GNUC__) && (__GNUC__ >= 5 || __GNUC__ == 4 && __GNUC_MINOR__ >= 4 )) || __cplusplus >= 201103)\n    #define __Pyx_SET_CREAL(z,x) ((z).real(x))\n    #define __Pyx_SET_CIMAG(z,y) ((z).imag(y))\n#else\n    #define __Pyx_SET_CREAL(z,x) __Pyx_CREAL(z) = (x)\n    #define __Pyx_SET_CIMAG(z,y) __Pyx_CIMAG(z) = (y)\n#endif\n\n/* Arithmetic.proto */\n#if CYTHON_CCOMPLEX\n    #define __Pyx_c_eq_float(a, b)   ((a)==(b))\n    #define __Pyx_c_sum_float(a, b)  ((a)+(b))\n    #define __Pyx_c_diff_float(a, b) ((a)-(b))\n    #define __Pyx_c_prod_float(a, b) ((a)*(b))\n    #define __Pyx_c_quot_float(a, b) ((a)/(b))\n    #define __Pyx_c_neg_float(a)     (-(a))\n  #ifdef __cplusplus\n    #define __Pyx_c_is_zero_float(z) ((z)==(float)0)\n    #define __Pyx_c_conj_float(z)    (::std::conj(z))\n    #if 1\n        #define __Pyx_c_abs_float(z)     (::std::abs(z))\n        #define __Pyx_c_pow_float(a, b)  (::std::pow(a, b))\n    #endif\n  #else\n    #define __Pyx_c_is_zero_float(z) ((z)==0)\n    #define __Pyx_c_conj_float(z)    (conjf(z))\n    #if 1\n        #define __Pyx_c_abs_float(z)     (cabsf(z))\n        #define __Pyx_c_pow_float(a, b)  (cpowf(a, b))\n    #endif\n #endif\n#else\n    static CYTHON_INLINE int __Pyx_c_eq_float(__pyx_t_float_complex, __pyx_t_float_complex);\n    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex, __pyx_t_float_complex);\n    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex, __pyx_t_float_complex);\n    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex, __pyx_t_float_complex);\n    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex, __pyx_t_float_complex);\n    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex);\n    static CYTHON_INLINE int __Pyx_c_is_zero_float(__pyx_t_float_complex);\n    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex);\n    #if 1\n        static CYTHON_INLINE float __Pyx_c_abs_float(__pyx_t_float_complex);\n        static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex, __pyx_t_float_complex);\n    #endif\n#endif\n\n/* Arithmetic.proto */\n#if CYTHON_CCOMPLEX\n    #define __Pyx_c_eq_double(a, b)   ((a)==(b))\n    #define __Pyx_c_sum_double(a, b)  ((a)+(b))\n    #define __Pyx_c_diff_double(a, b) ((a)-(b))\n    #define __Pyx_c_prod_double(a, b) ((a)*(b))\n    #define __Pyx_c_quot_double(a, b) ((a)/(b))\n    #define __Pyx_c_neg_double(a)     (-(a))\n  #ifdef __cplusplus\n    #define __Pyx_c_is_zero_double(z) ((z)==(double)0)\n    #define __Pyx_c_conj_double(z)    (::std::conj(z))\n    #if 1\n        #define __Pyx_c_abs_double(z)     (::std::abs(z))\n        #define __Pyx_c_pow_double(a, b)  (::std::pow(a, b))\n    #endif\n  #else\n    #define __Pyx_c_is_zero_double(z) ((z)==0)\n    #define __Pyx_c_conj_double(z)    (conj(z))\n    #if 1\n        #define __Pyx_c_abs_double(z)     (cabs(z))\n        #define __Pyx_c_pow_double(a, b)  (cpow(a, b))\n    #endif\n #endif\n#else\n    static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex, __pyx_t_double_complex);\n    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex, __pyx_t_double_complex);\n    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex, __pyx_t_double_complex);\n    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex, __pyx_t_double_complex);\n    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex, __pyx_t_double_complex);\n    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex);\n    static CYTHON_INLINE int __Pyx_c_is_zero_double(__pyx_t_double_complex);\n    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex);\n    #if 1\n        static CYTHON_INLINE double __Pyx_c_abs_double(__pyx_t_double_complex);\n        static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex, __pyx_t_double_complex);\n    #endif\n#endif\n\n/* MemviewSliceCopyTemplate.proto */\nstatic __Pyx_memviewslice\n__pyx_memoryview_copy_new_contig(const __Pyx_memviewslice *from_mvs,\n                                 const char *mode, int ndim,\n                                 size_t sizeof_dtype, int contig_flag,\n                                 int dtype_is_object);\n\n/* CIntFromPy.proto */\nstatic CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);\n\n/* CIntFromPy.proto */\nstatic CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);\n\n/* CIntToPy.proto */\nstatic CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);\n\n/* CIntToPy.proto */\nstatic CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);\n\n/* CIntFromPy.proto */\nstatic CYTHON_INLINE signed char __Pyx_PyInt_As_signed__char(PyObject *);\n\n/* CIntToPy.proto */\nstatic CYTHON_INLINE PyObject* __Pyx_PyInt_From_npy_bool(npy_bool value);\n\n/* PrintOne.proto */\nstatic int __Pyx_PrintOne(PyObject* stream, PyObject *o);\n\n/* CIntFromPy.proto */\nstatic CYTHON_INLINE char __Pyx_PyInt_As_char(PyObject *);\n\n/* CheckBinaryVersion.proto */\nstatic int __Pyx_check_binary_version(void);\n\n/* InitStrings.proto */\nstatic int __Pyx_InitStrings(__Pyx_StringTabEntry *t);\n\nstatic void __pyx_f_26_marching_cubes_lewiner_cy_4Cell__increase_size_vertices(struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *__pyx_v_self); /* proto*/\nstatic void __pyx_f_26_marching_cubes_lewiner_cy_4Cell__increase_size_faces(struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *__pyx_v_self); /* proto*/\nstatic int __pyx_f_26_marching_cubes_lewiner_cy_4Cell_add_vertex(struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *__pyx_v_self, float __pyx_v_x, float __pyx_v_y, float __pyx_v_z); /* proto*/\nstatic void __pyx_f_26_marching_cubes_lewiner_cy_4Cell_add_gradient(struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *__pyx_v_self, int __pyx_v_vertexIndex, float __pyx_v_gx, float __pyx_v_gy, float __pyx_v_gz); /* proto*/\nstatic void __pyx_f_26_marching_cubes_lewiner_cy_4Cell_add_gradient_from_index(struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *__pyx_v_self, int __pyx_v_vertexIndex, int __pyx_v_i, float __pyx_v_strength); /* proto*/\nstatic PyObject *__pyx_f_26_marching_cubes_lewiner_cy_4Cell_add_face(struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *__pyx_v_self, int __pyx_v_index); /* proto*/\nstatic void __pyx_f_26_marching_cubes_lewiner_cy_4Cell_new_z_value(struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *__pyx_v_self); /* proto*/\nstatic void __pyx_f_26_marching_cubes_lewiner_cy_4Cell_set_cube(struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *__pyx_v_self, double __pyx_v_isovalue, int __pyx_v_x, int __pyx_v_y, int __pyx_v_z, int __pyx_v_step, double __pyx_v_v0, double __pyx_v_v1, double __pyx_v_v2, double __pyx_v_v3, double __pyx_v_v4, double __pyx_v_v5, double __pyx_v_v6, double __pyx_v_v7); /* proto*/\nstatic void __pyx_f_26_marching_cubes_lewiner_cy_4Cell_add_triangles(struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *__pyx_v_self, struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *__pyx_v_lut, int __pyx_v_lutIndex, int __pyx_v_nt); /* proto*/\nstatic void __pyx_f_26_marching_cubes_lewiner_cy_4Cell_add_triangles2(struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *__pyx_v_self, struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *__pyx_v_lut, int __pyx_v_lutIndex, int __pyx_v_lutIndex2, int __pyx_v_nt); /* proto*/\nstatic void __pyx_f_26_marching_cubes_lewiner_cy_4Cell__add_face_from_edge_index(struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *__pyx_v_self, int __pyx_v_vi); /* proto*/\nstatic int __pyx_f_26_marching_cubes_lewiner_cy_4Cell_get_index_in_facelayer(struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *__pyx_v_self, int __pyx_v_vi); /* proto*/\nstatic void __pyx_f_26_marching_cubes_lewiner_cy_4Cell_prepare_for_adding_triangles(struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *__pyx_v_self); /* proto*/\nstatic void __pyx_f_26_marching_cubes_lewiner_cy_4Cell_calculate_center_vertex(struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *__pyx_v_self); /* proto*/\nstatic int __pyx_f_26_marching_cubes_lewiner_cy_3Lut_get1(struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *__pyx_v_self, int __pyx_v_i0); /* proto*/\nstatic int __pyx_f_26_marching_cubes_lewiner_cy_3Lut_get2(struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *__pyx_v_self, int __pyx_v_i0, int __pyx_v_i1); /* proto*/\nstatic int __pyx_f_26_marching_cubes_lewiner_cy_3Lut_get3(struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *__pyx_v_self, int __pyx_v_i0, int __pyx_v_i1, int __pyx_v_i2); /* proto*/\nstatic PyObject *__pyx_array_get_memview(struct __pyx_array_obj *__pyx_v_self); /* proto*/\nstatic char *__pyx_memoryview_get_item_pointer(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index); /* proto*/\nstatic PyObject *__pyx_memoryview_is_slice(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj); /* proto*/\nstatic PyObject *__pyx_memoryview_setitem_slice_assignment(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_dst, PyObject *__pyx_v_src); /* proto*/\nstatic PyObject *__pyx_memoryview_setitem_slice_assign_scalar(struct __pyx_memoryview_obj *__pyx_v_self, struct __pyx_memoryview_obj *__pyx_v_dst, PyObject *__pyx_v_value); /* proto*/\nstatic PyObject *__pyx_memoryview_setitem_indexed(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /* proto*/\nstatic PyObject *__pyx_memoryview_convert_item_to_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp); /* proto*/\nstatic PyObject *__pyx_memoryview_assign_item_from_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value); /* proto*/\nstatic PyObject *__pyx_memoryviewslice_convert_item_to_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp); /* proto*/\nstatic PyObject *__pyx_memoryviewslice_assign_item_from_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value); /* proto*/\n\n/* Module declarations from 'cpython.buffer' */\n\n/* Module declarations from 'libc.string' */\n\n/* Module declarations from 'libc.stdio' */\n\n/* Module declarations from '__builtin__' */\n\n/* Module declarations from 'cpython.type' */\nstatic PyTypeObject *__pyx_ptype_7cpython_4type_type = 0;\n\n/* Module declarations from 'cpython' */\n\n/* Module declarations from 'cpython.object' */\n\n/* Module declarations from 'cpython.ref' */\n\n/* Module declarations from 'cpython.mem' */\n\n/* Module declarations from 'numpy' */\n\n/* Module declarations from 'numpy' */\nstatic PyTypeObject *__pyx_ptype_5numpy_dtype = 0;\nstatic PyTypeObject *__pyx_ptype_5numpy_flatiter = 0;\nstatic PyTypeObject *__pyx_ptype_5numpy_broadcast = 0;\nstatic PyTypeObject *__pyx_ptype_5numpy_ndarray = 0;\nstatic PyTypeObject *__pyx_ptype_5numpy_generic = 0;\nstatic PyTypeObject *__pyx_ptype_5numpy_number = 0;\nstatic PyTypeObject *__pyx_ptype_5numpy_integer = 0;\nstatic PyTypeObject *__pyx_ptype_5numpy_signedinteger = 0;\nstatic PyTypeObject *__pyx_ptype_5numpy_unsignedinteger = 0;\nstatic PyTypeObject *__pyx_ptype_5numpy_inexact = 0;\nstatic PyTypeObject *__pyx_ptype_5numpy_floating = 0;\nstatic PyTypeObject *__pyx_ptype_5numpy_complexfloating = 0;\nstatic PyTypeObject *__pyx_ptype_5numpy_flexible = 0;\nstatic PyTypeObject *__pyx_ptype_5numpy_character = 0;\nstatic PyTypeObject *__pyx_ptype_5numpy_ufunc = 0;\nstatic CYTHON_INLINE int __pyx_f_5numpy_import_array(void); /*proto*/\n\n/* Module declarations from 'cython.view' */\n\n/* Module declarations from 'cython' */\n\n/* Module declarations from 'libc.stdlib' */\n\n/* Module declarations from '_marching_cubes_lewiner_cy' */\nstatic PyTypeObject *__pyx_ptype_26_marching_cubes_lewiner_cy_Cell = 0;\nstatic PyTypeObject *__pyx_ptype_26_marching_cubes_lewiner_cy_Lut = 0;\nstatic PyTypeObject *__pyx_ptype_26_marching_cubes_lewiner_cy_LutProvider = 0;\nstatic PyTypeObject *__pyx_array_type = 0;\nstatic PyTypeObject *__pyx_MemviewEnum_type = 0;\nstatic PyTypeObject *__pyx_memoryview_type = 0;\nstatic PyTypeObject *__pyx_memoryviewslice_type = 0;\nstatic double __pyx_v_26_marching_cubes_lewiner_cy_FLT_EPSILON;\nstatic PyObject *generic = 0;\nstatic PyObject *strided = 0;\nstatic PyObject *indirect = 0;\nstatic PyObject *contiguous = 0;\nstatic PyObject *indirect_contiguous = 0;\nstatic int __pyx_memoryview_thread_locks_used;\nstatic PyThread_type_lock __pyx_memoryview_thread_locks[8];\nstatic CYTHON_INLINE double __pyx_f_26_marching_cubes_lewiner_cy_dabs(double); /*proto*/\nstatic CYTHON_INLINE int __pyx_f_26_marching_cubes_lewiner_cy_imin(int, int); /*proto*/\nstatic float __pyx_f_26_marching_cubes_lewiner_cy_my_sign(float); /*proto*/\nstatic int __pyx_f_26_marching_cubes_lewiner_cy_non_zero_norm(__Pyx_memviewslice); /*proto*/\nstatic float __pyx_f_26_marching_cubes_lewiner_cy_avg_cube(float, float, float, float, float, float, float, float); /*proto*/\nstatic float __pyx_f_26_marching_cubes_lewiner_cy_max_cube(float, float, float, float, float, float, float, float); /*proto*/\nstatic float __pyx_f_26_marching_cubes_lewiner_cy_dot3(__Pyx_memviewslice, __Pyx_memviewslice); /*proto*/\nstatic int __pyx_f_26_marching_cubes_lewiner_cy_inwards_facing_normals(PyArrayObject *, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice); /*proto*/\nstatic void __pyx_f_26_marching_cubes_lewiner_cy_the_big_switch(struct __pyx_obj_26_marching_cubes_lewiner_cy_LutProvider *, struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *, int, int); /*proto*/\nstatic int __pyx_f_26_marching_cubes_lewiner_cy_test_face(struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *, int); /*proto*/\nstatic int __pyx_f_26_marching_cubes_lewiner_cy_test_internal(struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *, struct __pyx_obj_26_marching_cubes_lewiner_cy_LutProvider *, int, int, int, int); /*proto*/\nstatic PyObject *__pyx_f_26_marching_cubes_lewiner_cy___pyx_unpickle_LutProvider__set_state(struct __pyx_obj_26_marching_cubes_lewiner_cy_LutProvider *, PyObject *); /*proto*/\nstatic struct __pyx_array_obj *__pyx_array_new(PyObject *, Py_ssize_t, char *, char *, char *); /*proto*/\nstatic void *__pyx_align_pointer(void *, size_t); /*proto*/\nstatic PyObject *__pyx_memoryview_new(PyObject *, int, int, __Pyx_TypeInfo *); /*proto*/\nstatic CYTHON_INLINE int __pyx_memoryview_check(PyObject *); /*proto*/\nstatic PyObject *_unellipsify(PyObject *, int); /*proto*/\nstatic PyObject *assert_direct_dimensions(Py_ssize_t *, int); /*proto*/\nstatic struct __pyx_memoryview_obj *__pyx_memview_slice(struct __pyx_memoryview_obj *, PyObject *); /*proto*/\nstatic int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *, Py_ssize_t, Py_ssize_t, Py_ssize_t, int, int, int *, Py_ssize_t, Py_ssize_t, Py_ssize_t, int, int, int, int); /*proto*/\nstatic char *__pyx_pybuffer_index(Py_buffer *, char *, Py_ssize_t, Py_ssize_t); /*proto*/\nstatic int __pyx_memslice_transpose(__Pyx_memviewslice *); /*proto*/\nstatic PyObject *__pyx_memoryview_fromslice(__Pyx_memviewslice, int, PyObject *(*)(char *), int (*)(char *, PyObject *), int); /*proto*/\nstatic __Pyx_memviewslice *__pyx_memoryview_get_slice_from_memoryview(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/\nstatic void __pyx_memoryview_slice_copy(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/\nstatic PyObject *__pyx_memoryview_copy_object(struct __pyx_memoryview_obj *); /*proto*/\nstatic PyObject *__pyx_memoryview_copy_object_from_slice(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/\nstatic Py_ssize_t abs_py_ssize_t(Py_ssize_t); /*proto*/\nstatic char __pyx_get_best_slice_order(__Pyx_memviewslice *, int); /*proto*/\nstatic void _copy_strided_to_strided(char *, Py_ssize_t *, char *, Py_ssize_t *, Py_ssize_t *, Py_ssize_t *, int, size_t); /*proto*/\nstatic void copy_strided_to_strided(__Pyx_memviewslice *, __Pyx_memviewslice *, int, size_t); /*proto*/\nstatic Py_ssize_t __pyx_memoryview_slice_get_size(__Pyx_memviewslice *, int); /*proto*/\nstatic Py_ssize_t __pyx_fill_contig_strides_array(Py_ssize_t *, Py_ssize_t *, Py_ssize_t, int, char); /*proto*/\nstatic void *__pyx_memoryview_copy_data_to_temp(__Pyx_memviewslice *, __Pyx_memviewslice *, char, int); /*proto*/\nstatic int __pyx_memoryview_err_extents(int, Py_ssize_t, Py_ssize_t); /*proto*/\nstatic int __pyx_memoryview_err_dim(PyObject *, char *, int); /*proto*/\nstatic int __pyx_memoryview_err(PyObject *, char *); /*proto*/\nstatic int __pyx_memoryview_copy_contents(__Pyx_memviewslice, __Pyx_memviewslice, int, int, int); /*proto*/\nstatic void __pyx_memoryview_broadcast_leading(__Pyx_memviewslice *, int, int); /*proto*/\nstatic void __pyx_memoryview_refcount_copying(__Pyx_memviewslice *, int, int, int); /*proto*/\nstatic void __pyx_memoryview_refcount_objects_in_slice_with_gil(char *, Py_ssize_t *, Py_ssize_t *, int, int); /*proto*/\nstatic void __pyx_memoryview_refcount_objects_in_slice(char *, Py_ssize_t *, Py_ssize_t *, int, int); /*proto*/\nstatic void __pyx_memoryview_slice_assign_scalar(__Pyx_memviewslice *, int, size_t, void *, int); /*proto*/\nstatic void __pyx_memoryview__slice_assign_scalar(char *, Py_ssize_t *, Py_ssize_t *, int, size_t, void *); /*proto*/\nstatic PyObject *__pyx_unpickle_Enum__set_state(struct __pyx_MemviewEnum_obj *, PyObject *); /*proto*/\nstatic __Pyx_TypeInfo __Pyx_TypeInfo_nn_npy_bool = { \"npy_bool\", NULL, sizeof(npy_bool), { 0 }, 0, IS_UNSIGNED(npy_bool) ? 'U' : 'I', IS_UNSIGNED(npy_bool), 0 };\nstatic __Pyx_TypeInfo __Pyx_TypeInfo_float = { \"float\", NULL, sizeof(float), { 0 }, 0, 'R', 0, 0 };\nstatic __Pyx_TypeInfo __Pyx_TypeInfo_int = { \"int\", NULL, sizeof(int), { 0 }, 0, IS_UNSIGNED(int) ? 'U' : 'I', IS_UNSIGNED(int), 0 };\n#define __Pyx_MODULE_NAME \"_marching_cubes_lewiner_cy\"\nextern int __pyx_module_is_main__marching_cubes_lewiner_cy;\nint __pyx_module_is_main__marching_cubes_lewiner_cy = 0;\n\n/* Implementation of '_marching_cubes_lewiner_cy' */\nstatic PyObject *__pyx_builtin_range;\nstatic PyObject *__pyx_builtin_MemoryError;\nstatic PyObject *__pyx_builtin_TypeError;\nstatic PyObject *__pyx_builtin_ImportError;\nstatic PyObject *__pyx_builtin_ValueError;\nstatic PyObject *__pyx_builtin_enumerate;\nstatic PyObject *__pyx_builtin_Ellipsis;\nstatic PyObject *__pyx_builtin_id;\nstatic PyObject *__pyx_builtin_IndexError;\nstatic const char __pyx_k_O[] = \"O\";\nstatic const char __pyx_k_c[] = \"c\";\nstatic const char __pyx_k_j[] = \"j\";\nstatic const char __pyx_k_x[] = \"x\";\nstatic const char __pyx_k_y[] = \"y\";\nstatic const char __pyx_k_z[] = \"z\";\nstatic const char __pyx_k_Nx[] = \"Nx\";\nstatic const char __pyx_k_Ny[] = \"Ny\";\nstatic const char __pyx_k_Nz[] = \"Nz\";\nstatic const char __pyx_k_i1[] = \"i1\";\nstatic const char __pyx_k_i2[] = \"i2\";\nstatic const char __pyx_k_i3[] = \"i3\";\nstatic const char __pyx_k_id[] = \"id\";\nstatic const char __pyx_k_im[] = \"im\";\nstatic const char __pyx_k_np[] = \"np\";\nstatic const char __pyx_k_nt[] = \"nt\";\nstatic const char __pyx_k_nx[] = \"nx\";\nstatic const char __pyx_k_ny[] = \"ny\";\nstatic const char __pyx_k_nz[] = \"nz\";\nstatic const char __pyx_k_st[] = \"st\";\nstatic const char __pyx_k_v1[] = \"v1\";\nstatic const char __pyx_k_v2[] = \"v2\";\nstatic const char __pyx_k_v3[] = \"v3\";\nstatic const char __pyx_k_Lut[] = \"Lut\";\nstatic const char __pyx_k_arr[] = \"arr\";\nstatic const char __pyx_k_end[] = \"end\";\nstatic const char __pyx_k_new[] = \"__new__\";\nstatic const char __pyx_k_obj[] = \"obj\";\nstatic const char __pyx_k_Cell[] = \"Cell\";\nstatic const char __pyx_k_base[] = \"base\";\nstatic const char __pyx_k_case[] = \"case\";\nstatic const char __pyx_k_cell[] = \"cell\";\nstatic const char __pyx_k_copy[] = \"copy\";\nstatic const char __pyx_k_dict[] = \"__dict__\";\nstatic const char __pyx_k_file[] = \"file\";\nstatic const char __pyx_k_luts[] = \"luts\";\nstatic const char __pyx_k_main[] = \"__main__\";\nstatic const char __pyx_k_mask[] = \"mask\";\nstatic const char __pyx_k_mode[] = \"mode\";\nstatic const char __pyx_k_name[] = \"name\";\nstatic const char __pyx_k_ndim[] = \"ndim\";\nstatic const char __pyx_k_ones[] = \"ones\";\nstatic const char __pyx_k_pack[] = \"pack\";\nstatic const char __pyx_k_size[] = \"size\";\nstatic const char __pyx_k_step[] = \"step\";\nstatic const char __pyx_k_stop[] = \"stop\";\nstatic const char __pyx_k_test[] = \"__test__\";\nstatic const char __pyx_k_x_st[] = \"x_st\";\nstatic const char __pyx_k_y_st[] = \"y_st\";\nstatic const char __pyx_k_z_st[] = \"z_st\";\nstatic const char __pyx_k_ASCII[] = \"ASCII\";\nstatic const char __pyx_k_CASES[] = \"CASES\";\nstatic const char __pyx_k_TEST3[] = \"TEST3\";\nstatic const char __pyx_k_TEST4[] = \"TEST4\";\nstatic const char __pyx_k_TEST6[] = \"TEST6\";\nstatic const char __pyx_k_TEST7[] = \"TEST7\";\nstatic const char __pyx_k_array[] = \"array\";\nstatic const char __pyx_k_class[] = \"__class__\";\nstatic const char __pyx_k_dtype[] = \"dtype\";\nstatic const char __pyx_k_empty[] = \"empty\";\nstatic const char __pyx_k_error[] = \"error\";\nstatic const char __pyx_k_faces[] = \"faces\";\nstatic const char __pyx_k_flags[] = \"flags\";\nstatic const char __pyx_k_grads[] = \"grads\";\nstatic const char __pyx_k_int32[] = \"int32\";\nstatic const char __pyx_k_numpy[] = \"numpy\";\nstatic const char __pyx_k_print[] = \"print\";\nstatic const char __pyx_k_range[] = \"range\";\nstatic const char __pyx_k_ravel[] = \"ravel\";\nstatic const char __pyx_k_shape[] = \"shape\";\nstatic const char __pyx_k_start[] = \"start\";\nstatic const char __pyx_k_TEST10[] = \"TEST10\";\nstatic const char __pyx_k_TEST12[] = \"TEST12\";\nstatic const char __pyx_k_TEST13[] = \"TEST13\";\nstatic const char __pyx_k_arange[] = \"arange\";\nstatic const char __pyx_k_arrays[] = \"arrays\";\nstatic const char __pyx_k_config[] = \"config\";\nstatic const char __pyx_k_cumsum[] = \"cumsum\";\nstatic const char __pyx_k_encode[] = \"encode\";\nstatic const char __pyx_k_faces2[] = \"faces2\";\nstatic const char __pyx_k_format[] = \"format\";\nstatic const char __pyx_k_import[] = \"__import__\";\nstatic const char __pyx_k_name_2[] = \"__name__\";\nstatic const char __pyx_k_pickle[] = \"pickle\";\nstatic const char __pyx_k_reduce[] = \"__reduce__\";\nstatic const char __pyx_k_struct[] = \"struct\";\nstatic const char __pyx_k_unpack[] = \"unpack\";\nstatic const char __pyx_k_update[] = \"update\";\nstatic const char __pyx_k_TILING1[] = \"TILING1\";\nstatic const char __pyx_k_TILING2[] = \"TILING2\";\nstatic const char __pyx_k_TILING5[] = \"TILING5\";\nstatic const char __pyx_k_TILING8[] = \"TILING8\";\nstatic const char __pyx_k_TILING9[] = \"TILING9\";\nstatic const char __pyx_k_arrays2[] = \"arrays2\";\nstatic const char __pyx_k_classic[] = \"classic\";\nstatic const char __pyx_k_faces_2[] = \"faces_\";\nstatic const char __pyx_k_float32[] = \"float32\";\nstatic const char __pyx_k_fortran[] = \"fortran\";\nstatic const char __pyx_k_memview[] = \"memview\";\nstatic const char __pyx_k_no_mask[] = \"no_mask\";\nstatic const char __pyx_k_spacing[] = \"spacing\";\nstatic const char __pyx_k_Ellipsis[] = \"Ellipsis\";\nstatic const char __pyx_k_Nx_bound[] = \"Nx_bound\";\nstatic const char __pyx_k_Ny_bound[] = \"Ny_bound\";\nstatic const char __pyx_k_Nz_bound[] = \"Nz_bound\";\nstatic const char __pyx_k_TILING11[] = \"TILING11\";\nstatic const char __pyx_k_TILING14[] = \"TILING14\";\nstatic const char __pyx_k_base_vec[] = \"base_vec\";\nstatic const char __pyx_k_faces_ok[] = \"faces_ok\";\nstatic const char __pyx_k_getstate[] = \"__getstate__\";\nstatic const char __pyx_k_isovalue[] = \"isovalue\";\nstatic const char __pyx_k_itemsize[] = \"itemsize\";\nstatic const char __pyx_k_pyx_type[] = \"__pyx_type\";\nstatic const char __pyx_k_setstate[] = \"__setstate__\";\nstatic const char __pyx_k_vertices[] = \"vertices\";\nstatic const char __pyx_k_EDGESRELX[] = \"EDGESRELX\";\nstatic const char __pyx_k_EDGESRELY[] = \"EDGESRELY\";\nstatic const char __pyx_k_EDGESRELZ[] = \"EDGESRELZ\";\nstatic const char __pyx_k_TILING3_1[] = \"TILING3_1\";\nstatic const char __pyx_k_TILING3_2[] = \"TILING3_2\";\nstatic const char __pyx_k_TILING4_1[] = \"TILING4_1\";\nstatic const char __pyx_k_TILING4_2[] = \"TILING4_2\";\nstatic const char __pyx_k_TILING6_2[] = \"TILING6_2\";\nstatic const char __pyx_k_TILING7_1[] = \"TILING7_1\";\nstatic const char __pyx_k_TILING7_2[] = \"TILING7_2\";\nstatic const char __pyx_k_TILING7_3[] = \"TILING7_3\";\nstatic const char __pyx_k_TypeError[] = \"TypeError\";\nstatic const char __pyx_k_enumerate[] = \"enumerate\";\nstatic const char __pyx_k_get_faces[] = \"get_faces\";\nstatic const char __pyx_k_pyx_state[] = \"__pyx_state\";\nstatic const char __pyx_k_reduce_ex[] = \"__reduce_ex__\";\nstatic const char __pyx_k_subconfig[] = \"subconfig\";\nstatic const char __pyx_k_vertices2[] = \"vertices2\";\nstatic const char __pyx_k_IndexError[] = \"IndexError\";\nstatic const char __pyx_k_TILING10_2[] = \"TILING10_2\";\nstatic const char __pyx_k_TILING12_2[] = \"TILING12_2\";\nstatic const char __pyx_k_TILING13_1[] = \"TILING13_1\";\nstatic const char __pyx_k_TILING13_2[] = \"TILING13_2\";\nstatic const char __pyx_k_TILING13_3[] = \"TILING13_3\";\nstatic const char __pyx_k_TILING13_4[] = \"TILING13_4\";\nstatic const char __pyx_k_ValueError[] = \"ValueError\";\nstatic const char __pyx_k_faces_ok_2[] = \"faces_ok_\";\nstatic const char __pyx_k_get_values[] = \"get_values\";\nstatic const char __pyx_k_pyx_result[] = \"__pyx_result\";\nstatic const char __pyx_k_pyx_vtable[] = \"__pyx_vtable__\";\nstatic const char __pyx_k_vertices_2[] = \"vertices_\";\nstatic const char __pyx_k_voxel_size[] = \"voxel_size\";\nstatic const char __pyx_k_ImportError[] = \"ImportError\";\nstatic const char __pyx_k_LutProvider[] = \"LutProvider\";\nstatic const char __pyx_k_MemoryError[] = \"MemoryError\";\nstatic const char __pyx_k_PickleError[] = \"PickleError\";\nstatic const char __pyx_k_SUBCONFIG13[] = \"SUBCONFIG13\";\nstatic const char __pyx_k_TILING6_1_1[] = \"TILING6_1_1\";\nstatic const char __pyx_k_TILING6_1_2[] = \"TILING6_1_2\";\nstatic const char __pyx_k_TILING7_4_1[] = \"TILING7_4_1\";\nstatic const char __pyx_k_TILING7_4_2[] = \"TILING7_4_2\";\nstatic const char __pyx_k_get_normals[] = \"get_normals\";\nstatic const char __pyx_k_vertices_ok[] = \"vertices_ok\";\nstatic const char __pyx_k_CASESCLASSIC[] = \"CASESCLASSIC\";\nstatic const char __pyx_k_TILING10_1_1[] = \"TILING10_1_1\";\nstatic const char __pyx_k_TILING10_1_2[] = \"TILING10_1_2\";\nstatic const char __pyx_k_TILING10_2_2[] = \"TILING10_2_\";\nstatic const char __pyx_k_TILING12_1_1[] = \"TILING12_1_1\";\nstatic const char __pyx_k_TILING12_1_2[] = \"TILING12_1_2\";\nstatic const char __pyx_k_TILING12_2_2[] = \"TILING12_2_\";\nstatic const char __pyx_k_TILING13_1_2[] = \"TILING13_1_\";\nstatic const char __pyx_k_TILING13_2_2[] = \"TILING13_2_\";\nstatic const char __pyx_k_TILING13_3_2[] = \"TILING13_3_\";\nstatic const char __pyx_k_TILING13_5_1[] = \"TILING13_5_1\";\nstatic const char __pyx_k_TILING13_5_2[] = \"TILING13_5_2\";\nstatic const char __pyx_k_avg_cube_val[] = \"avg_cube_val\";\nstatic const char __pyx_k_get_vertices[] = \"get_vertices\";\nstatic const char __pyx_k_max_cube_val[] = \"max_cube_val\";\nstatic const char __pyx_k_pyx_checksum[] = \"__pyx_checksum\";\nstatic const char __pyx_k_stringsource[] = \"stringsource\";\nstatic const char __pyx_k_pyx_getbuffer[] = \"__pyx_getbuffer\";\nstatic const char __pyx_k_reduce_cython[] = \"__reduce_cython__\";\nstatic const char __pyx_k_vertices_map0[] = \"vertices_map0\";\nstatic const char __pyx_k_vertices_map1[] = \"vertices_map1\";\nstatic const char __pyx_k_vertices_map2[] = \"vertices_map2\";\nstatic const char __pyx_k_Invalid_edge_i[] = \"Invalid edge %i.\";\nstatic const char __pyx_k_TILING10_1_1_2[] = \"TILING10_1_1_\";\nstatic const char __pyx_k_TILING12_1_1_2[] = \"TILING12_1_1_\";\nstatic const char __pyx_k_marching_cubes[] = \"marching_cubes\";\nstatic const char __pyx_k_View_MemoryView[] = \"View.MemoryView\";\nstatic const char __pyx_k_allocate_buffer[] = \"allocate_buffer\";\nstatic const char __pyx_k_dtype_is_object[] = \"dtype_is_object\";\nstatic const char __pyx_k_pyx_PickleError[] = \"__pyx_PickleError\";\nstatic const char __pyx_k_setstate_cython[] = \"__setstate_cython__\";\nstatic const char __pyx_k_vertices_map1_2[] = \"vertices_map1_\";\nstatic const char __pyx_k_pyx_unpickle_Enum[] = \"__pyx_unpickle_Enum\";\nstatic const char __pyx_k_cline_in_traceback[] = \"cline_in_traceback\";\nstatic const char __pyx_k_marching_cubes_udf[] = \"marching_cubes_udf\";\nstatic const char __pyx_k_strided_and_direct[] = \"<strided and direct>\";\nstatic const char __pyx_k_strided_and_indirect[] = \"<strided and indirect>\";\nstatic const char __pyx_k_contiguous_and_direct[] = \"<contiguous and direct>\";\nstatic const char __pyx_k_MemoryView_of_r_object[] = \"<MemoryView of %r object>\";\nstatic const char __pyx_k_MemoryView_of_r_at_0x_x[] = \"<MemoryView of %r at 0x%x>\";\nstatic const char __pyx_k_contiguous_and_indirect[] = \"<contiguous and indirect>\";\nstatic const char __pyx_k_remove_degenerate_faces[] = \"remove_degenerate_faces\";\nstatic const char __pyx_k_Cannot_index_with_type_s[] = \"Cannot index with type '%s'\";\nstatic const char __pyx_k_Invalid_ambiguous_case_i[] = \"Invalid ambiguous case %i.\";\nstatic const char __pyx_k_pyx_unpickle_LutProvider[] = \"__pyx_unpickle_LutProvider\";\nstatic const char __pyx_k_Invalid_shape_in_axis_d_d[] = \"Invalid shape in axis %d: %d.\";\nstatic const char __pyx_k_marching_cubes_lewiner_cy[] = \"_marching_cubes_lewiner_cy\";\nstatic const char __pyx_k_inwards_facing_normals_ref[] = \"inwards_facing_normals_ref\";\nstatic const char __pyx_k_inwards_facing_normals_bool[] = \"inwards_facing_normals_bool\";\nstatic const char __pyx_k_itemsize_0_for_cython_array[] = \"itemsize <= 0 for cython.array\";\nstatic const char __pyx_k_marching_cubes_lewiner_cy_pyx[] = \"_marching_cubes_lewiner_cy.pyx\";\nstatic const char __pyx_k_unable_to_allocate_array_data[] = \"unable to allocate array data.\";\nstatic const char __pyx_k_strided_and_direct_or_indirect[] = \"<strided and direct or indirect>\";\nstatic const char __pyx_k_This_is_an_implementation_of_th[] = \"\\nThis is an implementation of the marching cubes algorithm proposed in:\\n\\nEfficient implementation of Marching Cubes' cases with topological guarantees.\\nThomas Lewiner, Helio Lopes, Antonio Wilson Vieira and Geovan Tavares.\\nJournal of Graphics Tools 8(2): pp. 1-15 (december 2003)\\n\\nThis algorithm has the advantage that it provides topologically correct\\nresults, and the algorithms implementation is relatively simple. Most\\nof the magic is in the lookup tables, which are provided as open source.\\n\\nOriginally implemented in C++ by Thomas Lewiner in 2002, ported to Cython\\nby Almar Klein in 2012. Adapted for scikit-image in 2016.\\n\\n\";\nstatic const char __pyx_k_numpy_core_multiarray_failed_to[] = \"numpy.core.multiarray failed to import\";\nstatic const char __pyx_k_Buffer_view_does_not_expose_stri[] = \"Buffer view does not expose strides\";\nstatic const char __pyx_k_Can_only_create_a_buffer_that_is[] = \"Can only create a buffer that is contiguous in memory.\";\nstatic const char __pyx_k_Cannot_assign_to_read_only_memor[] = \"Cannot assign to read-only memoryview\";\nstatic const char __pyx_k_Cannot_create_writable_memory_vi[] = \"Cannot create writable memory view from read-only memoryview\";\nstatic const char __pyx_k_Empty_shape_tuple_for_cython_arr[] = \"Empty shape tuple for cython.array\";\nstatic const char __pyx_k_Incompatible_checksums_0x_x_vs_0[] = \"Incompatible checksums (0x%x vs (0x3035ec8, 0x4a4e1b2, 0x53f5fc5) = (CASES, CASESCLASSIC, EDGESRELX, EDGESRELY, EDGESRELZ, SUBCONFIG13, TEST10, TEST12, TEST13, TEST3, TEST4, TEST6, TEST7, TILING1, TILING10_1_1, TILING10_1_1_, TILING10_1_2, TILING10_2, TILING10_2_, TILING11, TILING12_1_1, TILING12_1_1_, TILING12_1_2, TILING12_2, TILING12_2_, TILING13_1, TILING13_1_, TILING13_2, TILING13_2_, TILING13_3, TILING13_3_, TILING13_4, TILING13_5_1, TILING13_5_2, TILING14, TILING2, TILING3_1, TILING3_2, TILING4_1, TILING4_2, TILING5, TILING6_1_1, TILING6_1_2, TILING6_2, TILING7_1, TILING7_2, TILING7_3, TILING7_4_1, TILING7_4_2, TILING8, TILING9))\";\nstatic const char __pyx_k_Indirect_dimensions_not_supporte[] = \"Indirect dimensions not supported\";\nstatic const char __pyx_k_Invalid_mode_expected_c_or_fortr[] = \"Invalid mode, expected 'c' or 'fortran', got %s\";\nstatic const char __pyx_k_Marching_Cubes_Impossible_case_1[] = \"Marching Cubes: Impossible case 13?\";\nstatic const char __pyx_k_Out_of_bounds_on_buffer_access_a[] = \"Out of bounds on buffer access (axis %d)\";\nstatic const char __pyx_k_Unable_to_convert_item_to_object[] = \"Unable to convert item to object\";\nstatic const char __pyx_k_got_differing_extents_in_dimensi[] = \"got differing extents in dimension %d (got %d and %d)\";\nstatic const char __pyx_k_no_default___reduce___due_to_non[] = \"no default __reduce__ due to non-trivial __cinit__\";\nstatic const char __pyx_k_numpy_core_umath_failed_to_impor[] = \"numpy.core.umath failed to import\";\nstatic const char __pyx_k_unable_to_allocate_shape_and_str[] = \"unable to allocate shape and strides.\";\nstatic const char __pyx_k_Incompatible_checksums_0x_x_vs_0_2[] = \"Incompatible checksums (0x%x vs (0xb068931, 0x82a3537, 0x6ae9995) = (name))\";\nstatic PyObject *__pyx_n_s_ASCII;\nstatic PyObject *__pyx_kp_s_Buffer_view_does_not_expose_stri;\nstatic PyObject *__pyx_n_s_CASES;\nstatic PyObject *__pyx_n_s_CASESCLASSIC;\nstatic PyObject *__pyx_kp_s_Can_only_create_a_buffer_that_is;\nstatic PyObject *__pyx_kp_s_Cannot_assign_to_read_only_memor;\nstatic PyObject *__pyx_kp_s_Cannot_create_writable_memory_vi;\nstatic PyObject *__pyx_kp_s_Cannot_index_with_type_s;\nstatic PyObject *__pyx_n_s_Cell;\nstatic PyObject *__pyx_n_s_EDGESRELX;\nstatic PyObject *__pyx_n_s_EDGESRELY;\nstatic PyObject *__pyx_n_s_EDGESRELZ;\nstatic PyObject *__pyx_n_s_Ellipsis;\nstatic PyObject *__pyx_kp_s_Empty_shape_tuple_for_cython_arr;\nstatic PyObject *__pyx_n_s_ImportError;\nstatic PyObject *__pyx_kp_s_Incompatible_checksums_0x_x_vs_0;\nstatic PyObject *__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_2;\nstatic PyObject *__pyx_n_s_IndexError;\nstatic PyObject *__pyx_kp_s_Indirect_dimensions_not_supporte;\nstatic PyObject *__pyx_kp_s_Invalid_ambiguous_case_i;\nstatic PyObject *__pyx_kp_s_Invalid_edge_i;\nstatic PyObject *__pyx_kp_s_Invalid_mode_expected_c_or_fortr;\nstatic PyObject *__pyx_kp_s_Invalid_shape_in_axis_d_d;\nstatic PyObject *__pyx_n_s_Lut;\nstatic PyObject *__pyx_n_s_LutProvider;\nstatic PyObject *__pyx_kp_s_Marching_Cubes_Impossible_case_1;\nstatic PyObject *__pyx_n_s_MemoryError;\nstatic PyObject *__pyx_kp_s_MemoryView_of_r_at_0x_x;\nstatic PyObject *__pyx_kp_s_MemoryView_of_r_object;\nstatic PyObject *__pyx_n_s_Nx;\nstatic PyObject *__pyx_n_s_Nx_bound;\nstatic PyObject *__pyx_n_s_Ny;\nstatic PyObject *__pyx_n_s_Ny_bound;\nstatic PyObject *__pyx_n_s_Nz;\nstatic PyObject *__pyx_n_s_Nz_bound;\nstatic PyObject *__pyx_n_b_O;\nstatic PyObject *__pyx_kp_s_Out_of_bounds_on_buffer_access_a;\nstatic PyObject *__pyx_n_s_PickleError;\nstatic PyObject *__pyx_n_s_SUBCONFIG13;\nstatic PyObject *__pyx_n_s_TEST10;\nstatic PyObject *__pyx_n_s_TEST12;\nstatic PyObject *__pyx_n_s_TEST13;\nstatic PyObject *__pyx_n_s_TEST3;\nstatic PyObject *__pyx_n_s_TEST4;\nstatic PyObject *__pyx_n_s_TEST6;\nstatic PyObject *__pyx_n_s_TEST7;\nstatic PyObject *__pyx_n_s_TILING1;\nstatic PyObject *__pyx_n_s_TILING10_1_1;\nstatic PyObject *__pyx_n_s_TILING10_1_1_2;\nstatic PyObject *__pyx_n_s_TILING10_1_2;\nstatic PyObject *__pyx_n_s_TILING10_2;\nstatic PyObject *__pyx_n_s_TILING10_2_2;\nstatic PyObject *__pyx_n_s_TILING11;\nstatic PyObject *__pyx_n_s_TILING12_1_1;\nstatic PyObject *__pyx_n_s_TILING12_1_1_2;\nstatic PyObject *__pyx_n_s_TILING12_1_2;\nstatic PyObject *__pyx_n_s_TILING12_2;\nstatic PyObject *__pyx_n_s_TILING12_2_2;\nstatic PyObject *__pyx_n_s_TILING13_1;\nstatic PyObject *__pyx_n_s_TILING13_1_2;\nstatic PyObject *__pyx_n_s_TILING13_2;\nstatic PyObject *__pyx_n_s_TILING13_2_2;\nstatic PyObject *__pyx_n_s_TILING13_3;\nstatic PyObject *__pyx_n_s_TILING13_3_2;\nstatic PyObject *__pyx_n_s_TILING13_4;\nstatic PyObject *__pyx_n_s_TILING13_5_1;\nstatic PyObject *__pyx_n_s_TILING13_5_2;\nstatic PyObject *__pyx_n_s_TILING14;\nstatic PyObject *__pyx_n_s_TILING2;\nstatic PyObject *__pyx_n_s_TILING3_1;\nstatic PyObject *__pyx_n_s_TILING3_2;\nstatic PyObject *__pyx_n_s_TILING4_1;\nstatic PyObject *__pyx_n_s_TILING4_2;\nstatic PyObject *__pyx_n_s_TILING5;\nstatic PyObject *__pyx_n_s_TILING6_1_1;\nstatic PyObject *__pyx_n_s_TILING6_1_2;\nstatic PyObject *__pyx_n_s_TILING6_2;\nstatic PyObject *__pyx_n_s_TILING7_1;\nstatic PyObject *__pyx_n_s_TILING7_2;\nstatic PyObject *__pyx_n_s_TILING7_3;\nstatic PyObject *__pyx_n_s_TILING7_4_1;\nstatic PyObject *__pyx_n_s_TILING7_4_2;\nstatic PyObject *__pyx_n_s_TILING8;\nstatic PyObject *__pyx_n_s_TILING9;\nstatic PyObject *__pyx_n_s_TypeError;\nstatic PyObject *__pyx_kp_s_Unable_to_convert_item_to_object;\nstatic PyObject *__pyx_n_s_ValueError;\nstatic PyObject *__pyx_n_s_View_MemoryView;\nstatic PyObject *__pyx_n_s_allocate_buffer;\nstatic PyObject *__pyx_n_s_arange;\nstatic PyObject *__pyx_n_s_arr;\nstatic PyObject *__pyx_n_s_array;\nstatic PyObject *__pyx_n_s_arrays;\nstatic PyObject *__pyx_n_s_arrays2;\nstatic PyObject *__pyx_n_s_avg_cube_val;\nstatic PyObject *__pyx_n_s_base;\nstatic PyObject *__pyx_n_s_base_vec;\nstatic PyObject *__pyx_n_s_c;\nstatic PyObject *__pyx_n_u_c;\nstatic PyObject *__pyx_n_s_case;\nstatic PyObject *__pyx_n_s_cell;\nstatic PyObject *__pyx_n_s_class;\nstatic PyObject *__pyx_n_s_classic;\nstatic PyObject *__pyx_n_s_cline_in_traceback;\nstatic PyObject *__pyx_n_s_config;\nstatic PyObject *__pyx_kp_s_contiguous_and_direct;\nstatic PyObject *__pyx_kp_s_contiguous_and_indirect;\nstatic PyObject *__pyx_n_s_copy;\nstatic PyObject *__pyx_n_s_cumsum;\nstatic PyObject *__pyx_n_s_dict;\nstatic PyObject *__pyx_n_s_dtype;\nstatic PyObject *__pyx_n_s_dtype_is_object;\nstatic PyObject *__pyx_n_s_empty;\nstatic PyObject *__pyx_n_s_encode;\nstatic PyObject *__pyx_n_s_end;\nstatic PyObject *__pyx_n_s_enumerate;\nstatic PyObject *__pyx_n_s_error;\nstatic PyObject *__pyx_n_s_faces;\nstatic PyObject *__pyx_n_s_faces2;\nstatic PyObject *__pyx_n_s_faces_2;\nstatic PyObject *__pyx_n_s_faces_ok;\nstatic PyObject *__pyx_n_s_faces_ok_2;\nstatic PyObject *__pyx_n_s_file;\nstatic PyObject *__pyx_n_s_flags;\nstatic PyObject *__pyx_n_s_float32;\nstatic PyObject *__pyx_n_s_format;\nstatic PyObject *__pyx_n_s_fortran;\nstatic PyObject *__pyx_n_u_fortran;\nstatic PyObject *__pyx_n_s_get_faces;\nstatic PyObject *__pyx_n_s_get_normals;\nstatic PyObject *__pyx_n_s_get_values;\nstatic PyObject *__pyx_n_s_get_vertices;\nstatic PyObject *__pyx_n_s_getstate;\nstatic PyObject *__pyx_kp_s_got_differing_extents_in_dimensi;\nstatic PyObject *__pyx_n_s_grads;\nstatic PyObject *__pyx_n_s_i1;\nstatic PyObject *__pyx_n_s_i2;\nstatic PyObject *__pyx_n_s_i3;\nstatic PyObject *__pyx_n_s_id;\nstatic PyObject *__pyx_n_s_im;\nstatic PyObject *__pyx_n_s_import;\nstatic PyObject *__pyx_n_s_int32;\nstatic PyObject *__pyx_n_s_inwards_facing_normals_bool;\nstatic PyObject *__pyx_n_s_inwards_facing_normals_ref;\nstatic PyObject *__pyx_n_s_isovalue;\nstatic PyObject *__pyx_n_s_itemsize;\nstatic PyObject *__pyx_kp_s_itemsize_0_for_cython_array;\nstatic PyObject *__pyx_n_s_j;\nstatic PyObject *__pyx_n_s_luts;\nstatic PyObject *__pyx_n_s_main;\nstatic PyObject *__pyx_n_s_marching_cubes;\nstatic PyObject *__pyx_n_s_marching_cubes_lewiner_cy;\nstatic PyObject *__pyx_kp_s_marching_cubes_lewiner_cy_pyx;\nstatic PyObject *__pyx_n_s_marching_cubes_udf;\nstatic PyObject *__pyx_n_s_mask;\nstatic PyObject *__pyx_n_s_max_cube_val;\nstatic PyObject *__pyx_n_s_memview;\nstatic PyObject *__pyx_n_s_mode;\nstatic PyObject *__pyx_n_s_name;\nstatic PyObject *__pyx_n_s_name_2;\nstatic PyObject *__pyx_n_s_ndim;\nstatic PyObject *__pyx_n_s_new;\nstatic PyObject *__pyx_kp_s_no_default___reduce___due_to_non;\nstatic PyObject *__pyx_n_s_no_mask;\nstatic PyObject *__pyx_n_s_np;\nstatic PyObject *__pyx_n_s_nt;\nstatic PyObject *__pyx_n_s_numpy;\nstatic PyObject *__pyx_kp_s_numpy_core_multiarray_failed_to;\nstatic PyObject *__pyx_kp_s_numpy_core_umath_failed_to_impor;\nstatic PyObject *__pyx_n_s_nx;\nstatic PyObject *__pyx_n_s_ny;\nstatic PyObject *__pyx_n_s_nz;\nstatic PyObject *__pyx_n_s_obj;\nstatic PyObject *__pyx_n_s_ones;\nstatic PyObject *__pyx_n_s_pack;\nstatic PyObject *__pyx_n_s_pickle;\nstatic PyObject *__pyx_n_s_print;\nstatic PyObject *__pyx_n_s_pyx_PickleError;\nstatic PyObject *__pyx_n_s_pyx_checksum;\nstatic PyObject *__pyx_n_s_pyx_getbuffer;\nstatic PyObject *__pyx_n_s_pyx_result;\nstatic PyObject *__pyx_n_s_pyx_state;\nstatic PyObject *__pyx_n_s_pyx_type;\nstatic PyObject *__pyx_n_s_pyx_unpickle_Enum;\nstatic PyObject *__pyx_n_s_pyx_unpickle_LutProvider;\nstatic PyObject *__pyx_n_s_pyx_vtable;\nstatic PyObject *__pyx_n_s_range;\nstatic PyObject *__pyx_n_s_ravel;\nstatic PyObject *__pyx_n_s_reduce;\nstatic PyObject *__pyx_n_s_reduce_cython;\nstatic PyObject *__pyx_n_s_reduce_ex;\nstatic PyObject *__pyx_n_s_remove_degenerate_faces;\nstatic PyObject *__pyx_n_s_setstate;\nstatic PyObject *__pyx_n_s_setstate_cython;\nstatic PyObject *__pyx_n_s_shape;\nstatic PyObject *__pyx_n_s_size;\nstatic PyObject *__pyx_n_s_spacing;\nstatic PyObject *__pyx_n_s_st;\nstatic PyObject *__pyx_n_s_start;\nstatic PyObject *__pyx_n_s_step;\nstatic PyObject *__pyx_n_s_stop;\nstatic PyObject *__pyx_kp_s_strided_and_direct;\nstatic PyObject *__pyx_kp_s_strided_and_direct_or_indirect;\nstatic PyObject *__pyx_kp_s_strided_and_indirect;\nstatic PyObject *__pyx_kp_s_stringsource;\nstatic PyObject *__pyx_n_s_struct;\nstatic PyObject *__pyx_n_s_subconfig;\nstatic PyObject *__pyx_n_s_test;\nstatic PyObject *__pyx_kp_s_unable_to_allocate_array_data;\nstatic PyObject *__pyx_kp_s_unable_to_allocate_shape_and_str;\nstatic PyObject *__pyx_n_s_unpack;\nstatic PyObject *__pyx_n_s_update;\nstatic PyObject *__pyx_n_s_v1;\nstatic PyObject *__pyx_n_s_v2;\nstatic PyObject *__pyx_n_s_v3;\nstatic PyObject *__pyx_n_s_vertices;\nstatic PyObject *__pyx_n_s_vertices2;\nstatic PyObject *__pyx_n_s_vertices_2;\nstatic PyObject *__pyx_n_s_vertices_map0;\nstatic PyObject *__pyx_n_s_vertices_map1;\nstatic PyObject *__pyx_n_s_vertices_map1_2;\nstatic PyObject *__pyx_n_s_vertices_map2;\nstatic PyObject *__pyx_n_s_vertices_ok;\nstatic PyObject *__pyx_n_s_voxel_size;\nstatic PyObject *__pyx_n_s_x;\nstatic PyObject *__pyx_n_s_x_st;\nstatic PyObject *__pyx_n_s_y;\nstatic PyObject *__pyx_n_s_y_st;\nstatic PyObject *__pyx_n_s_z;\nstatic PyObject *__pyx_n_s_z_st;\nstatic PyObject *__pyx_pf_26_marching_cubes_lewiner_cy_remove_degenerate_faces(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_vertices, PyObject *__pyx_v_faces, PyObject *__pyx_v_arrays); /* proto */\nstatic int __pyx_pf_26_marching_cubes_lewiner_cy_4Cell___init__(struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *__pyx_v_self, struct __pyx_obj_26_marching_cubes_lewiner_cy_LutProvider *__pyx_v_luts, int __pyx_v_nx, int __pyx_v_ny, int __pyx_v_nz); /* proto */\nstatic int __pyx_pf_26_marching_cubes_lewiner_cy_4Cell_2__cinit__(struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *__pyx_v_self); /* proto */\nstatic void __pyx_pf_26_marching_cubes_lewiner_cy_4Cell_4__dealloc__(struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *__pyx_v_self); /* proto */\nstatic PyObject *__pyx_pf_26_marching_cubes_lewiner_cy_4Cell_6get_vertices(struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *__pyx_v_self); /* proto */\nstatic PyObject *__pyx_pf_26_marching_cubes_lewiner_cy_4Cell_8get_normals(struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *__pyx_v_self); /* proto */\nstatic PyObject *__pyx_pf_26_marching_cubes_lewiner_cy_4Cell_10get_faces(struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *__pyx_v_self); /* proto */\nstatic PyObject *__pyx_pf_26_marching_cubes_lewiner_cy_4Cell_12get_values(struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *__pyx_v_self); /* proto */\nstatic PyObject *__pyx_pf_26_marching_cubes_lewiner_cy_4Cell_14__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *__pyx_v_self); /* proto */\nstatic PyObject *__pyx_pf_26_marching_cubes_lewiner_cy_4Cell_16__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */\nstatic int __pyx_pf_26_marching_cubes_lewiner_cy_3Lut___init__(struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *__pyx_v_self, PyObject *__pyx_v_array); /* proto */\nstatic int __pyx_pf_26_marching_cubes_lewiner_cy_3Lut_2__cinit__(struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *__pyx_v_self); /* proto */\nstatic void __pyx_pf_26_marching_cubes_lewiner_cy_3Lut_4__dealloc__(struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *__pyx_v_self); /* proto */\nstatic PyObject *__pyx_pf_26_marching_cubes_lewiner_cy_3Lut_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *__pyx_v_self); /* proto */\nstatic PyObject *__pyx_pf_26_marching_cubes_lewiner_cy_3Lut_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */\nstatic int __pyx_pf_26_marching_cubes_lewiner_cy_11LutProvider___init__(struct __pyx_obj_26_marching_cubes_lewiner_cy_LutProvider *__pyx_v_self, PyObject *__pyx_v_EDGESRELX, PyObject *__pyx_v_EDGESRELY, PyObject *__pyx_v_EDGESRELZ, PyObject *__pyx_v_CASESCLASSIC, PyObject *__pyx_v_CASES, PyObject *__pyx_v_TILING1, PyObject *__pyx_v_TILING2, PyObject *__pyx_v_TILING3_1, PyObject *__pyx_v_TILING3_2, PyObject *__pyx_v_TILING4_1, PyObject *__pyx_v_TILING4_2, PyObject *__pyx_v_TILING5, PyObject *__pyx_v_TILING6_1_1, PyObject *__pyx_v_TILING6_1_2, PyObject *__pyx_v_TILING6_2, PyObject *__pyx_v_TILING7_1, PyObject *__pyx_v_TILING7_2, PyObject *__pyx_v_TILING7_3, PyObject *__pyx_v_TILING7_4_1, PyObject *__pyx_v_TILING7_4_2, PyObject *__pyx_v_TILING8, PyObject *__pyx_v_TILING9, PyObject *__pyx_v_TILING10_1_1, PyObject *__pyx_v_TILING10_1_1_, PyObject *__pyx_v_TILING10_1_2, PyObject *__pyx_v_TILING10_2, PyObject *__pyx_v_TILING10_2_, PyObject *__pyx_v_TILING11, PyObject *__pyx_v_TILING12_1_1, PyObject *__pyx_v_TILING12_1_1_, PyObject *__pyx_v_TILING12_1_2, PyObject *__pyx_v_TILING12_2, PyObject *__pyx_v_TILING12_2_, PyObject *__pyx_v_TILING13_1, PyObject *__pyx_v_TILING13_1_, PyObject *__pyx_v_TILING13_2, PyObject *__pyx_v_TILING13_2_, PyObject *__pyx_v_TILING13_3, PyObject *__pyx_v_TILING13_3_, PyObject *__pyx_v_TILING13_4, PyObject *__pyx_v_TILING13_5_1, PyObject *__pyx_v_TILING13_5_2, PyObject *__pyx_v_TILING14, PyObject *__pyx_v_TEST3, PyObject *__pyx_v_TEST4, PyObject *__pyx_v_TEST6, PyObject *__pyx_v_TEST7, PyObject *__pyx_v_TEST10, PyObject *__pyx_v_TEST12, PyObject *__pyx_v_TEST13, PyObject *__pyx_v_SUBCONFIG13); /* proto */\nstatic PyObject *__pyx_pf_26_marching_cubes_lewiner_cy_11LutProvider_2__reduce_cython__(struct __pyx_obj_26_marching_cubes_lewiner_cy_LutProvider *__pyx_v_self); /* proto */\nstatic PyObject *__pyx_pf_26_marching_cubes_lewiner_cy_11LutProvider_4__setstate_cython__(struct __pyx_obj_26_marching_cubes_lewiner_cy_LutProvider *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */\nstatic PyObject *__pyx_pf_26_marching_cubes_lewiner_cy_2marching_cubes(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_im, double __pyx_v_isovalue, struct __pyx_obj_26_marching_cubes_lewiner_cy_LutProvider *__pyx_v_luts, int __pyx_v_st, int __pyx_v_classic, PyArrayObject *__pyx_v_mask); /* proto */\nstatic PyObject *__pyx_pf_26_marching_cubes_lewiner_cy_4marching_cubes_udf(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_im, __Pyx_memviewslice __pyx_v_grads, struct __pyx_obj_26_marching_cubes_lewiner_cy_LutProvider *__pyx_v_luts, int __pyx_v_st, CYTHON_UNUSED int __pyx_v_classic, PyArrayObject *__pyx_v_mask); /* proto */\nstatic PyObject *__pyx_pf_26_marching_cubes_lewiner_cy_6__pyx_unpickle_LutProvider(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */\nstatic int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_shape, Py_ssize_t __pyx_v_itemsize, PyObject *__pyx_v_format, PyObject *__pyx_v_mode, int __pyx_v_allocate_buffer); /* proto */\nstatic int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(struct __pyx_array_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */\nstatic void __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(struct __pyx_array_obj *__pyx_v_self); /* proto */\nstatic PyObject *__pyx_pf_15View_dot_MemoryView_5array_7memview___get__(struct __pyx_array_obj *__pyx_v_self); /* proto */\nstatic Py_ssize_t __pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__len__(struct __pyx_array_obj *__pyx_v_self); /* proto */\nstatic PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getattr__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_attr); /* proto */\nstatic PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__getitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item); /* proto */\nstatic int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_12__setitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value); /* proto */\nstatic PyObject *__pyx_pf___pyx_array___reduce_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self); /* proto */\nstatic PyObject *__pyx_pf___pyx_array_2__setstate_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */\nstatic int __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v_name); /* proto */\nstatic PyObject *__pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum_2__repr__(struct __pyx_MemviewEnum_obj *__pyx_v_self); /* proto */\nstatic PyObject *__pyx_pf___pyx_MemviewEnum___reduce_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self); /* proto */\nstatic PyObject *__pyx_pf___pyx_MemviewEnum_2__setstate_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */\nstatic int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_v_flags, int __pyx_v_dtype_is_object); /* proto */\nstatic void __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__dealloc__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */\nstatic PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4__getitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index); /* proto */\nstatic int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_6__setitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /* proto */\nstatic int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_8__getbuffer__(struct __pyx_memoryview_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */\nstatic PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */\nstatic PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4base___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */\nstatic PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_5shape___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */\nstatic PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */\nstatic PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */\nstatic PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */\nstatic PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */\nstatic PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */\nstatic PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */\nstatic Py_ssize_t __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_10__len__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */\nstatic PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_12__repr__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */\nstatic PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_14__str__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */\nstatic PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_16is_c_contig(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */\nstatic PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_18is_f_contig(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */\nstatic PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20copy(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */\nstatic PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_22copy_fortran(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */\nstatic PyObject *__pyx_pf___pyx_memoryview___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self); /* proto */\nstatic PyObject *__pyx_pf___pyx_memoryview_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */\nstatic void __pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memoryviewslice___dealloc__(struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto */\nstatic PyObject *__pyx_pf_15View_dot_MemoryView_16_memoryviewslice_4base___get__(struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto */\nstatic PyObject *__pyx_pf___pyx_memoryviewslice___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto */\nstatic PyObject *__pyx_pf___pyx_memoryviewslice_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */\nstatic PyObject *__pyx_pf_15View_dot_MemoryView___pyx_unpickle_Enum(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */\nstatic PyObject *__pyx_tp_new_26_marching_cubes_lewiner_cy_Cell(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/\nstatic PyObject *__pyx_tp_new_26_marching_cubes_lewiner_cy_Lut(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/\nstatic PyObject *__pyx_tp_new_26_marching_cubes_lewiner_cy_LutProvider(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/\nstatic PyObject *__pyx_tp_new_array(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/\nstatic PyObject *__pyx_tp_new_Enum(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/\nstatic PyObject *__pyx_tp_new_memoryview(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/\nstatic PyObject *__pyx_tp_new__memoryviewslice(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/\nstatic PyObject *__pyx_float_1_;\nstatic PyObject *__pyx_float_1_0;\nstatic PyObject *__pyx_float_1_05;\nstatic PyObject *__pyx_float_1_74;\nstatic PyObject *__pyx_float_neg_1_;\nstatic PyObject *__pyx_int_0;\nstatic PyObject *__pyx_int_1;\nstatic PyObject *__pyx_int_2;\nstatic PyObject *__pyx_int_3;\nstatic PyObject *__pyx_int_50552520;\nstatic PyObject *__pyx_int_77914546;\nstatic PyObject *__pyx_int_88039365;\nstatic PyObject *__pyx_int_112105877;\nstatic PyObject *__pyx_int_136983863;\nstatic PyObject *__pyx_int_184977713;\nstatic PyObject *__pyx_int_neg_1;\nstatic PyObject *__pyx_tuple_;\nstatic PyObject *__pyx_tuple__2;\nstatic PyObject *__pyx_tuple__3;\nstatic PyObject *__pyx_tuple__4;\nstatic PyObject *__pyx_tuple__5;\nstatic PyObject *__pyx_tuple__6;\nstatic PyObject *__pyx_tuple__7;\nstatic PyObject *__pyx_tuple__8;\nstatic PyObject *__pyx_tuple__9;\nstatic PyObject *__pyx_slice__30;\nstatic PyObject *__pyx_tuple__10;\nstatic PyObject *__pyx_tuple__11;\nstatic PyObject *__pyx_tuple__12;\nstatic PyObject *__pyx_tuple__13;\nstatic PyObject *__pyx_tuple__14;\nstatic PyObject *__pyx_tuple__15;\nstatic PyObject *__pyx_tuple__16;\nstatic PyObject *__pyx_tuple__17;\nstatic PyObject *__pyx_tuple__18;\nstatic PyObject *__pyx_tuple__19;\nstatic PyObject *__pyx_tuple__20;\nstatic PyObject *__pyx_tuple__21;\nstatic PyObject *__pyx_tuple__22;\nstatic PyObject *__pyx_tuple__23;\nstatic PyObject *__pyx_tuple__24;\nstatic PyObject *__pyx_tuple__25;\nstatic PyObject *__pyx_tuple__26;\nstatic PyObject *__pyx_tuple__27;\nstatic PyObject *__pyx_tuple__28;\nstatic PyObject *__pyx_tuple__29;\nstatic PyObject *__pyx_tuple__31;\nstatic PyObject *__pyx_tuple__32;\nstatic PyObject *__pyx_tuple__33;\nstatic PyObject *__pyx_tuple__34;\nstatic PyObject *__pyx_tuple__35;\nstatic PyObject *__pyx_tuple__36;\nstatic PyObject *__pyx_tuple__38;\nstatic PyObject *__pyx_tuple__40;\nstatic PyObject *__pyx_tuple__42;\nstatic PyObject *__pyx_tuple__44;\nstatic PyObject *__pyx_tuple__45;\nstatic PyObject *__pyx_tuple__46;\nstatic PyObject *__pyx_tuple__47;\nstatic PyObject *__pyx_tuple__48;\nstatic PyObject *__pyx_tuple__49;\nstatic PyObject *__pyx_codeobj__37;\nstatic PyObject *__pyx_codeobj__39;\nstatic PyObject *__pyx_codeobj__41;\nstatic PyObject *__pyx_codeobj__43;\nstatic PyObject *__pyx_codeobj__50;\n/* Late includes */\n\n/* \"_marching_cubes_lewiner_cy.pyx\":35\n * \n * # Define abs function for doubles\n * cdef inline double dabs(double a): return a if a>=0 else -a             # <<<<<<<<<<<<<<\n * cdef inline int imin(int a, int b): return a if a<b else b\n * \n */\n\nstatic CYTHON_INLINE double __pyx_f_26_marching_cubes_lewiner_cy_dabs(double __pyx_v_a) {\n  double __pyx_r;\n  __Pyx_RefNannyDeclarations\n  double __pyx_t_1;\n  __Pyx_RefNannySetupContext(\"dabs\", 0);\n  if (((__pyx_v_a >= 0.0) != 0)) {\n    __pyx_t_1 = __pyx_v_a;\n  } else {\n    __pyx_t_1 = (-__pyx_v_a);\n  }\n  __pyx_r = __pyx_t_1;\n  goto __pyx_L0;\n\n  /* function exit code */\n  __pyx_L0:;\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\n/* \"_marching_cubes_lewiner_cy.pyx\":36\n * # Define abs function for doubles\n * cdef inline double dabs(double a): return a if a>=0 else -a\n * cdef inline int imin(int a, int b): return a if a<b else b             # <<<<<<<<<<<<<<\n * \n * # todo: allow dynamic isovalue?\n */\n\nstatic CYTHON_INLINE int __pyx_f_26_marching_cubes_lewiner_cy_imin(int __pyx_v_a, int __pyx_v_b) {\n  int __pyx_r;\n  __Pyx_RefNannyDeclarations\n  int __pyx_t_1;\n  __Pyx_RefNannySetupContext(\"imin\", 0);\n  if (((__pyx_v_a < __pyx_v_b) != 0)) {\n    __pyx_t_1 = __pyx_v_a;\n  } else {\n    __pyx_t_1 = __pyx_v_b;\n  }\n  __pyx_r = __pyx_t_1;\n  goto __pyx_L0;\n\n  /* function exit code */\n  __pyx_L0:;\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\n/* \"_marching_cubes_lewiner_cy.pyx\":41\n * # todo: can we disable Cython from checking for zero division? Sometimes we know that it never happens!\n * \n * def remove_degenerate_faces(vertices, faces, *arrays):             # <<<<<<<<<<<<<<\n * \n *     vertices_map0 = np.arange(len(vertices), dtype=np.int32)\n */\n\n/* Python wrapper */\nstatic PyObject *__pyx_pw_26_marching_cubes_lewiner_cy_1remove_degenerate_faces(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/\nstatic PyMethodDef __pyx_mdef_26_marching_cubes_lewiner_cy_1remove_degenerate_faces = {\"remove_degenerate_faces\", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_26_marching_cubes_lewiner_cy_1remove_degenerate_faces, METH_VARARGS|METH_KEYWORDS, 0};\nstatic PyObject *__pyx_pw_26_marching_cubes_lewiner_cy_1remove_degenerate_faces(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {\n  PyObject *__pyx_v_vertices = 0;\n  PyObject *__pyx_v_faces = 0;\n  PyObject *__pyx_v_arrays = 0;\n  int __pyx_lineno = 0;\n  const char *__pyx_filename = NULL;\n  int __pyx_clineno = 0;\n  PyObject *__pyx_r = 0;\n  __Pyx_RefNannyDeclarations\n  __Pyx_RefNannySetupContext(\"remove_degenerate_faces (wrapper)\", 0);\n  if (PyTuple_GET_SIZE(__pyx_args) > 2) {\n    __pyx_v_arrays = PyTuple_GetSlice(__pyx_args, 2, PyTuple_GET_SIZE(__pyx_args));\n    if (unlikely(!__pyx_v_arrays)) {\n      __Pyx_RefNannyFinishContext();\n      return NULL;\n    }\n    __Pyx_GOTREF(__pyx_v_arrays);\n  } else {\n    __pyx_v_arrays = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);\n  }\n  {\n    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_vertices,&__pyx_n_s_faces,0};\n    PyObject* values[2] = {0,0};\n    if (unlikely(__pyx_kwds)) {\n      Py_ssize_t kw_args;\n      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);\n      switch (pos_args) {\n        default:\n        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);\n        CYTHON_FALLTHROUGH;\n        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);\n        CYTHON_FALLTHROUGH;\n        case  0: break;\n      }\n      kw_args = PyDict_Size(__pyx_kwds);\n      switch (pos_args) {\n        case  0:\n        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_vertices)) != 0)) kw_args--;\n        else goto __pyx_L5_argtuple_error;\n        CYTHON_FALLTHROUGH;\n        case  1:\n        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_faces)) != 0)) kw_args--;\n        else {\n          __Pyx_RaiseArgtupleInvalid(\"remove_degenerate_faces\", 0, 2, 2, 1); __PYX_ERR(0, 41, __pyx_L3_error)\n        }\n      }\n      if (unlikely(kw_args > 0)) {\n        const Py_ssize_t used_pos_args = (pos_args < 2) ? pos_args : 2;\n        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, \"remove_degenerate_faces\") < 0)) __PYX_ERR(0, 41, __pyx_L3_error)\n      }\n    } else if (PyTuple_GET_SIZE(__pyx_args) < 2) {\n      goto __pyx_L5_argtuple_error;\n    } else {\n      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);\n      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);\n    }\n    __pyx_v_vertices = values[0];\n    __pyx_v_faces = values[1];\n  }\n  goto __pyx_L4_argument_unpacking_done;\n  __pyx_L5_argtuple_error:;\n  __Pyx_RaiseArgtupleInvalid(\"remove_degenerate_faces\", 0, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 41, __pyx_L3_error)\n  __pyx_L3_error:;\n  __Pyx_DECREF(__pyx_v_arrays); __pyx_v_arrays = 0;\n  __Pyx_AddTraceback(\"_marching_cubes_lewiner_cy.remove_degenerate_faces\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n  __Pyx_RefNannyFinishContext();\n  return NULL;\n  __pyx_L4_argument_unpacking_done:;\n  __pyx_r = __pyx_pf_26_marching_cubes_lewiner_cy_remove_degenerate_faces(__pyx_self, __pyx_v_vertices, __pyx_v_faces, __pyx_v_arrays);\n\n  /* function exit code */\n  __Pyx_XDECREF(__pyx_v_arrays);\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\nstatic PyObject *__pyx_pf_26_marching_cubes_lewiner_cy_remove_degenerate_faces(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_vertices, PyObject *__pyx_v_faces, PyObject *__pyx_v_arrays) {\n  PyObject *__pyx_v_vertices_map0 = NULL;\n  PyObject *__pyx_v_vertices_map1 = NULL;\n  PyObject *__pyx_v_faces_ok = NULL;\n  __Pyx_memviewslice __pyx_v_vertices_ = { 0, 0, { 0 }, { 0 }, { 0 } };\n  __Pyx_memviewslice __pyx_v_v1 = { 0, 0, { 0 }, { 0 }, { 0 } };\n  __Pyx_memviewslice __pyx_v_v2 = { 0, 0, { 0 }, { 0 }, { 0 } };\n  __Pyx_memviewslice __pyx_v_v3 = { 0, 0, { 0 }, { 0 }, { 0 } };\n  __Pyx_memviewslice __pyx_v_faces_ = { 0, 0, { 0 }, { 0 }, { 0 } };\n  __Pyx_memviewslice __pyx_v_vertices_map1_ = { 0, 0, { 0 }, { 0 }, { 0 } };\n  __Pyx_memviewslice __pyx_v_faces_ok_ = { 0, 0, { 0 }, { 0 }, { 0 } };\n  int __pyx_v_j;\n  int __pyx_v_i1;\n  int __pyx_v_i2;\n  int __pyx_v_i3;\n  PyObject *__pyx_v_vertices_ok = NULL;\n  PyObject *__pyx_v_vertices_map2 = NULL;\n  PyObject *__pyx_v_faces2 = NULL;\n  PyObject *__pyx_v_vertices2 = NULL;\n  PyObject *__pyx_v_arrays2 = NULL;\n  PyObject *__pyx_v_arr = NULL;\n  PyObject *__pyx_r = NULL;\n  __Pyx_RefNannyDeclarations\n  PyObject *__pyx_t_1 = NULL;\n  PyObject *__pyx_t_2 = NULL;\n  Py_ssize_t __pyx_t_3;\n  PyObject *__pyx_t_4 = NULL;\n  PyObject *__pyx_t_5 = NULL;\n  PyObject *__pyx_t_6 = NULL;\n  __Pyx_memviewslice __pyx_t_7 = { 0, 0, { 0 }, { 0 }, { 0 } };\n  __Pyx_memviewslice __pyx_t_8 = { 0, 0, { 0 }, { 0 }, { 0 } };\n  __Pyx_memviewslice __pyx_t_9 = { 0, 0, { 0 }, { 0 }, { 0 } };\n  Py_ssize_t __pyx_t_10;\n  int __pyx_t_11;\n  Py_ssize_t __pyx_t_12;\n  Py_ssize_t __pyx_t_13;\n  int __pyx_t_14;\n  int __pyx_t_15;\n  int __pyx_t_16;\n  __Pyx_memviewslice __pyx_t_17 = { 0, 0, { 0 }, { 0 }, { 0 } };\n  __Pyx_memviewslice __pyx_t_18 = { 0, 0, { 0 }, { 0 }, { 0 } };\n  __Pyx_memviewslice __pyx_t_19 = { 0, 0, { 0 }, { 0 }, { 0 } };\n  int __pyx_t_20;\n  int __pyx_t_21;\n  int __pyx_lineno = 0;\n  const char *__pyx_filename = NULL;\n  int __pyx_clineno = 0;\n  __Pyx_RefNannySetupContext(\"remove_degenerate_faces\", 0);\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":43\n * def remove_degenerate_faces(vertices, faces, *arrays):\n * \n *     vertices_map0 = np.arange(len(vertices), dtype=np.int32)             # <<<<<<<<<<<<<<\n *     vertices_map1 = vertices_map0.copy()\n *     faces_ok = np.ones(len(faces), dtype=np.int32)\n */\n  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 43, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_arange); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 43, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_2);\n  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n  __pyx_t_3 = PyObject_Length(__pyx_v_vertices); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 43, __pyx_L1_error)\n  __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 43, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 43, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_4);\n  __Pyx_GIVEREF(__pyx_t_1);\n  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);\n  __pyx_t_1 = 0;\n  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 43, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 43, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_5);\n  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int32); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 43, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_6);\n  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;\n  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_t_6) < 0) __PYX_ERR(0, 43, __pyx_L1_error)\n  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;\n  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 43, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_6);\n  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;\n  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;\n  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n  __pyx_v_vertices_map0 = __pyx_t_6;\n  __pyx_t_6 = 0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":44\n * \n *     vertices_map0 = np.arange(len(vertices), dtype=np.int32)\n *     vertices_map1 = vertices_map0.copy()             # <<<<<<<<<<<<<<\n *     faces_ok = np.ones(len(faces), dtype=np.int32)\n * \n */\n  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_vertices_map0, __pyx_n_s_copy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 44, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __pyx_t_4 = NULL;\n  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {\n    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);\n    if (likely(__pyx_t_4)) {\n      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);\n      __Pyx_INCREF(__pyx_t_4);\n      __Pyx_INCREF(function);\n      __Pyx_DECREF_SET(__pyx_t_1, function);\n    }\n  }\n  __pyx_t_6 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_1);\n  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;\n  if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 44, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_6);\n  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n  __pyx_v_vertices_map1 = __pyx_t_6;\n  __pyx_t_6 = 0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":45\n *     vertices_map0 = np.arange(len(vertices), dtype=np.int32)\n *     vertices_map1 = vertices_map0.copy()\n *     faces_ok = np.ones(len(faces), dtype=np.int32)             # <<<<<<<<<<<<<<\n * \n *     cdef float [:, :] vertices_ = vertices\n */\n  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 45, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_6);\n  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_ones); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 45, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;\n  __pyx_t_3 = PyObject_Length(__pyx_v_faces); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 45, __pyx_L1_error)\n  __pyx_t_6 = PyInt_FromSsize_t(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 45, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_6);\n  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 45, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_4);\n  __Pyx_GIVEREF(__pyx_t_6);\n  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);\n  __pyx_t_6 = 0;\n  __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 45, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_6);\n  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 45, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_2);\n  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_int32); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 45, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_5);\n  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;\n  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_dtype, __pyx_t_5) < 0) __PYX_ERR(0, 45, __pyx_L1_error)\n  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;\n  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 45, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_5);\n  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;\n  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;\n  __pyx_v_faces_ok = __pyx_t_5;\n  __pyx_t_5 = 0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":47\n *     faces_ok = np.ones(len(faces), dtype=np.int32)\n * \n *     cdef float [:, :] vertices_ = vertices             # <<<<<<<<<<<<<<\n *     cdef float [:] v1, v2, v3\n *     cdef int [:, :]  faces_ = faces\n */\n  __pyx_t_7 = __Pyx_PyObject_to_MemoryviewSlice_dsds_float(__pyx_v_vertices, PyBUF_WRITABLE); if (unlikely(!__pyx_t_7.memview)) __PYX_ERR(0, 47, __pyx_L1_error)\n  __pyx_v_vertices_ = __pyx_t_7;\n  __pyx_t_7.memview = NULL;\n  __pyx_t_7.data = NULL;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":49\n *     cdef float [:, :] vertices_ = vertices\n *     cdef float [:] v1, v2, v3\n *     cdef int [:, :]  faces_ = faces             # <<<<<<<<<<<<<<\n * \n *     cdef int [:] vertices_map1_ = vertices_map1\n */\n  __pyx_t_8 = __Pyx_PyObject_to_MemoryviewSlice_dsds_int(__pyx_v_faces, PyBUF_WRITABLE); if (unlikely(!__pyx_t_8.memview)) __PYX_ERR(0, 49, __pyx_L1_error)\n  __pyx_v_faces_ = __pyx_t_8;\n  __pyx_t_8.memview = NULL;\n  __pyx_t_8.data = NULL;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":51\n *     cdef int [:, :]  faces_ = faces\n * \n *     cdef int [:] vertices_map1_ = vertices_map1             # <<<<<<<<<<<<<<\n *     cdef int [:] faces_ok_ = faces_ok\n * \n */\n  __pyx_t_9 = __Pyx_PyObject_to_MemoryviewSlice_ds_int(__pyx_v_vertices_map1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_9.memview)) __PYX_ERR(0, 51, __pyx_L1_error)\n  __pyx_v_vertices_map1_ = __pyx_t_9;\n  __pyx_t_9.memview = NULL;\n  __pyx_t_9.data = NULL;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":52\n * \n *     cdef int [:] vertices_map1_ = vertices_map1\n *     cdef int [:] faces_ok_ = faces_ok             # <<<<<<<<<<<<<<\n * \n *     cdef int j, i1, i2, i3\n */\n  __pyx_t_9 = __Pyx_PyObject_to_MemoryviewSlice_ds_int(__pyx_v_faces_ok, PyBUF_WRITABLE); if (unlikely(!__pyx_t_9.memview)) __PYX_ERR(0, 52, __pyx_L1_error)\n  __pyx_v_faces_ok_ = __pyx_t_9;\n  __pyx_t_9.memview = NULL;\n  __pyx_t_9.data = NULL;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":58\n *     # Iterate over all faces. When we encounter a degenerate triangle,\n *     # we update the vertex map, i.e. we merge the corresponding vertices.\n *     for j in range(faces_.shape[0]):             # <<<<<<<<<<<<<<\n *         i1, i2, i3 = faces_[j][0], faces_[j][1], faces_[j][2]\n *         v1, v2, v3 = vertices_[i1], vertices_[i2], vertices_[i3]\n */\n  __pyx_t_3 = (__pyx_v_faces_.shape[0]);\n  __pyx_t_10 = __pyx_t_3;\n  for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) {\n    __pyx_v_j = __pyx_t_11;\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":59\n *     # we update the vertex map, i.e. we merge the corresponding vertices.\n *     for j in range(faces_.shape[0]):\n *         i1, i2, i3 = faces_[j][0], faces_[j][1], faces_[j][2]             # <<<<<<<<<<<<<<\n *         v1, v2, v3 = vertices_[i1], vertices_[i2], vertices_[i3]\n *         if v1[0] == v2[0] and v1[1] == v2[1] and v1[2] == v2[2]:\n */\n    __pyx_t_12 = __pyx_v_j;\n    __pyx_t_13 = 0;\n    __pyx_t_14 = (*((int *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_faces_.data + __pyx_t_12 * __pyx_v_faces_.strides[0]) ) + __pyx_t_13 * __pyx_v_faces_.strides[1]) )));\n    __pyx_t_13 = __pyx_v_j;\n    __pyx_t_12 = 1;\n    __pyx_t_15 = (*((int *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_faces_.data + __pyx_t_13 * __pyx_v_faces_.strides[0]) ) + __pyx_t_12 * __pyx_v_faces_.strides[1]) )));\n    __pyx_t_12 = __pyx_v_j;\n    __pyx_t_13 = 2;\n    __pyx_t_16 = (*((int *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_faces_.data + __pyx_t_12 * __pyx_v_faces_.strides[0]) ) + __pyx_t_13 * __pyx_v_faces_.strides[1]) )));\n    __pyx_v_i1 = __pyx_t_14;\n    __pyx_v_i2 = __pyx_t_15;\n    __pyx_v_i3 = __pyx_t_16;\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":60\n *     for j in range(faces_.shape[0]):\n *         i1, i2, i3 = faces_[j][0], faces_[j][1], faces_[j][2]\n *         v1, v2, v3 = vertices_[i1], vertices_[i2], vertices_[i3]             # <<<<<<<<<<<<<<\n *         if v1[0] == v2[0] and v1[1] == v2[1] and v1[2] == v2[2]:\n *             vertices_map1_[i1] = vertices_map1_[i2] = imin(vertices_map1_[i1], vertices_map1_[i2])\n */\n    __pyx_t_17.data = __pyx_v_vertices_.data;\n    __pyx_t_17.memview = __pyx_v_vertices_.memview;\n    __PYX_INC_MEMVIEW(&__pyx_t_17, 0);\n    {\n    Py_ssize_t __pyx_tmp_idx = __pyx_v_i1;\n    Py_ssize_t __pyx_tmp_stride = __pyx_v_vertices_.strides[0];\n        __pyx_t_17.data += __pyx_tmp_idx * __pyx_tmp_stride;\n}\n\n__pyx_t_17.shape[0] = __pyx_v_vertices_.shape[1];\n__pyx_t_17.strides[0] = __pyx_v_vertices_.strides[1];\n    __pyx_t_17.suboffsets[0] = -1;\n\n__pyx_t_18.data = __pyx_v_vertices_.data;\n    __pyx_t_18.memview = __pyx_v_vertices_.memview;\n    __PYX_INC_MEMVIEW(&__pyx_t_18, 0);\n    {\n    Py_ssize_t __pyx_tmp_idx = __pyx_v_i2;\n    Py_ssize_t __pyx_tmp_stride = __pyx_v_vertices_.strides[0];\n        __pyx_t_18.data += __pyx_tmp_idx * __pyx_tmp_stride;\n}\n\n__pyx_t_18.shape[0] = __pyx_v_vertices_.shape[1];\n__pyx_t_18.strides[0] = __pyx_v_vertices_.strides[1];\n    __pyx_t_18.suboffsets[0] = -1;\n\n__pyx_t_19.data = __pyx_v_vertices_.data;\n    __pyx_t_19.memview = __pyx_v_vertices_.memview;\n    __PYX_INC_MEMVIEW(&__pyx_t_19, 0);\n    {\n    Py_ssize_t __pyx_tmp_idx = __pyx_v_i3;\n    Py_ssize_t __pyx_tmp_stride = __pyx_v_vertices_.strides[0];\n        __pyx_t_19.data += __pyx_tmp_idx * __pyx_tmp_stride;\n}\n\n__pyx_t_19.shape[0] = __pyx_v_vertices_.shape[1];\n__pyx_t_19.strides[0] = __pyx_v_vertices_.strides[1];\n    __pyx_t_19.suboffsets[0] = -1;\n\n__PYX_XDEC_MEMVIEW(&__pyx_v_v1, 1);\n    __pyx_v_v1 = __pyx_t_17;\n    __pyx_t_17.memview = NULL;\n    __pyx_t_17.data = NULL;\n    __PYX_XDEC_MEMVIEW(&__pyx_v_v2, 1);\n    __pyx_v_v2 = __pyx_t_18;\n    __pyx_t_18.memview = NULL;\n    __pyx_t_18.data = NULL;\n    __PYX_XDEC_MEMVIEW(&__pyx_v_v3, 1);\n    __pyx_v_v3 = __pyx_t_19;\n    __pyx_t_19.memview = NULL;\n    __pyx_t_19.data = NULL;\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":61\n *         i1, i2, i3 = faces_[j][0], faces_[j][1], faces_[j][2]\n *         v1, v2, v3 = vertices_[i1], vertices_[i2], vertices_[i3]\n *         if v1[0] == v2[0] and v1[1] == v2[1] and v1[2] == v2[2]:             # <<<<<<<<<<<<<<\n *             vertices_map1_[i1] = vertices_map1_[i2] = imin(vertices_map1_[i1], vertices_map1_[i2])\n *             faces_ok_[j] = 0\n */\n    __pyx_t_13 = 0;\n    __pyx_t_12 = 0;\n    __pyx_t_21 = (((*((float *) ( /* dim=0 */ (__pyx_v_v1.data + __pyx_t_13 * __pyx_v_v1.strides[0]) ))) == (*((float *) ( /* dim=0 */ (__pyx_v_v2.data + __pyx_t_12 * __pyx_v_v2.strides[0]) )))) != 0);\n    if (__pyx_t_21) {\n    } else {\n      __pyx_t_20 = __pyx_t_21;\n      goto __pyx_L6_bool_binop_done;\n    }\n    __pyx_t_12 = 1;\n    __pyx_t_13 = 1;\n    __pyx_t_21 = (((*((float *) ( /* dim=0 */ (__pyx_v_v1.data + __pyx_t_12 * __pyx_v_v1.strides[0]) ))) == (*((float *) ( /* dim=0 */ (__pyx_v_v2.data + __pyx_t_13 * __pyx_v_v2.strides[0]) )))) != 0);\n    if (__pyx_t_21) {\n    } else {\n      __pyx_t_20 = __pyx_t_21;\n      goto __pyx_L6_bool_binop_done;\n    }\n    __pyx_t_13 = 2;\n    __pyx_t_12 = 2;\n    __pyx_t_21 = (((*((float *) ( /* dim=0 */ (__pyx_v_v1.data + __pyx_t_13 * __pyx_v_v1.strides[0]) ))) == (*((float *) ( /* dim=0 */ (__pyx_v_v2.data + __pyx_t_12 * __pyx_v_v2.strides[0]) )))) != 0);\n    __pyx_t_20 = __pyx_t_21;\n    __pyx_L6_bool_binop_done:;\n    if (__pyx_t_20) {\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":62\n *         v1, v2, v3 = vertices_[i1], vertices_[i2], vertices_[i3]\n *         if v1[0] == v2[0] and v1[1] == v2[1] and v1[2] == v2[2]:\n *             vertices_map1_[i1] = vertices_map1_[i2] = imin(vertices_map1_[i1], vertices_map1_[i2])             # <<<<<<<<<<<<<<\n *             faces_ok_[j] = 0\n *         if v1[0] == v3[0] and v1[1] == v3[1] and v1[2] == v3[2]:\n */\n      __pyx_t_12 = __pyx_v_i1;\n      __pyx_t_13 = __pyx_v_i2;\n      __pyx_t_16 = __pyx_f_26_marching_cubes_lewiner_cy_imin((*((int *) ( /* dim=0 */ (__pyx_v_vertices_map1_.data + __pyx_t_12 * __pyx_v_vertices_map1_.strides[0]) ))), (*((int *) ( /* dim=0 */ (__pyx_v_vertices_map1_.data + __pyx_t_13 * __pyx_v_vertices_map1_.strides[0]) ))));\n      __pyx_t_13 = __pyx_v_i1;\n      *((int *) ( /* dim=0 */ (__pyx_v_vertices_map1_.data + __pyx_t_13 * __pyx_v_vertices_map1_.strides[0]) )) = __pyx_t_16;\n      __pyx_t_13 = __pyx_v_i2;\n      *((int *) ( /* dim=0 */ (__pyx_v_vertices_map1_.data + __pyx_t_13 * __pyx_v_vertices_map1_.strides[0]) )) = __pyx_t_16;\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":63\n *         if v1[0] == v2[0] and v1[1] == v2[1] and v1[2] == v2[2]:\n *             vertices_map1_[i1] = vertices_map1_[i2] = imin(vertices_map1_[i1], vertices_map1_[i2])\n *             faces_ok_[j] = 0             # <<<<<<<<<<<<<<\n *         if v1[0] == v3[0] and v1[1] == v3[1] and v1[2] == v3[2]:\n *             vertices_map1_[i1] = vertices_map1_[i3] = imin(vertices_map1_[i1], vertices_map1_[i3])\n */\n      __pyx_t_13 = __pyx_v_j;\n      *((int *) ( /* dim=0 */ (__pyx_v_faces_ok_.data + __pyx_t_13 * __pyx_v_faces_ok_.strides[0]) )) = 0;\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":61\n *         i1, i2, i3 = faces_[j][0], faces_[j][1], faces_[j][2]\n *         v1, v2, v3 = vertices_[i1], vertices_[i2], vertices_[i3]\n *         if v1[0] == v2[0] and v1[1] == v2[1] and v1[2] == v2[2]:             # <<<<<<<<<<<<<<\n *             vertices_map1_[i1] = vertices_map1_[i2] = imin(vertices_map1_[i1], vertices_map1_[i2])\n *             faces_ok_[j] = 0\n */\n    }\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":64\n *             vertices_map1_[i1] = vertices_map1_[i2] = imin(vertices_map1_[i1], vertices_map1_[i2])\n *             faces_ok_[j] = 0\n *         if v1[0] == v3[0] and v1[1] == v3[1] and v1[2] == v3[2]:             # <<<<<<<<<<<<<<\n *             vertices_map1_[i1] = vertices_map1_[i3] = imin(vertices_map1_[i1], vertices_map1_[i3])\n *             faces_ok_[j] = 0\n */\n    __pyx_t_13 = 0;\n    __pyx_t_12 = 0;\n    __pyx_t_21 = (((*((float *) ( /* dim=0 */ (__pyx_v_v1.data + __pyx_t_13 * __pyx_v_v1.strides[0]) ))) == (*((float *) ( /* dim=0 */ (__pyx_v_v3.data + __pyx_t_12 * __pyx_v_v3.strides[0]) )))) != 0);\n    if (__pyx_t_21) {\n    } else {\n      __pyx_t_20 = __pyx_t_21;\n      goto __pyx_L10_bool_binop_done;\n    }\n    __pyx_t_12 = 1;\n    __pyx_t_13 = 1;\n    __pyx_t_21 = (((*((float *) ( /* dim=0 */ (__pyx_v_v1.data + __pyx_t_12 * __pyx_v_v1.strides[0]) ))) == (*((float *) ( /* dim=0 */ (__pyx_v_v3.data + __pyx_t_13 * __pyx_v_v3.strides[0]) )))) != 0);\n    if (__pyx_t_21) {\n    } else {\n      __pyx_t_20 = __pyx_t_21;\n      goto __pyx_L10_bool_binop_done;\n    }\n    __pyx_t_13 = 2;\n    __pyx_t_12 = 2;\n    __pyx_t_21 = (((*((float *) ( /* dim=0 */ (__pyx_v_v1.data + __pyx_t_13 * __pyx_v_v1.strides[0]) ))) == (*((float *) ( /* dim=0 */ (__pyx_v_v3.data + __pyx_t_12 * __pyx_v_v3.strides[0]) )))) != 0);\n    __pyx_t_20 = __pyx_t_21;\n    __pyx_L10_bool_binop_done:;\n    if (__pyx_t_20) {\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":65\n *             faces_ok_[j] = 0\n *         if v1[0] == v3[0] and v1[1] == v3[1] and v1[2] == v3[2]:\n *             vertices_map1_[i1] = vertices_map1_[i3] = imin(vertices_map1_[i1], vertices_map1_[i3])             # <<<<<<<<<<<<<<\n *             faces_ok_[j] = 0\n *         if v2[0] == v3[0] and v2[1] == v3[1] and v2[2] == v3[2]:\n */\n      __pyx_t_12 = __pyx_v_i1;\n      __pyx_t_13 = __pyx_v_i3;\n      __pyx_t_16 = __pyx_f_26_marching_cubes_lewiner_cy_imin((*((int *) ( /* dim=0 */ (__pyx_v_vertices_map1_.data + __pyx_t_12 * __pyx_v_vertices_map1_.strides[0]) ))), (*((int *) ( /* dim=0 */ (__pyx_v_vertices_map1_.data + __pyx_t_13 * __pyx_v_vertices_map1_.strides[0]) ))));\n      __pyx_t_13 = __pyx_v_i1;\n      *((int *) ( /* dim=0 */ (__pyx_v_vertices_map1_.data + __pyx_t_13 * __pyx_v_vertices_map1_.strides[0]) )) = __pyx_t_16;\n      __pyx_t_13 = __pyx_v_i3;\n      *((int *) ( /* dim=0 */ (__pyx_v_vertices_map1_.data + __pyx_t_13 * __pyx_v_vertices_map1_.strides[0]) )) = __pyx_t_16;\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":66\n *         if v1[0] == v3[0] and v1[1] == v3[1] and v1[2] == v3[2]:\n *             vertices_map1_[i1] = vertices_map1_[i3] = imin(vertices_map1_[i1], vertices_map1_[i3])\n *             faces_ok_[j] = 0             # <<<<<<<<<<<<<<\n *         if v2[0] == v3[0] and v2[1] == v3[1] and v2[2] == v3[2]:\n *             vertices_map1_[i2] = vertices_map1_[i3] = imin(vertices_map1_[i2], vertices_map1_[i3])\n */\n      __pyx_t_13 = __pyx_v_j;\n      *((int *) ( /* dim=0 */ (__pyx_v_faces_ok_.data + __pyx_t_13 * __pyx_v_faces_ok_.strides[0]) )) = 0;\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":64\n *             vertices_map1_[i1] = vertices_map1_[i2] = imin(vertices_map1_[i1], vertices_map1_[i2])\n *             faces_ok_[j] = 0\n *         if v1[0] == v3[0] and v1[1] == v3[1] and v1[2] == v3[2]:             # <<<<<<<<<<<<<<\n *             vertices_map1_[i1] = vertices_map1_[i3] = imin(vertices_map1_[i1], vertices_map1_[i3])\n *             faces_ok_[j] = 0\n */\n    }\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":67\n *             vertices_map1_[i1] = vertices_map1_[i3] = imin(vertices_map1_[i1], vertices_map1_[i3])\n *             faces_ok_[j] = 0\n *         if v2[0] == v3[0] and v2[1] == v3[1] and v2[2] == v3[2]:             # <<<<<<<<<<<<<<\n *             vertices_map1_[i2] = vertices_map1_[i3] = imin(vertices_map1_[i2], vertices_map1_[i3])\n *             faces_ok_[j] = 0\n */\n    __pyx_t_13 = 0;\n    __pyx_t_12 = 0;\n    __pyx_t_21 = (((*((float *) ( /* dim=0 */ (__pyx_v_v2.data + __pyx_t_13 * __pyx_v_v2.strides[0]) ))) == (*((float *) ( /* dim=0 */ (__pyx_v_v3.data + __pyx_t_12 * __pyx_v_v3.strides[0]) )))) != 0);\n    if (__pyx_t_21) {\n    } else {\n      __pyx_t_20 = __pyx_t_21;\n      goto __pyx_L14_bool_binop_done;\n    }\n    __pyx_t_12 = 1;\n    __pyx_t_13 = 1;\n    __pyx_t_21 = (((*((float *) ( /* dim=0 */ (__pyx_v_v2.data + __pyx_t_12 * __pyx_v_v2.strides[0]) ))) == (*((float *) ( /* dim=0 */ (__pyx_v_v3.data + __pyx_t_13 * __pyx_v_v3.strides[0]) )))) != 0);\n    if (__pyx_t_21) {\n    } else {\n      __pyx_t_20 = __pyx_t_21;\n      goto __pyx_L14_bool_binop_done;\n    }\n    __pyx_t_13 = 2;\n    __pyx_t_12 = 2;\n    __pyx_t_21 = (((*((float *) ( /* dim=0 */ (__pyx_v_v2.data + __pyx_t_13 * __pyx_v_v2.strides[0]) ))) == (*((float *) ( /* dim=0 */ (__pyx_v_v3.data + __pyx_t_12 * __pyx_v_v3.strides[0]) )))) != 0);\n    __pyx_t_20 = __pyx_t_21;\n    __pyx_L14_bool_binop_done:;\n    if (__pyx_t_20) {\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":68\n *             faces_ok_[j] = 0\n *         if v2[0] == v3[0] and v2[1] == v3[1] and v2[2] == v3[2]:\n *             vertices_map1_[i2] = vertices_map1_[i3] = imin(vertices_map1_[i2], vertices_map1_[i3])             # <<<<<<<<<<<<<<\n *             faces_ok_[j] = 0\n * \n */\n      __pyx_t_12 = __pyx_v_i2;\n      __pyx_t_13 = __pyx_v_i3;\n      __pyx_t_16 = __pyx_f_26_marching_cubes_lewiner_cy_imin((*((int *) ( /* dim=0 */ (__pyx_v_vertices_map1_.data + __pyx_t_12 * __pyx_v_vertices_map1_.strides[0]) ))), (*((int *) ( /* dim=0 */ (__pyx_v_vertices_map1_.data + __pyx_t_13 * __pyx_v_vertices_map1_.strides[0]) ))));\n      __pyx_t_13 = __pyx_v_i2;\n      *((int *) ( /* dim=0 */ (__pyx_v_vertices_map1_.data + __pyx_t_13 * __pyx_v_vertices_map1_.strides[0]) )) = __pyx_t_16;\n      __pyx_t_13 = __pyx_v_i3;\n      *((int *) ( /* dim=0 */ (__pyx_v_vertices_map1_.data + __pyx_t_13 * __pyx_v_vertices_map1_.strides[0]) )) = __pyx_t_16;\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":69\n *         if v2[0] == v3[0] and v2[1] == v3[1] and v2[2] == v3[2]:\n *             vertices_map1_[i2] = vertices_map1_[i3] = imin(vertices_map1_[i2], vertices_map1_[i3])\n *             faces_ok_[j] = 0             # <<<<<<<<<<<<<<\n * \n *     # Create mask and mapping to new vertex indices\n */\n      __pyx_t_13 = __pyx_v_j;\n      *((int *) ( /* dim=0 */ (__pyx_v_faces_ok_.data + __pyx_t_13 * __pyx_v_faces_ok_.strides[0]) )) = 0;\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":67\n *             vertices_map1_[i1] = vertices_map1_[i3] = imin(vertices_map1_[i1], vertices_map1_[i3])\n *             faces_ok_[j] = 0\n *         if v2[0] == v3[0] and v2[1] == v3[1] and v2[2] == v3[2]:             # <<<<<<<<<<<<<<\n *             vertices_map1_[i2] = vertices_map1_[i3] = imin(vertices_map1_[i2], vertices_map1_[i3])\n *             faces_ok_[j] = 0\n */\n    }\n  }\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":72\n * \n *     # Create mask and mapping to new vertex indices\n *     vertices_ok = vertices_map1 == vertices_map0             # <<<<<<<<<<<<<<\n *     vertices_map2 = np.cumsum(vertices_ok) - 1\n * \n */\n  __pyx_t_5 = PyObject_RichCompare(__pyx_v_vertices_map1, __pyx_v_vertices_map0, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 72, __pyx_L1_error)\n  __pyx_v_vertices_ok = __pyx_t_5;\n  __pyx_t_5 = 0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":73\n *     # Create mask and mapping to new vertex indices\n *     vertices_ok = vertices_map1 == vertices_map0\n *     vertices_map2 = np.cumsum(vertices_ok) - 1             # <<<<<<<<<<<<<<\n * \n *     # Apply selection and mapping\n */\n  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 73, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_6);\n  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_cumsum); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 73, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_4);\n  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;\n  __pyx_t_6 = NULL;\n  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {\n    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);\n    if (likely(__pyx_t_6)) {\n      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);\n      __Pyx_INCREF(__pyx_t_6);\n      __Pyx_INCREF(function);\n      __Pyx_DECREF_SET(__pyx_t_4, function);\n    }\n  }\n  __pyx_t_5 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_v_vertices_ok) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_vertices_ok);\n  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;\n  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 73, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_5);\n  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;\n  __pyx_t_4 = __Pyx_PyInt_SubtractObjC(__pyx_t_5, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 73, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_4);\n  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;\n  __pyx_v_vertices_map2 = __pyx_t_4;\n  __pyx_t_4 = 0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":76\n * \n *     # Apply selection and mapping\n *     faces2 = vertices_map2[vertices_map1[faces[faces_ok>0]]]             # <<<<<<<<<<<<<<\n *     vertices2 = vertices[vertices_ok]\n *     arrays2 = [arr[vertices_ok] for arr in arrays]\n */\n  __pyx_t_4 = PyObject_RichCompare(__pyx_v_faces_ok, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 76, __pyx_L1_error)\n  __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_v_faces, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 76, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_5);\n  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;\n  __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_v_vertices_map1, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 76, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_4);\n  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;\n  __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_v_vertices_map2, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 76, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_5);\n  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;\n  __pyx_v_faces2 = __pyx_t_5;\n  __pyx_t_5 = 0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":77\n *     # Apply selection and mapping\n *     faces2 = vertices_map2[vertices_map1[faces[faces_ok>0]]]\n *     vertices2 = vertices[vertices_ok]             # <<<<<<<<<<<<<<\n *     arrays2 = [arr[vertices_ok] for arr in arrays]\n * \n */\n  __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_v_vertices, __pyx_v_vertices_ok); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 77, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_5);\n  __pyx_v_vertices2 = __pyx_t_5;\n  __pyx_t_5 = 0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":78\n *     faces2 = vertices_map2[vertices_map1[faces[faces_ok>0]]]\n *     vertices2 = vertices[vertices_ok]\n *     arrays2 = [arr[vertices_ok] for arr in arrays]             # <<<<<<<<<<<<<<\n * \n *     return (vertices2, faces2) + tuple(arrays2)\n */\n  __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 78, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_5);\n  __pyx_t_4 = __pyx_v_arrays; __Pyx_INCREF(__pyx_t_4); __pyx_t_3 = 0;\n  for (;;) {\n    if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_4)) break;\n    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS\n    __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_3); __Pyx_INCREF(__pyx_t_6); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 78, __pyx_L1_error)\n    #else\n    __pyx_t_6 = PySequence_ITEM(__pyx_t_4, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 78, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_6);\n    #endif\n    __Pyx_XDECREF_SET(__pyx_v_arr, __pyx_t_6);\n    __pyx_t_6 = 0;\n    __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_v_arr, __pyx_v_vertices_ok); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 78, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_6);\n    if (unlikely(__Pyx_ListComp_Append(__pyx_t_5, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 78, __pyx_L1_error)\n    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;\n  }\n  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;\n  __pyx_v_arrays2 = ((PyObject*)__pyx_t_5);\n  __pyx_t_5 = 0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":80\n *     arrays2 = [arr[vertices_ok] for arr in arrays]\n * \n *     return (vertices2, faces2) + tuple(arrays2)             # <<<<<<<<<<<<<<\n * \n * \n */\n  __Pyx_XDECREF(__pyx_r);\n  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 80, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_5);\n  __Pyx_INCREF(__pyx_v_vertices2);\n  __Pyx_GIVEREF(__pyx_v_vertices2);\n  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_vertices2);\n  __Pyx_INCREF(__pyx_v_faces2);\n  __Pyx_GIVEREF(__pyx_v_faces2);\n  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_faces2);\n  __pyx_t_4 = PyList_AsTuple(__pyx_v_arrays2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 80, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_4);\n  __pyx_t_6 = PyNumber_Add(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 80, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_6);\n  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;\n  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;\n  __pyx_r = __pyx_t_6;\n  __pyx_t_6 = 0;\n  goto __pyx_L0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":41\n * # todo: can we disable Cython from checking for zero division? Sometimes we know that it never happens!\n * \n * def remove_degenerate_faces(vertices, faces, *arrays):             # <<<<<<<<<<<<<<\n * \n *     vertices_map0 = np.arange(len(vertices), dtype=np.int32)\n */\n\n  /* function exit code */\n  __pyx_L1_error:;\n  __Pyx_XDECREF(__pyx_t_1);\n  __Pyx_XDECREF(__pyx_t_2);\n  __Pyx_XDECREF(__pyx_t_4);\n  __Pyx_XDECREF(__pyx_t_5);\n  __Pyx_XDECREF(__pyx_t_6);\n  __PYX_XDEC_MEMVIEW(&__pyx_t_7, 1);\n  __PYX_XDEC_MEMVIEW(&__pyx_t_8, 1);\n  __PYX_XDEC_MEMVIEW(&__pyx_t_9, 1);\n  __PYX_XDEC_MEMVIEW(&__pyx_t_17, 1);\n  __PYX_XDEC_MEMVIEW(&__pyx_t_18, 1);\n  __PYX_XDEC_MEMVIEW(&__pyx_t_19, 1);\n  __Pyx_AddTraceback(\"_marching_cubes_lewiner_cy.remove_degenerate_faces\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n  __pyx_r = NULL;\n  __pyx_L0:;\n  __Pyx_XDECREF(__pyx_v_vertices_map0);\n  __Pyx_XDECREF(__pyx_v_vertices_map1);\n  __Pyx_XDECREF(__pyx_v_faces_ok);\n  __PYX_XDEC_MEMVIEW(&__pyx_v_vertices_, 1);\n  __PYX_XDEC_MEMVIEW(&__pyx_v_v1, 1);\n  __PYX_XDEC_MEMVIEW(&__pyx_v_v2, 1);\n  __PYX_XDEC_MEMVIEW(&__pyx_v_v3, 1);\n  __PYX_XDEC_MEMVIEW(&__pyx_v_faces_, 1);\n  __PYX_XDEC_MEMVIEW(&__pyx_v_vertices_map1_, 1);\n  __PYX_XDEC_MEMVIEW(&__pyx_v_faces_ok_, 1);\n  __Pyx_XDECREF(__pyx_v_vertices_ok);\n  __Pyx_XDECREF(__pyx_v_vertices_map2);\n  __Pyx_XDECREF(__pyx_v_faces2);\n  __Pyx_XDECREF(__pyx_v_vertices2);\n  __Pyx_XDECREF(__pyx_v_arrays2);\n  __Pyx_XDECREF(__pyx_v_arr);\n  __Pyx_XGIVEREF(__pyx_r);\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\n/* \"_marching_cubes_lewiner_cy.pyx\":184\n * \n * \n *     def __init__(self, LutProvider luts, int nx, int ny, int nz):             # <<<<<<<<<<<<<<\n *         self.luts = luts\n *         self.nx, self.ny, self.nz = nx, ny, nz\n */\n\n/* Python wrapper */\nstatic int __pyx_pw_26_marching_cubes_lewiner_cy_4Cell_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/\nstatic int __pyx_pw_26_marching_cubes_lewiner_cy_4Cell_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {\n  struct __pyx_obj_26_marching_cubes_lewiner_cy_LutProvider *__pyx_v_luts = 0;\n  int __pyx_v_nx;\n  int __pyx_v_ny;\n  int __pyx_v_nz;\n  int __pyx_lineno = 0;\n  const char *__pyx_filename = NULL;\n  int __pyx_clineno = 0;\n  int __pyx_r;\n  __Pyx_RefNannyDeclarations\n  __Pyx_RefNannySetupContext(\"__init__ (wrapper)\", 0);\n  {\n    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_luts,&__pyx_n_s_nx,&__pyx_n_s_ny,&__pyx_n_s_nz,0};\n    PyObject* values[4] = {0,0,0,0};\n    if (unlikely(__pyx_kwds)) {\n      Py_ssize_t kw_args;\n      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);\n      switch (pos_args) {\n        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);\n        CYTHON_FALLTHROUGH;\n        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);\n        CYTHON_FALLTHROUGH;\n        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);\n        CYTHON_FALLTHROUGH;\n        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);\n        CYTHON_FALLTHROUGH;\n        case  0: break;\n        default: goto __pyx_L5_argtuple_error;\n      }\n      kw_args = PyDict_Size(__pyx_kwds);\n      switch (pos_args) {\n        case  0:\n        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_luts)) != 0)) kw_args--;\n        else goto __pyx_L5_argtuple_error;\n        CYTHON_FALLTHROUGH;\n        case  1:\n        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nx)) != 0)) kw_args--;\n        else {\n          __Pyx_RaiseArgtupleInvalid(\"__init__\", 1, 4, 4, 1); __PYX_ERR(0, 184, __pyx_L3_error)\n        }\n        CYTHON_FALLTHROUGH;\n        case  2:\n        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ny)) != 0)) kw_args--;\n        else {\n          __Pyx_RaiseArgtupleInvalid(\"__init__\", 1, 4, 4, 2); __PYX_ERR(0, 184, __pyx_L3_error)\n        }\n        CYTHON_FALLTHROUGH;\n        case  3:\n        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nz)) != 0)) kw_args--;\n        else {\n          __Pyx_RaiseArgtupleInvalid(\"__init__\", 1, 4, 4, 3); __PYX_ERR(0, 184, __pyx_L3_error)\n        }\n      }\n      if (unlikely(kw_args > 0)) {\n        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, \"__init__\") < 0)) __PYX_ERR(0, 184, __pyx_L3_error)\n      }\n    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {\n      goto __pyx_L5_argtuple_error;\n    } else {\n      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);\n      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);\n      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);\n      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);\n    }\n    __pyx_v_luts = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_LutProvider *)values[0]);\n    __pyx_v_nx = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_nx == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 184, __pyx_L3_error)\n    __pyx_v_ny = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_ny == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 184, __pyx_L3_error)\n    __pyx_v_nz = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_nz == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 184, __pyx_L3_error)\n  }\n  goto __pyx_L4_argument_unpacking_done;\n  __pyx_L5_argtuple_error:;\n  __Pyx_RaiseArgtupleInvalid(\"__init__\", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 184, __pyx_L3_error)\n  __pyx_L3_error:;\n  __Pyx_AddTraceback(\"_marching_cubes_lewiner_cy.Cell.__init__\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n  __Pyx_RefNannyFinishContext();\n  return -1;\n  __pyx_L4_argument_unpacking_done:;\n  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_luts), __pyx_ptype_26_marching_cubes_lewiner_cy_LutProvider, 1, \"luts\", 0))) __PYX_ERR(0, 184, __pyx_L1_error)\n  __pyx_r = __pyx_pf_26_marching_cubes_lewiner_cy_4Cell___init__(((struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_self), __pyx_v_luts, __pyx_v_nx, __pyx_v_ny, __pyx_v_nz);\n\n  /* function exit code */\n  goto __pyx_L0;\n  __pyx_L1_error:;\n  __pyx_r = -1;\n  __pyx_L0:;\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\nstatic int __pyx_pf_26_marching_cubes_lewiner_cy_4Cell___init__(struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *__pyx_v_self, struct __pyx_obj_26_marching_cubes_lewiner_cy_LutProvider *__pyx_v_luts, int __pyx_v_nx, int __pyx_v_ny, int __pyx_v_nz) {\n  int __pyx_v_i;\n  int __pyx_r;\n  __Pyx_RefNannyDeclarations\n  int __pyx_t_1;\n  int __pyx_t_2;\n  int __pyx_t_3;\n  int __pyx_t_4;\n  int __pyx_t_5;\n  long __pyx_t_6;\n  long __pyx_t_7;\n  int *__pyx_t_8;\n  int __pyx_lineno = 0;\n  const char *__pyx_filename = NULL;\n  int __pyx_clineno = 0;\n  __Pyx_RefNannySetupContext(\"__init__\", 0);\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":185\n * \n *     def __init__(self, LutProvider luts, int nx, int ny, int nz):\n *         self.luts = luts             # <<<<<<<<<<<<<<\n *         self.nx, self.ny, self.nz = nx, ny, nz\n * \n */\n  __Pyx_INCREF(((PyObject *)__pyx_v_luts));\n  __Pyx_GIVEREF(((PyObject *)__pyx_v_luts));\n  __Pyx_GOTREF(__pyx_v_self->luts);\n  __Pyx_DECREF(((PyObject *)__pyx_v_self->luts));\n  __pyx_v_self->luts = __pyx_v_luts;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":186\n *     def __init__(self, LutProvider luts, int nx, int ny, int nz):\n *         self.luts = luts\n *         self.nx, self.ny, self.nz = nx, ny, nz             # <<<<<<<<<<<<<<\n * \n *         # Allocate face layers\n */\n  __pyx_t_1 = __pyx_v_nx;\n  __pyx_t_2 = __pyx_v_ny;\n  __pyx_t_3 = __pyx_v_nz;\n  __pyx_v_self->nx = __pyx_t_1;\n  __pyx_v_self->ny = __pyx_t_2;\n  __pyx_v_self->nz = __pyx_t_3;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":189\n * \n *         # Allocate face layers\n *         self.faceLayer1 = <int *>malloc(self.nx*self.ny*4 * sizeof(int))             # <<<<<<<<<<<<<<\n *         self.faceLayer2 = <int *>malloc(self.nx*self.ny*4 * sizeof(int))\n * \n */\n  __pyx_v_self->faceLayer1 = ((int *)malloc((((__pyx_v_self->nx * __pyx_v_self->ny) * 4) * (sizeof(int)))));\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":190\n *         # Allocate face layers\n *         self.faceLayer1 = <int *>malloc(self.nx*self.ny*4 * sizeof(int))\n *         self.faceLayer2 = <int *>malloc(self.nx*self.ny*4 * sizeof(int))             # <<<<<<<<<<<<<<\n * \n *         if (self.faceLayer1 is NULL or self.faceLayer2 is NULL or\n */\n  __pyx_v_self->faceLayer2 = ((int *)malloc((((__pyx_v_self->nx * __pyx_v_self->ny) * 4) * (sizeof(int)))));\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":192\n *         self.faceLayer2 = <int *>malloc(self.nx*self.ny*4 * sizeof(int))\n * \n *         if (self.faceLayer1 is NULL or self.faceLayer2 is NULL or             # <<<<<<<<<<<<<<\n *             self.vv is NULL or self.vg is NULL or self._vertices is NULL or\n *             self._normals is NULL or self._values is NULL or\n */\n  __pyx_t_5 = ((__pyx_v_self->faceLayer1 == NULL) != 0);\n  if (!__pyx_t_5) {\n  } else {\n    __pyx_t_4 = __pyx_t_5;\n    goto __pyx_L4_bool_binop_done;\n  }\n  __pyx_t_5 = ((__pyx_v_self->faceLayer2 == NULL) != 0);\n  if (!__pyx_t_5) {\n  } else {\n    __pyx_t_4 = __pyx_t_5;\n    goto __pyx_L4_bool_binop_done;\n  }\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":193\n * \n *         if (self.faceLayer1 is NULL or self.faceLayer2 is NULL or\n *             self.vv is NULL or self.vg is NULL or self._vertices is NULL or             # <<<<<<<<<<<<<<\n *             self._normals is NULL or self._values is NULL or\n *             self._faces is NULL):\n */\n  __pyx_t_5 = ((__pyx_v_self->vv == NULL) != 0);\n  if (!__pyx_t_5) {\n  } else {\n    __pyx_t_4 = __pyx_t_5;\n    goto __pyx_L4_bool_binop_done;\n  }\n  __pyx_t_5 = ((__pyx_v_self->vg == NULL) != 0);\n  if (!__pyx_t_5) {\n  } else {\n    __pyx_t_4 = __pyx_t_5;\n    goto __pyx_L4_bool_binop_done;\n  }\n  __pyx_t_5 = ((__pyx_v_self->_vertices == NULL) != 0);\n  if (!__pyx_t_5) {\n  } else {\n    __pyx_t_4 = __pyx_t_5;\n    goto __pyx_L4_bool_binop_done;\n  }\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":194\n *         if (self.faceLayer1 is NULL or self.faceLayer2 is NULL or\n *             self.vv is NULL or self.vg is NULL or self._vertices is NULL or\n *             self._normals is NULL or self._values is NULL or             # <<<<<<<<<<<<<<\n *             self._faces is NULL):\n *             raise MemoryError()\n */\n  __pyx_t_5 = ((__pyx_v_self->_normals == NULL) != 0);\n  if (!__pyx_t_5) {\n  } else {\n    __pyx_t_4 = __pyx_t_5;\n    goto __pyx_L4_bool_binop_done;\n  }\n  __pyx_t_5 = ((__pyx_v_self->_values == NULL) != 0);\n  if (!__pyx_t_5) {\n  } else {\n    __pyx_t_4 = __pyx_t_5;\n    goto __pyx_L4_bool_binop_done;\n  }\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":195\n *             self.vv is NULL or self.vg is NULL or self._vertices is NULL or\n *             self._normals is NULL or self._values is NULL or\n *             self._faces is NULL):             # <<<<<<<<<<<<<<\n *             raise MemoryError()\n * \n */\n  __pyx_t_5 = ((__pyx_v_self->_faces == NULL) != 0);\n  __pyx_t_4 = __pyx_t_5;\n  __pyx_L4_bool_binop_done:;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":192\n *         self.faceLayer2 = <int *>malloc(self.nx*self.ny*4 * sizeof(int))\n * \n *         if (self.faceLayer1 is NULL or self.faceLayer2 is NULL or             # <<<<<<<<<<<<<<\n *             self.vv is NULL or self.vg is NULL or self._vertices is NULL or\n *             self._normals is NULL or self._values is NULL or\n */\n  if (unlikely(__pyx_t_4)) {\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":196\n *             self._normals is NULL or self._values is NULL or\n *             self._faces is NULL):\n *             raise MemoryError()             # <<<<<<<<<<<<<<\n * \n *         cdef int i\n */\n    PyErr_NoMemory(); __PYX_ERR(0, 196, __pyx_L1_error)\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":192\n *         self.faceLayer2 = <int *>malloc(self.nx*self.ny*4 * sizeof(int))\n * \n *         if (self.faceLayer1 is NULL or self.faceLayer2 is NULL or             # <<<<<<<<<<<<<<\n *             self.vv is NULL or self.vg is NULL or self._vertices is NULL or\n *             self._normals is NULL or self._values is NULL or\n */\n  }\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":199\n * \n *         cdef int i\n *         for i in range(self.nx*self.ny*4):             # <<<<<<<<<<<<<<\n *             self.faceLayer1[i] = -1\n *             self.faceLayer2[i] = -1\n */\n  __pyx_t_6 = ((__pyx_v_self->nx * __pyx_v_self->ny) * 4);\n  __pyx_t_7 = __pyx_t_6;\n  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_7; __pyx_t_3+=1) {\n    __pyx_v_i = __pyx_t_3;\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":200\n *         cdef int i\n *         for i in range(self.nx*self.ny*4):\n *             self.faceLayer1[i] = -1             # <<<<<<<<<<<<<<\n *             self.faceLayer2[i] = -1\n *         self.faceLayer = self.faceLayer1\n */\n    (__pyx_v_self->faceLayer1[__pyx_v_i]) = -1;\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":201\n *         for i in range(self.nx*self.ny*4):\n *             self.faceLayer1[i] = -1\n *             self.faceLayer2[i] = -1             # <<<<<<<<<<<<<<\n *         self.faceLayer = self.faceLayer1\n * \n */\n    (__pyx_v_self->faceLayer2[__pyx_v_i]) = -1;\n  }\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":202\n *             self.faceLayer1[i] = -1\n *             self.faceLayer2[i] = -1\n *         self.faceLayer = self.faceLayer1             # <<<<<<<<<<<<<<\n * \n * \n */\n  __pyx_t_8 = __pyx_v_self->faceLayer1;\n  __pyx_v_self->faceLayer = __pyx_t_8;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":184\n * \n * \n *     def __init__(self, LutProvider luts, int nx, int ny, int nz):             # <<<<<<<<<<<<<<\n *         self.luts = luts\n *         self.nx, self.ny, self.nz = nx, ny, nz\n */\n\n  /* function exit code */\n  __pyx_r = 0;\n  goto __pyx_L0;\n  __pyx_L1_error:;\n  __Pyx_AddTraceback(\"_marching_cubes_lewiner_cy.Cell.__init__\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n  __pyx_r = -1;\n  __pyx_L0:;\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\n/* \"_marching_cubes_lewiner_cy.pyx\":205\n * \n * \n *     def __cinit__(self):             # <<<<<<<<<<<<<<\n * \n *         # Init tiny arrays for vertices and gradients at the vertices\n */\n\n/* Python wrapper */\nstatic int __pyx_pw_26_marching_cubes_lewiner_cy_4Cell_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/\nstatic int __pyx_pw_26_marching_cubes_lewiner_cy_4Cell_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {\n  int __pyx_r;\n  __Pyx_RefNannyDeclarations\n  __Pyx_RefNannySetupContext(\"__cinit__ (wrapper)\", 0);\n  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {\n    __Pyx_RaiseArgtupleInvalid(\"__cinit__\", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}\n  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, \"__cinit__\", 0))) return -1;\n  __pyx_r = __pyx_pf_26_marching_cubes_lewiner_cy_4Cell_2__cinit__(((struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_self));\n\n  /* function exit code */\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\nstatic int __pyx_pf_26_marching_cubes_lewiner_cy_4Cell_2__cinit__(struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *__pyx_v_self) {\n  int __pyx_v_i;\n  int __pyx_v_j;\n  int __pyx_r;\n  __Pyx_RefNannyDeclarations\n  int __pyx_t_1;\n  int __pyx_t_2;\n  int __pyx_t_3;\n  int __pyx_t_4;\n  int __pyx_t_5;\n  int __pyx_t_6;\n  __Pyx_RefNannySetupContext(\"__cinit__\", 0);\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":208\n * \n *         # Init tiny arrays for vertices and gradients at the vertices\n *         self.vv = <double *>malloc(8 * sizeof(double))             # <<<<<<<<<<<<<<\n *         self.vg = <double *>malloc(8*3 * sizeof(double))\n * \n */\n  __pyx_v_self->vv = ((double *)malloc((8 * (sizeof(double)))));\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":209\n *         # Init tiny arrays for vertices and gradients at the vertices\n *         self.vv = <double *>malloc(8 * sizeof(double))\n *         self.vg = <double *>malloc(8*3 * sizeof(double))             # <<<<<<<<<<<<<<\n * \n *         # Init face layers\n */\n  __pyx_v_self->vg = ((double *)malloc((24 * (sizeof(double)))));\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":212\n * \n *         # Init face layers\n *         self.faceLayer1 = NULL             # <<<<<<<<<<<<<<\n *         self.faceLayer2 = NULL\n * \n */\n  __pyx_v_self->faceLayer1 = NULL;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":213\n *         # Init face layers\n *         self.faceLayer1 = NULL\n *         self.faceLayer2 = NULL             # <<<<<<<<<<<<<<\n * \n *         # Init vertices\n */\n  __pyx_v_self->faceLayer2 = NULL;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":216\n * \n *         # Init vertices\n *         self._vertexCount = 0             # <<<<<<<<<<<<<<\n *         self._vertexMaxCount = 8\n *         self._vertices = <float *>malloc(self._vertexMaxCount*3 * sizeof(float))\n */\n  __pyx_v_self->_vertexCount = 0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":217\n *         # Init vertices\n *         self._vertexCount = 0\n *         self._vertexMaxCount = 8             # <<<<<<<<<<<<<<\n *         self._vertices = <float *>malloc(self._vertexMaxCount*3 * sizeof(float))\n *         self._normals = <float *>malloc(self._vertexMaxCount*3 * sizeof(float))\n */\n  __pyx_v_self->_vertexMaxCount = 8;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":218\n *         self._vertexCount = 0\n *         self._vertexMaxCount = 8\n *         self._vertices = <float *>malloc(self._vertexMaxCount*3 * sizeof(float))             # <<<<<<<<<<<<<<\n *         self._normals = <float *>malloc(self._vertexMaxCount*3 * sizeof(float))\n *         self._values = <float *>malloc(self._vertexMaxCount * sizeof(float))\n */\n  __pyx_v_self->_vertices = ((float *)malloc(((__pyx_v_self->_vertexMaxCount * 3) * (sizeof(float)))));\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":219\n *         self._vertexMaxCount = 8\n *         self._vertices = <float *>malloc(self._vertexMaxCount*3 * sizeof(float))\n *         self._normals = <float *>malloc(self._vertexMaxCount*3 * sizeof(float))             # <<<<<<<<<<<<<<\n *         self._values = <float *>malloc(self._vertexMaxCount * sizeof(float))\n *         # Clear normals and values\n */\n  __pyx_v_self->_normals = ((float *)malloc(((__pyx_v_self->_vertexMaxCount * 3) * (sizeof(float)))));\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":220\n *         self._vertices = <float *>malloc(self._vertexMaxCount*3 * sizeof(float))\n *         self._normals = <float *>malloc(self._vertexMaxCount*3 * sizeof(float))\n *         self._values = <float *>malloc(self._vertexMaxCount * sizeof(float))             # <<<<<<<<<<<<<<\n *         # Clear normals and values\n *         cdef int i, j\n */\n  __pyx_v_self->_values = ((float *)malloc((__pyx_v_self->_vertexMaxCount * (sizeof(float)))));\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":223\n *         # Clear normals and values\n *         cdef int i, j\n *         if self._values is not NULL and self._normals is not NULL:             # <<<<<<<<<<<<<<\n *             for i in range(self._vertexMaxCount):\n *                 self._values[i] = 0.0\n */\n  __pyx_t_2 = ((__pyx_v_self->_values != NULL) != 0);\n  if (__pyx_t_2) {\n  } else {\n    __pyx_t_1 = __pyx_t_2;\n    goto __pyx_L4_bool_binop_done;\n  }\n  __pyx_t_2 = ((__pyx_v_self->_normals != NULL) != 0);\n  __pyx_t_1 = __pyx_t_2;\n  __pyx_L4_bool_binop_done:;\n  if (__pyx_t_1) {\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":224\n *         cdef int i, j\n *         if self._values is not NULL and self._normals is not NULL:\n *             for i in range(self._vertexMaxCount):             # <<<<<<<<<<<<<<\n *                 self._values[i] = 0.0\n *                 for j in range(3):\n */\n    __pyx_t_3 = __pyx_v_self->_vertexMaxCount;\n    __pyx_t_4 = __pyx_t_3;\n    for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {\n      __pyx_v_i = __pyx_t_5;\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":225\n *         if self._values is not NULL and self._normals is not NULL:\n *             for i in range(self._vertexMaxCount):\n *                 self._values[i] = 0.0             # <<<<<<<<<<<<<<\n *                 for j in range(3):\n *                     self._normals[i*3+j] = 0.0\n */\n      (__pyx_v_self->_values[__pyx_v_i]) = 0.0;\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":226\n *             for i in range(self._vertexMaxCount):\n *                 self._values[i] = 0.0\n *                 for j in range(3):             # <<<<<<<<<<<<<<\n *                     self._normals[i*3+j] = 0.0\n * \n */\n      for (__pyx_t_6 = 0; __pyx_t_6 < 3; __pyx_t_6+=1) {\n        __pyx_v_j = __pyx_t_6;\n\n        /* \"_marching_cubes_lewiner_cy.pyx\":227\n *                 self._values[i] = 0.0\n *                 for j in range(3):\n *                     self._normals[i*3+j] = 0.0             # <<<<<<<<<<<<<<\n * \n *         # Init faces\n */\n        (__pyx_v_self->_normals[((__pyx_v_i * 3) + __pyx_v_j)]) = 0.0;\n      }\n    }\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":223\n *         # Clear normals and values\n *         cdef int i, j\n *         if self._values is not NULL and self._normals is not NULL:             # <<<<<<<<<<<<<<\n *             for i in range(self._vertexMaxCount):\n *                 self._values[i] = 0.0\n */\n  }\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":230\n * \n *         # Init faces\n *         self._faceCount = 0             # <<<<<<<<<<<<<<\n *         self._faceMaxCount = 8\n *         self._faces = <int *>malloc(self._faceMaxCount * sizeof(int))\n */\n  __pyx_v_self->_faceCount = 0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":231\n *         # Init faces\n *         self._faceCount = 0\n *         self._faceMaxCount = 8             # <<<<<<<<<<<<<<\n *         self._faces = <int *>malloc(self._faceMaxCount * sizeof(int))\n * \n */\n  __pyx_v_self->_faceMaxCount = 8;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":232\n *         self._faceCount = 0\n *         self._faceMaxCount = 8\n *         self._faces = <int *>malloc(self._faceMaxCount * sizeof(int))             # <<<<<<<<<<<<<<\n * \n * \n */\n  __pyx_v_self->_faces = ((int *)malloc((__pyx_v_self->_faceMaxCount * (sizeof(int)))));\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":205\n * \n * \n *     def __cinit__(self):             # <<<<<<<<<<<<<<\n * \n *         # Init tiny arrays for vertices and gradients at the vertices\n */\n\n  /* function exit code */\n  __pyx_r = 0;\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\n/* \"_marching_cubes_lewiner_cy.pyx\":235\n * \n * \n *     def __dealloc__(self):             # <<<<<<<<<<<<<<\n *         free(self.vv)\n *         free(self.vg)\n */\n\n/* Python wrapper */\nstatic void __pyx_pw_26_marching_cubes_lewiner_cy_4Cell_5__dealloc__(PyObject *__pyx_v_self); /*proto*/\nstatic void __pyx_pw_26_marching_cubes_lewiner_cy_4Cell_5__dealloc__(PyObject *__pyx_v_self) {\n  __Pyx_RefNannyDeclarations\n  __Pyx_RefNannySetupContext(\"__dealloc__ (wrapper)\", 0);\n  __pyx_pf_26_marching_cubes_lewiner_cy_4Cell_4__dealloc__(((struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_self));\n\n  /* function exit code */\n  __Pyx_RefNannyFinishContext();\n}\n\nstatic void __pyx_pf_26_marching_cubes_lewiner_cy_4Cell_4__dealloc__(struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *__pyx_v_self) {\n  __Pyx_RefNannyDeclarations\n  __Pyx_RefNannySetupContext(\"__dealloc__\", 0);\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":236\n * \n *     def __dealloc__(self):\n *         free(self.vv)             # <<<<<<<<<<<<<<\n *         free(self.vg)\n *         free(self.faceLayer1)\n */\n  free(__pyx_v_self->vv);\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":237\n *     def __dealloc__(self):\n *         free(self.vv)\n *         free(self.vg)             # <<<<<<<<<<<<<<\n *         free(self.faceLayer1)\n *         free(self.faceLayer2)\n */\n  free(__pyx_v_self->vg);\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":238\n *         free(self.vv)\n *         free(self.vg)\n *         free(self.faceLayer1)             # <<<<<<<<<<<<<<\n *         free(self.faceLayer2)\n *         free(self._vertices)\n */\n  free(__pyx_v_self->faceLayer1);\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":239\n *         free(self.vg)\n *         free(self.faceLayer1)\n *         free(self.faceLayer2)             # <<<<<<<<<<<<<<\n *         free(self._vertices)\n *         free(self._normals)\n */\n  free(__pyx_v_self->faceLayer2);\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":240\n *         free(self.faceLayer1)\n *         free(self.faceLayer2)\n *         free(self._vertices)             # <<<<<<<<<<<<<<\n *         free(self._normals)\n *         free(self._values)\n */\n  free(__pyx_v_self->_vertices);\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":241\n *         free(self.faceLayer2)\n *         free(self._vertices)\n *         free(self._normals)             # <<<<<<<<<<<<<<\n *         free(self._values)\n *         free(self._faces)\n */\n  free(__pyx_v_self->_normals);\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":242\n *         free(self._vertices)\n *         free(self._normals)\n *         free(self._values)             # <<<<<<<<<<<<<<\n *         free(self._faces)\n * \n */\n  free(__pyx_v_self->_values);\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":243\n *         free(self._normals)\n *         free(self._values)\n *         free(self._faces)             # <<<<<<<<<<<<<<\n * \n * \n */\n  free(__pyx_v_self->_faces);\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":235\n * \n * \n *     def __dealloc__(self):             # <<<<<<<<<<<<<<\n *         free(self.vv)\n *         free(self.vg)\n */\n\n  /* function exit code */\n  __Pyx_RefNannyFinishContext();\n}\n\n/* \"_marching_cubes_lewiner_cy.pyx\":246\n * \n * \n *     cdef void _increase_size_vertices(self):             # <<<<<<<<<<<<<<\n *         \"\"\" Increase the size of the vertices array by a factor two.\n *         \"\"\"\n */\n\nstatic void __pyx_f_26_marching_cubes_lewiner_cy_4Cell__increase_size_vertices(struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *__pyx_v_self) {\n  int __pyx_v_newMaxCount;\n  float *__pyx_v_newVertices;\n  float *__pyx_v_newNormals;\n  float *__pyx_v_newValues;\n  int __pyx_v_i;\n  int __pyx_v_j;\n  __Pyx_RefNannyDeclarations\n  int __pyx_t_1;\n  int __pyx_t_2;\n  int __pyx_t_3;\n  int __pyx_t_4;\n  int __pyx_t_5;\n  int __pyx_t_6;\n  int __pyx_lineno = 0;\n  const char *__pyx_filename = NULL;\n  int __pyx_clineno = 0;\n  __Pyx_RefNannySetupContext(\"_increase_size_vertices\", 0);\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":250\n *         \"\"\"\n *         # Allocate new array\n *         cdef int newMaxCount = self._vertexMaxCount * 2             # <<<<<<<<<<<<<<\n *         cdef float *newVertices = <float *>malloc(newMaxCount*3 * sizeof(float))\n *         cdef float *newNormals = <float *>malloc(newMaxCount*3 * sizeof(float))\n */\n  __pyx_v_newMaxCount = (__pyx_v_self->_vertexMaxCount * 2);\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":251\n *         # Allocate new array\n *         cdef int newMaxCount = self._vertexMaxCount * 2\n *         cdef float *newVertices = <float *>malloc(newMaxCount*3 * sizeof(float))             # <<<<<<<<<<<<<<\n *         cdef float *newNormals = <float *>malloc(newMaxCount*3 * sizeof(float))\n *         cdef float *newValues = <float *>malloc(newMaxCount * sizeof(float))\n */\n  __pyx_v_newVertices = ((float *)malloc(((__pyx_v_newMaxCount * 3) * (sizeof(float)))));\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":252\n *         cdef int newMaxCount = self._vertexMaxCount * 2\n *         cdef float *newVertices = <float *>malloc(newMaxCount*3 * sizeof(float))\n *         cdef float *newNormals = <float *>malloc(newMaxCount*3 * sizeof(float))             # <<<<<<<<<<<<<<\n *         cdef float *newValues = <float *>malloc(newMaxCount * sizeof(float))\n *         if newVertices is NULL or newNormals is NULL or newValues is NULL:\n */\n  __pyx_v_newNormals = ((float *)malloc(((__pyx_v_newMaxCount * 3) * (sizeof(float)))));\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":253\n *         cdef float *newVertices = <float *>malloc(newMaxCount*3 * sizeof(float))\n *         cdef float *newNormals = <float *>malloc(newMaxCount*3 * sizeof(float))\n *         cdef float *newValues = <float *>malloc(newMaxCount * sizeof(float))             # <<<<<<<<<<<<<<\n *         if newVertices is NULL or newNormals is NULL or newValues is NULL:\n *             free(newVertices)\n */\n  __pyx_v_newValues = ((float *)malloc((__pyx_v_newMaxCount * (sizeof(float)))));\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":254\n *         cdef float *newNormals = <float *>malloc(newMaxCount*3 * sizeof(float))\n *         cdef float *newValues = <float *>malloc(newMaxCount * sizeof(float))\n *         if newVertices is NULL or newNormals is NULL or newValues is NULL:             # <<<<<<<<<<<<<<\n *             free(newVertices)\n *             free(newNormals)\n */\n  __pyx_t_2 = ((__pyx_v_newVertices == NULL) != 0);\n  if (!__pyx_t_2) {\n  } else {\n    __pyx_t_1 = __pyx_t_2;\n    goto __pyx_L4_bool_binop_done;\n  }\n  __pyx_t_2 = ((__pyx_v_newNormals == NULL) != 0);\n  if (!__pyx_t_2) {\n  } else {\n    __pyx_t_1 = __pyx_t_2;\n    goto __pyx_L4_bool_binop_done;\n  }\n  __pyx_t_2 = ((__pyx_v_newValues == NULL) != 0);\n  __pyx_t_1 = __pyx_t_2;\n  __pyx_L4_bool_binop_done:;\n  if (unlikely(__pyx_t_1)) {\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":255\n *         cdef float *newValues = <float *>malloc(newMaxCount * sizeof(float))\n *         if newVertices is NULL or newNormals is NULL or newValues is NULL:\n *             free(newVertices)             # <<<<<<<<<<<<<<\n *             free(newNormals)\n *             free(newValues)\n */\n    free(__pyx_v_newVertices);\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":256\n *         if newVertices is NULL or newNormals is NULL or newValues is NULL:\n *             free(newVertices)\n *             free(newNormals)             # <<<<<<<<<<<<<<\n *             free(newValues)\n *             raise MemoryError()\n */\n    free(__pyx_v_newNormals);\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":257\n *             free(newVertices)\n *             free(newNormals)\n *             free(newValues)             # <<<<<<<<<<<<<<\n *             raise MemoryError()\n *         # Clear\n */\n    free(__pyx_v_newValues);\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":258\n *             free(newNormals)\n *             free(newValues)\n *             raise MemoryError()             # <<<<<<<<<<<<<<\n *         # Clear\n *         cdef int i, j\n */\n    PyErr_NoMemory(); __PYX_ERR(0, 258, __pyx_L1_error)\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":254\n *         cdef float *newNormals = <float *>malloc(newMaxCount*3 * sizeof(float))\n *         cdef float *newValues = <float *>malloc(newMaxCount * sizeof(float))\n *         if newVertices is NULL or newNormals is NULL or newValues is NULL:             # <<<<<<<<<<<<<<\n *             free(newVertices)\n *             free(newNormals)\n */\n  }\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":261\n *         # Clear\n *         cdef int i, j\n *         for i in range(self._vertexCount, newMaxCount):             # <<<<<<<<<<<<<<\n *             newValues[i] = 0.0\n *             for j in range(3):\n */\n  __pyx_t_3 = __pyx_v_newMaxCount;\n  __pyx_t_4 = __pyx_t_3;\n  for (__pyx_t_5 = __pyx_v_self->_vertexCount; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {\n    __pyx_v_i = __pyx_t_5;\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":262\n *         cdef int i, j\n *         for i in range(self._vertexCount, newMaxCount):\n *             newValues[i] = 0.0             # <<<<<<<<<<<<<<\n *             for j in range(3):\n *                 newNormals[i*3+j] = 0.0\n */\n    (__pyx_v_newValues[__pyx_v_i]) = 0.0;\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":263\n *         for i in range(self._vertexCount, newMaxCount):\n *             newValues[i] = 0.0\n *             for j in range(3):             # <<<<<<<<<<<<<<\n *                 newNormals[i*3+j] = 0.0\n *         # Copy\n */\n    for (__pyx_t_6 = 0; __pyx_t_6 < 3; __pyx_t_6+=1) {\n      __pyx_v_j = __pyx_t_6;\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":264\n *             newValues[i] = 0.0\n *             for j in range(3):\n *                 newNormals[i*3+j] = 0.0             # <<<<<<<<<<<<<<\n *         # Copy\n *         for i in range(self._vertexCount):\n */\n      (__pyx_v_newNormals[((__pyx_v_i * 3) + __pyx_v_j)]) = 0.0;\n    }\n  }\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":266\n *                 newNormals[i*3+j] = 0.0\n *         # Copy\n *         for i in range(self._vertexCount):             # <<<<<<<<<<<<<<\n *             newValues[i] = self._values[i]\n *             for j in range(3):\n */\n  __pyx_t_3 = __pyx_v_self->_vertexCount;\n  __pyx_t_4 = __pyx_t_3;\n  for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {\n    __pyx_v_i = __pyx_t_5;\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":267\n *         # Copy\n *         for i in range(self._vertexCount):\n *             newValues[i] = self._values[i]             # <<<<<<<<<<<<<<\n *             for j in range(3):\n *                 newVertices[i*3+j] = self._vertices[i*3+j]\n */\n    (__pyx_v_newValues[__pyx_v_i]) = (__pyx_v_self->_values[__pyx_v_i]);\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":268\n *         for i in range(self._vertexCount):\n *             newValues[i] = self._values[i]\n *             for j in range(3):             # <<<<<<<<<<<<<<\n *                 newVertices[i*3+j] = self._vertices[i*3+j]\n *                 newNormals[i*3+j] = self._normals[i*3+j]\n */\n    for (__pyx_t_6 = 0; __pyx_t_6 < 3; __pyx_t_6+=1) {\n      __pyx_v_j = __pyx_t_6;\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":269\n *             newValues[i] = self._values[i]\n *             for j in range(3):\n *                 newVertices[i*3+j] = self._vertices[i*3+j]             # <<<<<<<<<<<<<<\n *                 newNormals[i*3+j] = self._normals[i*3+j]\n *         # Apply\n */\n      (__pyx_v_newVertices[((__pyx_v_i * 3) + __pyx_v_j)]) = (__pyx_v_self->_vertices[((__pyx_v_i * 3) + __pyx_v_j)]);\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":270\n *             for j in range(3):\n *                 newVertices[i*3+j] = self._vertices[i*3+j]\n *                 newNormals[i*3+j] = self._normals[i*3+j]             # <<<<<<<<<<<<<<\n *         # Apply\n *         free(self._vertices); self._vertices = newVertices\n */\n      (__pyx_v_newNormals[((__pyx_v_i * 3) + __pyx_v_j)]) = (__pyx_v_self->_normals[((__pyx_v_i * 3) + __pyx_v_j)]);\n    }\n  }\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":272\n *                 newNormals[i*3+j] = self._normals[i*3+j]\n *         # Apply\n *         free(self._vertices); self._vertices = newVertices             # <<<<<<<<<<<<<<\n *         free(self._normals); self._normals = newNormals\n *         free(self._values); self._values = newValues\n */\n  free(__pyx_v_self->_vertices);\n  __pyx_v_self->_vertices = __pyx_v_newVertices;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":273\n *         # Apply\n *         free(self._vertices); self._vertices = newVertices\n *         free(self._normals); self._normals = newNormals             # <<<<<<<<<<<<<<\n *         free(self._values); self._values = newValues\n *         self._vertexMaxCount = newMaxCount\n */\n  free(__pyx_v_self->_normals);\n  __pyx_v_self->_normals = __pyx_v_newNormals;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":274\n *         free(self._vertices); self._vertices = newVertices\n *         free(self._normals); self._normals = newNormals\n *         free(self._values); self._values = newValues             # <<<<<<<<<<<<<<\n *         self._vertexMaxCount = newMaxCount\n * \n */\n  free(__pyx_v_self->_values);\n  __pyx_v_self->_values = __pyx_v_newValues;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":275\n *         free(self._normals); self._normals = newNormals\n *         free(self._values); self._values = newValues\n *         self._vertexMaxCount = newMaxCount             # <<<<<<<<<<<<<<\n * \n * \n */\n  __pyx_v_self->_vertexMaxCount = __pyx_v_newMaxCount;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":246\n * \n * \n *     cdef void _increase_size_vertices(self):             # <<<<<<<<<<<<<<\n *         \"\"\" Increase the size of the vertices array by a factor two.\n *         \"\"\"\n */\n\n  /* function exit code */\n  goto __pyx_L0;\n  __pyx_L1_error:;\n  __Pyx_WriteUnraisable(\"_marching_cubes_lewiner_cy.Cell._increase_size_vertices\", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);\n  __pyx_L0:;\n  __Pyx_RefNannyFinishContext();\n}\n\n/* \"_marching_cubes_lewiner_cy.pyx\":278\n * \n * \n *     cdef void _increase_size_faces(self):             # <<<<<<<<<<<<<<\n *         \"\"\" Increase the size of the faces array by a factor two.\n *         \"\"\"\n */\n\nstatic void __pyx_f_26_marching_cubes_lewiner_cy_4Cell__increase_size_faces(struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *__pyx_v_self) {\n  int __pyx_v_newMaxCount;\n  int *__pyx_v_newFaces;\n  int __pyx_v_i;\n  __Pyx_RefNannyDeclarations\n  int __pyx_t_1;\n  int __pyx_t_2;\n  int __pyx_t_3;\n  int __pyx_t_4;\n  int __pyx_lineno = 0;\n  const char *__pyx_filename = NULL;\n  int __pyx_clineno = 0;\n  __Pyx_RefNannySetupContext(\"_increase_size_faces\", 0);\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":282\n *         \"\"\"\n *         # Allocate new array\n *         cdef int newMaxCount = self._faceMaxCount * 2             # <<<<<<<<<<<<<<\n *         cdef int *newFaces = <int *>malloc(newMaxCount * sizeof(int))\n *         if newFaces is NULL:\n */\n  __pyx_v_newMaxCount = (__pyx_v_self->_faceMaxCount * 2);\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":283\n *         # Allocate new array\n *         cdef int newMaxCount = self._faceMaxCount * 2\n *         cdef int *newFaces = <int *>malloc(newMaxCount * sizeof(int))             # <<<<<<<<<<<<<<\n *         if newFaces is NULL:\n *             raise MemoryError()\n */\n  __pyx_v_newFaces = ((int *)malloc((__pyx_v_newMaxCount * (sizeof(int)))));\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":284\n *         cdef int newMaxCount = self._faceMaxCount * 2\n *         cdef int *newFaces = <int *>malloc(newMaxCount * sizeof(int))\n *         if newFaces is NULL:             # <<<<<<<<<<<<<<\n *             raise MemoryError()\n *         # Copy\n */\n  __pyx_t_1 = ((__pyx_v_newFaces == NULL) != 0);\n  if (unlikely(__pyx_t_1)) {\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":285\n *         cdef int *newFaces = <int *>malloc(newMaxCount * sizeof(int))\n *         if newFaces is NULL:\n *             raise MemoryError()             # <<<<<<<<<<<<<<\n *         # Copy\n *         cdef int i\n */\n    PyErr_NoMemory(); __PYX_ERR(0, 285, __pyx_L1_error)\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":284\n *         cdef int newMaxCount = self._faceMaxCount * 2\n *         cdef int *newFaces = <int *>malloc(newMaxCount * sizeof(int))\n *         if newFaces is NULL:             # <<<<<<<<<<<<<<\n *             raise MemoryError()\n *         # Copy\n */\n  }\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":288\n *         # Copy\n *         cdef int i\n *         for i in range(self._faceCount):             # <<<<<<<<<<<<<<\n *             newFaces[i] = self._faces[i]\n *         # Apply\n */\n  __pyx_t_2 = __pyx_v_self->_faceCount;\n  __pyx_t_3 = __pyx_t_2;\n  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {\n    __pyx_v_i = __pyx_t_4;\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":289\n *         cdef int i\n *         for i in range(self._faceCount):\n *             newFaces[i] = self._faces[i]             # <<<<<<<<<<<<<<\n *         # Apply\n *         free(self._faces)\n */\n    (__pyx_v_newFaces[__pyx_v_i]) = (__pyx_v_self->_faces[__pyx_v_i]);\n  }\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":291\n *             newFaces[i] = self._faces[i]\n *         # Apply\n *         free(self._faces)             # <<<<<<<<<<<<<<\n *         self._faces = newFaces\n *         self._faceMaxCount = newMaxCount\n */\n  free(__pyx_v_self->_faces);\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":292\n *         # Apply\n *         free(self._faces)\n *         self._faces = newFaces             # <<<<<<<<<<<<<<\n *         self._faceMaxCount = newMaxCount\n * \n */\n  __pyx_v_self->_faces = __pyx_v_newFaces;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":293\n *         free(self._faces)\n *         self._faces = newFaces\n *         self._faceMaxCount = newMaxCount             # <<<<<<<<<<<<<<\n * \n * \n */\n  __pyx_v_self->_faceMaxCount = __pyx_v_newMaxCount;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":278\n * \n * \n *     cdef void _increase_size_faces(self):             # <<<<<<<<<<<<<<\n *         \"\"\" Increase the size of the faces array by a factor two.\n *         \"\"\"\n */\n\n  /* function exit code */\n  goto __pyx_L0;\n  __pyx_L1_error:;\n  __Pyx_WriteUnraisable(\"_marching_cubes_lewiner_cy.Cell._increase_size_faces\", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);\n  __pyx_L0:;\n  __Pyx_RefNannyFinishContext();\n}\n\n/* \"_marching_cubes_lewiner_cy.pyx\":298\n *     ## Adding results\n * \n *     cdef int add_vertex(self, float x, float y, float z):             # <<<<<<<<<<<<<<\n *         \"\"\" Add a vertex to the result. Return index in vertex array.\n *         \"\"\"\n */\n\nstatic int __pyx_f_26_marching_cubes_lewiner_cy_4Cell_add_vertex(struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *__pyx_v_self, float __pyx_v_x, float __pyx_v_y, float __pyx_v_z) {\n  int __pyx_r;\n  __Pyx_RefNannyDeclarations\n  int __pyx_t_1;\n  __Pyx_RefNannySetupContext(\"add_vertex\", 0);\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":302\n *         \"\"\"\n *         # Check if array is large enough\n *         if self._vertexCount >= self._vertexMaxCount:             # <<<<<<<<<<<<<<\n *             self._increase_size_vertices()\n *         # Add vertex\n */\n  __pyx_t_1 = ((__pyx_v_self->_vertexCount >= __pyx_v_self->_vertexMaxCount) != 0);\n  if (__pyx_t_1) {\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":303\n *         # Check if array is large enough\n *         if self._vertexCount >= self._vertexMaxCount:\n *             self._increase_size_vertices()             # <<<<<<<<<<<<<<\n *         # Add vertex\n *         self._vertices[self._vertexCount*3+0] = x\n */\n    ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_self->__pyx_vtab)->_increase_size_vertices(__pyx_v_self);\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":302\n *         \"\"\"\n *         # Check if array is large enough\n *         if self._vertexCount >= self._vertexMaxCount:             # <<<<<<<<<<<<<<\n *             self._increase_size_vertices()\n *         # Add vertex\n */\n  }\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":305\n *             self._increase_size_vertices()\n *         # Add vertex\n *         self._vertices[self._vertexCount*3+0] = x             # <<<<<<<<<<<<<<\n *         self._vertices[self._vertexCount*3+1] = y\n *         self._vertices[self._vertexCount*3+2] = z\n */\n  (__pyx_v_self->_vertices[((__pyx_v_self->_vertexCount * 3) + 0)]) = __pyx_v_x;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":306\n *         # Add vertex\n *         self._vertices[self._vertexCount*3+0] = x\n *         self._vertices[self._vertexCount*3+1] = y             # <<<<<<<<<<<<<<\n *         self._vertices[self._vertexCount*3+2] = z\n *         self._vertexCount += 1\n */\n  (__pyx_v_self->_vertices[((__pyx_v_self->_vertexCount * 3) + 1)]) = __pyx_v_y;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":307\n *         self._vertices[self._vertexCount*3+0] = x\n *         self._vertices[self._vertexCount*3+1] = y\n *         self._vertices[self._vertexCount*3+2] = z             # <<<<<<<<<<<<<<\n *         self._vertexCount += 1\n *         return self._vertexCount -1\n */\n  (__pyx_v_self->_vertices[((__pyx_v_self->_vertexCount * 3) + 2)]) = __pyx_v_z;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":308\n *         self._vertices[self._vertexCount*3+1] = y\n *         self._vertices[self._vertexCount*3+2] = z\n *         self._vertexCount += 1             # <<<<<<<<<<<<<<\n *         return self._vertexCount -1\n * \n */\n  __pyx_v_self->_vertexCount = (__pyx_v_self->_vertexCount + 1);\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":309\n *         self._vertices[self._vertexCount*3+2] = z\n *         self._vertexCount += 1\n *         return self._vertexCount -1             # <<<<<<<<<<<<<<\n * \n * \n */\n  __pyx_r = (__pyx_v_self->_vertexCount - 1);\n  goto __pyx_L0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":298\n *     ## Adding results\n * \n *     cdef int add_vertex(self, float x, float y, float z):             # <<<<<<<<<<<<<<\n *         \"\"\" Add a vertex to the result. Return index in vertex array.\n *         \"\"\"\n */\n\n  /* function exit code */\n  __pyx_L0:;\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\n/* \"_marching_cubes_lewiner_cy.pyx\":312\n * \n * \n *     cdef void add_gradient(self, int vertexIndex, float gx, float gy, float gz):             # <<<<<<<<<<<<<<\n *         \"\"\" Add a gradient value to the vertex corresponding to the given index.\n *         \"\"\"\n */\n\nstatic void __pyx_f_26_marching_cubes_lewiner_cy_4Cell_add_gradient(struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *__pyx_v_self, int __pyx_v_vertexIndex, float __pyx_v_gx, float __pyx_v_gy, float __pyx_v_gz) {\n  __Pyx_RefNannyDeclarations\n  long __pyx_t_1;\n  __Pyx_RefNannySetupContext(\"add_gradient\", 0);\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":315\n *         \"\"\" Add a gradient value to the vertex corresponding to the given index.\n *         \"\"\"\n *         self._normals[vertexIndex*3+0] += gx             # <<<<<<<<<<<<<<\n *         self._normals[vertexIndex*3+1] += gy\n *         self._normals[vertexIndex*3+2] += gz\n */\n  __pyx_t_1 = ((__pyx_v_vertexIndex * 3) + 0);\n  (__pyx_v_self->_normals[__pyx_t_1]) = ((__pyx_v_self->_normals[__pyx_t_1]) + __pyx_v_gx);\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":316\n *         \"\"\"\n *         self._normals[vertexIndex*3+0] += gx\n *         self._normals[vertexIndex*3+1] += gy             # <<<<<<<<<<<<<<\n *         self._normals[vertexIndex*3+2] += gz\n * \n */\n  __pyx_t_1 = ((__pyx_v_vertexIndex * 3) + 1);\n  (__pyx_v_self->_normals[__pyx_t_1]) = ((__pyx_v_self->_normals[__pyx_t_1]) + __pyx_v_gy);\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":317\n *         self._normals[vertexIndex*3+0] += gx\n *         self._normals[vertexIndex*3+1] += gy\n *         self._normals[vertexIndex*3+2] += gz             # <<<<<<<<<<<<<<\n * \n * \n */\n  __pyx_t_1 = ((__pyx_v_vertexIndex * 3) + 2);\n  (__pyx_v_self->_normals[__pyx_t_1]) = ((__pyx_v_self->_normals[__pyx_t_1]) + __pyx_v_gz);\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":312\n * \n * \n *     cdef void add_gradient(self, int vertexIndex, float gx, float gy, float gz):             # <<<<<<<<<<<<<<\n *         \"\"\" Add a gradient value to the vertex corresponding to the given index.\n *         \"\"\"\n */\n\n  /* function exit code */\n  __Pyx_RefNannyFinishContext();\n}\n\n/* \"_marching_cubes_lewiner_cy.pyx\":320\n * \n * \n *     cdef void add_gradient_from_index(self, int vertexIndex, int i, float strength):             # <<<<<<<<<<<<<<\n *         \"\"\" Add a gradient value to the vertex corresponding to the given index.\n *         vertexIndex is the index in the large array of vertices that is returned.\n */\n\nstatic void __pyx_f_26_marching_cubes_lewiner_cy_4Cell_add_gradient_from_index(struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *__pyx_v_self, int __pyx_v_vertexIndex, int __pyx_v_i, float __pyx_v_strength) {\n  __Pyx_RefNannyDeclarations\n  __Pyx_RefNannySetupContext(\"add_gradient_from_index\", 0);\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":325\n *         i is the index of the array of vertices 0-7 for the current cell.\n *         \"\"\"\n *         self.add_gradient(vertexIndex, self.vg[i*3+0] * strength, self.vg[i*3+1] * strength, self.vg[i*3+2] * strength)             # <<<<<<<<<<<<<<\n * \n * \n */\n  ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_self->__pyx_vtab)->add_gradient(__pyx_v_self, __pyx_v_vertexIndex, ((__pyx_v_self->vg[((__pyx_v_i * 3) + 0)]) * __pyx_v_strength), ((__pyx_v_self->vg[((__pyx_v_i * 3) + 1)]) * __pyx_v_strength), ((__pyx_v_self->vg[((__pyx_v_i * 3) + 2)]) * __pyx_v_strength));\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":320\n * \n * \n *     cdef void add_gradient_from_index(self, int vertexIndex, int i, float strength):             # <<<<<<<<<<<<<<\n *         \"\"\" Add a gradient value to the vertex corresponding to the given index.\n *         vertexIndex is the index in the large array of vertices that is returned.\n */\n\n  /* function exit code */\n  __Pyx_RefNannyFinishContext();\n}\n\n/* \"_marching_cubes_lewiner_cy.pyx\":328\n * \n * \n *     cdef add_face(self, int index):             # <<<<<<<<<<<<<<\n *         \"\"\" Add a face to the result. Also updates the value.\n *         \"\"\"\n */\n\nstatic PyObject *__pyx_f_26_marching_cubes_lewiner_cy_4Cell_add_face(struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *__pyx_v_self, int __pyx_v_index) {\n  PyObject *__pyx_r = NULL;\n  __Pyx_RefNannyDeclarations\n  int __pyx_t_1;\n  double __pyx_t_2;\n  __Pyx_RefNannySetupContext(\"add_face\", 0);\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":332\n *         \"\"\"\n *         # Check if array is large enough\n *         if self._faceCount >= self._faceMaxCount:             # <<<<<<<<<<<<<<\n *             self._increase_size_faces()\n *         # Add face\n */\n  __pyx_t_1 = ((__pyx_v_self->_faceCount >= __pyx_v_self->_faceMaxCount) != 0);\n  if (__pyx_t_1) {\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":333\n *         # Check if array is large enough\n *         if self._faceCount >= self._faceMaxCount:\n *             self._increase_size_faces()             # <<<<<<<<<<<<<<\n *         # Add face\n *         self._faces[self._faceCount] = index\n */\n    ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_self->__pyx_vtab)->_increase_size_faces(__pyx_v_self);\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":332\n *         \"\"\"\n *         # Check if array is large enough\n *         if self._faceCount >= self._faceMaxCount:             # <<<<<<<<<<<<<<\n *             self._increase_size_faces()\n *         # Add face\n */\n  }\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":335\n *             self._increase_size_faces()\n *         # Add face\n *         self._faces[self._faceCount] = index             # <<<<<<<<<<<<<<\n *         self._faceCount += 1\n *         # Also update value\n */\n  (__pyx_v_self->_faces[__pyx_v_self->_faceCount]) = __pyx_v_index;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":336\n *         # Add face\n *         self._faces[self._faceCount] = index\n *         self._faceCount += 1             # <<<<<<<<<<<<<<\n *         # Also update value\n *         if self.vmax > self._values[index]:\n */\n  __pyx_v_self->_faceCount = (__pyx_v_self->_faceCount + 1);\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":338\n *         self._faceCount += 1\n *         # Also update value\n *         if self.vmax > self._values[index]:             # <<<<<<<<<<<<<<\n *             self._values[index] = self.vmax\n * \n */\n  __pyx_t_1 = ((__pyx_v_self->vmax > (__pyx_v_self->_values[__pyx_v_index])) != 0);\n  if (__pyx_t_1) {\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":339\n *         # Also update value\n *         if self.vmax > self._values[index]:\n *             self._values[index] = self.vmax             # <<<<<<<<<<<<<<\n * \n * \n */\n    __pyx_t_2 = __pyx_v_self->vmax;\n    (__pyx_v_self->_values[__pyx_v_index]) = __pyx_t_2;\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":338\n *         self._faceCount += 1\n *         # Also update value\n *         if self.vmax > self._values[index]:             # <<<<<<<<<<<<<<\n *             self._values[index] = self.vmax\n * \n */\n  }\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":328\n * \n * \n *     cdef add_face(self, int index):             # <<<<<<<<<<<<<<\n *         \"\"\" Add a face to the result. Also updates the value.\n *         \"\"\"\n */\n\n  /* function exit code */\n  __pyx_r = Py_None; __Pyx_INCREF(Py_None);\n  __Pyx_XGIVEREF(__pyx_r);\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\n/* \"_marching_cubes_lewiner_cy.pyx\":344\n *     ## Getting results\n * \n *     def get_vertices(self):             # <<<<<<<<<<<<<<\n *         \"\"\" Get the final vertex array.\n *         \"\"\"\n */\n\n/* Python wrapper */\nstatic PyObject *__pyx_pw_26_marching_cubes_lewiner_cy_4Cell_7get_vertices(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/\nstatic char __pyx_doc_26_marching_cubes_lewiner_cy_4Cell_6get_vertices[] = \" Get the final vertex array.\\n        \";\nstatic PyObject *__pyx_pw_26_marching_cubes_lewiner_cy_4Cell_7get_vertices(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {\n  PyObject *__pyx_r = 0;\n  __Pyx_RefNannyDeclarations\n  __Pyx_RefNannySetupContext(\"get_vertices (wrapper)\", 0);\n  __pyx_r = __pyx_pf_26_marching_cubes_lewiner_cy_4Cell_6get_vertices(((struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_self));\n\n  /* function exit code */\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\nstatic PyObject *__pyx_pf_26_marching_cubes_lewiner_cy_4Cell_6get_vertices(struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *__pyx_v_self) {\n  PyObject *__pyx_v_vertices = NULL;\n  __Pyx_memviewslice __pyx_v_vertices_ = { 0, 0, { 0 }, { 0 }, { 0 } };\n  int __pyx_v_i;\n  int __pyx_v_j;\n  PyObject *__pyx_r = NULL;\n  __Pyx_RefNannyDeclarations\n  PyObject *__pyx_t_1 = NULL;\n  PyObject *__pyx_t_2 = NULL;\n  PyObject *__pyx_t_3 = NULL;\n  PyObject *__pyx_t_4 = NULL;\n  PyObject *__pyx_t_5 = NULL;\n  int __pyx_t_6;\n  PyObject *__pyx_t_7 = NULL;\n  __Pyx_memviewslice __pyx_t_8 = { 0, 0, { 0 }, { 0 }, { 0 } };\n  int __pyx_t_9;\n  int __pyx_t_10;\n  int __pyx_t_11;\n  Py_ssize_t __pyx_t_12;\n  Py_ssize_t __pyx_t_13;\n  int __pyx_lineno = 0;\n  const char *__pyx_filename = NULL;\n  int __pyx_clineno = 0;\n  __Pyx_RefNannySetupContext(\"get_vertices\", 0);\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":347\n *         \"\"\" Get the final vertex array.\n *         \"\"\"\n *         vertices = np.empty((self._vertexCount,3), np.float32)             # <<<<<<<<<<<<<<\n *         cdef float [:, :] vertices_ = vertices\n *         cdef int i, j\n */\n  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 347, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_2);\n  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 347, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_3);\n  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;\n  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->_vertexCount); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 347, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_2);\n  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 347, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_4);\n  __Pyx_GIVEREF(__pyx_t_2);\n  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);\n  __Pyx_INCREF(__pyx_int_3);\n  __Pyx_GIVEREF(__pyx_int_3);\n  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_int_3);\n  __pyx_t_2 = 0;\n  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 347, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_2);\n  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_float32); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 347, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_5);\n  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;\n  __pyx_t_2 = NULL;\n  __pyx_t_6 = 0;\n  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {\n    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);\n    if (likely(__pyx_t_2)) {\n      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);\n      __Pyx_INCREF(__pyx_t_2);\n      __Pyx_INCREF(function);\n      __Pyx_DECREF_SET(__pyx_t_3, function);\n      __pyx_t_6 = 1;\n    }\n  }\n  #if CYTHON_FAST_PYCALL\n  if (PyFunction_Check(__pyx_t_3)) {\n    PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_t_4, __pyx_t_5};\n    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 347, __pyx_L1_error)\n    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;\n    __Pyx_GOTREF(__pyx_t_1);\n    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;\n    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;\n  } else\n  #endif\n  #if CYTHON_FAST_PYCCALL\n  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {\n    PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_t_4, __pyx_t_5};\n    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 347, __pyx_L1_error)\n    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;\n    __Pyx_GOTREF(__pyx_t_1);\n    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;\n    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;\n  } else\n  #endif\n  {\n    __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 347, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_7);\n    if (__pyx_t_2) {\n      __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2); __pyx_t_2 = NULL;\n    }\n    __Pyx_GIVEREF(__pyx_t_4);\n    PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_4);\n    __Pyx_GIVEREF(__pyx_t_5);\n    PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_5);\n    __pyx_t_4 = 0;\n    __pyx_t_5 = 0;\n    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 347, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_1);\n    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;\n  }\n  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;\n  __pyx_v_vertices = __pyx_t_1;\n  __pyx_t_1 = 0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":348\n *         \"\"\"\n *         vertices = np.empty((self._vertexCount,3), np.float32)\n *         cdef float [:, :] vertices_ = vertices             # <<<<<<<<<<<<<<\n *         cdef int i, j\n *         for i in range(self._vertexCount):\n */\n  __pyx_t_8 = __Pyx_PyObject_to_MemoryviewSlice_dsds_float(__pyx_v_vertices, PyBUF_WRITABLE); if (unlikely(!__pyx_t_8.memview)) __PYX_ERR(0, 348, __pyx_L1_error)\n  __pyx_v_vertices_ = __pyx_t_8;\n  __pyx_t_8.memview = NULL;\n  __pyx_t_8.data = NULL;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":350\n *         cdef float [:, :] vertices_ = vertices\n *         cdef int i, j\n *         for i in range(self._vertexCount):             # <<<<<<<<<<<<<<\n *             for j in range(3):\n *                 vertices_[i, j] = self._vertices[i*3+j]\n */\n  __pyx_t_6 = __pyx_v_self->_vertexCount;\n  __pyx_t_9 = __pyx_t_6;\n  for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) {\n    __pyx_v_i = __pyx_t_10;\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":351\n *         cdef int i, j\n *         for i in range(self._vertexCount):\n *             for j in range(3):             # <<<<<<<<<<<<<<\n *                 vertices_[i, j] = self._vertices[i*3+j]\n *         return vertices\n */\n    for (__pyx_t_11 = 0; __pyx_t_11 < 3; __pyx_t_11+=1) {\n      __pyx_v_j = __pyx_t_11;\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":352\n *         for i in range(self._vertexCount):\n *             for j in range(3):\n *                 vertices_[i, j] = self._vertices[i*3+j]             # <<<<<<<<<<<<<<\n *         return vertices\n * \n */\n      __pyx_t_12 = __pyx_v_i;\n      __pyx_t_13 = __pyx_v_j;\n      *((float *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_vertices_.data + __pyx_t_12 * __pyx_v_vertices_.strides[0]) ) + __pyx_t_13 * __pyx_v_vertices_.strides[1]) )) = (__pyx_v_self->_vertices[((__pyx_v_i * 3) + __pyx_v_j)]);\n    }\n  }\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":353\n *             for j in range(3):\n *                 vertices_[i, j] = self._vertices[i*3+j]\n *         return vertices             # <<<<<<<<<<<<<<\n * \n *     def get_normals(self):\n */\n  __Pyx_XDECREF(__pyx_r);\n  __Pyx_INCREF(__pyx_v_vertices);\n  __pyx_r = __pyx_v_vertices;\n  goto __pyx_L0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":344\n *     ## Getting results\n * \n *     def get_vertices(self):             # <<<<<<<<<<<<<<\n *         \"\"\" Get the final vertex array.\n *         \"\"\"\n */\n\n  /* function exit code */\n  __pyx_L1_error:;\n  __Pyx_XDECREF(__pyx_t_1);\n  __Pyx_XDECREF(__pyx_t_2);\n  __Pyx_XDECREF(__pyx_t_3);\n  __Pyx_XDECREF(__pyx_t_4);\n  __Pyx_XDECREF(__pyx_t_5);\n  __Pyx_XDECREF(__pyx_t_7);\n  __PYX_XDEC_MEMVIEW(&__pyx_t_8, 1);\n  __Pyx_AddTraceback(\"_marching_cubes_lewiner_cy.Cell.get_vertices\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n  __pyx_r = NULL;\n  __pyx_L0:;\n  __Pyx_XDECREF(__pyx_v_vertices);\n  __PYX_XDEC_MEMVIEW(&__pyx_v_vertices_, 1);\n  __Pyx_XGIVEREF(__pyx_r);\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\n/* \"_marching_cubes_lewiner_cy.pyx\":355\n *         return vertices\n * \n *     def get_normals(self):             # <<<<<<<<<<<<<<\n *         \"\"\" Get the final normals array.\n *         The normals are normalized to unit length.\n */\n\n/* Python wrapper */\nstatic PyObject *__pyx_pw_26_marching_cubes_lewiner_cy_4Cell_9get_normals(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/\nstatic char __pyx_doc_26_marching_cubes_lewiner_cy_4Cell_8get_normals[] = \" Get the final normals array.\\n        The normals are normalized to unit length.\\n        \";\nstatic PyObject *__pyx_pw_26_marching_cubes_lewiner_cy_4Cell_9get_normals(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {\n  PyObject *__pyx_r = 0;\n  __Pyx_RefNannyDeclarations\n  __Pyx_RefNannySetupContext(\"get_normals (wrapper)\", 0);\n  __pyx_r = __pyx_pf_26_marching_cubes_lewiner_cy_4Cell_8get_normals(((struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_self));\n\n  /* function exit code */\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\nstatic PyObject *__pyx_pf_26_marching_cubes_lewiner_cy_4Cell_8get_normals(struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *__pyx_v_self) {\n  PyObject *__pyx_v_normals = NULL;\n  __Pyx_memviewslice __pyx_v_normals_ = { 0, 0, { 0 }, { 0 }, { 0 } };\n  int __pyx_v_i;\n  int __pyx_v_j;\n  double __pyx_v_length;\n  double __pyx_v_dtmp;\n  PyObject *__pyx_r = NULL;\n  __Pyx_RefNannyDeclarations\n  PyObject *__pyx_t_1 = NULL;\n  PyObject *__pyx_t_2 = NULL;\n  PyObject *__pyx_t_3 = NULL;\n  PyObject *__pyx_t_4 = NULL;\n  PyObject *__pyx_t_5 = NULL;\n  int __pyx_t_6;\n  PyObject *__pyx_t_7 = NULL;\n  __Pyx_memviewslice __pyx_t_8 = { 0, 0, { 0 }, { 0 }, { 0 } };\n  int __pyx_t_9;\n  int __pyx_t_10;\n  int __pyx_t_11;\n  int __pyx_t_12;\n  Py_ssize_t __pyx_t_13;\n  Py_ssize_t __pyx_t_14;\n  int __pyx_lineno = 0;\n  const char *__pyx_filename = NULL;\n  int __pyx_clineno = 0;\n  __Pyx_RefNannySetupContext(\"get_normals\", 0);\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":359\n *         The normals are normalized to unit length.\n *         \"\"\"\n *         normals = np.empty((self._vertexCount,3), np.float32)             # <<<<<<<<<<<<<<\n *         cdef float [:, :] normals_ = normals\n * \n */\n  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 359, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_2);\n  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 359, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_3);\n  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;\n  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->_vertexCount); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 359, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_2);\n  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 359, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_4);\n  __Pyx_GIVEREF(__pyx_t_2);\n  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);\n  __Pyx_INCREF(__pyx_int_3);\n  __Pyx_GIVEREF(__pyx_int_3);\n  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_int_3);\n  __pyx_t_2 = 0;\n  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 359, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_2);\n  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_float32); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 359, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_5);\n  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;\n  __pyx_t_2 = NULL;\n  __pyx_t_6 = 0;\n  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {\n    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);\n    if (likely(__pyx_t_2)) {\n      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);\n      __Pyx_INCREF(__pyx_t_2);\n      __Pyx_INCREF(function);\n      __Pyx_DECREF_SET(__pyx_t_3, function);\n      __pyx_t_6 = 1;\n    }\n  }\n  #if CYTHON_FAST_PYCALL\n  if (PyFunction_Check(__pyx_t_3)) {\n    PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_t_4, __pyx_t_5};\n    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 359, __pyx_L1_error)\n    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;\n    __Pyx_GOTREF(__pyx_t_1);\n    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;\n    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;\n  } else\n  #endif\n  #if CYTHON_FAST_PYCCALL\n  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {\n    PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_t_4, __pyx_t_5};\n    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 359, __pyx_L1_error)\n    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;\n    __Pyx_GOTREF(__pyx_t_1);\n    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;\n    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;\n  } else\n  #endif\n  {\n    __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 359, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_7);\n    if (__pyx_t_2) {\n      __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2); __pyx_t_2 = NULL;\n    }\n    __Pyx_GIVEREF(__pyx_t_4);\n    PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_4);\n    __Pyx_GIVEREF(__pyx_t_5);\n    PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_5);\n    __pyx_t_4 = 0;\n    __pyx_t_5 = 0;\n    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 359, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_1);\n    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;\n  }\n  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;\n  __pyx_v_normals = __pyx_t_1;\n  __pyx_t_1 = 0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":360\n *         \"\"\"\n *         normals = np.empty((self._vertexCount,3), np.float32)\n *         cdef float [:, :] normals_ = normals             # <<<<<<<<<<<<<<\n * \n *         cdef int i, j\n */\n  __pyx_t_8 = __Pyx_PyObject_to_MemoryviewSlice_dsds_float(__pyx_v_normals, PyBUF_WRITABLE); if (unlikely(!__pyx_t_8.memview)) __PYX_ERR(0, 360, __pyx_L1_error)\n  __pyx_v_normals_ = __pyx_t_8;\n  __pyx_t_8.memview = NULL;\n  __pyx_t_8.data = NULL;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":364\n *         cdef int i, j\n *         cdef double length, dtmp\n *         for i in range(self._vertexCount):             # <<<<<<<<<<<<<<\n *             length = 0.0\n *             for j in range(3):\n */\n  __pyx_t_6 = __pyx_v_self->_vertexCount;\n  __pyx_t_9 = __pyx_t_6;\n  for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) {\n    __pyx_v_i = __pyx_t_10;\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":365\n *         cdef double length, dtmp\n *         for i in range(self._vertexCount):\n *             length = 0.0             # <<<<<<<<<<<<<<\n *             for j in range(3):\n *                 dtmp = self._normals[i*3+j] # Make it double before taking **2!\n */\n    __pyx_v_length = 0.0;\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":366\n *         for i in range(self._vertexCount):\n *             length = 0.0\n *             for j in range(3):             # <<<<<<<<<<<<<<\n *                 dtmp = self._normals[i*3+j] # Make it double before taking **2!\n *                 length +=  dtmp*dtmp\n */\n    for (__pyx_t_11 = 0; __pyx_t_11 < 3; __pyx_t_11+=1) {\n      __pyx_v_j = __pyx_t_11;\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":367\n *             length = 0.0\n *             for j in range(3):\n *                 dtmp = self._normals[i*3+j] # Make it double before taking **2!             # <<<<<<<<<<<<<<\n *                 length +=  dtmp*dtmp\n *             if length > 0.0:\n */\n      __pyx_v_dtmp = (__pyx_v_self->_normals[((__pyx_v_i * 3) + __pyx_v_j)]);\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":368\n *             for j in range(3):\n *                 dtmp = self._normals[i*3+j] # Make it double before taking **2!\n *                 length +=  dtmp*dtmp             # <<<<<<<<<<<<<<\n *             if length > 0.0:\n *                 length = 1.0 / length**0.5\n */\n      __pyx_v_length = (__pyx_v_length + (__pyx_v_dtmp * __pyx_v_dtmp));\n    }\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":369\n *                 dtmp = self._normals[i*3+j] # Make it double before taking **2!\n *                 length +=  dtmp*dtmp\n *             if length > 0.0:             # <<<<<<<<<<<<<<\n *                 length = 1.0 / length**0.5\n *             for j in range(3):\n */\n    __pyx_t_12 = ((__pyx_v_length > 0.0) != 0);\n    if (__pyx_t_12) {\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":370\n *                 length +=  dtmp*dtmp\n *             if length > 0.0:\n *                 length = 1.0 / length**0.5             # <<<<<<<<<<<<<<\n *             for j in range(3):\n *                 normals_[i,j] = self._normals[i*3+j] * length\n */\n      __pyx_v_length = (1.0 / pow(__pyx_v_length, 0.5));\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":369\n *                 dtmp = self._normals[i*3+j] # Make it double before taking **2!\n *                 length +=  dtmp*dtmp\n *             if length > 0.0:             # <<<<<<<<<<<<<<\n *                 length = 1.0 / length**0.5\n *             for j in range(3):\n */\n    }\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":371\n *             if length > 0.0:\n *                 length = 1.0 / length**0.5\n *             for j in range(3):             # <<<<<<<<<<<<<<\n *                 normals_[i,j] = self._normals[i*3+j] * length\n *         return normals\n */\n    for (__pyx_t_11 = 0; __pyx_t_11 < 3; __pyx_t_11+=1) {\n      __pyx_v_j = __pyx_t_11;\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":372\n *                 length = 1.0 / length**0.5\n *             for j in range(3):\n *                 normals_[i,j] = self._normals[i*3+j] * length             # <<<<<<<<<<<<<<\n *         return normals\n * \n */\n      __pyx_t_13 = __pyx_v_i;\n      __pyx_t_14 = __pyx_v_j;\n      *((float *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_normals_.data + __pyx_t_13 * __pyx_v_normals_.strides[0]) ) + __pyx_t_14 * __pyx_v_normals_.strides[1]) )) = ((__pyx_v_self->_normals[((__pyx_v_i * 3) + __pyx_v_j)]) * __pyx_v_length);\n    }\n  }\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":373\n *             for j in range(3):\n *                 normals_[i,j] = self._normals[i*3+j] * length\n *         return normals             # <<<<<<<<<<<<<<\n * \n *     def get_faces(self):\n */\n  __Pyx_XDECREF(__pyx_r);\n  __Pyx_INCREF(__pyx_v_normals);\n  __pyx_r = __pyx_v_normals;\n  goto __pyx_L0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":355\n *         return vertices\n * \n *     def get_normals(self):             # <<<<<<<<<<<<<<\n *         \"\"\" Get the final normals array.\n *         The normals are normalized to unit length.\n */\n\n  /* function exit code */\n  __pyx_L1_error:;\n  __Pyx_XDECREF(__pyx_t_1);\n  __Pyx_XDECREF(__pyx_t_2);\n  __Pyx_XDECREF(__pyx_t_3);\n  __Pyx_XDECREF(__pyx_t_4);\n  __Pyx_XDECREF(__pyx_t_5);\n  __Pyx_XDECREF(__pyx_t_7);\n  __PYX_XDEC_MEMVIEW(&__pyx_t_8, 1);\n  __Pyx_AddTraceback(\"_marching_cubes_lewiner_cy.Cell.get_normals\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n  __pyx_r = NULL;\n  __pyx_L0:;\n  __Pyx_XDECREF(__pyx_v_normals);\n  __PYX_XDEC_MEMVIEW(&__pyx_v_normals_, 1);\n  __Pyx_XGIVEREF(__pyx_r);\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\n/* \"_marching_cubes_lewiner_cy.pyx\":375\n *         return normals\n * \n *     def get_faces(self):             # <<<<<<<<<<<<<<\n *         faces = np.empty((self._faceCount,), np.int32)\n *         cdef int [:] faces_ = faces\n */\n\n/* Python wrapper */\nstatic PyObject *__pyx_pw_26_marching_cubes_lewiner_cy_4Cell_11get_faces(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/\nstatic PyObject *__pyx_pw_26_marching_cubes_lewiner_cy_4Cell_11get_faces(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {\n  PyObject *__pyx_r = 0;\n  __Pyx_RefNannyDeclarations\n  __Pyx_RefNannySetupContext(\"get_faces (wrapper)\", 0);\n  __pyx_r = __pyx_pf_26_marching_cubes_lewiner_cy_4Cell_10get_faces(((struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_self));\n\n  /* function exit code */\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\nstatic PyObject *__pyx_pf_26_marching_cubes_lewiner_cy_4Cell_10get_faces(struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *__pyx_v_self) {\n  PyObject *__pyx_v_faces = NULL;\n  __Pyx_memviewslice __pyx_v_faces_ = { 0, 0, { 0 }, { 0 }, { 0 } };\n  int __pyx_v_i;\n  PyObject *__pyx_r = NULL;\n  __Pyx_RefNannyDeclarations\n  PyObject *__pyx_t_1 = NULL;\n  PyObject *__pyx_t_2 = NULL;\n  PyObject *__pyx_t_3 = NULL;\n  PyObject *__pyx_t_4 = NULL;\n  PyObject *__pyx_t_5 = NULL;\n  int __pyx_t_6;\n  PyObject *__pyx_t_7 = NULL;\n  __Pyx_memviewslice __pyx_t_8 = { 0, 0, { 0 }, { 0 }, { 0 } };\n  int __pyx_t_9;\n  int __pyx_t_10;\n  Py_ssize_t __pyx_t_11;\n  int __pyx_lineno = 0;\n  const char *__pyx_filename = NULL;\n  int __pyx_clineno = 0;\n  __Pyx_RefNannySetupContext(\"get_faces\", 0);\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":376\n * \n *     def get_faces(self):\n *         faces = np.empty((self._faceCount,), np.int32)             # <<<<<<<<<<<<<<\n *         cdef int [:] faces_ = faces\n *         cdef int i, j\n */\n  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 376, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_2);\n  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 376, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_3);\n  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;\n  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->_faceCount); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 376, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_2);\n  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 376, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_4);\n  __Pyx_GIVEREF(__pyx_t_2);\n  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);\n  __pyx_t_2 = 0;\n  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 376, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_2);\n  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_int32); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 376, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_5);\n  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;\n  __pyx_t_2 = NULL;\n  __pyx_t_6 = 0;\n  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {\n    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);\n    if (likely(__pyx_t_2)) {\n      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);\n      __Pyx_INCREF(__pyx_t_2);\n      __Pyx_INCREF(function);\n      __Pyx_DECREF_SET(__pyx_t_3, function);\n      __pyx_t_6 = 1;\n    }\n  }\n  #if CYTHON_FAST_PYCALL\n  if (PyFunction_Check(__pyx_t_3)) {\n    PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_t_4, __pyx_t_5};\n    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 376, __pyx_L1_error)\n    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;\n    __Pyx_GOTREF(__pyx_t_1);\n    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;\n    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;\n  } else\n  #endif\n  #if CYTHON_FAST_PYCCALL\n  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {\n    PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_t_4, __pyx_t_5};\n    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 376, __pyx_L1_error)\n    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;\n    __Pyx_GOTREF(__pyx_t_1);\n    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;\n    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;\n  } else\n  #endif\n  {\n    __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 376, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_7);\n    if (__pyx_t_2) {\n      __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2); __pyx_t_2 = NULL;\n    }\n    __Pyx_GIVEREF(__pyx_t_4);\n    PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_4);\n    __Pyx_GIVEREF(__pyx_t_5);\n    PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_5);\n    __pyx_t_4 = 0;\n    __pyx_t_5 = 0;\n    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 376, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_1);\n    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;\n  }\n  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;\n  __pyx_v_faces = __pyx_t_1;\n  __pyx_t_1 = 0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":377\n *     def get_faces(self):\n *         faces = np.empty((self._faceCount,), np.int32)\n *         cdef int [:] faces_ = faces             # <<<<<<<<<<<<<<\n *         cdef int i, j\n *         for i in range(self._faceCount):\n */\n  __pyx_t_8 = __Pyx_PyObject_to_MemoryviewSlice_ds_int(__pyx_v_faces, PyBUF_WRITABLE); if (unlikely(!__pyx_t_8.memview)) __PYX_ERR(0, 377, __pyx_L1_error)\n  __pyx_v_faces_ = __pyx_t_8;\n  __pyx_t_8.memview = NULL;\n  __pyx_t_8.data = NULL;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":379\n *         cdef int [:] faces_ = faces\n *         cdef int i, j\n *         for i in range(self._faceCount):             # <<<<<<<<<<<<<<\n *             faces_[i] = self._faces[i]\n *         return faces\n */\n  __pyx_t_6 = __pyx_v_self->_faceCount;\n  __pyx_t_9 = __pyx_t_6;\n  for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) {\n    __pyx_v_i = __pyx_t_10;\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":380\n *         cdef int i, j\n *         for i in range(self._faceCount):\n *             faces_[i] = self._faces[i]             # <<<<<<<<<<<<<<\n *         return faces\n * \n */\n    __pyx_t_11 = __pyx_v_i;\n    *((int *) ( /* dim=0 */ (__pyx_v_faces_.data + __pyx_t_11 * __pyx_v_faces_.strides[0]) )) = (__pyx_v_self->_faces[__pyx_v_i]);\n  }\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":381\n *         for i in range(self._faceCount):\n *             faces_[i] = self._faces[i]\n *         return faces             # <<<<<<<<<<<<<<\n * \n *     def get_values(self):\n */\n  __Pyx_XDECREF(__pyx_r);\n  __Pyx_INCREF(__pyx_v_faces);\n  __pyx_r = __pyx_v_faces;\n  goto __pyx_L0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":375\n *         return normals\n * \n *     def get_faces(self):             # <<<<<<<<<<<<<<\n *         faces = np.empty((self._faceCount,), np.int32)\n *         cdef int [:] faces_ = faces\n */\n\n  /* function exit code */\n  __pyx_L1_error:;\n  __Pyx_XDECREF(__pyx_t_1);\n  __Pyx_XDECREF(__pyx_t_2);\n  __Pyx_XDECREF(__pyx_t_3);\n  __Pyx_XDECREF(__pyx_t_4);\n  __Pyx_XDECREF(__pyx_t_5);\n  __Pyx_XDECREF(__pyx_t_7);\n  __PYX_XDEC_MEMVIEW(&__pyx_t_8, 1);\n  __Pyx_AddTraceback(\"_marching_cubes_lewiner_cy.Cell.get_faces\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n  __pyx_r = NULL;\n  __pyx_L0:;\n  __Pyx_XDECREF(__pyx_v_faces);\n  __PYX_XDEC_MEMVIEW(&__pyx_v_faces_, 1);\n  __Pyx_XGIVEREF(__pyx_r);\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\n/* \"_marching_cubes_lewiner_cy.pyx\":383\n *         return faces\n * \n *     def get_values(self):             # <<<<<<<<<<<<<<\n *         values = np.empty((self._vertexCount,), np.float32)\n *         cdef float [:] values_ = values\n */\n\n/* Python wrapper */\nstatic PyObject *__pyx_pw_26_marching_cubes_lewiner_cy_4Cell_13get_values(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/\nstatic PyObject *__pyx_pw_26_marching_cubes_lewiner_cy_4Cell_13get_values(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {\n  PyObject *__pyx_r = 0;\n  __Pyx_RefNannyDeclarations\n  __Pyx_RefNannySetupContext(\"get_values (wrapper)\", 0);\n  __pyx_r = __pyx_pf_26_marching_cubes_lewiner_cy_4Cell_12get_values(((struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_self));\n\n  /* function exit code */\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\nstatic PyObject *__pyx_pf_26_marching_cubes_lewiner_cy_4Cell_12get_values(struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *__pyx_v_self) {\n  PyObject *__pyx_v_values = NULL;\n  __Pyx_memviewslice __pyx_v_values_ = { 0, 0, { 0 }, { 0 }, { 0 } };\n  int __pyx_v_i;\n  PyObject *__pyx_r = NULL;\n  __Pyx_RefNannyDeclarations\n  PyObject *__pyx_t_1 = NULL;\n  PyObject *__pyx_t_2 = NULL;\n  PyObject *__pyx_t_3 = NULL;\n  PyObject *__pyx_t_4 = NULL;\n  PyObject *__pyx_t_5 = NULL;\n  int __pyx_t_6;\n  PyObject *__pyx_t_7 = NULL;\n  __Pyx_memviewslice __pyx_t_8 = { 0, 0, { 0 }, { 0 }, { 0 } };\n  int __pyx_t_9;\n  int __pyx_t_10;\n  Py_ssize_t __pyx_t_11;\n  int __pyx_lineno = 0;\n  const char *__pyx_filename = NULL;\n  int __pyx_clineno = 0;\n  __Pyx_RefNannySetupContext(\"get_values\", 0);\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":384\n * \n *     def get_values(self):\n *         values = np.empty((self._vertexCount,), np.float32)             # <<<<<<<<<<<<<<\n *         cdef float [:] values_ = values\n *         cdef int i, j\n */\n  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 384, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_2);\n  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 384, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_3);\n  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;\n  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->_vertexCount); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 384, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_2);\n  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 384, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_4);\n  __Pyx_GIVEREF(__pyx_t_2);\n  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);\n  __pyx_t_2 = 0;\n  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 384, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_2);\n  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_float32); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 384, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_5);\n  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;\n  __pyx_t_2 = NULL;\n  __pyx_t_6 = 0;\n  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {\n    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);\n    if (likely(__pyx_t_2)) {\n      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);\n      __Pyx_INCREF(__pyx_t_2);\n      __Pyx_INCREF(function);\n      __Pyx_DECREF_SET(__pyx_t_3, function);\n      __pyx_t_6 = 1;\n    }\n  }\n  #if CYTHON_FAST_PYCALL\n  if (PyFunction_Check(__pyx_t_3)) {\n    PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_t_4, __pyx_t_5};\n    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 384, __pyx_L1_error)\n    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;\n    __Pyx_GOTREF(__pyx_t_1);\n    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;\n    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;\n  } else\n  #endif\n  #if CYTHON_FAST_PYCCALL\n  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {\n    PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_t_4, __pyx_t_5};\n    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 384, __pyx_L1_error)\n    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;\n    __Pyx_GOTREF(__pyx_t_1);\n    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;\n    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;\n  } else\n  #endif\n  {\n    __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 384, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_7);\n    if (__pyx_t_2) {\n      __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2); __pyx_t_2 = NULL;\n    }\n    __Pyx_GIVEREF(__pyx_t_4);\n    PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_4);\n    __Pyx_GIVEREF(__pyx_t_5);\n    PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_5);\n    __pyx_t_4 = 0;\n    __pyx_t_5 = 0;\n    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 384, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_1);\n    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;\n  }\n  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;\n  __pyx_v_values = __pyx_t_1;\n  __pyx_t_1 = 0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":385\n *     def get_values(self):\n *         values = np.empty((self._vertexCount,), np.float32)\n *         cdef float [:] values_ = values             # <<<<<<<<<<<<<<\n *         cdef int i, j\n *         for i in range(self._vertexCount):\n */\n  __pyx_t_8 = __Pyx_PyObject_to_MemoryviewSlice_ds_float(__pyx_v_values, PyBUF_WRITABLE); if (unlikely(!__pyx_t_8.memview)) __PYX_ERR(0, 385, __pyx_L1_error)\n  __pyx_v_values_ = __pyx_t_8;\n  __pyx_t_8.memview = NULL;\n  __pyx_t_8.data = NULL;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":387\n *         cdef float [:] values_ = values\n *         cdef int i, j\n *         for i in range(self._vertexCount):             # <<<<<<<<<<<<<<\n *             values_[i] = self._values[i]\n *         return values\n */\n  __pyx_t_6 = __pyx_v_self->_vertexCount;\n  __pyx_t_9 = __pyx_t_6;\n  for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) {\n    __pyx_v_i = __pyx_t_10;\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":388\n *         cdef int i, j\n *         for i in range(self._vertexCount):\n *             values_[i] = self._values[i]             # <<<<<<<<<<<<<<\n *         return values\n * \n */\n    __pyx_t_11 = __pyx_v_i;\n    *((float *) ( /* dim=0 */ (__pyx_v_values_.data + __pyx_t_11 * __pyx_v_values_.strides[0]) )) = (__pyx_v_self->_values[__pyx_v_i]);\n  }\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":389\n *         for i in range(self._vertexCount):\n *             values_[i] = self._values[i]\n *         return values             # <<<<<<<<<<<<<<\n * \n * \n */\n  __Pyx_XDECREF(__pyx_r);\n  __Pyx_INCREF(__pyx_v_values);\n  __pyx_r = __pyx_v_values;\n  goto __pyx_L0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":383\n *         return faces\n * \n *     def get_values(self):             # <<<<<<<<<<<<<<\n *         values = np.empty((self._vertexCount,), np.float32)\n *         cdef float [:] values_ = values\n */\n\n  /* function exit code */\n  __pyx_L1_error:;\n  __Pyx_XDECREF(__pyx_t_1);\n  __Pyx_XDECREF(__pyx_t_2);\n  __Pyx_XDECREF(__pyx_t_3);\n  __Pyx_XDECREF(__pyx_t_4);\n  __Pyx_XDECREF(__pyx_t_5);\n  __Pyx_XDECREF(__pyx_t_7);\n  __PYX_XDEC_MEMVIEW(&__pyx_t_8, 1);\n  __Pyx_AddTraceback(\"_marching_cubes_lewiner_cy.Cell.get_values\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n  __pyx_r = NULL;\n  __pyx_L0:;\n  __Pyx_XDECREF(__pyx_v_values);\n  __PYX_XDEC_MEMVIEW(&__pyx_v_values_, 1);\n  __Pyx_XGIVEREF(__pyx_r);\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\n/* \"_marching_cubes_lewiner_cy.pyx\":394\n *     ## Called from marching cube function\n * \n *     cdef void new_z_value(self):             # <<<<<<<<<<<<<<\n *         \"\"\" This method should be called each time a new z layer is entered.\n *         We will swap the layers with face information and empty the second.\n */\n\nstatic void __pyx_f_26_marching_cubes_lewiner_cy_4Cell_new_z_value(struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *__pyx_v_self) {\n  int __pyx_v_i;\n  __Pyx_RefNannyDeclarations\n  int *__pyx_t_1;\n  int *__pyx_t_2;\n  long __pyx_t_3;\n  long __pyx_t_4;\n  int __pyx_t_5;\n  __Pyx_RefNannySetupContext(\"new_z_value\", 0);\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":399\n *         \"\"\"\n *         # Swap layers\n *         self.faceLayer1, self.faceLayer2 = self.faceLayer2, self.faceLayer1             # <<<<<<<<<<<<<<\n *         # Empty last\n *         cdef int i\n */\n  __pyx_t_1 = __pyx_v_self->faceLayer2;\n  __pyx_t_2 = __pyx_v_self->faceLayer1;\n  __pyx_v_self->faceLayer1 = __pyx_t_1;\n  __pyx_v_self->faceLayer2 = __pyx_t_2;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":402\n *         # Empty last\n *         cdef int i\n *         for i in range(self.nx*self.ny*4):             # <<<<<<<<<<<<<<\n *             self.faceLayer2[i] = -1\n * \n */\n  __pyx_t_3 = ((__pyx_v_self->nx * __pyx_v_self->ny) * 4);\n  __pyx_t_4 = __pyx_t_3;\n  for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {\n    __pyx_v_i = __pyx_t_5;\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":403\n *         cdef int i\n *         for i in range(self.nx*self.ny*4):\n *             self.faceLayer2[i] = -1             # <<<<<<<<<<<<<<\n * \n * \n */\n    (__pyx_v_self->faceLayer2[__pyx_v_i]) = -1;\n  }\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":394\n *     ## Called from marching cube function\n * \n *     cdef void new_z_value(self):             # <<<<<<<<<<<<<<\n *         \"\"\" This method should be called each time a new z layer is entered.\n *         We will swap the layers with face information and empty the second.\n */\n\n  /* function exit code */\n  __Pyx_RefNannyFinishContext();\n}\n\n/* \"_marching_cubes_lewiner_cy.pyx\":406\n * \n * \n *     cdef void set_cube(self,    double isovalue, int x, int y, int z, int step,             # <<<<<<<<<<<<<<\n *                                 double v0, double v1, double v2, double v3,\n *                                 double v4, double v5, double v6, double v7):\n */\n\nstatic void __pyx_f_26_marching_cubes_lewiner_cy_4Cell_set_cube(struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *__pyx_v_self, double __pyx_v_isovalue, int __pyx_v_x, int __pyx_v_y, int __pyx_v_z, int __pyx_v_step, double __pyx_v_v0, double __pyx_v_v1, double __pyx_v_v2, double __pyx_v_v3, double __pyx_v_v4, double __pyx_v_v5, double __pyx_v_v6, double __pyx_v_v7) {\n  int __pyx_v_index;\n  __Pyx_RefNannyDeclarations\n  int __pyx_t_1;\n  __Pyx_RefNannySetupContext(\"set_cube\", 0);\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":420\n * \n *         # Set location and step\n *         self.x = x             # <<<<<<<<<<<<<<\n *         self.y = y\n *         self.z = z\n */\n  __pyx_v_self->x = __pyx_v_x;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":421\n *         # Set location and step\n *         self.x = x\n *         self.y = y             # <<<<<<<<<<<<<<\n *         self.z = z\n *         self.step = step\n */\n  __pyx_v_self->y = __pyx_v_y;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":422\n *         self.x = x\n *         self.y = y\n *         self.z = z             # <<<<<<<<<<<<<<\n *         self.step = step\n * \n */\n  __pyx_v_self->z = __pyx_v_z;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":423\n *         self.y = y\n *         self.z = z\n *         self.step = step             # <<<<<<<<<<<<<<\n * \n *         # Set values\n */\n  __pyx_v_self->step = __pyx_v_step;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":426\n * \n *         # Set values\n *         self.v0 = v0 - isovalue             # <<<<<<<<<<<<<<\n *         self.v1 = v1 - isovalue\n *         self.v2 = v2 - isovalue\n */\n  __pyx_v_self->v0 = (__pyx_v_v0 - __pyx_v_isovalue);\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":427\n *         # Set values\n *         self.v0 = v0 - isovalue\n *         self.v1 = v1 - isovalue             # <<<<<<<<<<<<<<\n *         self.v2 = v2 - isovalue\n *         self.v3 = v3 - isovalue\n */\n  __pyx_v_self->v1 = (__pyx_v_v1 - __pyx_v_isovalue);\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":428\n *         self.v0 = v0 - isovalue\n *         self.v1 = v1 - isovalue\n *         self.v2 = v2 - isovalue             # <<<<<<<<<<<<<<\n *         self.v3 = v3 - isovalue\n *         self.v4 = v4 - isovalue\n */\n  __pyx_v_self->v2 = (__pyx_v_v2 - __pyx_v_isovalue);\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":429\n *         self.v1 = v1 - isovalue\n *         self.v2 = v2 - isovalue\n *         self.v3 = v3 - isovalue             # <<<<<<<<<<<<<<\n *         self.v4 = v4 - isovalue\n *         self.v5 = v5 - isovalue\n */\n  __pyx_v_self->v3 = (__pyx_v_v3 - __pyx_v_isovalue);\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":430\n *         self.v2 = v2 - isovalue\n *         self.v3 = v3 - isovalue\n *         self.v4 = v4 - isovalue             # <<<<<<<<<<<<<<\n *         self.v5 = v5 - isovalue\n *         self.v6 = v6 - isovalue\n */\n  __pyx_v_self->v4 = (__pyx_v_v4 - __pyx_v_isovalue);\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":431\n *         self.v3 = v3 - isovalue\n *         self.v4 = v4 - isovalue\n *         self.v5 = v5 - isovalue             # <<<<<<<<<<<<<<\n *         self.v6 = v6 - isovalue\n *         self.v7 = v7 - isovalue\n */\n  __pyx_v_self->v5 = (__pyx_v_v5 - __pyx_v_isovalue);\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":432\n *         self.v4 = v4 - isovalue\n *         self.v5 = v5 - isovalue\n *         self.v6 = v6 - isovalue             # <<<<<<<<<<<<<<\n *         self.v7 = v7 - isovalue\n * \n */\n  __pyx_v_self->v6 = (__pyx_v_v6 - __pyx_v_isovalue);\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":433\n *         self.v5 = v5 - isovalue\n *         self.v6 = v6 - isovalue\n *         self.v7 = v7 - isovalue             # <<<<<<<<<<<<<<\n * \n *         # Calculate index\n */\n  __pyx_v_self->v7 = (__pyx_v_v7 - __pyx_v_isovalue);\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":436\n * \n *         # Calculate index\n *         cdef int index = 0             # <<<<<<<<<<<<<<\n *         if self.v0 > 0.0:   index += 1\n *         if self.v1 > 0.0:   index += 2\n */\n  __pyx_v_index = 0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":437\n *         # Calculate index\n *         cdef int index = 0\n *         if self.v0 > 0.0:   index += 1             # <<<<<<<<<<<<<<\n *         if self.v1 > 0.0:   index += 2\n *         if self.v2 > 0.0:   index += 4\n */\n  __pyx_t_1 = ((__pyx_v_self->v0 > 0.0) != 0);\n  if (__pyx_t_1) {\n    __pyx_v_index = (__pyx_v_index + 1);\n  }\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":438\n *         cdef int index = 0\n *         if self.v0 > 0.0:   index += 1\n *         if self.v1 > 0.0:   index += 2             # <<<<<<<<<<<<<<\n *         if self.v2 > 0.0:   index += 4\n *         if self.v3 > 0.0:   index += 8\n */\n  __pyx_t_1 = ((__pyx_v_self->v1 > 0.0) != 0);\n  if (__pyx_t_1) {\n    __pyx_v_index = (__pyx_v_index + 2);\n  }\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":439\n *         if self.v0 > 0.0:   index += 1\n *         if self.v1 > 0.0:   index += 2\n *         if self.v2 > 0.0:   index += 4             # <<<<<<<<<<<<<<\n *         if self.v3 > 0.0:   index += 8\n *         if self.v4 > 0.0:   index += 16\n */\n  __pyx_t_1 = ((__pyx_v_self->v2 > 0.0) != 0);\n  if (__pyx_t_1) {\n    __pyx_v_index = (__pyx_v_index + 4);\n  }\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":440\n *         if self.v1 > 0.0:   index += 2\n *         if self.v2 > 0.0:   index += 4\n *         if self.v3 > 0.0:   index += 8             # <<<<<<<<<<<<<<\n *         if self.v4 > 0.0:   index += 16\n *         if self.v5 > 0.0:   index += 32\n */\n  __pyx_t_1 = ((__pyx_v_self->v3 > 0.0) != 0);\n  if (__pyx_t_1) {\n    __pyx_v_index = (__pyx_v_index + 8);\n  }\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":441\n *         if self.v2 > 0.0:   index += 4\n *         if self.v3 > 0.0:   index += 8\n *         if self.v4 > 0.0:   index += 16             # <<<<<<<<<<<<<<\n *         if self.v5 > 0.0:   index += 32\n *         if self.v6 > 0.0:   index += 64\n */\n  __pyx_t_1 = ((__pyx_v_self->v4 > 0.0) != 0);\n  if (__pyx_t_1) {\n    __pyx_v_index = (__pyx_v_index + 16);\n  }\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":442\n *         if self.v3 > 0.0:   index += 8\n *         if self.v4 > 0.0:   index += 16\n *         if self.v5 > 0.0:   index += 32             # <<<<<<<<<<<<<<\n *         if self.v6 > 0.0:   index += 64\n *         if self.v7 > 0.0:   index += 128\n */\n  __pyx_t_1 = ((__pyx_v_self->v5 > 0.0) != 0);\n  if (__pyx_t_1) {\n    __pyx_v_index = (__pyx_v_index + 32);\n  }\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":443\n *         if self.v4 > 0.0:   index += 16\n *         if self.v5 > 0.0:   index += 32\n *         if self.v6 > 0.0:   index += 64             # <<<<<<<<<<<<<<\n *         if self.v7 > 0.0:   index += 128\n *         self.index = index\n */\n  __pyx_t_1 = ((__pyx_v_self->v6 > 0.0) != 0);\n  if (__pyx_t_1) {\n    __pyx_v_index = (__pyx_v_index + 64);\n  }\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":444\n *         if self.v5 > 0.0:   index += 32\n *         if self.v6 > 0.0:   index += 64\n *         if self.v7 > 0.0:   index += 128             # <<<<<<<<<<<<<<\n *         self.index = index\n * \n */\n  __pyx_t_1 = ((__pyx_v_self->v7 > 0.0) != 0);\n  if (__pyx_t_1) {\n    __pyx_v_index = (__pyx_v_index + 0x80);\n  }\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":445\n *         if self.v6 > 0.0:   index += 64\n *         if self.v7 > 0.0:   index += 128\n *         self.index = index             # <<<<<<<<<<<<<<\n * \n *         # Reset c12\n */\n  __pyx_v_self->index = __pyx_v_index;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":448\n * \n *         # Reset c12\n *         self.v12_calculated = 0             # <<<<<<<<<<<<<<\n * \n * \n */\n  __pyx_v_self->v12_calculated = 0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":406\n * \n * \n *     cdef void set_cube(self,    double isovalue, int x, int y, int z, int step,             # <<<<<<<<<<<<<<\n *                                 double v0, double v1, double v2, double v3,\n *                                 double v4, double v5, double v6, double v7):\n */\n\n  /* function exit code */\n  __Pyx_RefNannyFinishContext();\n}\n\n/* \"_marching_cubes_lewiner_cy.pyx\":451\n * \n * \n *     cdef void add_triangles(self, Lut lut, int lutIndex, int nt):             # <<<<<<<<<<<<<<\n *         \"\"\" Add triangles.\n * \n */\n\nstatic void __pyx_f_26_marching_cubes_lewiner_cy_4Cell_add_triangles(struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *__pyx_v_self, struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *__pyx_v_lut, int __pyx_v_lutIndex, int __pyx_v_nt) {\n  int __pyx_v_i;\n  int __pyx_v_j;\n  int __pyx_v_vi;\n  __Pyx_RefNannyDeclarations\n  int __pyx_t_1;\n  int __pyx_t_2;\n  int __pyx_t_3;\n  int __pyx_t_4;\n  __Pyx_RefNannySetupContext(\"add_triangles\", 0);\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":465\n *         cdef int vi\n * \n *         self.prepare_for_adding_triangles()             # <<<<<<<<<<<<<<\n * \n *         for i in range(nt):\n */\n  ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_self->__pyx_vtab)->prepare_for_adding_triangles(__pyx_v_self);\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":467\n *         self.prepare_for_adding_triangles()\n * \n *         for i in range(nt):             # <<<<<<<<<<<<<<\n *             for j in range(3):\n *                 # Get two sides for each element in this vertex\n */\n  __pyx_t_1 = __pyx_v_nt;\n  __pyx_t_2 = __pyx_t_1;\n  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {\n    __pyx_v_i = __pyx_t_3;\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":468\n * \n *         for i in range(nt):\n *             for j in range(3):             # <<<<<<<<<<<<<<\n *                 # Get two sides for each element in this vertex\n *                 vi = lut.get2(lutIndex, i*3+j)\n */\n    for (__pyx_t_4 = 0; __pyx_t_4 < 3; __pyx_t_4+=1) {\n      __pyx_v_j = __pyx_t_4;\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":470\n *             for j in range(3):\n *                 # Get two sides for each element in this vertex\n *                 vi = lut.get2(lutIndex, i*3+j)             # <<<<<<<<<<<<<<\n *                 self._add_face_from_edge_index(vi)\n * \n */\n      __pyx_v_vi = ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Lut *)__pyx_v_lut->__pyx_vtab)->get2(__pyx_v_lut, __pyx_v_lutIndex, ((__pyx_v_i * 3) + __pyx_v_j));\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":471\n *                 # Get two sides for each element in this vertex\n *                 vi = lut.get2(lutIndex, i*3+j)\n *                 self._add_face_from_edge_index(vi)             # <<<<<<<<<<<<<<\n * \n * \n */\n      ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_self->__pyx_vtab)->_add_face_from_edge_index(__pyx_v_self, __pyx_v_vi);\n    }\n  }\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":451\n * \n * \n *     cdef void add_triangles(self, Lut lut, int lutIndex, int nt):             # <<<<<<<<<<<<<<\n *         \"\"\" Add triangles.\n * \n */\n\n  /* function exit code */\n  __Pyx_RefNannyFinishContext();\n}\n\n/* \"_marching_cubes_lewiner_cy.pyx\":474\n * \n * \n *     cdef void add_triangles2(self, Lut lut, int lutIndex, int lutIndex2, int nt):             # <<<<<<<<<<<<<<\n *         \"\"\" Same as add_triangles, except that now the geometry is in a LUT\n *         with 3 dimensions, and an extra index is provided.\n */\n\nstatic void __pyx_f_26_marching_cubes_lewiner_cy_4Cell_add_triangles2(struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *__pyx_v_self, struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *__pyx_v_lut, int __pyx_v_lutIndex, int __pyx_v_lutIndex2, int __pyx_v_nt) {\n  int __pyx_v_i;\n  int __pyx_v_j;\n  int __pyx_v_vi;\n  __Pyx_RefNannyDeclarations\n  int __pyx_t_1;\n  int __pyx_t_2;\n  int __pyx_t_3;\n  int __pyx_t_4;\n  __Pyx_RefNannySetupContext(\"add_triangles2\", 0);\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":482\n *         cdef int vi\n * \n *         self.prepare_for_adding_triangles()             # <<<<<<<<<<<<<<\n * \n *         for i in range(nt):\n */\n  ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_self->__pyx_vtab)->prepare_for_adding_triangles(__pyx_v_self);\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":484\n *         self.prepare_for_adding_triangles()\n * \n *         for i in range(nt):             # <<<<<<<<<<<<<<\n *             for j in range(3):\n *                 # Get two sides for each element in this vertex\n */\n  __pyx_t_1 = __pyx_v_nt;\n  __pyx_t_2 = __pyx_t_1;\n  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {\n    __pyx_v_i = __pyx_t_3;\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":485\n * \n *         for i in range(nt):\n *             for j in range(3):             # <<<<<<<<<<<<<<\n *                 # Get two sides for each element in this vertex\n *                 vi = lut.get3(lutIndex, lutIndex2, i*3+j)\n */\n    for (__pyx_t_4 = 0; __pyx_t_4 < 3; __pyx_t_4+=1) {\n      __pyx_v_j = __pyx_t_4;\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":487\n *             for j in range(3):\n *                 # Get two sides for each element in this vertex\n *                 vi = lut.get3(lutIndex, lutIndex2, i*3+j)             # <<<<<<<<<<<<<<\n *                 self._add_face_from_edge_index(vi)\n * \n */\n      __pyx_v_vi = ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Lut *)__pyx_v_lut->__pyx_vtab)->get3(__pyx_v_lut, __pyx_v_lutIndex, __pyx_v_lutIndex2, ((__pyx_v_i * 3) + __pyx_v_j));\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":488\n *                 # Get two sides for each element in this vertex\n *                 vi = lut.get3(lutIndex, lutIndex2, i*3+j)\n *                 self._add_face_from_edge_index(vi)             # <<<<<<<<<<<<<<\n * \n *     ## Used internally\n */\n      ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_self->__pyx_vtab)->_add_face_from_edge_index(__pyx_v_self, __pyx_v_vi);\n    }\n  }\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":474\n * \n * \n *     cdef void add_triangles2(self, Lut lut, int lutIndex, int lutIndex2, int nt):             # <<<<<<<<<<<<<<\n *         \"\"\" Same as add_triangles, except that now the geometry is in a LUT\n *         with 3 dimensions, and an extra index is provided.\n */\n\n  /* function exit code */\n  __Pyx_RefNannyFinishContext();\n}\n\n/* \"_marching_cubes_lewiner_cy.pyx\":492\n *     ## Used internally\n * \n *     cdef void _add_face_from_edge_index(self, int vi):             # <<<<<<<<<<<<<<\n *         \"\"\" Add one face from an edge index. Only adds a face if the\n *         vertex already exists. Otherwise also adds a vertex and applies\n */\n\nstatic void __pyx_f_26_marching_cubes_lewiner_cy_4Cell__add_face_from_edge_index(struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *__pyx_v_self, int __pyx_v_vi) {\n  int __pyx_v_indexInVertexArray;\n  int __pyx_v_indexInFaceLayer;\n  int __pyx_v_dx1;\n  int __pyx_v_dy1;\n  int __pyx_v_dz1;\n  int __pyx_v_dx2;\n  int __pyx_v_dy2;\n  int __pyx_v_dz2;\n  int __pyx_v_index1;\n  int __pyx_v_index2;\n  double __pyx_v_tmpf1;\n  double __pyx_v_tmpf2;\n  double __pyx_v_fx;\n  double __pyx_v_fy;\n  double __pyx_v_fz;\n  double __pyx_v_ff;\n  double __pyx_v_stp;\n  __Pyx_RefNannyDeclarations\n  int __pyx_t_1;\n  PyObject *__pyx_t_2 = NULL;\n  int __pyx_t_3;\n  int __pyx_t_4;\n  double __pyx_t_5;\n  double __pyx_t_6;\n  double __pyx_t_7;\n  double __pyx_t_8;\n  int __pyx_lineno = 0;\n  const char *__pyx_filename = NULL;\n  int __pyx_clineno = 0;\n  __Pyx_RefNannySetupContext(\"_add_face_from_edge_index\", 0);\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":505\n *         cdef double tmpf1, tmpf2\n *         cdef double fx, fy, fz, ff\n *         cdef double stp = <double>self.step             # <<<<<<<<<<<<<<\n * \n *         # Get index in the face layer and corresponding vertex number\n */\n  __pyx_v_stp = ((double)__pyx_v_self->step);\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":508\n * \n *         # Get index in the face layer and corresponding vertex number\n *         indexInFaceLayer = self.get_index_in_facelayer(vi)             # <<<<<<<<<<<<<<\n *         indexInVertexArray = self.faceLayer[indexInFaceLayer]\n * \n */\n  __pyx_v_indexInFaceLayer = ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_self->__pyx_vtab)->get_index_in_facelayer(__pyx_v_self, __pyx_v_vi);\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":509\n *         # Get index in the face layer and corresponding vertex number\n *         indexInFaceLayer = self.get_index_in_facelayer(vi)\n *         indexInVertexArray = self.faceLayer[indexInFaceLayer]             # <<<<<<<<<<<<<<\n * \n *         # If we have the center vertex, we have things pre-calculated,\n */\n  __pyx_v_indexInVertexArray = (__pyx_v_self->faceLayer[__pyx_v_indexInFaceLayer]);\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":516\n *         # or not.\n * \n *         if vi == 12: # center vertex             # <<<<<<<<<<<<<<\n *             if self.v12_calculated == 0:\n *                 self.calculate_center_vertex()\n */\n  __pyx_t_1 = ((__pyx_v_vi == 12) != 0);\n  if (__pyx_t_1) {\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":517\n * \n *         if vi == 12: # center vertex\n *             if self.v12_calculated == 0:             # <<<<<<<<<<<<<<\n *                 self.calculate_center_vertex()\n *             if indexInVertexArray >= 0:\n */\n    __pyx_t_1 = ((__pyx_v_self->v12_calculated == 0) != 0);\n    if (__pyx_t_1) {\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":518\n *         if vi == 12: # center vertex\n *             if self.v12_calculated == 0:\n *                 self.calculate_center_vertex()             # <<<<<<<<<<<<<<\n *             if indexInVertexArray >= 0:\n *                 # Vertex already calculated, only need to add face and gradient\n */\n      ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_self->__pyx_vtab)->calculate_center_vertex(__pyx_v_self);\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":517\n * \n *         if vi == 12: # center vertex\n *             if self.v12_calculated == 0:             # <<<<<<<<<<<<<<\n *                 self.calculate_center_vertex()\n *             if indexInVertexArray >= 0:\n */\n    }\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":519\n *             if self.v12_calculated == 0:\n *                 self.calculate_center_vertex()\n *             if indexInVertexArray >= 0:             # <<<<<<<<<<<<<<\n *                 # Vertex already calculated, only need to add face and gradient\n *                 self.add_face(indexInVertexArray)\n */\n    __pyx_t_1 = ((__pyx_v_indexInVertexArray >= 0) != 0);\n    if (__pyx_t_1) {\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":521\n *             if indexInVertexArray >= 0:\n *                 # Vertex already calculated, only need to add face and gradient\n *                 self.add_face(indexInVertexArray)             # <<<<<<<<<<<<<<\n *                 self.add_gradient(indexInVertexArray, self.v12_xg, self.v12_yg, self.v12_zg)\n *             else:\n */\n      __pyx_t_2 = ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_self->__pyx_vtab)->add_face(__pyx_v_self, __pyx_v_indexInVertexArray); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 521, __pyx_L1_error)\n      __Pyx_GOTREF(__pyx_t_2);\n      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":522\n *                 # Vertex already calculated, only need to add face and gradient\n *                 self.add_face(indexInVertexArray)\n *                 self.add_gradient(indexInVertexArray, self.v12_xg, self.v12_yg, self.v12_zg)             # <<<<<<<<<<<<<<\n *             else:\n *                 # Add precalculated center vertex position (is interpolated)\n */\n      ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_self->__pyx_vtab)->add_gradient(__pyx_v_self, __pyx_v_indexInVertexArray, __pyx_v_self->v12_xg, __pyx_v_self->v12_yg, __pyx_v_self->v12_zg);\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":519\n *             if self.v12_calculated == 0:\n *                 self.calculate_center_vertex()\n *             if indexInVertexArray >= 0:             # <<<<<<<<<<<<<<\n *                 # Vertex already calculated, only need to add face and gradient\n *                 self.add_face(indexInVertexArray)\n */\n      goto __pyx_L5;\n    }\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":525\n *             else:\n *                 # Add precalculated center vertex position (is interpolated)\n *                 indexInVertexArray = self.add_vertex( self.v12_x, self.v12_y, self.v12_z)             # <<<<<<<<<<<<<<\n *                 # Update face layer\n *                 self.faceLayer[indexInFaceLayer] = indexInVertexArray\n */\n    /*else*/ {\n      __pyx_v_indexInVertexArray = ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_self->__pyx_vtab)->add_vertex(__pyx_v_self, __pyx_v_self->v12_x, __pyx_v_self->v12_y, __pyx_v_self->v12_z);\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":527\n *                 indexInVertexArray = self.add_vertex( self.v12_x, self.v12_y, self.v12_z)\n *                 # Update face layer\n *                 self.faceLayer[indexInFaceLayer] = indexInVertexArray             # <<<<<<<<<<<<<<\n *                 # Add face and gradient\n *                 self.add_face(indexInVertexArray)\n */\n      (__pyx_v_self->faceLayer[__pyx_v_indexInFaceLayer]) = __pyx_v_indexInVertexArray;\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":529\n *                 self.faceLayer[indexInFaceLayer] = indexInVertexArray\n *                 # Add face and gradient\n *                 self.add_face(indexInVertexArray)             # <<<<<<<<<<<<<<\n *                 self.add_gradient(indexInVertexArray, self.v12_xg, self.v12_yg, self.v12_zg)\n * \n */\n      __pyx_t_2 = ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_self->__pyx_vtab)->add_face(__pyx_v_self, __pyx_v_indexInVertexArray); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 529, __pyx_L1_error)\n      __Pyx_GOTREF(__pyx_t_2);\n      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":530\n *                 # Add face and gradient\n *                 self.add_face(indexInVertexArray)\n *                 self.add_gradient(indexInVertexArray, self.v12_xg, self.v12_yg, self.v12_zg)             # <<<<<<<<<<<<<<\n * \n *         else:\n */\n      ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_self->__pyx_vtab)->add_gradient(__pyx_v_self, __pyx_v_indexInVertexArray, __pyx_v_self->v12_xg, __pyx_v_self->v12_yg, __pyx_v_self->v12_zg);\n    }\n    __pyx_L5:;\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":516\n *         # or not.\n * \n *         if vi == 12: # center vertex             # <<<<<<<<<<<<<<\n *             if self.v12_calculated == 0:\n *                 self.calculate_center_vertex()\n */\n    goto __pyx_L3;\n  }\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":535\n * \n *             # Get relative edge indices for x, y and z\n *             dx1, dx2 = self.luts.EDGESRELX.get2(vi,0), self.luts.EDGESRELX.get2(vi,1)             # <<<<<<<<<<<<<<\n *             dy1, dy2 = self.luts.EDGESRELY.get2(vi,0), self.luts.EDGESRELY.get2(vi,1)\n *             dz1, dz2 = self.luts.EDGESRELZ.get2(vi,0), self.luts.EDGESRELZ.get2(vi,1)\n */\n  /*else*/ {\n    __pyx_t_3 = ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Lut *)__pyx_v_self->luts->EDGESRELX->__pyx_vtab)->get2(__pyx_v_self->luts->EDGESRELX, __pyx_v_vi, 0);\n    __pyx_t_4 = ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Lut *)__pyx_v_self->luts->EDGESRELX->__pyx_vtab)->get2(__pyx_v_self->luts->EDGESRELX, __pyx_v_vi, 1);\n    __pyx_v_dx1 = __pyx_t_3;\n    __pyx_v_dx2 = __pyx_t_4;\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":536\n *             # Get relative edge indices for x, y and z\n *             dx1, dx2 = self.luts.EDGESRELX.get2(vi,0), self.luts.EDGESRELX.get2(vi,1)\n *             dy1, dy2 = self.luts.EDGESRELY.get2(vi,0), self.luts.EDGESRELY.get2(vi,1)             # <<<<<<<<<<<<<<\n *             dz1, dz2 = self.luts.EDGESRELZ.get2(vi,0), self.luts.EDGESRELZ.get2(vi,1)\n *             # Make two vertex indices\n */\n    __pyx_t_4 = ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Lut *)__pyx_v_self->luts->EDGESRELY->__pyx_vtab)->get2(__pyx_v_self->luts->EDGESRELY, __pyx_v_vi, 0);\n    __pyx_t_3 = ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Lut *)__pyx_v_self->luts->EDGESRELY->__pyx_vtab)->get2(__pyx_v_self->luts->EDGESRELY, __pyx_v_vi, 1);\n    __pyx_v_dy1 = __pyx_t_4;\n    __pyx_v_dy2 = __pyx_t_3;\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":537\n *             dx1, dx2 = self.luts.EDGESRELX.get2(vi,0), self.luts.EDGESRELX.get2(vi,1)\n *             dy1, dy2 = self.luts.EDGESRELY.get2(vi,0), self.luts.EDGESRELY.get2(vi,1)\n *             dz1, dz2 = self.luts.EDGESRELZ.get2(vi,0), self.luts.EDGESRELZ.get2(vi,1)             # <<<<<<<<<<<<<<\n *             # Make two vertex indices\n *             index1 = dz1*4 + dy1*2 + dx1\n */\n    __pyx_t_3 = ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Lut *)__pyx_v_self->luts->EDGESRELZ->__pyx_vtab)->get2(__pyx_v_self->luts->EDGESRELZ, __pyx_v_vi, 0);\n    __pyx_t_4 = ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Lut *)__pyx_v_self->luts->EDGESRELZ->__pyx_vtab)->get2(__pyx_v_self->luts->EDGESRELZ, __pyx_v_vi, 1);\n    __pyx_v_dz1 = __pyx_t_3;\n    __pyx_v_dz2 = __pyx_t_4;\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":539\n *             dz1, dz2 = self.luts.EDGESRELZ.get2(vi,0), self.luts.EDGESRELZ.get2(vi,1)\n *             # Make two vertex indices\n *             index1 = dz1*4 + dy1*2 + dx1             # <<<<<<<<<<<<<<\n *             index2 = dz2*4 + dy2*2 + dx2\n *             # Define strength of both corners\n */\n    __pyx_v_index1 = (((__pyx_v_dz1 * 4) + (__pyx_v_dy1 * 2)) + __pyx_v_dx1);\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":540\n *             # Make two vertex indices\n *             index1 = dz1*4 + dy1*2 + dx1\n *             index2 = dz2*4 + dy2*2 + dx2             # <<<<<<<<<<<<<<\n *             # Define strength of both corners\n *             tmpf1 = 1.0 / (FLT_EPSILON + dabs(self.vv[index1]))\n */\n    __pyx_v_index2 = (((__pyx_v_dz2 * 4) + (__pyx_v_dy2 * 2)) + __pyx_v_dx2);\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":542\n *             index2 = dz2*4 + dy2*2 + dx2\n *             # Define strength of both corners\n *             tmpf1 = 1.0 / (FLT_EPSILON + dabs(self.vv[index1]))             # <<<<<<<<<<<<<<\n *             tmpf2 = 1.0 / (FLT_EPSILON + dabs(self.vv[index2]))\n * \n */\n    __pyx_v_tmpf1 = (1.0 / (__pyx_v_26_marching_cubes_lewiner_cy_FLT_EPSILON + __pyx_f_26_marching_cubes_lewiner_cy_dabs((__pyx_v_self->vv[__pyx_v_index1]))));\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":543\n *             # Define strength of both corners\n *             tmpf1 = 1.0 / (FLT_EPSILON + dabs(self.vv[index1]))\n *             tmpf2 = 1.0 / (FLT_EPSILON + dabs(self.vv[index2]))             # <<<<<<<<<<<<<<\n * \n *             # print('indexInVertexArray', self.x, self.y, self.z, '-', vi, indexInVertexArray, indexInFaceLayer)\n */\n    __pyx_v_tmpf2 = (1.0 / (__pyx_v_26_marching_cubes_lewiner_cy_FLT_EPSILON + __pyx_f_26_marching_cubes_lewiner_cy_dabs((__pyx_v_self->vv[__pyx_v_index2]))));\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":547\n *             # print('indexInVertexArray', self.x, self.y, self.z, '-', vi, indexInVertexArray, indexInFaceLayer)\n * \n *             if indexInVertexArray >= 0:             # <<<<<<<<<<<<<<\n *                 # Vertex already calculated, only need to add face and gradient\n *                 self.add_face(indexInVertexArray)\n */\n    __pyx_t_1 = ((__pyx_v_indexInVertexArray >= 0) != 0);\n    if (__pyx_t_1) {\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":549\n *             if indexInVertexArray >= 0:\n *                 # Vertex already calculated, only need to add face and gradient\n *                 self.add_face(indexInVertexArray)             # <<<<<<<<<<<<<<\n *                 self.add_gradient_from_index(indexInVertexArray, index1, tmpf1)\n *                 self.add_gradient_from_index(indexInVertexArray, index2, tmpf2)\n */\n      __pyx_t_2 = ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_self->__pyx_vtab)->add_face(__pyx_v_self, __pyx_v_indexInVertexArray); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 549, __pyx_L1_error)\n      __Pyx_GOTREF(__pyx_t_2);\n      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":550\n *                 # Vertex already calculated, only need to add face and gradient\n *                 self.add_face(indexInVertexArray)\n *                 self.add_gradient_from_index(indexInVertexArray, index1, tmpf1)             # <<<<<<<<<<<<<<\n *                 self.add_gradient_from_index(indexInVertexArray, index2, tmpf2)\n * \n */\n      ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_self->__pyx_vtab)->add_gradient_from_index(__pyx_v_self, __pyx_v_indexInVertexArray, __pyx_v_index1, __pyx_v_tmpf1);\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":551\n *                 self.add_face(indexInVertexArray)\n *                 self.add_gradient_from_index(indexInVertexArray, index1, tmpf1)\n *                 self.add_gradient_from_index(indexInVertexArray, index2, tmpf2)             # <<<<<<<<<<<<<<\n * \n *             else:\n */\n      ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_self->__pyx_vtab)->add_gradient_from_index(__pyx_v_self, __pyx_v_indexInVertexArray, __pyx_v_index2, __pyx_v_tmpf2);\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":547\n *             # print('indexInVertexArray', self.x, self.y, self.z, '-', vi, indexInVertexArray, indexInFaceLayer)\n * \n *             if indexInVertexArray >= 0:             # <<<<<<<<<<<<<<\n *                 # Vertex already calculated, only need to add face and gradient\n *                 self.add_face(indexInVertexArray)\n */\n      goto __pyx_L6;\n    }\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":555\n *             else:\n *                 # Interpolate by applying a kind of center-of-mass method\n *                 fx, fy, fz, ff = 0.0, 0.0, 0.0, 0.0             # <<<<<<<<<<<<<<\n *                 fx += <double>dx1 * tmpf1;  fy += <double>dy1 * tmpf1;  fz += <double>dz1 * tmpf1;  ff += tmpf1\n *                 fx += <double>dx2 * tmpf2;  fy += <double>dy2 * tmpf2;  fz += <double>dz2 * tmpf2;  ff += tmpf2\n */\n    /*else*/ {\n      __pyx_t_5 = 0.0;\n      __pyx_t_6 = 0.0;\n      __pyx_t_7 = 0.0;\n      __pyx_t_8 = 0.0;\n      __pyx_v_fx = __pyx_t_5;\n      __pyx_v_fy = __pyx_t_6;\n      __pyx_v_fz = __pyx_t_7;\n      __pyx_v_ff = __pyx_t_8;\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":556\n *                 # Interpolate by applying a kind of center-of-mass method\n *                 fx, fy, fz, ff = 0.0, 0.0, 0.0, 0.0\n *                 fx += <double>dx1 * tmpf1;  fy += <double>dy1 * tmpf1;  fz += <double>dz1 * tmpf1;  ff += tmpf1             # <<<<<<<<<<<<<<\n *                 fx += <double>dx2 * tmpf2;  fy += <double>dy2 * tmpf2;  fz += <double>dz2 * tmpf2;  ff += tmpf2\n * \n */\n      __pyx_v_fx = (__pyx_v_fx + (((double)__pyx_v_dx1) * __pyx_v_tmpf1));\n      __pyx_v_fy = (__pyx_v_fy + (((double)__pyx_v_dy1) * __pyx_v_tmpf1));\n      __pyx_v_fz = (__pyx_v_fz + (((double)__pyx_v_dz1) * __pyx_v_tmpf1));\n      __pyx_v_ff = (__pyx_v_ff + __pyx_v_tmpf1);\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":557\n *                 fx, fy, fz, ff = 0.0, 0.0, 0.0, 0.0\n *                 fx += <double>dx1 * tmpf1;  fy += <double>dy1 * tmpf1;  fz += <double>dz1 * tmpf1;  ff += tmpf1\n *                 fx += <double>dx2 * tmpf2;  fy += <double>dy2 * tmpf2;  fz += <double>dz2 * tmpf2;  ff += tmpf2             # <<<<<<<<<<<<<<\n * \n *                 # Add vertex\n */\n      __pyx_v_fx = (__pyx_v_fx + (((double)__pyx_v_dx2) * __pyx_v_tmpf2));\n      __pyx_v_fy = (__pyx_v_fy + (((double)__pyx_v_dy2) * __pyx_v_tmpf2));\n      __pyx_v_fz = (__pyx_v_fz + (((double)__pyx_v_dz2) * __pyx_v_tmpf2));\n      __pyx_v_ff = (__pyx_v_ff + __pyx_v_tmpf2);\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":560\n * \n *                 # Add vertex\n *                 indexInVertexArray = self.add_vertex(             # <<<<<<<<<<<<<<\n *                                 <double>self.x + stp*fx/ff,\n *                                 <double>self.y + stp*fy/ff,\n */\n      __pyx_v_indexInVertexArray = ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_self->__pyx_vtab)->add_vertex(__pyx_v_self, (((double)__pyx_v_self->x) + ((__pyx_v_stp * __pyx_v_fx) / __pyx_v_ff)), (((double)__pyx_v_self->y) + ((__pyx_v_stp * __pyx_v_fy) / __pyx_v_ff)), (((double)__pyx_v_self->z) + ((__pyx_v_stp * __pyx_v_fz) / __pyx_v_ff)));\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":565\n *                                 <double>self.z + stp*fz/ff )\n *                 # Update face layer\n *                 self.faceLayer[indexInFaceLayer] = indexInVertexArray             # <<<<<<<<<<<<<<\n *                 # Add face and gradient\n *                 self.add_face(indexInVertexArray)\n */\n      (__pyx_v_self->faceLayer[__pyx_v_indexInFaceLayer]) = __pyx_v_indexInVertexArray;\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":567\n *                 self.faceLayer[indexInFaceLayer] = indexInVertexArray\n *                 # Add face and gradient\n *                 self.add_face(indexInVertexArray)             # <<<<<<<<<<<<<<\n *                 self.add_gradient_from_index(indexInVertexArray, index1, tmpf1)\n *                 self.add_gradient_from_index(indexInVertexArray, index2, tmpf2)\n */\n      __pyx_t_2 = ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_self->__pyx_vtab)->add_face(__pyx_v_self, __pyx_v_indexInVertexArray); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 567, __pyx_L1_error)\n      __Pyx_GOTREF(__pyx_t_2);\n      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":568\n *                 # Add face and gradient\n *                 self.add_face(indexInVertexArray)\n *                 self.add_gradient_from_index(indexInVertexArray, index1, tmpf1)             # <<<<<<<<<<<<<<\n *                 self.add_gradient_from_index(indexInVertexArray, index2, tmpf2)\n * \n */\n      ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_self->__pyx_vtab)->add_gradient_from_index(__pyx_v_self, __pyx_v_indexInVertexArray, __pyx_v_index1, __pyx_v_tmpf1);\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":569\n *                 self.add_face(indexInVertexArray)\n *                 self.add_gradient_from_index(indexInVertexArray, index1, tmpf1)\n *                 self.add_gradient_from_index(indexInVertexArray, index2, tmpf2)             # <<<<<<<<<<<<<<\n * \n * \n */\n      ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_self->__pyx_vtab)->add_gradient_from_index(__pyx_v_self, __pyx_v_indexInVertexArray, __pyx_v_index2, __pyx_v_tmpf2);\n    }\n    __pyx_L6:;\n  }\n  __pyx_L3:;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":492\n *     ## Used internally\n * \n *     cdef void _add_face_from_edge_index(self, int vi):             # <<<<<<<<<<<<<<\n *         \"\"\" Add one face from an edge index. Only adds a face if the\n *         vertex already exists. Otherwise also adds a vertex and applies\n */\n\n  /* function exit code */\n  goto __pyx_L0;\n  __pyx_L1_error:;\n  __Pyx_XDECREF(__pyx_t_2);\n  __Pyx_WriteUnraisable(\"_marching_cubes_lewiner_cy.Cell._add_face_from_edge_index\", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);\n  __pyx_L0:;\n  __Pyx_RefNannyFinishContext();\n}\n\n/* \"_marching_cubes_lewiner_cy.pyx\":579\n * \n * \n *     cdef int get_index_in_facelayer(self, int vi):             # <<<<<<<<<<<<<<\n *         \"\"\"\n *         Get the index of a vertex position, given the edge on which it lies.\n */\n\nstatic int __pyx_f_26_marching_cubes_lewiner_cy_4Cell_get_index_in_facelayer(struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *__pyx_v_self, int __pyx_v_vi) {\n  int __pyx_v_i;\n  int __pyx_v_j;\n  CYTHON_UNUSED int __pyx_v_vi_;\n  int *__pyx_v_faceLayer;\n  int __pyx_r;\n  __Pyx_RefNannyDeclarations\n  int __pyx_t_1;\n  int *__pyx_t_2;\n  __Pyx_RefNannySetupContext(\"get_index_in_facelayer\", 0);\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":608\n * \n *         # Init indices, both are corrected below\n *         cdef int i = self.nx * self.y + self.x  # Index of cube to get vertex at             # <<<<<<<<<<<<<<\n *         cdef int j = 0 # Vertex number for that cell\n *         cdef int vi_ = vi\n */\n  __pyx_v_i = ((__pyx_v_self->nx * __pyx_v_self->y) + __pyx_v_self->x);\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":609\n *         # Init indices, both are corrected below\n *         cdef int i = self.nx * self.y + self.x  # Index of cube to get vertex at\n *         cdef int j = 0 # Vertex number for that cell             # <<<<<<<<<<<<<<\n *         cdef int vi_ = vi\n * \n */\n  __pyx_v_j = 0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":610\n *         cdef int i = self.nx * self.y + self.x  # Index of cube to get vertex at\n *         cdef int j = 0 # Vertex number for that cell\n *         cdef int vi_ = vi             # <<<<<<<<<<<<<<\n * \n *         cdef int *faceLayer\n */\n  __pyx_v_vi_ = __pyx_v_vi;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":615\n * \n *         # Select either upper or lower half\n *         if vi < 8:             # <<<<<<<<<<<<<<\n *             #  8 horizontal edges\n *             if vi < 4:\n */\n  __pyx_t_1 = ((__pyx_v_vi < 8) != 0);\n  if (__pyx_t_1) {\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":617\n *         if vi < 8:\n *             #  8 horizontal edges\n *             if vi < 4:             # <<<<<<<<<<<<<<\n *                 faceLayer = self.faceLayer1\n *             else:\n */\n    __pyx_t_1 = ((__pyx_v_vi < 4) != 0);\n    if (__pyx_t_1) {\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":618\n *             #  8 horizontal edges\n *             if vi < 4:\n *                 faceLayer = self.faceLayer1             # <<<<<<<<<<<<<<\n *             else:\n *                 vi -= 4\n */\n      __pyx_t_2 = __pyx_v_self->faceLayer1;\n      __pyx_v_faceLayer = __pyx_t_2;\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":617\n *         if vi < 8:\n *             #  8 horizontal edges\n *             if vi < 4:             # <<<<<<<<<<<<<<\n *                 faceLayer = self.faceLayer1\n *             else:\n */\n      goto __pyx_L4;\n    }\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":620\n *                 faceLayer = self.faceLayer1\n *             else:\n *                 vi -= 4             # <<<<<<<<<<<<<<\n *                 faceLayer = self.faceLayer2\n * \n */\n    /*else*/ {\n      __pyx_v_vi = (__pyx_v_vi - 4);\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":621\n *             else:\n *                 vi -= 4\n *                 faceLayer = self.faceLayer2             # <<<<<<<<<<<<<<\n * \n *             # Calculate actual index based on edge\n */\n      __pyx_t_2 = __pyx_v_self->faceLayer2;\n      __pyx_v_faceLayer = __pyx_t_2;\n    }\n    __pyx_L4:;\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":625\n *             # Calculate actual index based on edge\n *             #if vi == 0: pass  # no step\n *             if vi == 1:  # step in x             # <<<<<<<<<<<<<<\n *                 i += self.step\n *                 j = 1\n */\n    switch (__pyx_v_vi) {\n      case 1:\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":626\n *             #if vi == 0: pass  # no step\n *             if vi == 1:  # step in x\n *                 i += self.step             # <<<<<<<<<<<<<<\n *                 j = 1\n *             elif vi == 2:  # step in y\n */\n      __pyx_v_i = (__pyx_v_i + __pyx_v_self->step);\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":627\n *             if vi == 1:  # step in x\n *                 i += self.step\n *                 j = 1             # <<<<<<<<<<<<<<\n *             elif vi == 2:  # step in y\n *                 i += self.nx * self.step\n */\n      __pyx_v_j = 1;\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":625\n *             # Calculate actual index based on edge\n *             #if vi == 0: pass  # no step\n *             if vi == 1:  # step in x             # <<<<<<<<<<<<<<\n *                 i += self.step\n *                 j = 1\n */\n      break;\n      case 2:\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":629\n *                 j = 1\n *             elif vi == 2:  # step in y\n *                 i += self.nx * self.step             # <<<<<<<<<<<<<<\n *             elif vi == 3:  # no step\n *                 j = 1\n */\n      __pyx_v_i = (__pyx_v_i + (__pyx_v_self->nx * __pyx_v_self->step));\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":628\n *                 i += self.step\n *                 j = 1\n *             elif vi == 2:  # step in y             # <<<<<<<<<<<<<<\n *                 i += self.nx * self.step\n *             elif vi == 3:  # no step\n */\n      break;\n      case 3:\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":631\n *                 i += self.nx * self.step\n *             elif vi == 3:  # no step\n *                 j = 1             # <<<<<<<<<<<<<<\n * \n *         elif vi < 12:\n */\n      __pyx_v_j = 1;\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":630\n *             elif vi == 2:  # step in y\n *                 i += self.nx * self.step\n *             elif vi == 3:  # no step             # <<<<<<<<<<<<<<\n *                 j = 1\n * \n */\n      break;\n      default: break;\n    }\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":615\n * \n *         # Select either upper or lower half\n *         if vi < 8:             # <<<<<<<<<<<<<<\n *             #  8 horizontal edges\n *             if vi < 4:\n */\n    goto __pyx_L3;\n  }\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":633\n *                 j = 1\n * \n *         elif vi < 12:             # <<<<<<<<<<<<<<\n *             # 4 vertical edges\n *             faceLayer = self.faceLayer1\n */\n  __pyx_t_1 = ((__pyx_v_vi < 12) != 0);\n  if (__pyx_t_1) {\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":635\n *         elif vi < 12:\n *             # 4 vertical edges\n *             faceLayer = self.faceLayer1             # <<<<<<<<<<<<<<\n *             j = 2\n * \n */\n    __pyx_t_2 = __pyx_v_self->faceLayer1;\n    __pyx_v_faceLayer = __pyx_t_2;\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":636\n *             # 4 vertical edges\n *             faceLayer = self.faceLayer1\n *             j = 2             # <<<<<<<<<<<<<<\n * \n *             #if vi == 8: pass # no step\n */\n    __pyx_v_j = 2;\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":639\n * \n *             #if vi == 8: pass # no step\n *             if vi == 9:   # step in x             # <<<<<<<<<<<<<<\n *                 i += self.step\n *             elif vi == 10:   # step in x and y\n */\n    switch (__pyx_v_vi) {\n      case 9:\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":640\n *             #if vi == 8: pass # no step\n *             if vi == 9:   # step in x\n *                 i += self.step             # <<<<<<<<<<<<<<\n *             elif vi == 10:   # step in x and y\n *                 i += self.nx * self.step + self.step\n */\n      __pyx_v_i = (__pyx_v_i + __pyx_v_self->step);\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":639\n * \n *             #if vi == 8: pass # no step\n *             if vi == 9:   # step in x             # <<<<<<<<<<<<<<\n *                 i += self.step\n *             elif vi == 10:   # step in x and y\n */\n      break;\n      case 10:\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":642\n *                 i += self.step\n *             elif vi == 10:   # step in x and y\n *                 i += self.nx * self.step + self.step             # <<<<<<<<<<<<<<\n *             elif vi == 11:  # step in y\n *                 i += self.nx * self.step\n */\n      __pyx_v_i = (__pyx_v_i + ((__pyx_v_self->nx * __pyx_v_self->step) + __pyx_v_self->step));\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":641\n *             if vi == 9:   # step in x\n *                 i += self.step\n *             elif vi == 10:   # step in x and y             # <<<<<<<<<<<<<<\n *                 i += self.nx * self.step + self.step\n *             elif vi == 11:  # step in y\n */\n      break;\n      case 11:\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":644\n *                 i += self.nx * self.step + self.step\n *             elif vi == 11:  # step in y\n *                 i += self.nx * self.step             # <<<<<<<<<<<<<<\n * \n *         else:\n */\n      __pyx_v_i = (__pyx_v_i + (__pyx_v_self->nx * __pyx_v_self->step));\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":643\n *             elif vi == 10:   # step in x and y\n *                 i += self.nx * self.step + self.step\n *             elif vi == 11:  # step in y             # <<<<<<<<<<<<<<\n *                 i += self.nx * self.step\n * \n */\n      break;\n      default: break;\n    }\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":633\n *                 j = 1\n * \n *         elif vi < 12:             # <<<<<<<<<<<<<<\n *             # 4 vertical edges\n *             faceLayer = self.faceLayer1\n */\n    goto __pyx_L3;\n  }\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":648\n *         else:\n *             # center vertex\n *             faceLayer = self.faceLayer1             # <<<<<<<<<<<<<<\n *             j = 3\n * \n */\n  /*else*/ {\n    __pyx_t_2 = __pyx_v_self->faceLayer1;\n    __pyx_v_faceLayer = __pyx_t_2;\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":649\n *             # center vertex\n *             faceLayer = self.faceLayer1\n *             j = 3             # <<<<<<<<<<<<<<\n * \n *         # Store facelayer and return index\n */\n    __pyx_v_j = 3;\n  }\n  __pyx_L3:;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":652\n * \n *         # Store facelayer and return index\n *         self.faceLayer = faceLayer # Dirty way of returning a value             # <<<<<<<<<<<<<<\n *         return 4*i + j\n * \n */\n  __pyx_v_self->faceLayer = __pyx_v_faceLayer;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":653\n *         # Store facelayer and return index\n *         self.faceLayer = faceLayer # Dirty way of returning a value\n *         return 4*i + j             # <<<<<<<<<<<<<<\n * \n * \n */\n  __pyx_r = ((4 * __pyx_v_i) + __pyx_v_j);\n  goto __pyx_L0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":579\n * \n * \n *     cdef int get_index_in_facelayer(self, int vi):             # <<<<<<<<<<<<<<\n *         \"\"\"\n *         Get the index of a vertex position, given the edge on which it lies.\n */\n\n  /* function exit code */\n  __pyx_L0:;\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\n/* \"_marching_cubes_lewiner_cy.pyx\":656\n * \n * \n *     cdef void prepare_for_adding_triangles(self):             # <<<<<<<<<<<<<<\n *         \"\"\" Calculates some things to help adding the triangles:\n *         array with corner values, max corner value, gradient at each corner.\n */\n\nstatic void __pyx_f_26_marching_cubes_lewiner_cy_4Cell_prepare_for_adding_triangles(struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *__pyx_v_self) {\n  int __pyx_v_i;\n  double __pyx_v_vmin;\n  double __pyx_v_vmax;\n  __Pyx_RefNannyDeclarations\n  double __pyx_t_1;\n  double __pyx_t_2;\n  int __pyx_t_3;\n  int __pyx_t_4;\n  double __pyx_t_5;\n  __Pyx_RefNannySetupContext(\"prepare_for_adding_triangles\", 0);\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":665\n *         # Copy values in array so we can index them. Note the misalignment\n *         # because the numbering does not correspond with bitwise OR of xyz.\n *         self.vv[0] = self.v0             # <<<<<<<<<<<<<<\n *         self.vv[1] = self.v1\n *         self.vv[2] = self.v3#\n */\n  __pyx_t_1 = __pyx_v_self->v0;\n  (__pyx_v_self->vv[0]) = __pyx_t_1;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":666\n *         # because the numbering does not correspond with bitwise OR of xyz.\n *         self.vv[0] = self.v0\n *         self.vv[1] = self.v1             # <<<<<<<<<<<<<<\n *         self.vv[2] = self.v3#\n *         self.vv[3] = self.v2#\n */\n  __pyx_t_1 = __pyx_v_self->v1;\n  (__pyx_v_self->vv[1]) = __pyx_t_1;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":667\n *         self.vv[0] = self.v0\n *         self.vv[1] = self.v1\n *         self.vv[2] = self.v3#             # <<<<<<<<<<<<<<\n *         self.vv[3] = self.v2#\n *         self.vv[4] = self.v4\n */\n  __pyx_t_1 = __pyx_v_self->v3;\n  (__pyx_v_self->vv[2]) = __pyx_t_1;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":668\n *         self.vv[1] = self.v1\n *         self.vv[2] = self.v3#\n *         self.vv[3] = self.v2#             # <<<<<<<<<<<<<<\n *         self.vv[4] = self.v4\n *         self.vv[5] = self.v5\n */\n  __pyx_t_1 = __pyx_v_self->v2;\n  (__pyx_v_self->vv[3]) = __pyx_t_1;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":669\n *         self.vv[2] = self.v3#\n *         self.vv[3] = self.v2#\n *         self.vv[4] = self.v4             # <<<<<<<<<<<<<<\n *         self.vv[5] = self.v5\n *         self.vv[6] = self.v7#\n */\n  __pyx_t_1 = __pyx_v_self->v4;\n  (__pyx_v_self->vv[4]) = __pyx_t_1;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":670\n *         self.vv[3] = self.v2#\n *         self.vv[4] = self.v4\n *         self.vv[5] = self.v5             # <<<<<<<<<<<<<<\n *         self.vv[6] = self.v7#\n *         self.vv[7] = self.v6#\n */\n  __pyx_t_1 = __pyx_v_self->v5;\n  (__pyx_v_self->vv[5]) = __pyx_t_1;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":671\n *         self.vv[4] = self.v4\n *         self.vv[5] = self.v5\n *         self.vv[6] = self.v7#             # <<<<<<<<<<<<<<\n *         self.vv[7] = self.v6#\n * \n */\n  __pyx_t_1 = __pyx_v_self->v7;\n  (__pyx_v_self->vv[6]) = __pyx_t_1;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":672\n *         self.vv[5] = self.v5\n *         self.vv[6] = self.v7#\n *         self.vv[7] = self.v6#             # <<<<<<<<<<<<<<\n * \n *         # Calculate max\n */\n  __pyx_t_1 = __pyx_v_self->v6;\n  (__pyx_v_self->vv[7]) = __pyx_t_1;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":676\n *         # Calculate max\n *         cdef double vmin, vmax\n *         vmin, vmax = 0.0, 0.0             # <<<<<<<<<<<<<<\n *         for i in range(8):\n *             if self.vv[i] > vmax:\n */\n  __pyx_t_1 = 0.0;\n  __pyx_t_2 = 0.0;\n  __pyx_v_vmin = __pyx_t_1;\n  __pyx_v_vmax = __pyx_t_2;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":677\n *         cdef double vmin, vmax\n *         vmin, vmax = 0.0, 0.0\n *         for i in range(8):             # <<<<<<<<<<<<<<\n *             if self.vv[i] > vmax:\n *                 vmax = self.vv[i]\n */\n  for (__pyx_t_3 = 0; __pyx_t_3 < 8; __pyx_t_3+=1) {\n    __pyx_v_i = __pyx_t_3;\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":678\n *         vmin, vmax = 0.0, 0.0\n *         for i in range(8):\n *             if self.vv[i] > vmax:             # <<<<<<<<<<<<<<\n *                 vmax = self.vv[i]\n *             if self.vv[i] < vmin:\n */\n    __pyx_t_4 = (((__pyx_v_self->vv[__pyx_v_i]) > __pyx_v_vmax) != 0);\n    if (__pyx_t_4) {\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":679\n *         for i in range(8):\n *             if self.vv[i] > vmax:\n *                 vmax = self.vv[i]             # <<<<<<<<<<<<<<\n *             if self.vv[i] < vmin:\n *                 vmin = self.vv[i]\n */\n      __pyx_v_vmax = (__pyx_v_self->vv[__pyx_v_i]);\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":678\n *         vmin, vmax = 0.0, 0.0\n *         for i in range(8):\n *             if self.vv[i] > vmax:             # <<<<<<<<<<<<<<\n *                 vmax = self.vv[i]\n *             if self.vv[i] < vmin:\n */\n    }\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":680\n *             if self.vv[i] > vmax:\n *                 vmax = self.vv[i]\n *             if self.vv[i] < vmin:             # <<<<<<<<<<<<<<\n *                 vmin = self.vv[i]\n *         self.vmax = vmax-vmin\n */\n    __pyx_t_4 = (((__pyx_v_self->vv[__pyx_v_i]) < __pyx_v_vmin) != 0);\n    if (__pyx_t_4) {\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":681\n *                 vmax = self.vv[i]\n *             if self.vv[i] < vmin:\n *                 vmin = self.vv[i]             # <<<<<<<<<<<<<<\n *         self.vmax = vmax-vmin\n * \n */\n      __pyx_v_vmin = (__pyx_v_self->vv[__pyx_v_i]);\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":680\n *             if self.vv[i] > vmax:\n *                 vmax = self.vv[i]\n *             if self.vv[i] < vmin:             # <<<<<<<<<<<<<<\n *                 vmin = self.vv[i]\n *         self.vmax = vmax-vmin\n */\n    }\n  }\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":682\n *             if self.vv[i] < vmin:\n *                 vmin = self.vv[i]\n *         self.vmax = vmax-vmin             # <<<<<<<<<<<<<<\n * \n *         # Calculate gradients\n */\n  __pyx_v_self->vmax = (__pyx_v_vmax - __pyx_v_vmin);\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":689\n *         # by interpolating  and averaging the normals this is solved.\n *         # todo: we can potentially reuse these similar to how we store vertex indices in face layers\n *         self.vg[0*3+0], self.vg[0*3+1], self.vg[0*3+2] = self.v0-self.v1, self.v0-self.v3, self.v0-self.v4             # <<<<<<<<<<<<<<\n *         self.vg[1*3+0], self.vg[1*3+1], self.vg[1*3+2] = self.v0-self.v1, self.v1-self.v2, self.v1-self.v5\n *         self.vg[2*3+0], self.vg[2*3+1], self.vg[2*3+2] = self.v3-self.v2, self.v1-self.v2, self.v2-self.v6\n */\n  __pyx_t_2 = (__pyx_v_self->v0 - __pyx_v_self->v1);\n  __pyx_t_1 = (__pyx_v_self->v0 - __pyx_v_self->v3);\n  __pyx_t_5 = (__pyx_v_self->v0 - __pyx_v_self->v4);\n  (__pyx_v_self->vg[0]) = __pyx_t_2;\n  (__pyx_v_self->vg[1]) = __pyx_t_1;\n  (__pyx_v_self->vg[2]) = __pyx_t_5;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":690\n *         # todo: we can potentially reuse these similar to how we store vertex indices in face layers\n *         self.vg[0*3+0], self.vg[0*3+1], self.vg[0*3+2] = self.v0-self.v1, self.v0-self.v3, self.v0-self.v4\n *         self.vg[1*3+0], self.vg[1*3+1], self.vg[1*3+2] = self.v0-self.v1, self.v1-self.v2, self.v1-self.v5             # <<<<<<<<<<<<<<\n *         self.vg[2*3+0], self.vg[2*3+1], self.vg[2*3+2] = self.v3-self.v2, self.v1-self.v2, self.v2-self.v6\n *         self.vg[3*3+0], self.vg[3*3+1], self.vg[3*3+2] = self.v3-self.v2, self.v0-self.v3, self.v3-self.v7\n */\n  __pyx_t_5 = (__pyx_v_self->v0 - __pyx_v_self->v1);\n  __pyx_t_1 = (__pyx_v_self->v1 - __pyx_v_self->v2);\n  __pyx_t_2 = (__pyx_v_self->v1 - __pyx_v_self->v5);\n  (__pyx_v_self->vg[3]) = __pyx_t_5;\n  (__pyx_v_self->vg[4]) = __pyx_t_1;\n  (__pyx_v_self->vg[5]) = __pyx_t_2;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":691\n *         self.vg[0*3+0], self.vg[0*3+1], self.vg[0*3+2] = self.v0-self.v1, self.v0-self.v3, self.v0-self.v4\n *         self.vg[1*3+0], self.vg[1*3+1], self.vg[1*3+2] = self.v0-self.v1, self.v1-self.v2, self.v1-self.v5\n *         self.vg[2*3+0], self.vg[2*3+1], self.vg[2*3+2] = self.v3-self.v2, self.v1-self.v2, self.v2-self.v6             # <<<<<<<<<<<<<<\n *         self.vg[3*3+0], self.vg[3*3+1], self.vg[3*3+2] = self.v3-self.v2, self.v0-self.v3, self.v3-self.v7\n *         self.vg[4*3+0], self.vg[4*3+1], self.vg[4*3+2] = self.v4-self.v5, self.v4-self.v7, self.v0-self.v4\n */\n  __pyx_t_2 = (__pyx_v_self->v3 - __pyx_v_self->v2);\n  __pyx_t_1 = (__pyx_v_self->v1 - __pyx_v_self->v2);\n  __pyx_t_5 = (__pyx_v_self->v2 - __pyx_v_self->v6);\n  (__pyx_v_self->vg[6]) = __pyx_t_2;\n  (__pyx_v_self->vg[7]) = __pyx_t_1;\n  (__pyx_v_self->vg[8]) = __pyx_t_5;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":692\n *         self.vg[1*3+0], self.vg[1*3+1], self.vg[1*3+2] = self.v0-self.v1, self.v1-self.v2, self.v1-self.v5\n *         self.vg[2*3+0], self.vg[2*3+1], self.vg[2*3+2] = self.v3-self.v2, self.v1-self.v2, self.v2-self.v6\n *         self.vg[3*3+0], self.vg[3*3+1], self.vg[3*3+2] = self.v3-self.v2, self.v0-self.v3, self.v3-self.v7             # <<<<<<<<<<<<<<\n *         self.vg[4*3+0], self.vg[4*3+1], self.vg[4*3+2] = self.v4-self.v5, self.v4-self.v7, self.v0-self.v4\n *         self.vg[5*3+0], self.vg[5*3+1], self.vg[5*3+2] = self.v4-self.v5, self.v5-self.v6, self.v1-self.v5\n */\n  __pyx_t_5 = (__pyx_v_self->v3 - __pyx_v_self->v2);\n  __pyx_t_1 = (__pyx_v_self->v0 - __pyx_v_self->v3);\n  __pyx_t_2 = (__pyx_v_self->v3 - __pyx_v_self->v7);\n  (__pyx_v_self->vg[9]) = __pyx_t_5;\n  (__pyx_v_self->vg[10]) = __pyx_t_1;\n  (__pyx_v_self->vg[11]) = __pyx_t_2;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":693\n *         self.vg[2*3+0], self.vg[2*3+1], self.vg[2*3+2] = self.v3-self.v2, self.v1-self.v2, self.v2-self.v6\n *         self.vg[3*3+0], self.vg[3*3+1], self.vg[3*3+2] = self.v3-self.v2, self.v0-self.v3, self.v3-self.v7\n *         self.vg[4*3+0], self.vg[4*3+1], self.vg[4*3+2] = self.v4-self.v5, self.v4-self.v7, self.v0-self.v4             # <<<<<<<<<<<<<<\n *         self.vg[5*3+0], self.vg[5*3+1], self.vg[5*3+2] = self.v4-self.v5, self.v5-self.v6, self.v1-self.v5\n *         self.vg[6*3+0], self.vg[6*3+1], self.vg[6*3+2] = self.v7-self.v6, self.v5-self.v6, self.v2-self.v6\n */\n  __pyx_t_2 = (__pyx_v_self->v4 - __pyx_v_self->v5);\n  __pyx_t_1 = (__pyx_v_self->v4 - __pyx_v_self->v7);\n  __pyx_t_5 = (__pyx_v_self->v0 - __pyx_v_self->v4);\n  (__pyx_v_self->vg[12]) = __pyx_t_2;\n  (__pyx_v_self->vg[13]) = __pyx_t_1;\n  (__pyx_v_self->vg[14]) = __pyx_t_5;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":694\n *         self.vg[3*3+0], self.vg[3*3+1], self.vg[3*3+2] = self.v3-self.v2, self.v0-self.v3, self.v3-self.v7\n *         self.vg[4*3+0], self.vg[4*3+1], self.vg[4*3+2] = self.v4-self.v5, self.v4-self.v7, self.v0-self.v4\n *         self.vg[5*3+0], self.vg[5*3+1], self.vg[5*3+2] = self.v4-self.v5, self.v5-self.v6, self.v1-self.v5             # <<<<<<<<<<<<<<\n *         self.vg[6*3+0], self.vg[6*3+1], self.vg[6*3+2] = self.v7-self.v6, self.v5-self.v6, self.v2-self.v6\n *         self.vg[7*3+0], self.vg[7*3+1], self.vg[7*3+2] = self.v7-self.v6, self.v4-self.v7, self.v3-self.v7\n */\n  __pyx_t_5 = (__pyx_v_self->v4 - __pyx_v_self->v5);\n  __pyx_t_1 = (__pyx_v_self->v5 - __pyx_v_self->v6);\n  __pyx_t_2 = (__pyx_v_self->v1 - __pyx_v_self->v5);\n  (__pyx_v_self->vg[15]) = __pyx_t_5;\n  (__pyx_v_self->vg[16]) = __pyx_t_1;\n  (__pyx_v_self->vg[17]) = __pyx_t_2;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":695\n *         self.vg[4*3+0], self.vg[4*3+1], self.vg[4*3+2] = self.v4-self.v5, self.v4-self.v7, self.v0-self.v4\n *         self.vg[5*3+0], self.vg[5*3+1], self.vg[5*3+2] = self.v4-self.v5, self.v5-self.v6, self.v1-self.v5\n *         self.vg[6*3+0], self.vg[6*3+1], self.vg[6*3+2] = self.v7-self.v6, self.v5-self.v6, self.v2-self.v6             # <<<<<<<<<<<<<<\n *         self.vg[7*3+0], self.vg[7*3+1], self.vg[7*3+2] = self.v7-self.v6, self.v4-self.v7, self.v3-self.v7\n * \n */\n  __pyx_t_2 = (__pyx_v_self->v7 - __pyx_v_self->v6);\n  __pyx_t_1 = (__pyx_v_self->v5 - __pyx_v_self->v6);\n  __pyx_t_5 = (__pyx_v_self->v2 - __pyx_v_self->v6);\n  (__pyx_v_self->vg[18]) = __pyx_t_2;\n  (__pyx_v_self->vg[19]) = __pyx_t_1;\n  (__pyx_v_self->vg[20]) = __pyx_t_5;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":696\n *         self.vg[5*3+0], self.vg[5*3+1], self.vg[5*3+2] = self.v4-self.v5, self.v5-self.v6, self.v1-self.v5\n *         self.vg[6*3+0], self.vg[6*3+1], self.vg[6*3+2] = self.v7-self.v6, self.v5-self.v6, self.v2-self.v6\n *         self.vg[7*3+0], self.vg[7*3+1], self.vg[7*3+2] = self.v7-self.v6, self.v4-self.v7, self.v3-self.v7             # <<<<<<<<<<<<<<\n * \n * \n */\n  __pyx_t_5 = (__pyx_v_self->v7 - __pyx_v_self->v6);\n  __pyx_t_1 = (__pyx_v_self->v4 - __pyx_v_self->v7);\n  __pyx_t_2 = (__pyx_v_self->v3 - __pyx_v_self->v7);\n  (__pyx_v_self->vg[21]) = __pyx_t_5;\n  (__pyx_v_self->vg[22]) = __pyx_t_1;\n  (__pyx_v_self->vg[23]) = __pyx_t_2;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":656\n * \n * \n *     cdef void prepare_for_adding_triangles(self):             # <<<<<<<<<<<<<<\n *         \"\"\" Calculates some things to help adding the triangles:\n *         array with corner values, max corner value, gradient at each corner.\n */\n\n  /* function exit code */\n  __Pyx_RefNannyFinishContext();\n}\n\n/* \"_marching_cubes_lewiner_cy.pyx\":699\n * \n * \n *     cdef void calculate_center_vertex(self):             # <<<<<<<<<<<<<<\n *         \"\"\" Calculate interpolated center vertex and its gradient.\n *         \"\"\"\n */\n\nstatic void __pyx_f_26_marching_cubes_lewiner_cy_4Cell_calculate_center_vertex(struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *__pyx_v_self) {\n  double __pyx_v_v0;\n  double __pyx_v_v1;\n  double __pyx_v_v2;\n  double __pyx_v_v3;\n  double __pyx_v_v4;\n  double __pyx_v_v5;\n  double __pyx_v_v6;\n  double __pyx_v_v7;\n  double __pyx_v_fx;\n  double __pyx_v_fy;\n  double __pyx_v_fz;\n  double __pyx_v_ff;\n  double __pyx_v_stp;\n  __Pyx_RefNannyDeclarations\n  double __pyx_t_1;\n  double __pyx_t_2;\n  double __pyx_t_3;\n  double __pyx_t_4;\n  __Pyx_RefNannySetupContext(\"calculate_center_vertex\", 0);\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":704\n *         cdef double v0, v1, v2, v3, v4, v5, v6, v7\n *         cdef double fx, fy, fz, ff\n *         fx, fy, fz, ff = 0.0, 0.0, 0.0, 0.0             # <<<<<<<<<<<<<<\n * \n *         # Define \"strength\" of each corner of the cube that we need\n */\n  __pyx_t_1 = 0.0;\n  __pyx_t_2 = 0.0;\n  __pyx_t_3 = 0.0;\n  __pyx_t_4 = 0.0;\n  __pyx_v_fx = __pyx_t_1;\n  __pyx_v_fy = __pyx_t_2;\n  __pyx_v_fz = __pyx_t_3;\n  __pyx_v_ff = __pyx_t_4;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":707\n * \n *         # Define \"strength\" of each corner of the cube that we need\n *         v0 = 1.0 / (FLT_EPSILON + dabs(self.v0))             # <<<<<<<<<<<<<<\n *         v1 = 1.0 / (FLT_EPSILON + dabs(self.v1))\n *         v2 = 1.0 / (FLT_EPSILON + dabs(self.v2))\n */\n  __pyx_v_v0 = (1.0 / (__pyx_v_26_marching_cubes_lewiner_cy_FLT_EPSILON + __pyx_f_26_marching_cubes_lewiner_cy_dabs(__pyx_v_self->v0)));\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":708\n *         # Define \"strength\" of each corner of the cube that we need\n *         v0 = 1.0 / (FLT_EPSILON + dabs(self.v0))\n *         v1 = 1.0 / (FLT_EPSILON + dabs(self.v1))             # <<<<<<<<<<<<<<\n *         v2 = 1.0 / (FLT_EPSILON + dabs(self.v2))\n *         v3 = 1.0 / (FLT_EPSILON + dabs(self.v3))\n */\n  __pyx_v_v1 = (1.0 / (__pyx_v_26_marching_cubes_lewiner_cy_FLT_EPSILON + __pyx_f_26_marching_cubes_lewiner_cy_dabs(__pyx_v_self->v1)));\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":709\n *         v0 = 1.0 / (FLT_EPSILON + dabs(self.v0))\n *         v1 = 1.0 / (FLT_EPSILON + dabs(self.v1))\n *         v2 = 1.0 / (FLT_EPSILON + dabs(self.v2))             # <<<<<<<<<<<<<<\n *         v3 = 1.0 / (FLT_EPSILON + dabs(self.v3))\n *         v4 = 1.0 / (FLT_EPSILON + dabs(self.v4))\n */\n  __pyx_v_v2 = (1.0 / (__pyx_v_26_marching_cubes_lewiner_cy_FLT_EPSILON + __pyx_f_26_marching_cubes_lewiner_cy_dabs(__pyx_v_self->v2)));\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":710\n *         v1 = 1.0 / (FLT_EPSILON + dabs(self.v1))\n *         v2 = 1.0 / (FLT_EPSILON + dabs(self.v2))\n *         v3 = 1.0 / (FLT_EPSILON + dabs(self.v3))             # <<<<<<<<<<<<<<\n *         v4 = 1.0 / (FLT_EPSILON + dabs(self.v4))\n *         v5 = 1.0 / (FLT_EPSILON + dabs(self.v5))\n */\n  __pyx_v_v3 = (1.0 / (__pyx_v_26_marching_cubes_lewiner_cy_FLT_EPSILON + __pyx_f_26_marching_cubes_lewiner_cy_dabs(__pyx_v_self->v3)));\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":711\n *         v2 = 1.0 / (FLT_EPSILON + dabs(self.v2))\n *         v3 = 1.0 / (FLT_EPSILON + dabs(self.v3))\n *         v4 = 1.0 / (FLT_EPSILON + dabs(self.v4))             # <<<<<<<<<<<<<<\n *         v5 = 1.0 / (FLT_EPSILON + dabs(self.v5))\n *         v6 = 1.0 / (FLT_EPSILON + dabs(self.v6))\n */\n  __pyx_v_v4 = (1.0 / (__pyx_v_26_marching_cubes_lewiner_cy_FLT_EPSILON + __pyx_f_26_marching_cubes_lewiner_cy_dabs(__pyx_v_self->v4)));\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":712\n *         v3 = 1.0 / (FLT_EPSILON + dabs(self.v3))\n *         v4 = 1.0 / (FLT_EPSILON + dabs(self.v4))\n *         v5 = 1.0 / (FLT_EPSILON + dabs(self.v5))             # <<<<<<<<<<<<<<\n *         v6 = 1.0 / (FLT_EPSILON + dabs(self.v6))\n *         v7 = 1.0 / (FLT_EPSILON + dabs(self.v7))\n */\n  __pyx_v_v5 = (1.0 / (__pyx_v_26_marching_cubes_lewiner_cy_FLT_EPSILON + __pyx_f_26_marching_cubes_lewiner_cy_dabs(__pyx_v_self->v5)));\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":713\n *         v4 = 1.0 / (FLT_EPSILON + dabs(self.v4))\n *         v5 = 1.0 / (FLT_EPSILON + dabs(self.v5))\n *         v6 = 1.0 / (FLT_EPSILON + dabs(self.v6))             # <<<<<<<<<<<<<<\n *         v7 = 1.0 / (FLT_EPSILON + dabs(self.v7))\n * \n */\n  __pyx_v_v6 = (1.0 / (__pyx_v_26_marching_cubes_lewiner_cy_FLT_EPSILON + __pyx_f_26_marching_cubes_lewiner_cy_dabs(__pyx_v_self->v6)));\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":714\n *         v5 = 1.0 / (FLT_EPSILON + dabs(self.v5))\n *         v6 = 1.0 / (FLT_EPSILON + dabs(self.v6))\n *         v7 = 1.0 / (FLT_EPSILON + dabs(self.v7))             # <<<<<<<<<<<<<<\n * \n *         # Apply a kind of center-of-mass method\n */\n  __pyx_v_v7 = (1.0 / (__pyx_v_26_marching_cubes_lewiner_cy_FLT_EPSILON + __pyx_f_26_marching_cubes_lewiner_cy_dabs(__pyx_v_self->v7)));\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":717\n * \n *         # Apply a kind of center-of-mass method\n *         fx += 0.0*v0;  fy += 0.0*v0;  fz += 0.0*v0;  ff += v0             # <<<<<<<<<<<<<<\n *         fx += 1.0*v1;  fy += 0.0*v1;  fz += 0.0*v1;  ff += v1\n *         fx += 1.0*v2;  fy += 1.0*v2;  fz += 0.0*v2;  ff += v2\n */\n  __pyx_v_fx = (__pyx_v_fx + (0.0 * __pyx_v_v0));\n  __pyx_v_fy = (__pyx_v_fy + (0.0 * __pyx_v_v0));\n  __pyx_v_fz = (__pyx_v_fz + (0.0 * __pyx_v_v0));\n  __pyx_v_ff = (__pyx_v_ff + __pyx_v_v0);\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":718\n *         # Apply a kind of center-of-mass method\n *         fx += 0.0*v0;  fy += 0.0*v0;  fz += 0.0*v0;  ff += v0\n *         fx += 1.0*v1;  fy += 0.0*v1;  fz += 0.0*v1;  ff += v1             # <<<<<<<<<<<<<<\n *         fx += 1.0*v2;  fy += 1.0*v2;  fz += 0.0*v2;  ff += v2\n *         fx += 0.0*v3;  fy += 1.0*v3;  fz += 0.0*v3;  ff += v3\n */\n  __pyx_v_fx = (__pyx_v_fx + (1.0 * __pyx_v_v1));\n  __pyx_v_fy = (__pyx_v_fy + (0.0 * __pyx_v_v1));\n  __pyx_v_fz = (__pyx_v_fz + (0.0 * __pyx_v_v1));\n  __pyx_v_ff = (__pyx_v_ff + __pyx_v_v1);\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":719\n *         fx += 0.0*v0;  fy += 0.0*v0;  fz += 0.0*v0;  ff += v0\n *         fx += 1.0*v1;  fy += 0.0*v1;  fz += 0.0*v1;  ff += v1\n *         fx += 1.0*v2;  fy += 1.0*v2;  fz += 0.0*v2;  ff += v2             # <<<<<<<<<<<<<<\n *         fx += 0.0*v3;  fy += 1.0*v3;  fz += 0.0*v3;  ff += v3\n *         fx += 0.0*v4;  fy += 0.0*v4;  fz += 1.0*v4;  ff += v4\n */\n  __pyx_v_fx = (__pyx_v_fx + (1.0 * __pyx_v_v2));\n  __pyx_v_fy = (__pyx_v_fy + (1.0 * __pyx_v_v2));\n  __pyx_v_fz = (__pyx_v_fz + (0.0 * __pyx_v_v2));\n  __pyx_v_ff = (__pyx_v_ff + __pyx_v_v2);\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":720\n *         fx += 1.0*v1;  fy += 0.0*v1;  fz += 0.0*v1;  ff += v1\n *         fx += 1.0*v2;  fy += 1.0*v2;  fz += 0.0*v2;  ff += v2\n *         fx += 0.0*v3;  fy += 1.0*v3;  fz += 0.0*v3;  ff += v3             # <<<<<<<<<<<<<<\n *         fx += 0.0*v4;  fy += 0.0*v4;  fz += 1.0*v4;  ff += v4\n *         fx += 1.0*v5;  fy += 0.0*v5;  fz += 1.0*v5;  ff += v5\n */\n  __pyx_v_fx = (__pyx_v_fx + (0.0 * __pyx_v_v3));\n  __pyx_v_fy = (__pyx_v_fy + (1.0 * __pyx_v_v3));\n  __pyx_v_fz = (__pyx_v_fz + (0.0 * __pyx_v_v3));\n  __pyx_v_ff = (__pyx_v_ff + __pyx_v_v3);\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":721\n *         fx += 1.0*v2;  fy += 1.0*v2;  fz += 0.0*v2;  ff += v2\n *         fx += 0.0*v3;  fy += 1.0*v3;  fz += 0.0*v3;  ff += v3\n *         fx += 0.0*v4;  fy += 0.0*v4;  fz += 1.0*v4;  ff += v4             # <<<<<<<<<<<<<<\n *         fx += 1.0*v5;  fy += 0.0*v5;  fz += 1.0*v5;  ff += v5\n *         fx += 1.0*v6;  fy += 1.0*v6;  fz += 1.0*v6;  ff += v6\n */\n  __pyx_v_fx = (__pyx_v_fx + (0.0 * __pyx_v_v4));\n  __pyx_v_fy = (__pyx_v_fy + (0.0 * __pyx_v_v4));\n  __pyx_v_fz = (__pyx_v_fz + (1.0 * __pyx_v_v4));\n  __pyx_v_ff = (__pyx_v_ff + __pyx_v_v4);\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":722\n *         fx += 0.0*v3;  fy += 1.0*v3;  fz += 0.0*v3;  ff += v3\n *         fx += 0.0*v4;  fy += 0.0*v4;  fz += 1.0*v4;  ff += v4\n *         fx += 1.0*v5;  fy += 0.0*v5;  fz += 1.0*v5;  ff += v5             # <<<<<<<<<<<<<<\n *         fx += 1.0*v6;  fy += 1.0*v6;  fz += 1.0*v6;  ff += v6\n *         fx += 0.0*v7;  fy += 1.0*v7;  fz += 1.0*v7;  ff += v7\n */\n  __pyx_v_fx = (__pyx_v_fx + (1.0 * __pyx_v_v5));\n  __pyx_v_fy = (__pyx_v_fy + (0.0 * __pyx_v_v5));\n  __pyx_v_fz = (__pyx_v_fz + (1.0 * __pyx_v_v5));\n  __pyx_v_ff = (__pyx_v_ff + __pyx_v_v5);\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":723\n *         fx += 0.0*v4;  fy += 0.0*v4;  fz += 1.0*v4;  ff += v4\n *         fx += 1.0*v5;  fy += 0.0*v5;  fz += 1.0*v5;  ff += v5\n *         fx += 1.0*v6;  fy += 1.0*v6;  fz += 1.0*v6;  ff += v6             # <<<<<<<<<<<<<<\n *         fx += 0.0*v7;  fy += 1.0*v7;  fz += 1.0*v7;  ff += v7\n * \n */\n  __pyx_v_fx = (__pyx_v_fx + (1.0 * __pyx_v_v6));\n  __pyx_v_fy = (__pyx_v_fy + (1.0 * __pyx_v_v6));\n  __pyx_v_fz = (__pyx_v_fz + (1.0 * __pyx_v_v6));\n  __pyx_v_ff = (__pyx_v_ff + __pyx_v_v6);\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":724\n *         fx += 1.0*v5;  fy += 0.0*v5;  fz += 1.0*v5;  ff += v5\n *         fx += 1.0*v6;  fy += 1.0*v6;  fz += 1.0*v6;  ff += v6\n *         fx += 0.0*v7;  fy += 1.0*v7;  fz += 1.0*v7;  ff += v7             # <<<<<<<<<<<<<<\n * \n *         # Store\n */\n  __pyx_v_fx = (__pyx_v_fx + (0.0 * __pyx_v_v7));\n  __pyx_v_fy = (__pyx_v_fy + (1.0 * __pyx_v_v7));\n  __pyx_v_fz = (__pyx_v_fz + (1.0 * __pyx_v_v7));\n  __pyx_v_ff = (__pyx_v_ff + __pyx_v_v7);\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":727\n * \n *         # Store\n *         cdef double stp = <double>self.step             # <<<<<<<<<<<<<<\n *         self.v12_x = self.x + stp * fx / ff\n *         self.v12_y = self.y + stp * fy / ff\n */\n  __pyx_v_stp = ((double)__pyx_v_self->step);\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":728\n *         # Store\n *         cdef double stp = <double>self.step\n *         self.v12_x = self.x + stp * fx / ff             # <<<<<<<<<<<<<<\n *         self.v12_y = self.y + stp * fy / ff\n *         self.v12_z = self.z + stp * fz / ff\n */\n  __pyx_v_self->v12_x = (__pyx_v_self->x + ((__pyx_v_stp * __pyx_v_fx) / __pyx_v_ff));\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":729\n *         cdef double stp = <double>self.step\n *         self.v12_x = self.x + stp * fx / ff\n *         self.v12_y = self.y + stp * fy / ff             # <<<<<<<<<<<<<<\n *         self.v12_z = self.z + stp * fz / ff\n * \n */\n  __pyx_v_self->v12_y = (__pyx_v_self->y + ((__pyx_v_stp * __pyx_v_fy) / __pyx_v_ff));\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":730\n *         self.v12_x = self.x + stp * fx / ff\n *         self.v12_y = self.y + stp * fy / ff\n *         self.v12_z = self.z + stp * fz / ff             # <<<<<<<<<<<<<<\n * \n *         # Also pre-calculate gradient of center\n */\n  __pyx_v_self->v12_z = (__pyx_v_self->z + ((__pyx_v_stp * __pyx_v_fz) / __pyx_v_ff));\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":735\n *         # note that prepare_for_adding_triangles() must have been called for\n *         # the gradient data to exist.\n *         self.v12_xg = ( v0*self.vg[0*3+0] + v1*self.vg[1*3+0] + v2*self.vg[2*3+0] + v3*self.vg[3*3+0] +             # <<<<<<<<<<<<<<\n *                         v4*self.vg[4*3+0] + v5*self.vg[5*3+0] + v6*self.vg[6*3+0] + v7*self.vg[7*3+0] )\n *         self.v12_yg = ( v0*self.vg[0*3+1] + v1*self.vg[1*3+1] + v2*self.vg[2*3+1] + v3*self.vg[3*3+1] +\n */\n  __pyx_v_self->v12_xg = ((((((((__pyx_v_v0 * (__pyx_v_self->vg[0])) + (__pyx_v_v1 * (__pyx_v_self->vg[3]))) + (__pyx_v_v2 * (__pyx_v_self->vg[6]))) + (__pyx_v_v3 * (__pyx_v_self->vg[9]))) + (__pyx_v_v4 * (__pyx_v_self->vg[12]))) + (__pyx_v_v5 * (__pyx_v_self->vg[15]))) + (__pyx_v_v6 * (__pyx_v_self->vg[18]))) + (__pyx_v_v7 * (__pyx_v_self->vg[21])));\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":737\n *         self.v12_xg = ( v0*self.vg[0*3+0] + v1*self.vg[1*3+0] + v2*self.vg[2*3+0] + v3*self.vg[3*3+0] +\n *                         v4*self.vg[4*3+0] + v5*self.vg[5*3+0] + v6*self.vg[6*3+0] + v7*self.vg[7*3+0] )\n *         self.v12_yg = ( v0*self.vg[0*3+1] + v1*self.vg[1*3+1] + v2*self.vg[2*3+1] + v3*self.vg[3*3+1] +             # <<<<<<<<<<<<<<\n *                         v4*self.vg[4*3+1] + v5*self.vg[5*3+1] + v6*self.vg[6*3+1] + v7*self.vg[7*3+1] )\n *         self.v12_xg = ( v0*self.vg[0*3+2] + v1*self.vg[1*3+2] + v2*self.vg[2*3+2] + v3*self.vg[3*3+2] +\n */\n  __pyx_v_self->v12_yg = ((((((((__pyx_v_v0 * (__pyx_v_self->vg[1])) + (__pyx_v_v1 * (__pyx_v_self->vg[4]))) + (__pyx_v_v2 * (__pyx_v_self->vg[7]))) + (__pyx_v_v3 * (__pyx_v_self->vg[10]))) + (__pyx_v_v4 * (__pyx_v_self->vg[13]))) + (__pyx_v_v5 * (__pyx_v_self->vg[16]))) + (__pyx_v_v6 * (__pyx_v_self->vg[19]))) + (__pyx_v_v7 * (__pyx_v_self->vg[22])));\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":739\n *         self.v12_yg = ( v0*self.vg[0*3+1] + v1*self.vg[1*3+1] + v2*self.vg[2*3+1] + v3*self.vg[3*3+1] +\n *                         v4*self.vg[4*3+1] + v5*self.vg[5*3+1] + v6*self.vg[6*3+1] + v7*self.vg[7*3+1] )\n *         self.v12_xg = ( v0*self.vg[0*3+2] + v1*self.vg[1*3+2] + v2*self.vg[2*3+2] + v3*self.vg[3*3+2] +             # <<<<<<<<<<<<<<\n *                         v4*self.vg[4*3+2] + v5*self.vg[5*3+2] + v6*self.vg[6*3+2] + v7*self.vg[7*3+2] )\n * \n */\n  __pyx_v_self->v12_xg = ((((((((__pyx_v_v0 * (__pyx_v_self->vg[2])) + (__pyx_v_v1 * (__pyx_v_self->vg[5]))) + (__pyx_v_v2 * (__pyx_v_self->vg[8]))) + (__pyx_v_v3 * (__pyx_v_self->vg[11]))) + (__pyx_v_v4 * (__pyx_v_self->vg[14]))) + (__pyx_v_v5 * (__pyx_v_self->vg[17]))) + (__pyx_v_v6 * (__pyx_v_self->vg[20]))) + (__pyx_v_v7 * (__pyx_v_self->vg[23])));\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":743\n * \n *         # Set flag that this stuff is calculated\n *         self.v12_calculated = 1             # <<<<<<<<<<<<<<\n * \n * \n */\n  __pyx_v_self->v12_calculated = 1;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":699\n * \n * \n *     cdef void calculate_center_vertex(self):             # <<<<<<<<<<<<<<\n *         \"\"\" Calculate interpolated center vertex and its gradient.\n *         \"\"\"\n */\n\n  /* function exit code */\n  __Pyx_RefNannyFinishContext();\n}\n\n/* \"(tree fragment)\":1\n * def __reduce_cython__(self):             # <<<<<<<<<<<<<<\n *     raise TypeError(\"no default __reduce__ due to non-trivial __cinit__\")\n * def __setstate_cython__(self, __pyx_state):\n */\n\n/* Python wrapper */\nstatic PyObject *__pyx_pw_26_marching_cubes_lewiner_cy_4Cell_15__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/\nstatic PyObject *__pyx_pw_26_marching_cubes_lewiner_cy_4Cell_15__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {\n  PyObject *__pyx_r = 0;\n  __Pyx_RefNannyDeclarations\n  __Pyx_RefNannySetupContext(\"__reduce_cython__ (wrapper)\", 0);\n  __pyx_r = __pyx_pf_26_marching_cubes_lewiner_cy_4Cell_14__reduce_cython__(((struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_self));\n\n  /* function exit code */\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\nstatic PyObject *__pyx_pf_26_marching_cubes_lewiner_cy_4Cell_14__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *__pyx_v_self) {\n  PyObject *__pyx_r = NULL;\n  __Pyx_RefNannyDeclarations\n  PyObject *__pyx_t_1 = NULL;\n  int __pyx_lineno = 0;\n  const char *__pyx_filename = NULL;\n  int __pyx_clineno = 0;\n  __Pyx_RefNannySetupContext(\"__reduce_cython__\", 0);\n\n  /* \"(tree fragment)\":2\n * def __reduce_cython__(self):\n *     raise TypeError(\"no default __reduce__ due to non-trivial __cinit__\")             # <<<<<<<<<<<<<<\n * def __setstate_cython__(self, __pyx_state):\n *     raise TypeError(\"no default __reduce__ due to non-trivial __cinit__\")\n */\n  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __Pyx_Raise(__pyx_t_1, 0, 0, 0);\n  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n  __PYX_ERR(1, 2, __pyx_L1_error)\n\n  /* \"(tree fragment)\":1\n * def __reduce_cython__(self):             # <<<<<<<<<<<<<<\n *     raise TypeError(\"no default __reduce__ due to non-trivial __cinit__\")\n * def __setstate_cython__(self, __pyx_state):\n */\n\n  /* function exit code */\n  __pyx_L1_error:;\n  __Pyx_XDECREF(__pyx_t_1);\n  __Pyx_AddTraceback(\"_marching_cubes_lewiner_cy.Cell.__reduce_cython__\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n  __pyx_r = NULL;\n  __Pyx_XGIVEREF(__pyx_r);\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\n/* \"(tree fragment)\":3\n * def __reduce_cython__(self):\n *     raise TypeError(\"no default __reduce__ due to non-trivial __cinit__\")\n * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<\n *     raise TypeError(\"no default __reduce__ due to non-trivial __cinit__\")\n */\n\n/* Python wrapper */\nstatic PyObject *__pyx_pw_26_marching_cubes_lewiner_cy_4Cell_17__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/\nstatic PyObject *__pyx_pw_26_marching_cubes_lewiner_cy_4Cell_17__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {\n  PyObject *__pyx_r = 0;\n  __Pyx_RefNannyDeclarations\n  __Pyx_RefNannySetupContext(\"__setstate_cython__ (wrapper)\", 0);\n  __pyx_r = __pyx_pf_26_marching_cubes_lewiner_cy_4Cell_16__setstate_cython__(((struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));\n\n  /* function exit code */\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\nstatic PyObject *__pyx_pf_26_marching_cubes_lewiner_cy_4Cell_16__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {\n  PyObject *__pyx_r = NULL;\n  __Pyx_RefNannyDeclarations\n  PyObject *__pyx_t_1 = NULL;\n  int __pyx_lineno = 0;\n  const char *__pyx_filename = NULL;\n  int __pyx_clineno = 0;\n  __Pyx_RefNannySetupContext(\"__setstate_cython__\", 0);\n\n  /* \"(tree fragment)\":4\n *     raise TypeError(\"no default __reduce__ due to non-trivial __cinit__\")\n * def __setstate_cython__(self, __pyx_state):\n *     raise TypeError(\"no default __reduce__ due to non-trivial __cinit__\")             # <<<<<<<<<<<<<<\n */\n  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __Pyx_Raise(__pyx_t_1, 0, 0, 0);\n  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n  __PYX_ERR(1, 4, __pyx_L1_error)\n\n  /* \"(tree fragment)\":3\n * def __reduce_cython__(self):\n *     raise TypeError(\"no default __reduce__ due to non-trivial __cinit__\")\n * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<\n *     raise TypeError(\"no default __reduce__ due to non-trivial __cinit__\")\n */\n\n  /* function exit code */\n  __pyx_L1_error:;\n  __Pyx_XDECREF(__pyx_t_1);\n  __Pyx_AddTraceback(\"_marching_cubes_lewiner_cy.Cell.__setstate_cython__\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n  __pyx_r = NULL;\n  __Pyx_XGIVEREF(__pyx_r);\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\n/* \"_marching_cubes_lewiner_cy.pyx\":759\n *     cdef int L2 # size of tuple in tuple (if any)\n * \n *     def __init__(self, array):             # <<<<<<<<<<<<<<\n * \n *         # Get the shape of the LUT\n */\n\n/* Python wrapper */\nstatic int __pyx_pw_26_marching_cubes_lewiner_cy_3Lut_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/\nstatic int __pyx_pw_26_marching_cubes_lewiner_cy_3Lut_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {\n  PyObject *__pyx_v_array = 0;\n  int __pyx_lineno = 0;\n  const char *__pyx_filename = NULL;\n  int __pyx_clineno = 0;\n  int __pyx_r;\n  __Pyx_RefNannyDeclarations\n  __Pyx_RefNannySetupContext(\"__init__ (wrapper)\", 0);\n  {\n    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_array,0};\n    PyObject* values[1] = {0};\n    if (unlikely(__pyx_kwds)) {\n      Py_ssize_t kw_args;\n      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);\n      switch (pos_args) {\n        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);\n        CYTHON_FALLTHROUGH;\n        case  0: break;\n        default: goto __pyx_L5_argtuple_error;\n      }\n      kw_args = PyDict_Size(__pyx_kwds);\n      switch (pos_args) {\n        case  0:\n        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_array)) != 0)) kw_args--;\n        else goto __pyx_L5_argtuple_error;\n      }\n      if (unlikely(kw_args > 0)) {\n        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, \"__init__\") < 0)) __PYX_ERR(0, 759, __pyx_L3_error)\n      }\n    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {\n      goto __pyx_L5_argtuple_error;\n    } else {\n      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);\n    }\n    __pyx_v_array = values[0];\n  }\n  goto __pyx_L4_argument_unpacking_done;\n  __pyx_L5_argtuple_error:;\n  __Pyx_RaiseArgtupleInvalid(\"__init__\", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 759, __pyx_L3_error)\n  __pyx_L3_error:;\n  __Pyx_AddTraceback(\"_marching_cubes_lewiner_cy.Lut.__init__\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n  __Pyx_RefNannyFinishContext();\n  return -1;\n  __pyx_L4_argument_unpacking_done:;\n  __pyx_r = __pyx_pf_26_marching_cubes_lewiner_cy_3Lut___init__(((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_v_self), __pyx_v_array);\n\n  /* function exit code */\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\nstatic int __pyx_pf_26_marching_cubes_lewiner_cy_3Lut___init__(struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *__pyx_v_self, PyObject *__pyx_v_array) {\n  int __pyx_v_n;\n  int __pyx_v_N;\n  int __pyx_r;\n  __Pyx_RefNannyDeclarations\n  PyObject *__pyx_t_1 = NULL;\n  PyObject *__pyx_t_2 = NULL;\n  int __pyx_t_3;\n  int __pyx_t_4;\n  PyObject *__pyx_t_5 = NULL;\n  int __pyx_t_6;\n  int __pyx_t_7;\n  signed char __pyx_t_8;\n  int __pyx_lineno = 0;\n  const char *__pyx_filename = NULL;\n  int __pyx_clineno = 0;\n  __Pyx_RefNannySetupContext(\"__init__\", 0);\n  __Pyx_INCREF(__pyx_v_array);\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":762\n * \n *         # Get the shape of the LUT\n *         self.L1 = 1             # <<<<<<<<<<<<<<\n *         self.L2 = 1\n *         #\n */\n  __pyx_v_self->L1 = 1;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":763\n *         # Get the shape of the LUT\n *         self.L1 = 1\n *         self.L2 = 1             # <<<<<<<<<<<<<<\n *         #\n *         self.L0 = array.shape[0]\n */\n  __pyx_v_self->L2 = 1;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":765\n *         self.L2 = 1\n *         #\n *         self.L0 = array.shape[0]             # <<<<<<<<<<<<<<\n *         if array.ndim > 1:\n *             self.L1 = array.shape[1]\n */\n  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_array, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 765, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 765, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_2);\n  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n  __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 765, __pyx_L1_error)\n  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;\n  __pyx_v_self->L0 = __pyx_t_3;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":766\n *         #\n *         self.L0 = array.shape[0]\n *         if array.ndim > 1:             # <<<<<<<<<<<<<<\n *             self.L1 = array.shape[1]\n *         if array.ndim > 2:\n */\n  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_array, __pyx_n_s_ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 766, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_2);\n  __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_int_1, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 766, __pyx_L1_error)\n  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;\n  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 766, __pyx_L1_error)\n  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n  if (__pyx_t_4) {\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":767\n *         self.L0 = array.shape[0]\n *         if array.ndim > 1:\n *             self.L1 = array.shape[1]             # <<<<<<<<<<<<<<\n *         if array.ndim > 2:\n *             self.L2 = array.shape[2]\n */\n    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_array, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 767, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_1);\n    __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 767, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_2);\n    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n    __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 767, __pyx_L1_error)\n    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;\n    __pyx_v_self->L1 = __pyx_t_3;\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":766\n *         #\n *         self.L0 = array.shape[0]\n *         if array.ndim > 1:             # <<<<<<<<<<<<<<\n *             self.L1 = array.shape[1]\n *         if array.ndim > 2:\n */\n  }\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":768\n *         if array.ndim > 1:\n *             self.L1 = array.shape[1]\n *         if array.ndim > 2:             # <<<<<<<<<<<<<<\n *             self.L2 = array.shape[2]\n * \n */\n  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_array, __pyx_n_s_ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 768, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_2);\n  __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_int_2, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 768, __pyx_L1_error)\n  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;\n  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 768, __pyx_L1_error)\n  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n  if (__pyx_t_4) {\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":769\n *             self.L1 = array.shape[1]\n *         if array.ndim > 2:\n *             self.L2 = array.shape[2]             # <<<<<<<<<<<<<<\n * \n *         # Copy the contents\n */\n    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_array, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 769, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_1);\n    __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 769, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_2);\n    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n    __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 769, __pyx_L1_error)\n    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;\n    __pyx_v_self->L2 = __pyx_t_3;\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":768\n *         if array.ndim > 1:\n *             self.L1 = array.shape[1]\n *         if array.ndim > 2:             # <<<<<<<<<<<<<<\n *             self.L2 = array.shape[2]\n * \n */\n  }\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":772\n * \n *         # Copy the contents\n *         array = array.ravel()             # <<<<<<<<<<<<<<\n *         cdef int n, N\n *         N = self.L0 * self.L1 * self.L2\n */\n  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_array, __pyx_n_s_ravel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 772, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __pyx_t_5 = NULL;\n  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {\n    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);\n    if (likely(__pyx_t_5)) {\n      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);\n      __Pyx_INCREF(__pyx_t_5);\n      __Pyx_INCREF(function);\n      __Pyx_DECREF_SET(__pyx_t_1, function);\n    }\n  }\n  __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_1);\n  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;\n  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 772, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_2);\n  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n  __Pyx_DECREF_SET(__pyx_v_array, __pyx_t_2);\n  __pyx_t_2 = 0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":774\n *         array = array.ravel()\n *         cdef int n, N\n *         N = self.L0 * self.L1 * self.L2             # <<<<<<<<<<<<<<\n *         self.VALUES = <signed char *> malloc(N * sizeof(signed char))\n *         if self.VALUES is NULL:\n */\n  __pyx_v_N = ((__pyx_v_self->L0 * __pyx_v_self->L1) * __pyx_v_self->L2);\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":775\n *         cdef int n, N\n *         N = self.L0 * self.L1 * self.L2\n *         self.VALUES = <signed char *> malloc(N * sizeof(signed char))             # <<<<<<<<<<<<<<\n *         if self.VALUES is NULL:\n *             raise MemoryError()\n */\n  __pyx_v_self->VALUES = ((signed char *)malloc((__pyx_v_N * (sizeof(signed char)))));\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":776\n *         N = self.L0 * self.L1 * self.L2\n *         self.VALUES = <signed char *> malloc(N * sizeof(signed char))\n *         if self.VALUES is NULL:             # <<<<<<<<<<<<<<\n *             raise MemoryError()\n *         for n in range(N):\n */\n  __pyx_t_4 = ((__pyx_v_self->VALUES == NULL) != 0);\n  if (unlikely(__pyx_t_4)) {\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":777\n *         self.VALUES = <signed char *> malloc(N * sizeof(signed char))\n *         if self.VALUES is NULL:\n *             raise MemoryError()             # <<<<<<<<<<<<<<\n *         for n in range(N):\n *             self.VALUES[n] = array[n]\n */\n    PyErr_NoMemory(); __PYX_ERR(0, 777, __pyx_L1_error)\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":776\n *         N = self.L0 * self.L1 * self.L2\n *         self.VALUES = <signed char *> malloc(N * sizeof(signed char))\n *         if self.VALUES is NULL:             # <<<<<<<<<<<<<<\n *             raise MemoryError()\n *         for n in range(N):\n */\n  }\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":778\n *         if self.VALUES is NULL:\n *             raise MemoryError()\n *         for n in range(N):             # <<<<<<<<<<<<<<\n *             self.VALUES[n] = array[n]\n * \n */\n  __pyx_t_3 = __pyx_v_N;\n  __pyx_t_6 = __pyx_t_3;\n  for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {\n    __pyx_v_n = __pyx_t_7;\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":779\n *             raise MemoryError()\n *         for n in range(N):\n *             self.VALUES[n] = array[n]             # <<<<<<<<<<<<<<\n * \n *     def __cinit__(self):\n */\n    __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_array, __pyx_v_n, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 779, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_2);\n    __pyx_t_8 = __Pyx_PyInt_As_signed__char(__pyx_t_2); if (unlikely((__pyx_t_8 == (signed char)-1) && PyErr_Occurred())) __PYX_ERR(0, 779, __pyx_L1_error)\n    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;\n    (__pyx_v_self->VALUES[__pyx_v_n]) = __pyx_t_8;\n  }\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":759\n *     cdef int L2 # size of tuple in tuple (if any)\n * \n *     def __init__(self, array):             # <<<<<<<<<<<<<<\n * \n *         # Get the shape of the LUT\n */\n\n  /* function exit code */\n  __pyx_r = 0;\n  goto __pyx_L0;\n  __pyx_L1_error:;\n  __Pyx_XDECREF(__pyx_t_1);\n  __Pyx_XDECREF(__pyx_t_2);\n  __Pyx_XDECREF(__pyx_t_5);\n  __Pyx_AddTraceback(\"_marching_cubes_lewiner_cy.Lut.__init__\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n  __pyx_r = -1;\n  __pyx_L0:;\n  __Pyx_XDECREF(__pyx_v_array);\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\n/* \"_marching_cubes_lewiner_cy.pyx\":781\n *             self.VALUES[n] = array[n]\n * \n *     def __cinit__(self):             # <<<<<<<<<<<<<<\n *         self.VALUES = NULL\n * \n */\n\n/* Python wrapper */\nstatic int __pyx_pw_26_marching_cubes_lewiner_cy_3Lut_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/\nstatic int __pyx_pw_26_marching_cubes_lewiner_cy_3Lut_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {\n  int __pyx_r;\n  __Pyx_RefNannyDeclarations\n  __Pyx_RefNannySetupContext(\"__cinit__ (wrapper)\", 0);\n  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {\n    __Pyx_RaiseArgtupleInvalid(\"__cinit__\", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}\n  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, \"__cinit__\", 0))) return -1;\n  __pyx_r = __pyx_pf_26_marching_cubes_lewiner_cy_3Lut_2__cinit__(((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_v_self));\n\n  /* function exit code */\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\nstatic int __pyx_pf_26_marching_cubes_lewiner_cy_3Lut_2__cinit__(struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *__pyx_v_self) {\n  int __pyx_r;\n  __Pyx_RefNannyDeclarations\n  __Pyx_RefNannySetupContext(\"__cinit__\", 0);\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":782\n * \n *     def __cinit__(self):\n *         self.VALUES = NULL             # <<<<<<<<<<<<<<\n * \n *     def __dealloc__(self):\n */\n  __pyx_v_self->VALUES = NULL;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":781\n *             self.VALUES[n] = array[n]\n * \n *     def __cinit__(self):             # <<<<<<<<<<<<<<\n *         self.VALUES = NULL\n * \n */\n\n  /* function exit code */\n  __pyx_r = 0;\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\n/* \"_marching_cubes_lewiner_cy.pyx\":784\n *         self.VALUES = NULL\n * \n *     def __dealloc__(self):             # <<<<<<<<<<<<<<\n *         if self.VALUES is not NULL:\n *             free(self.VALUES)\n */\n\n/* Python wrapper */\nstatic void __pyx_pw_26_marching_cubes_lewiner_cy_3Lut_5__dealloc__(PyObject *__pyx_v_self); /*proto*/\nstatic void __pyx_pw_26_marching_cubes_lewiner_cy_3Lut_5__dealloc__(PyObject *__pyx_v_self) {\n  __Pyx_RefNannyDeclarations\n  __Pyx_RefNannySetupContext(\"__dealloc__ (wrapper)\", 0);\n  __pyx_pf_26_marching_cubes_lewiner_cy_3Lut_4__dealloc__(((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_v_self));\n\n  /* function exit code */\n  __Pyx_RefNannyFinishContext();\n}\n\nstatic void __pyx_pf_26_marching_cubes_lewiner_cy_3Lut_4__dealloc__(struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *__pyx_v_self) {\n  __Pyx_RefNannyDeclarations\n  int __pyx_t_1;\n  __Pyx_RefNannySetupContext(\"__dealloc__\", 0);\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":785\n * \n *     def __dealloc__(self):\n *         if self.VALUES is not NULL:             # <<<<<<<<<<<<<<\n *             free(self.VALUES)\n * \n */\n  __pyx_t_1 = ((__pyx_v_self->VALUES != NULL) != 0);\n  if (__pyx_t_1) {\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":786\n *     def __dealloc__(self):\n *         if self.VALUES is not NULL:\n *             free(self.VALUES)             # <<<<<<<<<<<<<<\n * \n *     cdef int get1(self, int i0):\n */\n    free(__pyx_v_self->VALUES);\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":785\n * \n *     def __dealloc__(self):\n *         if self.VALUES is not NULL:             # <<<<<<<<<<<<<<\n *             free(self.VALUES)\n * \n */\n  }\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":784\n *         self.VALUES = NULL\n * \n *     def __dealloc__(self):             # <<<<<<<<<<<<<<\n *         if self.VALUES is not NULL:\n *             free(self.VALUES)\n */\n\n  /* function exit code */\n  __Pyx_RefNannyFinishContext();\n}\n\n/* \"_marching_cubes_lewiner_cy.pyx\":788\n *             free(self.VALUES)\n * \n *     cdef int get1(self, int i0):             # <<<<<<<<<<<<<<\n *         return self.VALUES[i0]\n * \n */\n\nstatic int __pyx_f_26_marching_cubes_lewiner_cy_3Lut_get1(struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *__pyx_v_self, int __pyx_v_i0) {\n  int __pyx_r;\n  __Pyx_RefNannyDeclarations\n  __Pyx_RefNannySetupContext(\"get1\", 0);\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":789\n * \n *     cdef int get1(self, int i0):\n *         return self.VALUES[i0]             # <<<<<<<<<<<<<<\n * \n *     cdef int get2(self, int i0, int i1):\n */\n  __pyx_r = (__pyx_v_self->VALUES[__pyx_v_i0]);\n  goto __pyx_L0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":788\n *             free(self.VALUES)\n * \n *     cdef int get1(self, int i0):             # <<<<<<<<<<<<<<\n *         return self.VALUES[i0]\n * \n */\n\n  /* function exit code */\n  __pyx_L0:;\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\n/* \"_marching_cubes_lewiner_cy.pyx\":791\n *         return self.VALUES[i0]\n * \n *     cdef int get2(self, int i0, int i1):             # <<<<<<<<<<<<<<\n *         return self.VALUES[i0*self.L1 + i1]\n * \n */\n\nstatic int __pyx_f_26_marching_cubes_lewiner_cy_3Lut_get2(struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *__pyx_v_self, int __pyx_v_i0, int __pyx_v_i1) {\n  int __pyx_r;\n  __Pyx_RefNannyDeclarations\n  __Pyx_RefNannySetupContext(\"get2\", 0);\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":792\n * \n *     cdef int get2(self, int i0, int i1):\n *         return self.VALUES[i0*self.L1 + i1]             # <<<<<<<<<<<<<<\n * \n *     cdef int get3(self, int i0, int i1, int i2):\n */\n  __pyx_r = (__pyx_v_self->VALUES[((__pyx_v_i0 * __pyx_v_self->L1) + __pyx_v_i1)]);\n  goto __pyx_L0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":791\n *         return self.VALUES[i0]\n * \n *     cdef int get2(self, int i0, int i1):             # <<<<<<<<<<<<<<\n *         return self.VALUES[i0*self.L1 + i1]\n * \n */\n\n  /* function exit code */\n  __pyx_L0:;\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\n/* \"_marching_cubes_lewiner_cy.pyx\":794\n *         return self.VALUES[i0*self.L1 + i1]\n * \n *     cdef int get3(self, int i0, int i1, int i2):             # <<<<<<<<<<<<<<\n *         return self.VALUES[i0*self.L1*self.L2 + i1*self.L2 + i2]\n * \n */\n\nstatic int __pyx_f_26_marching_cubes_lewiner_cy_3Lut_get3(struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *__pyx_v_self, int __pyx_v_i0, int __pyx_v_i1, int __pyx_v_i2) {\n  int __pyx_r;\n  __Pyx_RefNannyDeclarations\n  __Pyx_RefNannySetupContext(\"get3\", 0);\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":795\n * \n *     cdef int get3(self, int i0, int i1, int i2):\n *         return self.VALUES[i0*self.L1*self.L2 + i1*self.L2 + i2]             # <<<<<<<<<<<<<<\n * \n * \n */\n  __pyx_r = (__pyx_v_self->VALUES[((((__pyx_v_i0 * __pyx_v_self->L1) * __pyx_v_self->L2) + (__pyx_v_i1 * __pyx_v_self->L2)) + __pyx_v_i2)]);\n  goto __pyx_L0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":794\n *         return self.VALUES[i0*self.L1 + i1]\n * \n *     cdef int get3(self, int i0, int i1, int i2):             # <<<<<<<<<<<<<<\n *         return self.VALUES[i0*self.L1*self.L2 + i1*self.L2 + i2]\n * \n */\n\n  /* function exit code */\n  __pyx_L0:;\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\n/* \"(tree fragment)\":1\n * def __reduce_cython__(self):             # <<<<<<<<<<<<<<\n *     raise TypeError(\"no default __reduce__ due to non-trivial __cinit__\")\n * def __setstate_cython__(self, __pyx_state):\n */\n\n/* Python wrapper */\nstatic PyObject *__pyx_pw_26_marching_cubes_lewiner_cy_3Lut_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/\nstatic PyObject *__pyx_pw_26_marching_cubes_lewiner_cy_3Lut_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {\n  PyObject *__pyx_r = 0;\n  __Pyx_RefNannyDeclarations\n  __Pyx_RefNannySetupContext(\"__reduce_cython__ (wrapper)\", 0);\n  __pyx_r = __pyx_pf_26_marching_cubes_lewiner_cy_3Lut_6__reduce_cython__(((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_v_self));\n\n  /* function exit code */\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\nstatic PyObject *__pyx_pf_26_marching_cubes_lewiner_cy_3Lut_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *__pyx_v_self) {\n  PyObject *__pyx_r = NULL;\n  __Pyx_RefNannyDeclarations\n  PyObject *__pyx_t_1 = NULL;\n  int __pyx_lineno = 0;\n  const char *__pyx_filename = NULL;\n  int __pyx_clineno = 0;\n  __Pyx_RefNannySetupContext(\"__reduce_cython__\", 0);\n\n  /* \"(tree fragment)\":2\n * def __reduce_cython__(self):\n *     raise TypeError(\"no default __reduce__ due to non-trivial __cinit__\")             # <<<<<<<<<<<<<<\n * def __setstate_cython__(self, __pyx_state):\n *     raise TypeError(\"no default __reduce__ due to non-trivial __cinit__\")\n */\n  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __Pyx_Raise(__pyx_t_1, 0, 0, 0);\n  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n  __PYX_ERR(1, 2, __pyx_L1_error)\n\n  /* \"(tree fragment)\":1\n * def __reduce_cython__(self):             # <<<<<<<<<<<<<<\n *     raise TypeError(\"no default __reduce__ due to non-trivial __cinit__\")\n * def __setstate_cython__(self, __pyx_state):\n */\n\n  /* function exit code */\n  __pyx_L1_error:;\n  __Pyx_XDECREF(__pyx_t_1);\n  __Pyx_AddTraceback(\"_marching_cubes_lewiner_cy.Lut.__reduce_cython__\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n  __pyx_r = NULL;\n  __Pyx_XGIVEREF(__pyx_r);\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\n/* \"(tree fragment)\":3\n * def __reduce_cython__(self):\n *     raise TypeError(\"no default __reduce__ due to non-trivial __cinit__\")\n * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<\n *     raise TypeError(\"no default __reduce__ due to non-trivial __cinit__\")\n */\n\n/* Python wrapper */\nstatic PyObject *__pyx_pw_26_marching_cubes_lewiner_cy_3Lut_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/\nstatic PyObject *__pyx_pw_26_marching_cubes_lewiner_cy_3Lut_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {\n  PyObject *__pyx_r = 0;\n  __Pyx_RefNannyDeclarations\n  __Pyx_RefNannySetupContext(\"__setstate_cython__ (wrapper)\", 0);\n  __pyx_r = __pyx_pf_26_marching_cubes_lewiner_cy_3Lut_8__setstate_cython__(((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));\n\n  /* function exit code */\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\nstatic PyObject *__pyx_pf_26_marching_cubes_lewiner_cy_3Lut_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {\n  PyObject *__pyx_r = NULL;\n  __Pyx_RefNannyDeclarations\n  PyObject *__pyx_t_1 = NULL;\n  int __pyx_lineno = 0;\n  const char *__pyx_filename = NULL;\n  int __pyx_clineno = 0;\n  __Pyx_RefNannySetupContext(\"__setstate_cython__\", 0);\n\n  /* \"(tree fragment)\":4\n *     raise TypeError(\"no default __reduce__ due to non-trivial __cinit__\")\n * def __setstate_cython__(self, __pyx_state):\n *     raise TypeError(\"no default __reduce__ due to non-trivial __cinit__\")             # <<<<<<<<<<<<<<\n */\n  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __Pyx_Raise(__pyx_t_1, 0, 0, 0);\n  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n  __PYX_ERR(1, 4, __pyx_L1_error)\n\n  /* \"(tree fragment)\":3\n * def __reduce_cython__(self):\n *     raise TypeError(\"no default __reduce__ due to non-trivial __cinit__\")\n * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<\n *     raise TypeError(\"no default __reduce__ due to non-trivial __cinit__\")\n */\n\n  /* function exit code */\n  __pyx_L1_error:;\n  __Pyx_XDECREF(__pyx_t_1);\n  __Pyx_AddTraceback(\"_marching_cubes_lewiner_cy.Lut.__setstate_cython__\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n  __pyx_r = NULL;\n  __Pyx_XGIVEREF(__pyx_r);\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\n/* \"_marching_cubes_lewiner_cy.pyx\":862\n * \n * \n *     def __init__(self, EDGESRELX, EDGESRELY, EDGESRELZ, CASESCLASSIC, CASES,             # <<<<<<<<<<<<<<\n * \n *             TILING1, TILING2, TILING3_1, TILING3_2, TILING4_1, TILING4_2,\n */\n\n/* Python wrapper */\nstatic int __pyx_pw_26_marching_cubes_lewiner_cy_11LutProvider_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/\nstatic int __pyx_pw_26_marching_cubes_lewiner_cy_11LutProvider_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {\n  PyObject *__pyx_v_EDGESRELX = 0;\n  PyObject *__pyx_v_EDGESRELY = 0;\n  PyObject *__pyx_v_EDGESRELZ = 0;\n  PyObject *__pyx_v_CASESCLASSIC = 0;\n  PyObject *__pyx_v_CASES = 0;\n  PyObject *__pyx_v_TILING1 = 0;\n  PyObject *__pyx_v_TILING2 = 0;\n  PyObject *__pyx_v_TILING3_1 = 0;\n  PyObject *__pyx_v_TILING3_2 = 0;\n  PyObject *__pyx_v_TILING4_1 = 0;\n  PyObject *__pyx_v_TILING4_2 = 0;\n  PyObject *__pyx_v_TILING5 = 0;\n  PyObject *__pyx_v_TILING6_1_1 = 0;\n  PyObject *__pyx_v_TILING6_1_2 = 0;\n  PyObject *__pyx_v_TILING6_2 = 0;\n  PyObject *__pyx_v_TILING7_1 = 0;\n  PyObject *__pyx_v_TILING7_2 = 0;\n  PyObject *__pyx_v_TILING7_3 = 0;\n  PyObject *__pyx_v_TILING7_4_1 = 0;\n  PyObject *__pyx_v_TILING7_4_2 = 0;\n  PyObject *__pyx_v_TILING8 = 0;\n  PyObject *__pyx_v_TILING9 = 0;\n  PyObject *__pyx_v_TILING10_1_1 = 0;\n  PyObject *__pyx_v_TILING10_1_1_ = 0;\n  PyObject *__pyx_v_TILING10_1_2 = 0;\n  PyObject *__pyx_v_TILING10_2 = 0;\n  PyObject *__pyx_v_TILING10_2_ = 0;\n  PyObject *__pyx_v_TILING11 = 0;\n  PyObject *__pyx_v_TILING12_1_1 = 0;\n  PyObject *__pyx_v_TILING12_1_1_ = 0;\n  PyObject *__pyx_v_TILING12_1_2 = 0;\n  PyObject *__pyx_v_TILING12_2 = 0;\n  PyObject *__pyx_v_TILING12_2_ = 0;\n  PyObject *__pyx_v_TILING13_1 = 0;\n  PyObject *__pyx_v_TILING13_1_ = 0;\n  PyObject *__pyx_v_TILING13_2 = 0;\n  PyObject *__pyx_v_TILING13_2_ = 0;\n  PyObject *__pyx_v_TILING13_3 = 0;\n  PyObject *__pyx_v_TILING13_3_ = 0;\n  PyObject *__pyx_v_TILING13_4 = 0;\n  PyObject *__pyx_v_TILING13_5_1 = 0;\n  PyObject *__pyx_v_TILING13_5_2 = 0;\n  PyObject *__pyx_v_TILING14 = 0;\n  PyObject *__pyx_v_TEST3 = 0;\n  PyObject *__pyx_v_TEST4 = 0;\n  PyObject *__pyx_v_TEST6 = 0;\n  PyObject *__pyx_v_TEST7 = 0;\n  PyObject *__pyx_v_TEST10 = 0;\n  PyObject *__pyx_v_TEST12 = 0;\n  PyObject *__pyx_v_TEST13 = 0;\n  PyObject *__pyx_v_SUBCONFIG13 = 0;\n  int __pyx_lineno = 0;\n  const char *__pyx_filename = NULL;\n  int __pyx_clineno = 0;\n  int __pyx_r;\n  __Pyx_RefNannyDeclarations\n  __Pyx_RefNannySetupContext(\"__init__ (wrapper)\", 0);\n  {\n    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_EDGESRELX,&__pyx_n_s_EDGESRELY,&__pyx_n_s_EDGESRELZ,&__pyx_n_s_CASESCLASSIC,&__pyx_n_s_CASES,&__pyx_n_s_TILING1,&__pyx_n_s_TILING2,&__pyx_n_s_TILING3_1,&__pyx_n_s_TILING3_2,&__pyx_n_s_TILING4_1,&__pyx_n_s_TILING4_2,&__pyx_n_s_TILING5,&__pyx_n_s_TILING6_1_1,&__pyx_n_s_TILING6_1_2,&__pyx_n_s_TILING6_2,&__pyx_n_s_TILING7_1,&__pyx_n_s_TILING7_2,&__pyx_n_s_TILING7_3,&__pyx_n_s_TILING7_4_1,&__pyx_n_s_TILING7_4_2,&__pyx_n_s_TILING8,&__pyx_n_s_TILING9,&__pyx_n_s_TILING10_1_1,&__pyx_n_s_TILING10_1_1_2,&__pyx_n_s_TILING10_1_2,&__pyx_n_s_TILING10_2,&__pyx_n_s_TILING10_2_2,&__pyx_n_s_TILING11,&__pyx_n_s_TILING12_1_1,&__pyx_n_s_TILING12_1_1_2,&__pyx_n_s_TILING12_1_2,&__pyx_n_s_TILING12_2,&__pyx_n_s_TILING12_2_2,&__pyx_n_s_TILING13_1,&__pyx_n_s_TILING13_1_2,&__pyx_n_s_TILING13_2,&__pyx_n_s_TILING13_2_2,&__pyx_n_s_TILING13_3,&__pyx_n_s_TILING13_3_2,&__pyx_n_s_TILING13_4,&__pyx_n_s_TILING13_5_1,&__pyx_n_s_TILING13_5_2,&__pyx_n_s_TILING14,&__pyx_n_s_TEST3,&__pyx_n_s_TEST4,&__pyx_n_s_TEST6,&__pyx_n_s_TEST7,&__pyx_n_s_TEST10,&__pyx_n_s_TEST12,&__pyx_n_s_TEST13,&__pyx_n_s_SUBCONFIG13,0};\n    PyObject* values[51] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};\n    if (unlikely(__pyx_kwds)) {\n      Py_ssize_t kw_args;\n      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);\n      switch (pos_args) {\n        case 51: values[50] = PyTuple_GET_ITEM(__pyx_args, 50);\n        CYTHON_FALLTHROUGH;\n        case 50: values[49] = PyTuple_GET_ITEM(__pyx_args, 49);\n        CYTHON_FALLTHROUGH;\n        case 49: values[48] = PyTuple_GET_ITEM(__pyx_args, 48);\n        CYTHON_FALLTHROUGH;\n        case 48: values[47] = PyTuple_GET_ITEM(__pyx_args, 47);\n        CYTHON_FALLTHROUGH;\n        case 47: values[46] = PyTuple_GET_ITEM(__pyx_args, 46);\n        CYTHON_FALLTHROUGH;\n        case 46: values[45] = PyTuple_GET_ITEM(__pyx_args, 45);\n        CYTHON_FALLTHROUGH;\n        case 45: values[44] = PyTuple_GET_ITEM(__pyx_args, 44);\n        CYTHON_FALLTHROUGH;\n        case 44: values[43] = PyTuple_GET_ITEM(__pyx_args, 43);\n        CYTHON_FALLTHROUGH;\n        case 43: values[42] = PyTuple_GET_ITEM(__pyx_args, 42);\n        CYTHON_FALLTHROUGH;\n        case 42: values[41] = PyTuple_GET_ITEM(__pyx_args, 41);\n        CYTHON_FALLTHROUGH;\n        case 41: values[40] = PyTuple_GET_ITEM(__pyx_args, 40);\n        CYTHON_FALLTHROUGH;\n        case 40: values[39] = PyTuple_GET_ITEM(__pyx_args, 39);\n        CYTHON_FALLTHROUGH;\n        case 39: values[38] = PyTuple_GET_ITEM(__pyx_args, 38);\n        CYTHON_FALLTHROUGH;\n        case 38: values[37] = PyTuple_GET_ITEM(__pyx_args, 37);\n        CYTHON_FALLTHROUGH;\n        case 37: values[36] = PyTuple_GET_ITEM(__pyx_args, 36);\n        CYTHON_FALLTHROUGH;\n        case 36: values[35] = PyTuple_GET_ITEM(__pyx_args, 35);\n        CYTHON_FALLTHROUGH;\n        case 35: values[34] = PyTuple_GET_ITEM(__pyx_args, 34);\n        CYTHON_FALLTHROUGH;\n        case 34: values[33] = PyTuple_GET_ITEM(__pyx_args, 33);\n        CYTHON_FALLTHROUGH;\n        case 33: values[32] = PyTuple_GET_ITEM(__pyx_args, 32);\n        CYTHON_FALLTHROUGH;\n        case 32: values[31] = PyTuple_GET_ITEM(__pyx_args, 31);\n        CYTHON_FALLTHROUGH;\n        case 31: values[30] = PyTuple_GET_ITEM(__pyx_args, 30);\n        CYTHON_FALLTHROUGH;\n        case 30: values[29] = PyTuple_GET_ITEM(__pyx_args, 29);\n        CYTHON_FALLTHROUGH;\n        case 29: values[28] = PyTuple_GET_ITEM(__pyx_args, 28);\n        CYTHON_FALLTHROUGH;\n        case 28: values[27] = PyTuple_GET_ITEM(__pyx_args, 27);\n        CYTHON_FALLTHROUGH;\n        case 27: values[26] = PyTuple_GET_ITEM(__pyx_args, 26);\n        CYTHON_FALLTHROUGH;\n        case 26: values[25] = PyTuple_GET_ITEM(__pyx_args, 25);\n        CYTHON_FALLTHROUGH;\n        case 25: values[24] = PyTuple_GET_ITEM(__pyx_args, 24);\n        CYTHON_FALLTHROUGH;\n        case 24: values[23] = PyTuple_GET_ITEM(__pyx_args, 23);\n        CYTHON_FALLTHROUGH;\n        case 23: values[22] = PyTuple_GET_ITEM(__pyx_args, 22);\n        CYTHON_FALLTHROUGH;\n        case 22: values[21] = PyTuple_GET_ITEM(__pyx_args, 21);\n        CYTHON_FALLTHROUGH;\n        case 21: values[20] = PyTuple_GET_ITEM(__pyx_args, 20);\n        CYTHON_FALLTHROUGH;\n        case 20: values[19] = PyTuple_GET_ITEM(__pyx_args, 19);\n        CYTHON_FALLTHROUGH;\n        case 19: values[18] = PyTuple_GET_ITEM(__pyx_args, 18);\n        CYTHON_FALLTHROUGH;\n        case 18: values[17] = PyTuple_GET_ITEM(__pyx_args, 17);\n        CYTHON_FALLTHROUGH;\n        case 17: values[16] = PyTuple_GET_ITEM(__pyx_args, 16);\n        CYTHON_FALLTHROUGH;\n        case 16: values[15] = PyTuple_GET_ITEM(__pyx_args, 15);\n        CYTHON_FALLTHROUGH;\n        case 15: values[14] = PyTuple_GET_ITEM(__pyx_args, 14);\n        CYTHON_FALLTHROUGH;\n        case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13);\n        CYTHON_FALLTHROUGH;\n        case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12);\n        CYTHON_FALLTHROUGH;\n        case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);\n        CYTHON_FALLTHROUGH;\n        case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);\n        CYTHON_FALLTHROUGH;\n        case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);\n        CYTHON_FALLTHROUGH;\n        case  9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);\n        CYTHON_FALLTHROUGH;\n        case  8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);\n        CYTHON_FALLTHROUGH;\n        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);\n        CYTHON_FALLTHROUGH;\n        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);\n        CYTHON_FALLTHROUGH;\n        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);\n        CYTHON_FALLTHROUGH;\n        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);\n        CYTHON_FALLTHROUGH;\n        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);\n        CYTHON_FALLTHROUGH;\n        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);\n        CYTHON_FALLTHROUGH;\n        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);\n        CYTHON_FALLTHROUGH;\n        case  0: break;\n        default: goto __pyx_L5_argtuple_error;\n      }\n      kw_args = PyDict_Size(__pyx_kwds);\n      switch (pos_args) {\n        case  0:\n        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_EDGESRELX)) != 0)) kw_args--;\n        else goto __pyx_L5_argtuple_error;\n        CYTHON_FALLTHROUGH;\n        case  1:\n        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_EDGESRELY)) != 0)) kw_args--;\n        else {\n          __Pyx_RaiseArgtupleInvalid(\"__init__\", 1, 51, 51, 1); __PYX_ERR(0, 862, __pyx_L3_error)\n        }\n        CYTHON_FALLTHROUGH;\n        case  2:\n        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_EDGESRELZ)) != 0)) kw_args--;\n        else {\n          __Pyx_RaiseArgtupleInvalid(\"__init__\", 1, 51, 51, 2); __PYX_ERR(0, 862, __pyx_L3_error)\n        }\n        CYTHON_FALLTHROUGH;\n        case  3:\n        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_CASESCLASSIC)) != 0)) kw_args--;\n        else {\n          __Pyx_RaiseArgtupleInvalid(\"__init__\", 1, 51, 51, 3); __PYX_ERR(0, 862, __pyx_L3_error)\n        }\n        CYTHON_FALLTHROUGH;\n        case  4:\n        if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_CASES)) != 0)) kw_args--;\n        else {\n          __Pyx_RaiseArgtupleInvalid(\"__init__\", 1, 51, 51, 4); __PYX_ERR(0, 862, __pyx_L3_error)\n        }\n        CYTHON_FALLTHROUGH;\n        case  5:\n        if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_TILING1)) != 0)) kw_args--;\n        else {\n          __Pyx_RaiseArgtupleInvalid(\"__init__\", 1, 51, 51, 5); __PYX_ERR(0, 862, __pyx_L3_error)\n        }\n        CYTHON_FALLTHROUGH;\n        case  6:\n        if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_TILING2)) != 0)) kw_args--;\n        else {\n          __Pyx_RaiseArgtupleInvalid(\"__init__\", 1, 51, 51, 6); __PYX_ERR(0, 862, __pyx_L3_error)\n        }\n        CYTHON_FALLTHROUGH;\n        case  7:\n        if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_TILING3_1)) != 0)) kw_args--;\n        else {\n          __Pyx_RaiseArgtupleInvalid(\"__init__\", 1, 51, 51, 7); __PYX_ERR(0, 862, __pyx_L3_error)\n        }\n        CYTHON_FALLTHROUGH;\n        case  8:\n        if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_TILING3_2)) != 0)) kw_args--;\n        else {\n          __Pyx_RaiseArgtupleInvalid(\"__init__\", 1, 51, 51, 8); __PYX_ERR(0, 862, __pyx_L3_error)\n        }\n        CYTHON_FALLTHROUGH;\n        case  9:\n        if (likely((values[9] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_TILING4_1)) != 0)) kw_args--;\n        else {\n          __Pyx_RaiseArgtupleInvalid(\"__init__\", 1, 51, 51, 9); __PYX_ERR(0, 862, __pyx_L3_error)\n        }\n        CYTHON_FALLTHROUGH;\n        case 10:\n        if (likely((values[10] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_TILING4_2)) != 0)) kw_args--;\n        else {\n          __Pyx_RaiseArgtupleInvalid(\"__init__\", 1, 51, 51, 10); __PYX_ERR(0, 862, __pyx_L3_error)\n        }\n        CYTHON_FALLTHROUGH;\n        case 11:\n        if (likely((values[11] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_TILING5)) != 0)) kw_args--;\n        else {\n          __Pyx_RaiseArgtupleInvalid(\"__init__\", 1, 51, 51, 11); __PYX_ERR(0, 862, __pyx_L3_error)\n        }\n        CYTHON_FALLTHROUGH;\n        case 12:\n        if (likely((values[12] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_TILING6_1_1)) != 0)) kw_args--;\n        else {\n          __Pyx_RaiseArgtupleInvalid(\"__init__\", 1, 51, 51, 12); __PYX_ERR(0, 862, __pyx_L3_error)\n        }\n        CYTHON_FALLTHROUGH;\n        case 13:\n        if (likely((values[13] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_TILING6_1_2)) != 0)) kw_args--;\n        else {\n          __Pyx_RaiseArgtupleInvalid(\"__init__\", 1, 51, 51, 13); __PYX_ERR(0, 862, __pyx_L3_error)\n        }\n        CYTHON_FALLTHROUGH;\n        case 14:\n        if (likely((values[14] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_TILING6_2)) != 0)) kw_args--;\n        else {\n          __Pyx_RaiseArgtupleInvalid(\"__init__\", 1, 51, 51, 14); __PYX_ERR(0, 862, __pyx_L3_error)\n        }\n        CYTHON_FALLTHROUGH;\n        case 15:\n        if (likely((values[15] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_TILING7_1)) != 0)) kw_args--;\n        else {\n          __Pyx_RaiseArgtupleInvalid(\"__init__\", 1, 51, 51, 15); __PYX_ERR(0, 862, __pyx_L3_error)\n        }\n        CYTHON_FALLTHROUGH;\n        case 16:\n        if (likely((values[16] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_TILING7_2)) != 0)) kw_args--;\n        else {\n          __Pyx_RaiseArgtupleInvalid(\"__init__\", 1, 51, 51, 16); __PYX_ERR(0, 862, __pyx_L3_error)\n        }\n        CYTHON_FALLTHROUGH;\n        case 17:\n        if (likely((values[17] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_TILING7_3)) != 0)) kw_args--;\n        else {\n          __Pyx_RaiseArgtupleInvalid(\"__init__\", 1, 51, 51, 17); __PYX_ERR(0, 862, __pyx_L3_error)\n        }\n        CYTHON_FALLTHROUGH;\n        case 18:\n        if (likely((values[18] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_TILING7_4_1)) != 0)) kw_args--;\n        else {\n          __Pyx_RaiseArgtupleInvalid(\"__init__\", 1, 51, 51, 18); __PYX_ERR(0, 862, __pyx_L3_error)\n        }\n        CYTHON_FALLTHROUGH;\n        case 19:\n        if (likely((values[19] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_TILING7_4_2)) != 0)) kw_args--;\n        else {\n          __Pyx_RaiseArgtupleInvalid(\"__init__\", 1, 51, 51, 19); __PYX_ERR(0, 862, __pyx_L3_error)\n        }\n        CYTHON_FALLTHROUGH;\n        case 20:\n        if (likely((values[20] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_TILING8)) != 0)) kw_args--;\n        else {\n          __Pyx_RaiseArgtupleInvalid(\"__init__\", 1, 51, 51, 20); __PYX_ERR(0, 862, __pyx_L3_error)\n        }\n        CYTHON_FALLTHROUGH;\n        case 21:\n        if (likely((values[21] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_TILING9)) != 0)) kw_args--;\n        else {\n          __Pyx_RaiseArgtupleInvalid(\"__init__\", 1, 51, 51, 21); __PYX_ERR(0, 862, __pyx_L3_error)\n        }\n        CYTHON_FALLTHROUGH;\n        case 22:\n        if (likely((values[22] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_TILING10_1_1)) != 0)) kw_args--;\n        else {\n          __Pyx_RaiseArgtupleInvalid(\"__init__\", 1, 51, 51, 22); __PYX_ERR(0, 862, __pyx_L3_error)\n        }\n        CYTHON_FALLTHROUGH;\n        case 23:\n        if (likely((values[23] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_TILING10_1_1_2)) != 0)) kw_args--;\n        else {\n          __Pyx_RaiseArgtupleInvalid(\"__init__\", 1, 51, 51, 23); __PYX_ERR(0, 862, __pyx_L3_error)\n        }\n        CYTHON_FALLTHROUGH;\n        case 24:\n        if (likely((values[24] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_TILING10_1_2)) != 0)) kw_args--;\n        else {\n          __Pyx_RaiseArgtupleInvalid(\"__init__\", 1, 51, 51, 24); __PYX_ERR(0, 862, __pyx_L3_error)\n        }\n        CYTHON_FALLTHROUGH;\n        case 25:\n        if (likely((values[25] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_TILING10_2)) != 0)) kw_args--;\n        else {\n          __Pyx_RaiseArgtupleInvalid(\"__init__\", 1, 51, 51, 25); __PYX_ERR(0, 862, __pyx_L3_error)\n        }\n        CYTHON_FALLTHROUGH;\n        case 26:\n        if (likely((values[26] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_TILING10_2_2)) != 0)) kw_args--;\n        else {\n          __Pyx_RaiseArgtupleInvalid(\"__init__\", 1, 51, 51, 26); __PYX_ERR(0, 862, __pyx_L3_error)\n        }\n        CYTHON_FALLTHROUGH;\n        case 27:\n        if (likely((values[27] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_TILING11)) != 0)) kw_args--;\n        else {\n          __Pyx_RaiseArgtupleInvalid(\"__init__\", 1, 51, 51, 27); __PYX_ERR(0, 862, __pyx_L3_error)\n        }\n        CYTHON_FALLTHROUGH;\n        case 28:\n        if (likely((values[28] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_TILING12_1_1)) != 0)) kw_args--;\n        else {\n          __Pyx_RaiseArgtupleInvalid(\"__init__\", 1, 51, 51, 28); __PYX_ERR(0, 862, __pyx_L3_error)\n        }\n        CYTHON_FALLTHROUGH;\n        case 29:\n        if (likely((values[29] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_TILING12_1_1_2)) != 0)) kw_args--;\n        else {\n          __Pyx_RaiseArgtupleInvalid(\"__init__\", 1, 51, 51, 29); __PYX_ERR(0, 862, __pyx_L3_error)\n        }\n        CYTHON_FALLTHROUGH;\n        case 30:\n        if (likely((values[30] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_TILING12_1_2)) != 0)) kw_args--;\n        else {\n          __Pyx_RaiseArgtupleInvalid(\"__init__\", 1, 51, 51, 30); __PYX_ERR(0, 862, __pyx_L3_error)\n        }\n        CYTHON_FALLTHROUGH;\n        case 31:\n        if (likely((values[31] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_TILING12_2)) != 0)) kw_args--;\n        else {\n          __Pyx_RaiseArgtupleInvalid(\"__init__\", 1, 51, 51, 31); __PYX_ERR(0, 862, __pyx_L3_error)\n        }\n        CYTHON_FALLTHROUGH;\n        case 32:\n        if (likely((values[32] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_TILING12_2_2)) != 0)) kw_args--;\n        else {\n          __Pyx_RaiseArgtupleInvalid(\"__init__\", 1, 51, 51, 32); __PYX_ERR(0, 862, __pyx_L3_error)\n        }\n        CYTHON_FALLTHROUGH;\n        case 33:\n        if (likely((values[33] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_TILING13_1)) != 0)) kw_args--;\n        else {\n          __Pyx_RaiseArgtupleInvalid(\"__init__\", 1, 51, 51, 33); __PYX_ERR(0, 862, __pyx_L3_error)\n        }\n        CYTHON_FALLTHROUGH;\n        case 34:\n        if (likely((values[34] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_TILING13_1_2)) != 0)) kw_args--;\n        else {\n          __Pyx_RaiseArgtupleInvalid(\"__init__\", 1, 51, 51, 34); __PYX_ERR(0, 862, __pyx_L3_error)\n        }\n        CYTHON_FALLTHROUGH;\n        case 35:\n        if (likely((values[35] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_TILING13_2)) != 0)) kw_args--;\n        else {\n          __Pyx_RaiseArgtupleInvalid(\"__init__\", 1, 51, 51, 35); __PYX_ERR(0, 862, __pyx_L3_error)\n        }\n        CYTHON_FALLTHROUGH;\n        case 36:\n        if (likely((values[36] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_TILING13_2_2)) != 0)) kw_args--;\n        else {\n          __Pyx_RaiseArgtupleInvalid(\"__init__\", 1, 51, 51, 36); __PYX_ERR(0, 862, __pyx_L3_error)\n        }\n        CYTHON_FALLTHROUGH;\n        case 37:\n        if (likely((values[37] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_TILING13_3)) != 0)) kw_args--;\n        else {\n          __Pyx_RaiseArgtupleInvalid(\"__init__\", 1, 51, 51, 37); __PYX_ERR(0, 862, __pyx_L3_error)\n        }\n        CYTHON_FALLTHROUGH;\n        case 38:\n        if (likely((values[38] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_TILING13_3_2)) != 0)) kw_args--;\n        else {\n          __Pyx_RaiseArgtupleInvalid(\"__init__\", 1, 51, 51, 38); __PYX_ERR(0, 862, __pyx_L3_error)\n        }\n        CYTHON_FALLTHROUGH;\n        case 39:\n        if (likely((values[39] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_TILING13_4)) != 0)) kw_args--;\n        else {\n          __Pyx_RaiseArgtupleInvalid(\"__init__\", 1, 51, 51, 39); __PYX_ERR(0, 862, __pyx_L3_error)\n        }\n        CYTHON_FALLTHROUGH;\n        case 40:\n        if (likely((values[40] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_TILING13_5_1)) != 0)) kw_args--;\n        else {\n          __Pyx_RaiseArgtupleInvalid(\"__init__\", 1, 51, 51, 40); __PYX_ERR(0, 862, __pyx_L3_error)\n        }\n        CYTHON_FALLTHROUGH;\n        case 41:\n        if (likely((values[41] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_TILING13_5_2)) != 0)) kw_args--;\n        else {\n          __Pyx_RaiseArgtupleInvalid(\"__init__\", 1, 51, 51, 41); __PYX_ERR(0, 862, __pyx_L3_error)\n        }\n        CYTHON_FALLTHROUGH;\n        case 42:\n        if (likely((values[42] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_TILING14)) != 0)) kw_args--;\n        else {\n          __Pyx_RaiseArgtupleInvalid(\"__init__\", 1, 51, 51, 42); __PYX_ERR(0, 862, __pyx_L3_error)\n        }\n        CYTHON_FALLTHROUGH;\n        case 43:\n        if (likely((values[43] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_TEST3)) != 0)) kw_args--;\n        else {\n          __Pyx_RaiseArgtupleInvalid(\"__init__\", 1, 51, 51, 43); __PYX_ERR(0, 862, __pyx_L3_error)\n        }\n        CYTHON_FALLTHROUGH;\n        case 44:\n        if (likely((values[44] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_TEST4)) != 0)) kw_args--;\n        else {\n          __Pyx_RaiseArgtupleInvalid(\"__init__\", 1, 51, 51, 44); __PYX_ERR(0, 862, __pyx_L3_error)\n        }\n        CYTHON_FALLTHROUGH;\n        case 45:\n        if (likely((values[45] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_TEST6)) != 0)) kw_args--;\n        else {\n          __Pyx_RaiseArgtupleInvalid(\"__init__\", 1, 51, 51, 45); __PYX_ERR(0, 862, __pyx_L3_error)\n        }\n        CYTHON_FALLTHROUGH;\n        case 46:\n        if (likely((values[46] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_TEST7)) != 0)) kw_args--;\n        else {\n          __Pyx_RaiseArgtupleInvalid(\"__init__\", 1, 51, 51, 46); __PYX_ERR(0, 862, __pyx_L3_error)\n        }\n        CYTHON_FALLTHROUGH;\n        case 47:\n        if (likely((values[47] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_TEST10)) != 0)) kw_args--;\n        else {\n          __Pyx_RaiseArgtupleInvalid(\"__init__\", 1, 51, 51, 47); __PYX_ERR(0, 862, __pyx_L3_error)\n        }\n        CYTHON_FALLTHROUGH;\n        case 48:\n        if (likely((values[48] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_TEST12)) != 0)) kw_args--;\n        else {\n          __Pyx_RaiseArgtupleInvalid(\"__init__\", 1, 51, 51, 48); __PYX_ERR(0, 862, __pyx_L3_error)\n        }\n        CYTHON_FALLTHROUGH;\n        case 49:\n        if (likely((values[49] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_TEST13)) != 0)) kw_args--;\n        else {\n          __Pyx_RaiseArgtupleInvalid(\"__init__\", 1, 51, 51, 49); __PYX_ERR(0, 862, __pyx_L3_error)\n        }\n        CYTHON_FALLTHROUGH;\n        case 50:\n        if (likely((values[50] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_SUBCONFIG13)) != 0)) kw_args--;\n        else {\n          __Pyx_RaiseArgtupleInvalid(\"__init__\", 1, 51, 51, 50); __PYX_ERR(0, 862, __pyx_L3_error)\n        }\n      }\n      if (unlikely(kw_args > 0)) {\n        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, \"__init__\") < 0)) __PYX_ERR(0, 862, __pyx_L3_error)\n      }\n    } else if (PyTuple_GET_SIZE(__pyx_args) != 51) {\n      goto __pyx_L5_argtuple_error;\n    } else {\n      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);\n      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);\n      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);\n      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);\n      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);\n      values[5] = PyTuple_GET_ITEM(__pyx_args, 5);\n      values[6] = PyTuple_GET_ITEM(__pyx_args, 6);\n      values[7] = PyTuple_GET_ITEM(__pyx_args, 7);\n      values[8] = PyTuple_GET_ITEM(__pyx_args, 8);\n      values[9] = PyTuple_GET_ITEM(__pyx_args, 9);\n      values[10] = PyTuple_GET_ITEM(__pyx_args, 10);\n      values[11] = PyTuple_GET_ITEM(__pyx_args, 11);\n      values[12] = PyTuple_GET_ITEM(__pyx_args, 12);\n      values[13] = PyTuple_GET_ITEM(__pyx_args, 13);\n      values[14] = PyTuple_GET_ITEM(__pyx_args, 14);\n      values[15] = PyTuple_GET_ITEM(__pyx_args, 15);\n      values[16] = PyTuple_GET_ITEM(__pyx_args, 16);\n      values[17] = PyTuple_GET_ITEM(__pyx_args, 17);\n      values[18] = PyTuple_GET_ITEM(__pyx_args, 18);\n      values[19] = PyTuple_GET_ITEM(__pyx_args, 19);\n      values[20] = PyTuple_GET_ITEM(__pyx_args, 20);\n      values[21] = PyTuple_GET_ITEM(__pyx_args, 21);\n      values[22] = PyTuple_GET_ITEM(__pyx_args, 22);\n      values[23] = PyTuple_GET_ITEM(__pyx_args, 23);\n      values[24] = PyTuple_GET_ITEM(__pyx_args, 24);\n      values[25] = PyTuple_GET_ITEM(__pyx_args, 25);\n      values[26] = PyTuple_GET_ITEM(__pyx_args, 26);\n      values[27] = PyTuple_GET_ITEM(__pyx_args, 27);\n      values[28] = PyTuple_GET_ITEM(__pyx_args, 28);\n      values[29] = PyTuple_GET_ITEM(__pyx_args, 29);\n      values[30] = PyTuple_GET_ITEM(__pyx_args, 30);\n      values[31] = PyTuple_GET_ITEM(__pyx_args, 31);\n      values[32] = PyTuple_GET_ITEM(__pyx_args, 32);\n      values[33] = PyTuple_GET_ITEM(__pyx_args, 33);\n      values[34] = PyTuple_GET_ITEM(__pyx_args, 34);\n      values[35] = PyTuple_GET_ITEM(__pyx_args, 35);\n      values[36] = PyTuple_GET_ITEM(__pyx_args, 36);\n      values[37] = PyTuple_GET_ITEM(__pyx_args, 37);\n      values[38] = PyTuple_GET_ITEM(__pyx_args, 38);\n      values[39] = PyTuple_GET_ITEM(__pyx_args, 39);\n      values[40] = PyTuple_GET_ITEM(__pyx_args, 40);\n      values[41] = PyTuple_GET_ITEM(__pyx_args, 41);\n      values[42] = PyTuple_GET_ITEM(__pyx_args, 42);\n      values[43] = PyTuple_GET_ITEM(__pyx_args, 43);\n      values[44] = PyTuple_GET_ITEM(__pyx_args, 44);\n      values[45] = PyTuple_GET_ITEM(__pyx_args, 45);\n      values[46] = PyTuple_GET_ITEM(__pyx_args, 46);\n      values[47] = PyTuple_GET_ITEM(__pyx_args, 47);\n      values[48] = PyTuple_GET_ITEM(__pyx_args, 48);\n      values[49] = PyTuple_GET_ITEM(__pyx_args, 49);\n      values[50] = PyTuple_GET_ITEM(__pyx_args, 50);\n    }\n    __pyx_v_EDGESRELX = values[0];\n    __pyx_v_EDGESRELY = values[1];\n    __pyx_v_EDGESRELZ = values[2];\n    __pyx_v_CASESCLASSIC = values[3];\n    __pyx_v_CASES = values[4];\n    __pyx_v_TILING1 = values[5];\n    __pyx_v_TILING2 = values[6];\n    __pyx_v_TILING3_1 = values[7];\n    __pyx_v_TILING3_2 = values[8];\n    __pyx_v_TILING4_1 = values[9];\n    __pyx_v_TILING4_2 = values[10];\n    __pyx_v_TILING5 = values[11];\n    __pyx_v_TILING6_1_1 = values[12];\n    __pyx_v_TILING6_1_2 = values[13];\n    __pyx_v_TILING6_2 = values[14];\n    __pyx_v_TILING7_1 = values[15];\n    __pyx_v_TILING7_2 = values[16];\n    __pyx_v_TILING7_3 = values[17];\n    __pyx_v_TILING7_4_1 = values[18];\n    __pyx_v_TILING7_4_2 = values[19];\n    __pyx_v_TILING8 = values[20];\n    __pyx_v_TILING9 = values[21];\n    __pyx_v_TILING10_1_1 = values[22];\n    __pyx_v_TILING10_1_1_ = values[23];\n    __pyx_v_TILING10_1_2 = values[24];\n    __pyx_v_TILING10_2 = values[25];\n    __pyx_v_TILING10_2_ = values[26];\n    __pyx_v_TILING11 = values[27];\n    __pyx_v_TILING12_1_1 = values[28];\n    __pyx_v_TILING12_1_1_ = values[29];\n    __pyx_v_TILING12_1_2 = values[30];\n    __pyx_v_TILING12_2 = values[31];\n    __pyx_v_TILING12_2_ = values[32];\n    __pyx_v_TILING13_1 = values[33];\n    __pyx_v_TILING13_1_ = values[34];\n    __pyx_v_TILING13_2 = values[35];\n    __pyx_v_TILING13_2_ = values[36];\n    __pyx_v_TILING13_3 = values[37];\n    __pyx_v_TILING13_3_ = values[38];\n    __pyx_v_TILING13_4 = values[39];\n    __pyx_v_TILING13_5_1 = values[40];\n    __pyx_v_TILING13_5_2 = values[41];\n    __pyx_v_TILING14 = values[42];\n    __pyx_v_TEST3 = values[43];\n    __pyx_v_TEST4 = values[44];\n    __pyx_v_TEST6 = values[45];\n    __pyx_v_TEST7 = values[46];\n    __pyx_v_TEST10 = values[47];\n    __pyx_v_TEST12 = values[48];\n    __pyx_v_TEST13 = values[49];\n    __pyx_v_SUBCONFIG13 = values[50];\n  }\n  goto __pyx_L4_argument_unpacking_done;\n  __pyx_L5_argtuple_error:;\n  __Pyx_RaiseArgtupleInvalid(\"__init__\", 1, 51, 51, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 862, __pyx_L3_error)\n  __pyx_L3_error:;\n  __Pyx_AddTraceback(\"_marching_cubes_lewiner_cy.LutProvider.__init__\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n  __Pyx_RefNannyFinishContext();\n  return -1;\n  __pyx_L4_argument_unpacking_done:;\n  __pyx_r = __pyx_pf_26_marching_cubes_lewiner_cy_11LutProvider___init__(((struct __pyx_obj_26_marching_cubes_lewiner_cy_LutProvider *)__pyx_v_self), __pyx_v_EDGESRELX, __pyx_v_EDGESRELY, __pyx_v_EDGESRELZ, __pyx_v_CASESCLASSIC, __pyx_v_CASES, __pyx_v_TILING1, __pyx_v_TILING2, __pyx_v_TILING3_1, __pyx_v_TILING3_2, __pyx_v_TILING4_1, __pyx_v_TILING4_2, __pyx_v_TILING5, __pyx_v_TILING6_1_1, __pyx_v_TILING6_1_2, __pyx_v_TILING6_2, __pyx_v_TILING7_1, __pyx_v_TILING7_2, __pyx_v_TILING7_3, __pyx_v_TILING7_4_1, __pyx_v_TILING7_4_2, __pyx_v_TILING8, __pyx_v_TILING9, __pyx_v_TILING10_1_1, __pyx_v_TILING10_1_1_, __pyx_v_TILING10_1_2, __pyx_v_TILING10_2, __pyx_v_TILING10_2_, __pyx_v_TILING11, __pyx_v_TILING12_1_1, __pyx_v_TILING12_1_1_, __pyx_v_TILING12_1_2, __pyx_v_TILING12_2, __pyx_v_TILING12_2_, __pyx_v_TILING13_1, __pyx_v_TILING13_1_, __pyx_v_TILING13_2, __pyx_v_TILING13_2_, __pyx_v_TILING13_3, __pyx_v_TILING13_3_, __pyx_v_TILING13_4, __pyx_v_TILING13_5_1, __pyx_v_TILING13_5_2, __pyx_v_TILING14, __pyx_v_TEST3, __pyx_v_TEST4, __pyx_v_TEST6, __pyx_v_TEST7, __pyx_v_TEST10, __pyx_v_TEST12, __pyx_v_TEST13, __pyx_v_SUBCONFIG13);\n\n  /* function exit code */\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\nstatic int __pyx_pf_26_marching_cubes_lewiner_cy_11LutProvider___init__(struct __pyx_obj_26_marching_cubes_lewiner_cy_LutProvider *__pyx_v_self, PyObject *__pyx_v_EDGESRELX, PyObject *__pyx_v_EDGESRELY, PyObject *__pyx_v_EDGESRELZ, PyObject *__pyx_v_CASESCLASSIC, PyObject *__pyx_v_CASES, PyObject *__pyx_v_TILING1, PyObject *__pyx_v_TILING2, PyObject *__pyx_v_TILING3_1, PyObject *__pyx_v_TILING3_2, PyObject *__pyx_v_TILING4_1, PyObject *__pyx_v_TILING4_2, PyObject *__pyx_v_TILING5, PyObject *__pyx_v_TILING6_1_1, PyObject *__pyx_v_TILING6_1_2, PyObject *__pyx_v_TILING6_2, PyObject *__pyx_v_TILING7_1, PyObject *__pyx_v_TILING7_2, PyObject *__pyx_v_TILING7_3, PyObject *__pyx_v_TILING7_4_1, PyObject *__pyx_v_TILING7_4_2, PyObject *__pyx_v_TILING8, PyObject *__pyx_v_TILING9, PyObject *__pyx_v_TILING10_1_1, PyObject *__pyx_v_TILING10_1_1_, PyObject *__pyx_v_TILING10_1_2, PyObject *__pyx_v_TILING10_2, PyObject *__pyx_v_TILING10_2_, PyObject *__pyx_v_TILING11, PyObject *__pyx_v_TILING12_1_1, PyObject *__pyx_v_TILING12_1_1_, PyObject *__pyx_v_TILING12_1_2, PyObject *__pyx_v_TILING12_2, PyObject *__pyx_v_TILING12_2_, PyObject *__pyx_v_TILING13_1, PyObject *__pyx_v_TILING13_1_, PyObject *__pyx_v_TILING13_2, PyObject *__pyx_v_TILING13_2_, PyObject *__pyx_v_TILING13_3, PyObject *__pyx_v_TILING13_3_, PyObject *__pyx_v_TILING13_4, PyObject *__pyx_v_TILING13_5_1, PyObject *__pyx_v_TILING13_5_2, PyObject *__pyx_v_TILING14, PyObject *__pyx_v_TEST3, PyObject *__pyx_v_TEST4, PyObject *__pyx_v_TEST6, PyObject *__pyx_v_TEST7, PyObject *__pyx_v_TEST10, PyObject *__pyx_v_TEST12, PyObject *__pyx_v_TEST13, PyObject *__pyx_v_SUBCONFIG13) {\n  int __pyx_r;\n  __Pyx_RefNannyDeclarations\n  PyObject *__pyx_t_1 = NULL;\n  int __pyx_lineno = 0;\n  const char *__pyx_filename = NULL;\n  int __pyx_clineno = 0;\n  __Pyx_RefNannySetupContext(\"__init__\", 0);\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":877\n *             ):\n * \n *         self.EDGESRELX = Lut(EDGESRELX)             # <<<<<<<<<<<<<<\n *         self.EDGESRELY = Lut(EDGESRELY)\n *         self.EDGESRELZ = Lut(EDGESRELZ)\n */\n  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_26_marching_cubes_lewiner_cy_Lut), __pyx_v_EDGESRELX); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 877, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_1);\n  __Pyx_GOTREF(__pyx_v_self->EDGESRELX);\n  __Pyx_DECREF(((PyObject *)__pyx_v_self->EDGESRELX));\n  __pyx_v_self->EDGESRELX = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1);\n  __pyx_t_1 = 0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":878\n * \n *         self.EDGESRELX = Lut(EDGESRELX)\n *         self.EDGESRELY = Lut(EDGESRELY)             # <<<<<<<<<<<<<<\n *         self.EDGESRELZ = Lut(EDGESRELZ)\n * \n */\n  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_26_marching_cubes_lewiner_cy_Lut), __pyx_v_EDGESRELY); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 878, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_1);\n  __Pyx_GOTREF(__pyx_v_self->EDGESRELY);\n  __Pyx_DECREF(((PyObject *)__pyx_v_self->EDGESRELY));\n  __pyx_v_self->EDGESRELY = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1);\n  __pyx_t_1 = 0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":879\n *         self.EDGESRELX = Lut(EDGESRELX)\n *         self.EDGESRELY = Lut(EDGESRELY)\n *         self.EDGESRELZ = Lut(EDGESRELZ)             # <<<<<<<<<<<<<<\n * \n *         self.CASESCLASSIC = Lut(CASESCLASSIC)\n */\n  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_26_marching_cubes_lewiner_cy_Lut), __pyx_v_EDGESRELZ); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 879, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_1);\n  __Pyx_GOTREF(__pyx_v_self->EDGESRELZ);\n  __Pyx_DECREF(((PyObject *)__pyx_v_self->EDGESRELZ));\n  __pyx_v_self->EDGESRELZ = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1);\n  __pyx_t_1 = 0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":881\n *         self.EDGESRELZ = Lut(EDGESRELZ)\n * \n *         self.CASESCLASSIC = Lut(CASESCLASSIC)             # <<<<<<<<<<<<<<\n *         self.CASES = Lut(CASES)\n * \n */\n  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_26_marching_cubes_lewiner_cy_Lut), __pyx_v_CASESCLASSIC); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 881, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_1);\n  __Pyx_GOTREF(__pyx_v_self->CASESCLASSIC);\n  __Pyx_DECREF(((PyObject *)__pyx_v_self->CASESCLASSIC));\n  __pyx_v_self->CASESCLASSIC = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1);\n  __pyx_t_1 = 0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":882\n * \n *         self.CASESCLASSIC = Lut(CASESCLASSIC)\n *         self.CASES = Lut(CASES)             # <<<<<<<<<<<<<<\n * \n *         self.TILING1 = Lut(TILING1)\n */\n  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_26_marching_cubes_lewiner_cy_Lut), __pyx_v_CASES); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 882, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_1);\n  __Pyx_GOTREF(__pyx_v_self->CASES);\n  __Pyx_DECREF(((PyObject *)__pyx_v_self->CASES));\n  __pyx_v_self->CASES = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1);\n  __pyx_t_1 = 0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":884\n *         self.CASES = Lut(CASES)\n * \n *         self.TILING1 = Lut(TILING1)             # <<<<<<<<<<<<<<\n *         self.TILING2 = Lut(TILING2)\n *         self.TILING3_1 = Lut(TILING3_1)\n */\n  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_26_marching_cubes_lewiner_cy_Lut), __pyx_v_TILING1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 884, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_1);\n  __Pyx_GOTREF(__pyx_v_self->TILING1);\n  __Pyx_DECREF(((PyObject *)__pyx_v_self->TILING1));\n  __pyx_v_self->TILING1 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1);\n  __pyx_t_1 = 0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":885\n * \n *         self.TILING1 = Lut(TILING1)\n *         self.TILING2 = Lut(TILING2)             # <<<<<<<<<<<<<<\n *         self.TILING3_1 = Lut(TILING3_1)\n *         self.TILING3_2 = Lut(TILING3_2)\n */\n  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_26_marching_cubes_lewiner_cy_Lut), __pyx_v_TILING2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 885, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_1);\n  __Pyx_GOTREF(__pyx_v_self->TILING2);\n  __Pyx_DECREF(((PyObject *)__pyx_v_self->TILING2));\n  __pyx_v_self->TILING2 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1);\n  __pyx_t_1 = 0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":886\n *         self.TILING1 = Lut(TILING1)\n *         self.TILING2 = Lut(TILING2)\n *         self.TILING3_1 = Lut(TILING3_1)             # <<<<<<<<<<<<<<\n *         self.TILING3_2 = Lut(TILING3_2)\n *         self.TILING4_1 = Lut(TILING4_1)\n */\n  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_26_marching_cubes_lewiner_cy_Lut), __pyx_v_TILING3_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 886, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_1);\n  __Pyx_GOTREF(__pyx_v_self->TILING3_1);\n  __Pyx_DECREF(((PyObject *)__pyx_v_self->TILING3_1));\n  __pyx_v_self->TILING3_1 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1);\n  __pyx_t_1 = 0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":887\n *         self.TILING2 = Lut(TILING2)\n *         self.TILING3_1 = Lut(TILING3_1)\n *         self.TILING3_2 = Lut(TILING3_2)             # <<<<<<<<<<<<<<\n *         self.TILING4_1 = Lut(TILING4_1)\n *         self.TILING4_2 = Lut(TILING4_2)\n */\n  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_26_marching_cubes_lewiner_cy_Lut), __pyx_v_TILING3_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 887, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_1);\n  __Pyx_GOTREF(__pyx_v_self->TILING3_2);\n  __Pyx_DECREF(((PyObject *)__pyx_v_self->TILING3_2));\n  __pyx_v_self->TILING3_2 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1);\n  __pyx_t_1 = 0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":888\n *         self.TILING3_1 = Lut(TILING3_1)\n *         self.TILING3_2 = Lut(TILING3_2)\n *         self.TILING4_1 = Lut(TILING4_1)             # <<<<<<<<<<<<<<\n *         self.TILING4_2 = Lut(TILING4_2)\n *         self.TILING5 = Lut(TILING5)\n */\n  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_26_marching_cubes_lewiner_cy_Lut), __pyx_v_TILING4_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 888, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_1);\n  __Pyx_GOTREF(__pyx_v_self->TILING4_1);\n  __Pyx_DECREF(((PyObject *)__pyx_v_self->TILING4_1));\n  __pyx_v_self->TILING4_1 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1);\n  __pyx_t_1 = 0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":889\n *         self.TILING3_2 = Lut(TILING3_2)\n *         self.TILING4_1 = Lut(TILING4_1)\n *         self.TILING4_2 = Lut(TILING4_2)             # <<<<<<<<<<<<<<\n *         self.TILING5 = Lut(TILING5)\n *         self.TILING6_1_1 = Lut(TILING6_1_1)\n */\n  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_26_marching_cubes_lewiner_cy_Lut), __pyx_v_TILING4_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 889, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_1);\n  __Pyx_GOTREF(__pyx_v_self->TILING4_2);\n  __Pyx_DECREF(((PyObject *)__pyx_v_self->TILING4_2));\n  __pyx_v_self->TILING4_2 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1);\n  __pyx_t_1 = 0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":890\n *         self.TILING4_1 = Lut(TILING4_1)\n *         self.TILING4_2 = Lut(TILING4_2)\n *         self.TILING5 = Lut(TILING5)             # <<<<<<<<<<<<<<\n *         self.TILING6_1_1 = Lut(TILING6_1_1)\n *         self.TILING6_1_2 = Lut(TILING6_1_2)\n */\n  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_26_marching_cubes_lewiner_cy_Lut), __pyx_v_TILING5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 890, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_1);\n  __Pyx_GOTREF(__pyx_v_self->TILING5);\n  __Pyx_DECREF(((PyObject *)__pyx_v_self->TILING5));\n  __pyx_v_self->TILING5 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1);\n  __pyx_t_1 = 0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":891\n *         self.TILING4_2 = Lut(TILING4_2)\n *         self.TILING5 = Lut(TILING5)\n *         self.TILING6_1_1 = Lut(TILING6_1_1)             # <<<<<<<<<<<<<<\n *         self.TILING6_1_2 = Lut(TILING6_1_2)\n *         self.TILING6_2 = Lut(TILING6_2)\n */\n  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_26_marching_cubes_lewiner_cy_Lut), __pyx_v_TILING6_1_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 891, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_1);\n  __Pyx_GOTREF(__pyx_v_self->TILING6_1_1);\n  __Pyx_DECREF(((PyObject *)__pyx_v_self->TILING6_1_1));\n  __pyx_v_self->TILING6_1_1 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1);\n  __pyx_t_1 = 0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":892\n *         self.TILING5 = Lut(TILING5)\n *         self.TILING6_1_1 = Lut(TILING6_1_1)\n *         self.TILING6_1_2 = Lut(TILING6_1_2)             # <<<<<<<<<<<<<<\n *         self.TILING6_2 = Lut(TILING6_2)\n *         self.TILING7_1 = Lut(TILING7_1)\n */\n  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_26_marching_cubes_lewiner_cy_Lut), __pyx_v_TILING6_1_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 892, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_1);\n  __Pyx_GOTREF(__pyx_v_self->TILING6_1_2);\n  __Pyx_DECREF(((PyObject *)__pyx_v_self->TILING6_1_2));\n  __pyx_v_self->TILING6_1_2 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1);\n  __pyx_t_1 = 0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":893\n *         self.TILING6_1_1 = Lut(TILING6_1_1)\n *         self.TILING6_1_2 = Lut(TILING6_1_2)\n *         self.TILING6_2 = Lut(TILING6_2)             # <<<<<<<<<<<<<<\n *         self.TILING7_1 = Lut(TILING7_1)\n *         self.TILING7_2 = Lut(TILING7_2)\n */\n  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_26_marching_cubes_lewiner_cy_Lut), __pyx_v_TILING6_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 893, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_1);\n  __Pyx_GOTREF(__pyx_v_self->TILING6_2);\n  __Pyx_DECREF(((PyObject *)__pyx_v_self->TILING6_2));\n  __pyx_v_self->TILING6_2 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1);\n  __pyx_t_1 = 0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":894\n *         self.TILING6_1_2 = Lut(TILING6_1_2)\n *         self.TILING6_2 = Lut(TILING6_2)\n *         self.TILING7_1 = Lut(TILING7_1)             # <<<<<<<<<<<<<<\n *         self.TILING7_2 = Lut(TILING7_2)\n *         self.TILING7_3 = Lut(TILING7_3)\n */\n  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_26_marching_cubes_lewiner_cy_Lut), __pyx_v_TILING7_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 894, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_1);\n  __Pyx_GOTREF(__pyx_v_self->TILING7_1);\n  __Pyx_DECREF(((PyObject *)__pyx_v_self->TILING7_1));\n  __pyx_v_self->TILING7_1 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1);\n  __pyx_t_1 = 0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":895\n *         self.TILING6_2 = Lut(TILING6_2)\n *         self.TILING7_1 = Lut(TILING7_1)\n *         self.TILING7_2 = Lut(TILING7_2)             # <<<<<<<<<<<<<<\n *         self.TILING7_3 = Lut(TILING7_3)\n *         self.TILING7_4_1 = Lut(TILING7_4_1)\n */\n  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_26_marching_cubes_lewiner_cy_Lut), __pyx_v_TILING7_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 895, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_1);\n  __Pyx_GOTREF(__pyx_v_self->TILING7_2);\n  __Pyx_DECREF(((PyObject *)__pyx_v_self->TILING7_2));\n  __pyx_v_self->TILING7_2 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1);\n  __pyx_t_1 = 0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":896\n *         self.TILING7_1 = Lut(TILING7_1)\n *         self.TILING7_2 = Lut(TILING7_2)\n *         self.TILING7_3 = Lut(TILING7_3)             # <<<<<<<<<<<<<<\n *         self.TILING7_4_1 = Lut(TILING7_4_1)\n *         self.TILING7_4_2 = Lut(TILING7_4_2)\n */\n  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_26_marching_cubes_lewiner_cy_Lut), __pyx_v_TILING7_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 896, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_1);\n  __Pyx_GOTREF(__pyx_v_self->TILING7_3);\n  __Pyx_DECREF(((PyObject *)__pyx_v_self->TILING7_3));\n  __pyx_v_self->TILING7_3 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1);\n  __pyx_t_1 = 0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":897\n *         self.TILING7_2 = Lut(TILING7_2)\n *         self.TILING7_3 = Lut(TILING7_3)\n *         self.TILING7_4_1 = Lut(TILING7_4_1)             # <<<<<<<<<<<<<<\n *         self.TILING7_4_2 = Lut(TILING7_4_2)\n *         self.TILING8 = Lut(TILING8)\n */\n  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_26_marching_cubes_lewiner_cy_Lut), __pyx_v_TILING7_4_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 897, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_1);\n  __Pyx_GOTREF(__pyx_v_self->TILING7_4_1);\n  __Pyx_DECREF(((PyObject *)__pyx_v_self->TILING7_4_1));\n  __pyx_v_self->TILING7_4_1 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1);\n  __pyx_t_1 = 0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":898\n *         self.TILING7_3 = Lut(TILING7_3)\n *         self.TILING7_4_1 = Lut(TILING7_4_1)\n *         self.TILING7_4_2 = Lut(TILING7_4_2)             # <<<<<<<<<<<<<<\n *         self.TILING8 = Lut(TILING8)\n *         self.TILING9 = Lut(TILING9)\n */\n  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_26_marching_cubes_lewiner_cy_Lut), __pyx_v_TILING7_4_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 898, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_1);\n  __Pyx_GOTREF(__pyx_v_self->TILING7_4_2);\n  __Pyx_DECREF(((PyObject *)__pyx_v_self->TILING7_4_2));\n  __pyx_v_self->TILING7_4_2 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1);\n  __pyx_t_1 = 0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":899\n *         self.TILING7_4_1 = Lut(TILING7_4_1)\n *         self.TILING7_4_2 = Lut(TILING7_4_2)\n *         self.TILING8 = Lut(TILING8)             # <<<<<<<<<<<<<<\n *         self.TILING9 = Lut(TILING9)\n *         self.TILING10_1_1 = Lut(TILING10_1_1)\n */\n  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_26_marching_cubes_lewiner_cy_Lut), __pyx_v_TILING8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 899, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_1);\n  __Pyx_GOTREF(__pyx_v_self->TILING8);\n  __Pyx_DECREF(((PyObject *)__pyx_v_self->TILING8));\n  __pyx_v_self->TILING8 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1);\n  __pyx_t_1 = 0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":900\n *         self.TILING7_4_2 = Lut(TILING7_4_2)\n *         self.TILING8 = Lut(TILING8)\n *         self.TILING9 = Lut(TILING9)             # <<<<<<<<<<<<<<\n *         self.TILING10_1_1 = Lut(TILING10_1_1)\n *         self.TILING10_1_1_ = Lut(TILING10_1_1_)\n */\n  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_26_marching_cubes_lewiner_cy_Lut), __pyx_v_TILING9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 900, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_1);\n  __Pyx_GOTREF(__pyx_v_self->TILING9);\n  __Pyx_DECREF(((PyObject *)__pyx_v_self->TILING9));\n  __pyx_v_self->TILING9 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1);\n  __pyx_t_1 = 0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":901\n *         self.TILING8 = Lut(TILING8)\n *         self.TILING9 = Lut(TILING9)\n *         self.TILING10_1_1 = Lut(TILING10_1_1)             # <<<<<<<<<<<<<<\n *         self.TILING10_1_1_ = Lut(TILING10_1_1_)\n *         self.TILING10_1_2 = Lut(TILING10_1_2)\n */\n  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_26_marching_cubes_lewiner_cy_Lut), __pyx_v_TILING10_1_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 901, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_1);\n  __Pyx_GOTREF(__pyx_v_self->TILING10_1_1);\n  __Pyx_DECREF(((PyObject *)__pyx_v_self->TILING10_1_1));\n  __pyx_v_self->TILING10_1_1 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1);\n  __pyx_t_1 = 0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":902\n *         self.TILING9 = Lut(TILING9)\n *         self.TILING10_1_1 = Lut(TILING10_1_1)\n *         self.TILING10_1_1_ = Lut(TILING10_1_1_)             # <<<<<<<<<<<<<<\n *         self.TILING10_1_2 = Lut(TILING10_1_2)\n *         self.TILING10_2 = Lut(TILING10_2)\n */\n  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_26_marching_cubes_lewiner_cy_Lut), __pyx_v_TILING10_1_1_); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 902, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_1);\n  __Pyx_GOTREF(__pyx_v_self->TILING10_1_1_);\n  __Pyx_DECREF(((PyObject *)__pyx_v_self->TILING10_1_1_));\n  __pyx_v_self->TILING10_1_1_ = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1);\n  __pyx_t_1 = 0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":903\n *         self.TILING10_1_1 = Lut(TILING10_1_1)\n *         self.TILING10_1_1_ = Lut(TILING10_1_1_)\n *         self.TILING10_1_2 = Lut(TILING10_1_2)             # <<<<<<<<<<<<<<\n *         self.TILING10_2 = Lut(TILING10_2)\n *         self.TILING10_2_ = Lut(TILING10_2_)\n */\n  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_26_marching_cubes_lewiner_cy_Lut), __pyx_v_TILING10_1_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 903, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_1);\n  __Pyx_GOTREF(__pyx_v_self->TILING10_1_2);\n  __Pyx_DECREF(((PyObject *)__pyx_v_self->TILING10_1_2));\n  __pyx_v_self->TILING10_1_2 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1);\n  __pyx_t_1 = 0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":904\n *         self.TILING10_1_1_ = Lut(TILING10_1_1_)\n *         self.TILING10_1_2 = Lut(TILING10_1_2)\n *         self.TILING10_2 = Lut(TILING10_2)             # <<<<<<<<<<<<<<\n *         self.TILING10_2_ = Lut(TILING10_2_)\n *         self.TILING11 = Lut(TILING11)\n */\n  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_26_marching_cubes_lewiner_cy_Lut), __pyx_v_TILING10_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 904, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_1);\n  __Pyx_GOTREF(__pyx_v_self->TILING10_2);\n  __Pyx_DECREF(((PyObject *)__pyx_v_self->TILING10_2));\n  __pyx_v_self->TILING10_2 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1);\n  __pyx_t_1 = 0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":905\n *         self.TILING10_1_2 = Lut(TILING10_1_2)\n *         self.TILING10_2 = Lut(TILING10_2)\n *         self.TILING10_2_ = Lut(TILING10_2_)             # <<<<<<<<<<<<<<\n *         self.TILING11 = Lut(TILING11)\n *         self.TILING12_1_1 = Lut(TILING12_1_1)\n */\n  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_26_marching_cubes_lewiner_cy_Lut), __pyx_v_TILING10_2_); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 905, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_1);\n  __Pyx_GOTREF(__pyx_v_self->TILING10_2_);\n  __Pyx_DECREF(((PyObject *)__pyx_v_self->TILING10_2_));\n  __pyx_v_self->TILING10_2_ = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1);\n  __pyx_t_1 = 0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":906\n *         self.TILING10_2 = Lut(TILING10_2)\n *         self.TILING10_2_ = Lut(TILING10_2_)\n *         self.TILING11 = Lut(TILING11)             # <<<<<<<<<<<<<<\n *         self.TILING12_1_1 = Lut(TILING12_1_1)\n *         self.TILING12_1_1_ = Lut(TILING12_1_1_)\n */\n  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_26_marching_cubes_lewiner_cy_Lut), __pyx_v_TILING11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 906, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_1);\n  __Pyx_GOTREF(__pyx_v_self->TILING11);\n  __Pyx_DECREF(((PyObject *)__pyx_v_self->TILING11));\n  __pyx_v_self->TILING11 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1);\n  __pyx_t_1 = 0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":907\n *         self.TILING10_2_ = Lut(TILING10_2_)\n *         self.TILING11 = Lut(TILING11)\n *         self.TILING12_1_1 = Lut(TILING12_1_1)             # <<<<<<<<<<<<<<\n *         self.TILING12_1_1_ = Lut(TILING12_1_1_)\n *         self.TILING12_1_2 = Lut(TILING12_1_2)\n */\n  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_26_marching_cubes_lewiner_cy_Lut), __pyx_v_TILING12_1_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 907, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_1);\n  __Pyx_GOTREF(__pyx_v_self->TILING12_1_1);\n  __Pyx_DECREF(((PyObject *)__pyx_v_self->TILING12_1_1));\n  __pyx_v_self->TILING12_1_1 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1);\n  __pyx_t_1 = 0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":908\n *         self.TILING11 = Lut(TILING11)\n *         self.TILING12_1_1 = Lut(TILING12_1_1)\n *         self.TILING12_1_1_ = Lut(TILING12_1_1_)             # <<<<<<<<<<<<<<\n *         self.TILING12_1_2 = Lut(TILING12_1_2)\n *         self.TILING12_2 = Lut(TILING12_2)\n */\n  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_26_marching_cubes_lewiner_cy_Lut), __pyx_v_TILING12_1_1_); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 908, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_1);\n  __Pyx_GOTREF(__pyx_v_self->TILING12_1_1_);\n  __Pyx_DECREF(((PyObject *)__pyx_v_self->TILING12_1_1_));\n  __pyx_v_self->TILING12_1_1_ = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1);\n  __pyx_t_1 = 0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":909\n *         self.TILING12_1_1 = Lut(TILING12_1_1)\n *         self.TILING12_1_1_ = Lut(TILING12_1_1_)\n *         self.TILING12_1_2 = Lut(TILING12_1_2)             # <<<<<<<<<<<<<<\n *         self.TILING12_2 = Lut(TILING12_2)\n *         self.TILING12_2_ = Lut(TILING12_2_)\n */\n  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_26_marching_cubes_lewiner_cy_Lut), __pyx_v_TILING12_1_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 909, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_1);\n  __Pyx_GOTREF(__pyx_v_self->TILING12_1_2);\n  __Pyx_DECREF(((PyObject *)__pyx_v_self->TILING12_1_2));\n  __pyx_v_self->TILING12_1_2 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1);\n  __pyx_t_1 = 0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":910\n *         self.TILING12_1_1_ = Lut(TILING12_1_1_)\n *         self.TILING12_1_2 = Lut(TILING12_1_2)\n *         self.TILING12_2 = Lut(TILING12_2)             # <<<<<<<<<<<<<<\n *         self.TILING12_2_ = Lut(TILING12_2_)\n *         self.TILING13_1 = Lut(TILING13_1)\n */\n  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_26_marching_cubes_lewiner_cy_Lut), __pyx_v_TILING12_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 910, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_1);\n  __Pyx_GOTREF(__pyx_v_self->TILING12_2);\n  __Pyx_DECREF(((PyObject *)__pyx_v_self->TILING12_2));\n  __pyx_v_self->TILING12_2 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1);\n  __pyx_t_1 = 0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":911\n *         self.TILING12_1_2 = Lut(TILING12_1_2)\n *         self.TILING12_2 = Lut(TILING12_2)\n *         self.TILING12_2_ = Lut(TILING12_2_)             # <<<<<<<<<<<<<<\n *         self.TILING13_1 = Lut(TILING13_1)\n *         self.TILING13_1_ = Lut(TILING13_1_)\n */\n  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_26_marching_cubes_lewiner_cy_Lut), __pyx_v_TILING12_2_); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 911, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_1);\n  __Pyx_GOTREF(__pyx_v_self->TILING12_2_);\n  __Pyx_DECREF(((PyObject *)__pyx_v_self->TILING12_2_));\n  __pyx_v_self->TILING12_2_ = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1);\n  __pyx_t_1 = 0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":912\n *         self.TILING12_2 = Lut(TILING12_2)\n *         self.TILING12_2_ = Lut(TILING12_2_)\n *         self.TILING13_1 = Lut(TILING13_1)             # <<<<<<<<<<<<<<\n *         self.TILING13_1_ = Lut(TILING13_1_)\n *         self.TILING13_2 = Lut(TILING13_2)\n */\n  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_26_marching_cubes_lewiner_cy_Lut), __pyx_v_TILING13_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 912, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_1);\n  __Pyx_GOTREF(__pyx_v_self->TILING13_1);\n  __Pyx_DECREF(((PyObject *)__pyx_v_self->TILING13_1));\n  __pyx_v_self->TILING13_1 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1);\n  __pyx_t_1 = 0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":913\n *         self.TILING12_2_ = Lut(TILING12_2_)\n *         self.TILING13_1 = Lut(TILING13_1)\n *         self.TILING13_1_ = Lut(TILING13_1_)             # <<<<<<<<<<<<<<\n *         self.TILING13_2 = Lut(TILING13_2)\n *         self.TILING13_2_ = Lut(TILING13_2_)\n */\n  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_26_marching_cubes_lewiner_cy_Lut), __pyx_v_TILING13_1_); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 913, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_1);\n  __Pyx_GOTREF(__pyx_v_self->TILING13_1_);\n  __Pyx_DECREF(((PyObject *)__pyx_v_self->TILING13_1_));\n  __pyx_v_self->TILING13_1_ = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1);\n  __pyx_t_1 = 0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":914\n *         self.TILING13_1 = Lut(TILING13_1)\n *         self.TILING13_1_ = Lut(TILING13_1_)\n *         self.TILING13_2 = Lut(TILING13_2)             # <<<<<<<<<<<<<<\n *         self.TILING13_2_ = Lut(TILING13_2_)\n *         self.TILING13_3 = Lut(TILING13_3)\n */\n  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_26_marching_cubes_lewiner_cy_Lut), __pyx_v_TILING13_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 914, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_1);\n  __Pyx_GOTREF(__pyx_v_self->TILING13_2);\n  __Pyx_DECREF(((PyObject *)__pyx_v_self->TILING13_2));\n  __pyx_v_self->TILING13_2 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1);\n  __pyx_t_1 = 0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":915\n *         self.TILING13_1_ = Lut(TILING13_1_)\n *         self.TILING13_2 = Lut(TILING13_2)\n *         self.TILING13_2_ = Lut(TILING13_2_)             # <<<<<<<<<<<<<<\n *         self.TILING13_3 = Lut(TILING13_3)\n *         self.TILING13_3_ = Lut(TILING13_3_)\n */\n  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_26_marching_cubes_lewiner_cy_Lut), __pyx_v_TILING13_2_); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 915, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_1);\n  __Pyx_GOTREF(__pyx_v_self->TILING13_2_);\n  __Pyx_DECREF(((PyObject *)__pyx_v_self->TILING13_2_));\n  __pyx_v_self->TILING13_2_ = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1);\n  __pyx_t_1 = 0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":916\n *         self.TILING13_2 = Lut(TILING13_2)\n *         self.TILING13_2_ = Lut(TILING13_2_)\n *         self.TILING13_3 = Lut(TILING13_3)             # <<<<<<<<<<<<<<\n *         self.TILING13_3_ = Lut(TILING13_3_)\n *         self.TILING13_4 = Lut(TILING13_4)\n */\n  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_26_marching_cubes_lewiner_cy_Lut), __pyx_v_TILING13_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 916, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_1);\n  __Pyx_GOTREF(__pyx_v_self->TILING13_3);\n  __Pyx_DECREF(((PyObject *)__pyx_v_self->TILING13_3));\n  __pyx_v_self->TILING13_3 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1);\n  __pyx_t_1 = 0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":917\n *         self.TILING13_2_ = Lut(TILING13_2_)\n *         self.TILING13_3 = Lut(TILING13_3)\n *         self.TILING13_3_ = Lut(TILING13_3_)             # <<<<<<<<<<<<<<\n *         self.TILING13_4 = Lut(TILING13_4)\n *         self.TILING13_5_1 = Lut(TILING13_5_1)\n */\n  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_26_marching_cubes_lewiner_cy_Lut), __pyx_v_TILING13_3_); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 917, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_1);\n  __Pyx_GOTREF(__pyx_v_self->TILING13_3_);\n  __Pyx_DECREF(((PyObject *)__pyx_v_self->TILING13_3_));\n  __pyx_v_self->TILING13_3_ = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1);\n  __pyx_t_1 = 0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":918\n *         self.TILING13_3 = Lut(TILING13_3)\n *         self.TILING13_3_ = Lut(TILING13_3_)\n *         self.TILING13_4 = Lut(TILING13_4)             # <<<<<<<<<<<<<<\n *         self.TILING13_5_1 = Lut(TILING13_5_1)\n *         self.TILING13_5_2 = Lut(TILING13_5_2)\n */\n  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_26_marching_cubes_lewiner_cy_Lut), __pyx_v_TILING13_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 918, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_1);\n  __Pyx_GOTREF(__pyx_v_self->TILING13_4);\n  __Pyx_DECREF(((PyObject *)__pyx_v_self->TILING13_4));\n  __pyx_v_self->TILING13_4 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1);\n  __pyx_t_1 = 0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":919\n *         self.TILING13_3_ = Lut(TILING13_3_)\n *         self.TILING13_4 = Lut(TILING13_4)\n *         self.TILING13_5_1 = Lut(TILING13_5_1)             # <<<<<<<<<<<<<<\n *         self.TILING13_5_2 = Lut(TILING13_5_2)\n *         self.TILING14 = Lut(TILING14)\n */\n  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_26_marching_cubes_lewiner_cy_Lut), __pyx_v_TILING13_5_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 919, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_1);\n  __Pyx_GOTREF(__pyx_v_self->TILING13_5_1);\n  __Pyx_DECREF(((PyObject *)__pyx_v_self->TILING13_5_1));\n  __pyx_v_self->TILING13_5_1 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1);\n  __pyx_t_1 = 0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":920\n *         self.TILING13_4 = Lut(TILING13_4)\n *         self.TILING13_5_1 = Lut(TILING13_5_1)\n *         self.TILING13_5_2 = Lut(TILING13_5_2)             # <<<<<<<<<<<<<<\n *         self.TILING14 = Lut(TILING14)\n * \n */\n  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_26_marching_cubes_lewiner_cy_Lut), __pyx_v_TILING13_5_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 920, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_1);\n  __Pyx_GOTREF(__pyx_v_self->TILING13_5_2);\n  __Pyx_DECREF(((PyObject *)__pyx_v_self->TILING13_5_2));\n  __pyx_v_self->TILING13_5_2 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1);\n  __pyx_t_1 = 0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":921\n *         self.TILING13_5_1 = Lut(TILING13_5_1)\n *         self.TILING13_5_2 = Lut(TILING13_5_2)\n *         self.TILING14 = Lut(TILING14)             # <<<<<<<<<<<<<<\n * \n *         self.TEST3 = Lut(TEST3)\n */\n  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_26_marching_cubes_lewiner_cy_Lut), __pyx_v_TILING14); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 921, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_1);\n  __Pyx_GOTREF(__pyx_v_self->TILING14);\n  __Pyx_DECREF(((PyObject *)__pyx_v_self->TILING14));\n  __pyx_v_self->TILING14 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1);\n  __pyx_t_1 = 0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":923\n *         self.TILING14 = Lut(TILING14)\n * \n *         self.TEST3 = Lut(TEST3)             # <<<<<<<<<<<<<<\n *         self.TEST4 = Lut(TEST4)\n *         self.TEST6 = Lut(TEST6)\n */\n  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_26_marching_cubes_lewiner_cy_Lut), __pyx_v_TEST3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 923, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_1);\n  __Pyx_GOTREF(__pyx_v_self->TEST3);\n  __Pyx_DECREF(((PyObject *)__pyx_v_self->TEST3));\n  __pyx_v_self->TEST3 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1);\n  __pyx_t_1 = 0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":924\n * \n *         self.TEST3 = Lut(TEST3)\n *         self.TEST4 = Lut(TEST4)             # <<<<<<<<<<<<<<\n *         self.TEST6 = Lut(TEST6)\n *         self.TEST7 = Lut(TEST7)\n */\n  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_26_marching_cubes_lewiner_cy_Lut), __pyx_v_TEST4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 924, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_1);\n  __Pyx_GOTREF(__pyx_v_self->TEST4);\n  __Pyx_DECREF(((PyObject *)__pyx_v_self->TEST4));\n  __pyx_v_self->TEST4 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1);\n  __pyx_t_1 = 0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":925\n *         self.TEST3 = Lut(TEST3)\n *         self.TEST4 = Lut(TEST4)\n *         self.TEST6 = Lut(TEST6)             # <<<<<<<<<<<<<<\n *         self.TEST7 = Lut(TEST7)\n *         self.TEST10 = Lut(TEST10)\n */\n  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_26_marching_cubes_lewiner_cy_Lut), __pyx_v_TEST6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 925, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_1);\n  __Pyx_GOTREF(__pyx_v_self->TEST6);\n  __Pyx_DECREF(((PyObject *)__pyx_v_self->TEST6));\n  __pyx_v_self->TEST6 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1);\n  __pyx_t_1 = 0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":926\n *         self.TEST4 = Lut(TEST4)\n *         self.TEST6 = Lut(TEST6)\n *         self.TEST7 = Lut(TEST7)             # <<<<<<<<<<<<<<\n *         self.TEST10 = Lut(TEST10)\n *         self.TEST12 = Lut(TEST12)\n */\n  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_26_marching_cubes_lewiner_cy_Lut), __pyx_v_TEST7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 926, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_1);\n  __Pyx_GOTREF(__pyx_v_self->TEST7);\n  __Pyx_DECREF(((PyObject *)__pyx_v_self->TEST7));\n  __pyx_v_self->TEST7 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1);\n  __pyx_t_1 = 0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":927\n *         self.TEST6 = Lut(TEST6)\n *         self.TEST7 = Lut(TEST7)\n *         self.TEST10 = Lut(TEST10)             # <<<<<<<<<<<<<<\n *         self.TEST12 = Lut(TEST12)\n *         self.TEST13 = Lut(TEST13)\n */\n  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_26_marching_cubes_lewiner_cy_Lut), __pyx_v_TEST10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 927, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_1);\n  __Pyx_GOTREF(__pyx_v_self->TEST10);\n  __Pyx_DECREF(((PyObject *)__pyx_v_self->TEST10));\n  __pyx_v_self->TEST10 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1);\n  __pyx_t_1 = 0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":928\n *         self.TEST7 = Lut(TEST7)\n *         self.TEST10 = Lut(TEST10)\n *         self.TEST12 = Lut(TEST12)             # <<<<<<<<<<<<<<\n *         self.TEST13 = Lut(TEST13)\n * \n */\n  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_26_marching_cubes_lewiner_cy_Lut), __pyx_v_TEST12); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 928, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_1);\n  __Pyx_GOTREF(__pyx_v_self->TEST12);\n  __Pyx_DECREF(((PyObject *)__pyx_v_self->TEST12));\n  __pyx_v_self->TEST12 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1);\n  __pyx_t_1 = 0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":929\n *         self.TEST10 = Lut(TEST10)\n *         self.TEST12 = Lut(TEST12)\n *         self.TEST13 = Lut(TEST13)             # <<<<<<<<<<<<<<\n * \n *         self.SUBCONFIG13 = Lut(SUBCONFIG13)\n */\n  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_26_marching_cubes_lewiner_cy_Lut), __pyx_v_TEST13); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 929, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_1);\n  __Pyx_GOTREF(__pyx_v_self->TEST13);\n  __Pyx_DECREF(((PyObject *)__pyx_v_self->TEST13));\n  __pyx_v_self->TEST13 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1);\n  __pyx_t_1 = 0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":931\n *         self.TEST13 = Lut(TEST13)\n * \n *         self.SUBCONFIG13 = Lut(SUBCONFIG13)             # <<<<<<<<<<<<<<\n * \n * def marching_cubes(float[:, :, :] im not None, double isovalue,\n */\n  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_26_marching_cubes_lewiner_cy_Lut), __pyx_v_SUBCONFIG13); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 931, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_1);\n  __Pyx_GOTREF(__pyx_v_self->SUBCONFIG13);\n  __Pyx_DECREF(((PyObject *)__pyx_v_self->SUBCONFIG13));\n  __pyx_v_self->SUBCONFIG13 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1);\n  __pyx_t_1 = 0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":862\n * \n * \n *     def __init__(self, EDGESRELX, EDGESRELY, EDGESRELZ, CASESCLASSIC, CASES,             # <<<<<<<<<<<<<<\n * \n *             TILING1, TILING2, TILING3_1, TILING3_2, TILING4_1, TILING4_2,\n */\n\n  /* function exit code */\n  __pyx_r = 0;\n  goto __pyx_L0;\n  __pyx_L1_error:;\n  __Pyx_XDECREF(__pyx_t_1);\n  __Pyx_AddTraceback(\"_marching_cubes_lewiner_cy.LutProvider.__init__\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n  __pyx_r = -1;\n  __pyx_L0:;\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\n/* \"(tree fragment)\":1\n * def __reduce_cython__(self):             # <<<<<<<<<<<<<<\n *     cdef tuple state\n *     cdef object _dict\n */\n\n/* Python wrapper */\nstatic PyObject *__pyx_pw_26_marching_cubes_lewiner_cy_11LutProvider_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/\nstatic PyObject *__pyx_pw_26_marching_cubes_lewiner_cy_11LutProvider_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {\n  PyObject *__pyx_r = 0;\n  __Pyx_RefNannyDeclarations\n  __Pyx_RefNannySetupContext(\"__reduce_cython__ (wrapper)\", 0);\n  __pyx_r = __pyx_pf_26_marching_cubes_lewiner_cy_11LutProvider_2__reduce_cython__(((struct __pyx_obj_26_marching_cubes_lewiner_cy_LutProvider *)__pyx_v_self));\n\n  /* function exit code */\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\nstatic PyObject *__pyx_pf_26_marching_cubes_lewiner_cy_11LutProvider_2__reduce_cython__(struct __pyx_obj_26_marching_cubes_lewiner_cy_LutProvider *__pyx_v_self) {\n  PyObject *__pyx_v_state = 0;\n  PyObject *__pyx_v__dict = 0;\n  int __pyx_v_use_setstate;\n  PyObject *__pyx_r = NULL;\n  __Pyx_RefNannyDeclarations\n  PyObject *__pyx_t_1 = NULL;\n  int __pyx_t_2;\n  int __pyx_t_3;\n  PyObject *__pyx_t_4 = NULL;\n  int __pyx_t_5;\n  PyObject *__pyx_t_6 = NULL;\n  int __pyx_lineno = 0;\n  const char *__pyx_filename = NULL;\n  int __pyx_clineno = 0;\n  __Pyx_RefNannySetupContext(\"__reduce_cython__\", 0);\n\n  /* \"(tree fragment)\":5\n *     cdef object _dict\n *     cdef bint use_setstate\n *     state = (self.CASES, self.CASESCLASSIC, self.EDGESRELX, self.EDGESRELY, self.EDGESRELZ, self.SUBCONFIG13, self.TEST10, self.TEST12, self.TEST13, self.TEST3, self.TEST4, self.TEST6, self.TEST7, self.TILING1, self.TILING10_1_1, self.TILING10_1_1_, self.TILING10_1_2, self.TILING10_2, self.TILING10_2_, self.TILING11, self.TILING12_1_1, self.TILING12_1_1_, self.TILING12_1_2, self.TILING12_2, self.TILING12_2_, self.TILING13_1, self.TILING13_1_, self.TILING13_2, self.TILING13_2_, self.TILING13_3, self.TILING13_3_, self.TILING13_4, self.TILING13_5_1, self.TILING13_5_2, self.TILING14, self.TILING2, self.TILING3_1, self.TILING3_2, self.TILING4_1, self.TILING4_2, self.TILING5, self.TILING6_1_1, self.TILING6_1_2, self.TILING6_2, self.TILING7_1, self.TILING7_2, self.TILING7_3, self.TILING7_4_1, self.TILING7_4_2, self.TILING8, self.TILING9)             # <<<<<<<<<<<<<<\n *     _dict = getattr(self, '__dict__', None)\n *     if _dict is not None:\n */\n  __pyx_t_1 = PyTuple_New(51); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __Pyx_INCREF(((PyObject *)__pyx_v_self->CASES));\n  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->CASES));\n  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->CASES));\n  __Pyx_INCREF(((PyObject *)__pyx_v_self->CASESCLASSIC));\n  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->CASESCLASSIC));\n  PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_self->CASESCLASSIC));\n  __Pyx_INCREF(((PyObject *)__pyx_v_self->EDGESRELX));\n  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->EDGESRELX));\n  PyTuple_SET_ITEM(__pyx_t_1, 2, ((PyObject *)__pyx_v_self->EDGESRELX));\n  __Pyx_INCREF(((PyObject *)__pyx_v_self->EDGESRELY));\n  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->EDGESRELY));\n  PyTuple_SET_ITEM(__pyx_t_1, 3, ((PyObject *)__pyx_v_self->EDGESRELY));\n  __Pyx_INCREF(((PyObject *)__pyx_v_self->EDGESRELZ));\n  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->EDGESRELZ));\n  PyTuple_SET_ITEM(__pyx_t_1, 4, ((PyObject *)__pyx_v_self->EDGESRELZ));\n  __Pyx_INCREF(((PyObject *)__pyx_v_self->SUBCONFIG13));\n  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->SUBCONFIG13));\n  PyTuple_SET_ITEM(__pyx_t_1, 5, ((PyObject *)__pyx_v_self->SUBCONFIG13));\n  __Pyx_INCREF(((PyObject *)__pyx_v_self->TEST10));\n  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->TEST10));\n  PyTuple_SET_ITEM(__pyx_t_1, 6, ((PyObject *)__pyx_v_self->TEST10));\n  __Pyx_INCREF(((PyObject *)__pyx_v_self->TEST12));\n  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->TEST12));\n  PyTuple_SET_ITEM(__pyx_t_1, 7, ((PyObject *)__pyx_v_self->TEST12));\n  __Pyx_INCREF(((PyObject *)__pyx_v_self->TEST13));\n  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->TEST13));\n  PyTuple_SET_ITEM(__pyx_t_1, 8, ((PyObject *)__pyx_v_self->TEST13));\n  __Pyx_INCREF(((PyObject *)__pyx_v_self->TEST3));\n  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->TEST3));\n  PyTuple_SET_ITEM(__pyx_t_1, 9, ((PyObject *)__pyx_v_self->TEST3));\n  __Pyx_INCREF(((PyObject *)__pyx_v_self->TEST4));\n  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->TEST4));\n  PyTuple_SET_ITEM(__pyx_t_1, 10, ((PyObject *)__pyx_v_self->TEST4));\n  __Pyx_INCREF(((PyObject *)__pyx_v_self->TEST6));\n  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->TEST6));\n  PyTuple_SET_ITEM(__pyx_t_1, 11, ((PyObject *)__pyx_v_self->TEST6));\n  __Pyx_INCREF(((PyObject *)__pyx_v_self->TEST7));\n  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->TEST7));\n  PyTuple_SET_ITEM(__pyx_t_1, 12, ((PyObject *)__pyx_v_self->TEST7));\n  __Pyx_INCREF(((PyObject *)__pyx_v_self->TILING1));\n  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->TILING1));\n  PyTuple_SET_ITEM(__pyx_t_1, 13, ((PyObject *)__pyx_v_self->TILING1));\n  __Pyx_INCREF(((PyObject *)__pyx_v_self->TILING10_1_1));\n  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->TILING10_1_1));\n  PyTuple_SET_ITEM(__pyx_t_1, 14, ((PyObject *)__pyx_v_self->TILING10_1_1));\n  __Pyx_INCREF(((PyObject *)__pyx_v_self->TILING10_1_1_));\n  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->TILING10_1_1_));\n  PyTuple_SET_ITEM(__pyx_t_1, 15, ((PyObject *)__pyx_v_self->TILING10_1_1_));\n  __Pyx_INCREF(((PyObject *)__pyx_v_self->TILING10_1_2));\n  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->TILING10_1_2));\n  PyTuple_SET_ITEM(__pyx_t_1, 16, ((PyObject *)__pyx_v_self->TILING10_1_2));\n  __Pyx_INCREF(((PyObject *)__pyx_v_self->TILING10_2));\n  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->TILING10_2));\n  PyTuple_SET_ITEM(__pyx_t_1, 17, ((PyObject *)__pyx_v_self->TILING10_2));\n  __Pyx_INCREF(((PyObject *)__pyx_v_self->TILING10_2_));\n  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->TILING10_2_));\n  PyTuple_SET_ITEM(__pyx_t_1, 18, ((PyObject *)__pyx_v_self->TILING10_2_));\n  __Pyx_INCREF(((PyObject *)__pyx_v_self->TILING11));\n  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->TILING11));\n  PyTuple_SET_ITEM(__pyx_t_1, 19, ((PyObject *)__pyx_v_self->TILING11));\n  __Pyx_INCREF(((PyObject *)__pyx_v_self->TILING12_1_1));\n  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->TILING12_1_1));\n  PyTuple_SET_ITEM(__pyx_t_1, 20, ((PyObject *)__pyx_v_self->TILING12_1_1));\n  __Pyx_INCREF(((PyObject *)__pyx_v_self->TILING12_1_1_));\n  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->TILING12_1_1_));\n  PyTuple_SET_ITEM(__pyx_t_1, 21, ((PyObject *)__pyx_v_self->TILING12_1_1_));\n  __Pyx_INCREF(((PyObject *)__pyx_v_self->TILING12_1_2));\n  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->TILING12_1_2));\n  PyTuple_SET_ITEM(__pyx_t_1, 22, ((PyObject *)__pyx_v_self->TILING12_1_2));\n  __Pyx_INCREF(((PyObject *)__pyx_v_self->TILING12_2));\n  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->TILING12_2));\n  PyTuple_SET_ITEM(__pyx_t_1, 23, ((PyObject *)__pyx_v_self->TILING12_2));\n  __Pyx_INCREF(((PyObject *)__pyx_v_self->TILING12_2_));\n  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->TILING12_2_));\n  PyTuple_SET_ITEM(__pyx_t_1, 24, ((PyObject *)__pyx_v_self->TILING12_2_));\n  __Pyx_INCREF(((PyObject *)__pyx_v_self->TILING13_1));\n  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->TILING13_1));\n  PyTuple_SET_ITEM(__pyx_t_1, 25, ((PyObject *)__pyx_v_self->TILING13_1));\n  __Pyx_INCREF(((PyObject *)__pyx_v_self->TILING13_1_));\n  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->TILING13_1_));\n  PyTuple_SET_ITEM(__pyx_t_1, 26, ((PyObject *)__pyx_v_self->TILING13_1_));\n  __Pyx_INCREF(((PyObject *)__pyx_v_self->TILING13_2));\n  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->TILING13_2));\n  PyTuple_SET_ITEM(__pyx_t_1, 27, ((PyObject *)__pyx_v_self->TILING13_2));\n  __Pyx_INCREF(((PyObject *)__pyx_v_self->TILING13_2_));\n  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->TILING13_2_));\n  PyTuple_SET_ITEM(__pyx_t_1, 28, ((PyObject *)__pyx_v_self->TILING13_2_));\n  __Pyx_INCREF(((PyObject *)__pyx_v_self->TILING13_3));\n  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->TILING13_3));\n  PyTuple_SET_ITEM(__pyx_t_1, 29, ((PyObject *)__pyx_v_self->TILING13_3));\n  __Pyx_INCREF(((PyObject *)__pyx_v_self->TILING13_3_));\n  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->TILING13_3_));\n  PyTuple_SET_ITEM(__pyx_t_1, 30, ((PyObject *)__pyx_v_self->TILING13_3_));\n  __Pyx_INCREF(((PyObject *)__pyx_v_self->TILING13_4));\n  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->TILING13_4));\n  PyTuple_SET_ITEM(__pyx_t_1, 31, ((PyObject *)__pyx_v_self->TILING13_4));\n  __Pyx_INCREF(((PyObject *)__pyx_v_self->TILING13_5_1));\n  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->TILING13_5_1));\n  PyTuple_SET_ITEM(__pyx_t_1, 32, ((PyObject *)__pyx_v_self->TILING13_5_1));\n  __Pyx_INCREF(((PyObject *)__pyx_v_self->TILING13_5_2));\n  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->TILING13_5_2));\n  PyTuple_SET_ITEM(__pyx_t_1, 33, ((PyObject *)__pyx_v_self->TILING13_5_2));\n  __Pyx_INCREF(((PyObject *)__pyx_v_self->TILING14));\n  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->TILING14));\n  PyTuple_SET_ITEM(__pyx_t_1, 34, ((PyObject *)__pyx_v_self->TILING14));\n  __Pyx_INCREF(((PyObject *)__pyx_v_self->TILING2));\n  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->TILING2));\n  PyTuple_SET_ITEM(__pyx_t_1, 35, ((PyObject *)__pyx_v_self->TILING2));\n  __Pyx_INCREF(((PyObject *)__pyx_v_self->TILING3_1));\n  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->TILING3_1));\n  PyTuple_SET_ITEM(__pyx_t_1, 36, ((PyObject *)__pyx_v_self->TILING3_1));\n  __Pyx_INCREF(((PyObject *)__pyx_v_self->TILING3_2));\n  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->TILING3_2));\n  PyTuple_SET_ITEM(__pyx_t_1, 37, ((PyObject *)__pyx_v_self->TILING3_2));\n  __Pyx_INCREF(((PyObject *)__pyx_v_self->TILING4_1));\n  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->TILING4_1));\n  PyTuple_SET_ITEM(__pyx_t_1, 38, ((PyObject *)__pyx_v_self->TILING4_1));\n  __Pyx_INCREF(((PyObject *)__pyx_v_self->TILING4_2));\n  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->TILING4_2));\n  PyTuple_SET_ITEM(__pyx_t_1, 39, ((PyObject *)__pyx_v_self->TILING4_2));\n  __Pyx_INCREF(((PyObject *)__pyx_v_self->TILING5));\n  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->TILING5));\n  PyTuple_SET_ITEM(__pyx_t_1, 40, ((PyObject *)__pyx_v_self->TILING5));\n  __Pyx_INCREF(((PyObject *)__pyx_v_self->TILING6_1_1));\n  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->TILING6_1_1));\n  PyTuple_SET_ITEM(__pyx_t_1, 41, ((PyObject *)__pyx_v_self->TILING6_1_1));\n  __Pyx_INCREF(((PyObject *)__pyx_v_self->TILING6_1_2));\n  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->TILING6_1_2));\n  PyTuple_SET_ITEM(__pyx_t_1, 42, ((PyObject *)__pyx_v_self->TILING6_1_2));\n  __Pyx_INCREF(((PyObject *)__pyx_v_self->TILING6_2));\n  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->TILING6_2));\n  PyTuple_SET_ITEM(__pyx_t_1, 43, ((PyObject *)__pyx_v_self->TILING6_2));\n  __Pyx_INCREF(((PyObject *)__pyx_v_self->TILING7_1));\n  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->TILING7_1));\n  PyTuple_SET_ITEM(__pyx_t_1, 44, ((PyObject *)__pyx_v_self->TILING7_1));\n  __Pyx_INCREF(((PyObject *)__pyx_v_self->TILING7_2));\n  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->TILING7_2));\n  PyTuple_SET_ITEM(__pyx_t_1, 45, ((PyObject *)__pyx_v_self->TILING7_2));\n  __Pyx_INCREF(((PyObject *)__pyx_v_self->TILING7_3));\n  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->TILING7_3));\n  PyTuple_SET_ITEM(__pyx_t_1, 46, ((PyObject *)__pyx_v_self->TILING7_3));\n  __Pyx_INCREF(((PyObject *)__pyx_v_self->TILING7_4_1));\n  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->TILING7_4_1));\n  PyTuple_SET_ITEM(__pyx_t_1, 47, ((PyObject *)__pyx_v_self->TILING7_4_1));\n  __Pyx_INCREF(((PyObject *)__pyx_v_self->TILING7_4_2));\n  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->TILING7_4_2));\n  PyTuple_SET_ITEM(__pyx_t_1, 48, ((PyObject *)__pyx_v_self->TILING7_4_2));\n  __Pyx_INCREF(((PyObject *)__pyx_v_self->TILING8));\n  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->TILING8));\n  PyTuple_SET_ITEM(__pyx_t_1, 49, ((PyObject *)__pyx_v_self->TILING8));\n  __Pyx_INCREF(((PyObject *)__pyx_v_self->TILING9));\n  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->TILING9));\n  PyTuple_SET_ITEM(__pyx_t_1, 50, ((PyObject *)__pyx_v_self->TILING9));\n  __pyx_v_state = ((PyObject*)__pyx_t_1);\n  __pyx_t_1 = 0;\n\n  /* \"(tree fragment)\":6\n *     cdef bint use_setstate\n *     state = (self.CASES, self.CASESCLASSIC, self.EDGESRELX, self.EDGESRELY, self.EDGESRELZ, self.SUBCONFIG13, self.TEST10, self.TEST12, self.TEST13, self.TEST3, self.TEST4, self.TEST6, self.TEST7, self.TILING1, self.TILING10_1_1, self.TILING10_1_1_, self.TILING10_1_2, self.TILING10_2, self.TILING10_2_, self.TILING11, self.TILING12_1_1, self.TILING12_1_1_, self.TILING12_1_2, self.TILING12_2, self.TILING12_2_, self.TILING13_1, self.TILING13_1_, self.TILING13_2, self.TILING13_2_, self.TILING13_3, self.TILING13_3_, self.TILING13_4, self.TILING13_5_1, self.TILING13_5_2, self.TILING14, self.TILING2, self.TILING3_1, self.TILING3_2, self.TILING4_1, self.TILING4_2, self.TILING5, self.TILING6_1_1, self.TILING6_1_2, self.TILING6_2, self.TILING7_1, self.TILING7_2, self.TILING7_3, self.TILING7_4_1, self.TILING7_4_2, self.TILING8, self.TILING9)\n *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<\n *     if _dict is not None:\n *         state += (_dict,)\n */\n  __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __pyx_v__dict = __pyx_t_1;\n  __pyx_t_1 = 0;\n\n  /* \"(tree fragment)\":7\n *     state = (self.CASES, self.CASESCLASSIC, self.EDGESRELX, self.EDGESRELY, self.EDGESRELZ, self.SUBCONFIG13, self.TEST10, self.TEST12, self.TEST13, self.TEST3, self.TEST4, self.TEST6, self.TEST7, self.TILING1, self.TILING10_1_1, self.TILING10_1_1_, self.TILING10_1_2, self.TILING10_2, self.TILING10_2_, self.TILING11, self.TILING12_1_1, self.TILING12_1_1_, self.TILING12_1_2, self.TILING12_2, self.TILING12_2_, self.TILING13_1, self.TILING13_1_, self.TILING13_2, self.TILING13_2_, self.TILING13_3, self.TILING13_3_, self.TILING13_4, self.TILING13_5_1, self.TILING13_5_2, self.TILING14, self.TILING2, self.TILING3_1, self.TILING3_2, self.TILING4_1, self.TILING4_2, self.TILING5, self.TILING6_1_1, self.TILING6_1_2, self.TILING6_2, self.TILING7_1, self.TILING7_2, self.TILING7_3, self.TILING7_4_1, self.TILING7_4_2, self.TILING8, self.TILING9)\n *     _dict = getattr(self, '__dict__', None)\n *     if _dict is not None:             # <<<<<<<<<<<<<<\n *         state += (_dict,)\n *         use_setstate = True\n */\n  __pyx_t_2 = (__pyx_v__dict != Py_None);\n  __pyx_t_3 = (__pyx_t_2 != 0);\n  if (__pyx_t_3) {\n\n    /* \"(tree fragment)\":8\n *     _dict = getattr(self, '__dict__', None)\n *     if _dict is not None:\n *         state += (_dict,)             # <<<<<<<<<<<<<<\n *         use_setstate = True\n *     else:\n */\n    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_1);\n    __Pyx_INCREF(__pyx_v__dict);\n    __Pyx_GIVEREF(__pyx_v__dict);\n    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);\n    __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 8, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_4);\n    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));\n    __pyx_t_4 = 0;\n\n    /* \"(tree fragment)\":9\n *     if _dict is not None:\n *         state += (_dict,)\n *         use_setstate = True             # <<<<<<<<<<<<<<\n *     else:\n *         use_setstate = self.CASES is not None or self.CASESCLASSIC is not None or self.EDGESRELX is not None or self.EDGESRELY is not None or self.EDGESRELZ is not None or self.SUBCONFIG13 is not None or self.TEST10 is not None or self.TEST12 is not None or self.TEST13 is not None or self.TEST3 is not None or self.TEST4 is not None or self.TEST6 is not None or self.TEST7 is not None or self.TILING1 is not None or self.TILING10_1_1 is not None or self.TILING10_1_1_ is not None or self.TILING10_1_2 is not None or self.TILING10_2 is not None or self.TILING10_2_ is not None or self.TILING11 is not None or self.TILING12_1_1 is not None or self.TILING12_1_1_ is not None or self.TILING12_1_2 is not None or self.TILING12_2 is not None or self.TILING12_2_ is not None or self.TILING13_1 is not None or self.TILING13_1_ is not None or self.TILING13_2 is not None or self.TILING13_2_ is not None or self.TILING13_3 is not None or self.TILING13_3_ is not None or self.TILING13_4 is not None or self.TILING13_5_1 is not None or self.TILING13_5_2 is not None or self.TILING14 is not None or self.TILING2 is not None or self.TILING3_1 is not None or self.TILING3_2 is not None or self.TILING4_1 is not None or self.TILING4_2 is not None or self.TILING5 is not None or self.TILING6_1_1 is not None or self.TILING6_1_2 is not None or self.TILING6_2 is not None or self.TILING7_1 is not None or self.TILING7_2 is not None or self.TILING7_3 is not None or self.TILING7_4_1 is not None or self.TILING7_4_2 is not None or self.TILING8 is not None or self.TILING9 is not None\n */\n    __pyx_v_use_setstate = 1;\n\n    /* \"(tree fragment)\":7\n *     state = (self.CASES, self.CASESCLASSIC, self.EDGESRELX, self.EDGESRELY, self.EDGESRELZ, self.SUBCONFIG13, self.TEST10, self.TEST12, self.TEST13, self.TEST3, self.TEST4, self.TEST6, self.TEST7, self.TILING1, self.TILING10_1_1, self.TILING10_1_1_, self.TILING10_1_2, self.TILING10_2, self.TILING10_2_, self.TILING11, self.TILING12_1_1, self.TILING12_1_1_, self.TILING12_1_2, self.TILING12_2, self.TILING12_2_, self.TILING13_1, self.TILING13_1_, self.TILING13_2, self.TILING13_2_, self.TILING13_3, self.TILING13_3_, self.TILING13_4, self.TILING13_5_1, self.TILING13_5_2, self.TILING14, self.TILING2, self.TILING3_1, self.TILING3_2, self.TILING4_1, self.TILING4_2, self.TILING5, self.TILING6_1_1, self.TILING6_1_2, self.TILING6_2, self.TILING7_1, self.TILING7_2, self.TILING7_3, self.TILING7_4_1, self.TILING7_4_2, self.TILING8, self.TILING9)\n *     _dict = getattr(self, '__dict__', None)\n *     if _dict is not None:             # <<<<<<<<<<<<<<\n *         state += (_dict,)\n *         use_setstate = True\n */\n    goto __pyx_L3;\n  }\n\n  /* \"(tree fragment)\":11\n *         use_setstate = True\n *     else:\n *         use_setstate = self.CASES is not None or self.CASESCLASSIC is not None or self.EDGESRELX is not None or self.EDGESRELY is not None or self.EDGESRELZ is not None or self.SUBCONFIG13 is not None or self.TEST10 is not None or self.TEST12 is not None or self.TEST13 is not None or self.TEST3 is not None or self.TEST4 is not None or self.TEST6 is not None or self.TEST7 is not None or self.TILING1 is not None or self.TILING10_1_1 is not None or self.TILING10_1_1_ is not None or self.TILING10_1_2 is not None or self.TILING10_2 is not None or self.TILING10_2_ is not None or self.TILING11 is not None or self.TILING12_1_1 is not None or self.TILING12_1_1_ is not None or self.TILING12_1_2 is not None or self.TILING12_2 is not None or self.TILING12_2_ is not None or self.TILING13_1 is not None or self.TILING13_1_ is not None or self.TILING13_2 is not None or self.TILING13_2_ is not None or self.TILING13_3 is not None or self.TILING13_3_ is not None or self.TILING13_4 is not None or self.TILING13_5_1 is not None or self.TILING13_5_2 is not None or self.TILING14 is not None or self.TILING2 is not None or self.TILING3_1 is not None or self.TILING3_2 is not None or self.TILING4_1 is not None or self.TILING4_2 is not None or self.TILING5 is not None or self.TILING6_1_1 is not None or self.TILING6_1_2 is not None or self.TILING6_2 is not None or self.TILING7_1 is not None or self.TILING7_2 is not None or self.TILING7_3 is not None or self.TILING7_4_1 is not None or self.TILING7_4_2 is not None or self.TILING8 is not None or self.TILING9 is not None             # <<<<<<<<<<<<<<\n *     if use_setstate:\n *         return __pyx_unpickle_LutProvider, (type(self), 0x3035ec8, None), state\n */\n  /*else*/ {\n    __pyx_t_2 = (((PyObject *)__pyx_v_self->CASES) != Py_None);\n    __pyx_t_5 = (__pyx_t_2 != 0);\n    if (!__pyx_t_5) {\n    } else {\n      __pyx_t_3 = __pyx_t_5;\n      goto __pyx_L4_bool_binop_done;\n    }\n    __pyx_t_5 = (((PyObject *)__pyx_v_self->CASESCLASSIC) != Py_None);\n    __pyx_t_2 = (__pyx_t_5 != 0);\n    if (!__pyx_t_2) {\n    } else {\n      __pyx_t_3 = __pyx_t_2;\n      goto __pyx_L4_bool_binop_done;\n    }\n    __pyx_t_2 = (((PyObject *)__pyx_v_self->EDGESRELX) != Py_None);\n    __pyx_t_5 = (__pyx_t_2 != 0);\n    if (!__pyx_t_5) {\n    } else {\n      __pyx_t_3 = __pyx_t_5;\n      goto __pyx_L4_bool_binop_done;\n    }\n    __pyx_t_5 = (((PyObject *)__pyx_v_self->EDGESRELY) != Py_None);\n    __pyx_t_2 = (__pyx_t_5 != 0);\n    if (!__pyx_t_2) {\n    } else {\n      __pyx_t_3 = __pyx_t_2;\n      goto __pyx_L4_bool_binop_done;\n    }\n    __pyx_t_2 = (((PyObject *)__pyx_v_self->EDGESRELZ) != Py_None);\n    __pyx_t_5 = (__pyx_t_2 != 0);\n    if (!__pyx_t_5) {\n    } else {\n      __pyx_t_3 = __pyx_t_5;\n      goto __pyx_L4_bool_binop_done;\n    }\n    __pyx_t_5 = (((PyObject *)__pyx_v_self->SUBCONFIG13) != Py_None);\n    __pyx_t_2 = (__pyx_t_5 != 0);\n    if (!__pyx_t_2) {\n    } else {\n      __pyx_t_3 = __pyx_t_2;\n      goto __pyx_L4_bool_binop_done;\n    }\n    __pyx_t_2 = (((PyObject *)__pyx_v_self->TEST10) != Py_None);\n    __pyx_t_5 = (__pyx_t_2 != 0);\n    if (!__pyx_t_5) {\n    } else {\n      __pyx_t_3 = __pyx_t_5;\n      goto __pyx_L4_bool_binop_done;\n    }\n    __pyx_t_5 = (((PyObject *)__pyx_v_self->TEST12) != Py_None);\n    __pyx_t_2 = (__pyx_t_5 != 0);\n    if (!__pyx_t_2) {\n    } else {\n      __pyx_t_3 = __pyx_t_2;\n      goto __pyx_L4_bool_binop_done;\n    }\n    __pyx_t_2 = (((PyObject *)__pyx_v_self->TEST13) != Py_None);\n    __pyx_t_5 = (__pyx_t_2 != 0);\n    if (!__pyx_t_5) {\n    } else {\n      __pyx_t_3 = __pyx_t_5;\n      goto __pyx_L4_bool_binop_done;\n    }\n    __pyx_t_5 = (((PyObject *)__pyx_v_self->TEST3) != Py_None);\n    __pyx_t_2 = (__pyx_t_5 != 0);\n    if (!__pyx_t_2) {\n    } else {\n      __pyx_t_3 = __pyx_t_2;\n      goto __pyx_L4_bool_binop_done;\n    }\n    __pyx_t_2 = (((PyObject *)__pyx_v_self->TEST4) != Py_None);\n    __pyx_t_5 = (__pyx_t_2 != 0);\n    if (!__pyx_t_5) {\n    } else {\n      __pyx_t_3 = __pyx_t_5;\n      goto __pyx_L4_bool_binop_done;\n    }\n    __pyx_t_5 = (((PyObject *)__pyx_v_self->TEST6) != Py_None);\n    __pyx_t_2 = (__pyx_t_5 != 0);\n    if (!__pyx_t_2) {\n    } else {\n      __pyx_t_3 = __pyx_t_2;\n      goto __pyx_L4_bool_binop_done;\n    }\n    __pyx_t_2 = (((PyObject *)__pyx_v_self->TEST7) != Py_None);\n    __pyx_t_5 = (__pyx_t_2 != 0);\n    if (!__pyx_t_5) {\n    } else {\n      __pyx_t_3 = __pyx_t_5;\n      goto __pyx_L4_bool_binop_done;\n    }\n    __pyx_t_5 = (((PyObject *)__pyx_v_self->TILING1) != Py_None);\n    __pyx_t_2 = (__pyx_t_5 != 0);\n    if (!__pyx_t_2) {\n    } else {\n      __pyx_t_3 = __pyx_t_2;\n      goto __pyx_L4_bool_binop_done;\n    }\n    __pyx_t_2 = (((PyObject *)__pyx_v_self->TILING10_1_1) != Py_None);\n    __pyx_t_5 = (__pyx_t_2 != 0);\n    if (!__pyx_t_5) {\n    } else {\n      __pyx_t_3 = __pyx_t_5;\n      goto __pyx_L4_bool_binop_done;\n    }\n    __pyx_t_5 = (((PyObject *)__pyx_v_self->TILING10_1_1_) != Py_None);\n    __pyx_t_2 = (__pyx_t_5 != 0);\n    if (!__pyx_t_2) {\n    } else {\n      __pyx_t_3 = __pyx_t_2;\n      goto __pyx_L4_bool_binop_done;\n    }\n    __pyx_t_2 = (((PyObject *)__pyx_v_self->TILING10_1_2) != Py_None);\n    __pyx_t_5 = (__pyx_t_2 != 0);\n    if (!__pyx_t_5) {\n    } else {\n      __pyx_t_3 = __pyx_t_5;\n      goto __pyx_L4_bool_binop_done;\n    }\n    __pyx_t_5 = (((PyObject *)__pyx_v_self->TILING10_2) != Py_None);\n    __pyx_t_2 = (__pyx_t_5 != 0);\n    if (!__pyx_t_2) {\n    } else {\n      __pyx_t_3 = __pyx_t_2;\n      goto __pyx_L4_bool_binop_done;\n    }\n    __pyx_t_2 = (((PyObject *)__pyx_v_self->TILING10_2_) != Py_None);\n    __pyx_t_5 = (__pyx_t_2 != 0);\n    if (!__pyx_t_5) {\n    } else {\n      __pyx_t_3 = __pyx_t_5;\n      goto __pyx_L4_bool_binop_done;\n    }\n    __pyx_t_5 = (((PyObject *)__pyx_v_self->TILING11) != Py_None);\n    __pyx_t_2 = (__pyx_t_5 != 0);\n    if (!__pyx_t_2) {\n    } else {\n      __pyx_t_3 = __pyx_t_2;\n      goto __pyx_L4_bool_binop_done;\n    }\n    __pyx_t_2 = (((PyObject *)__pyx_v_self->TILING12_1_1) != Py_None);\n    __pyx_t_5 = (__pyx_t_2 != 0);\n    if (!__pyx_t_5) {\n    } else {\n      __pyx_t_3 = __pyx_t_5;\n      goto __pyx_L4_bool_binop_done;\n    }\n    __pyx_t_5 = (((PyObject *)__pyx_v_self->TILING12_1_1_) != Py_None);\n    __pyx_t_2 = (__pyx_t_5 != 0);\n    if (!__pyx_t_2) {\n    } else {\n      __pyx_t_3 = __pyx_t_2;\n      goto __pyx_L4_bool_binop_done;\n    }\n    __pyx_t_2 = (((PyObject *)__pyx_v_self->TILING12_1_2) != Py_None);\n    __pyx_t_5 = (__pyx_t_2 != 0);\n    if (!__pyx_t_5) {\n    } else {\n      __pyx_t_3 = __pyx_t_5;\n      goto __pyx_L4_bool_binop_done;\n    }\n    __pyx_t_5 = (((PyObject *)__pyx_v_self->TILING12_2) != Py_None);\n    __pyx_t_2 = (__pyx_t_5 != 0);\n    if (!__pyx_t_2) {\n    } else {\n      __pyx_t_3 = __pyx_t_2;\n      goto __pyx_L4_bool_binop_done;\n    }\n    __pyx_t_2 = (((PyObject *)__pyx_v_self->TILING12_2_) != Py_None);\n    __pyx_t_5 = (__pyx_t_2 != 0);\n    if (!__pyx_t_5) {\n    } else {\n      __pyx_t_3 = __pyx_t_5;\n      goto __pyx_L4_bool_binop_done;\n    }\n    __pyx_t_5 = (((PyObject *)__pyx_v_self->TILING13_1) != Py_None);\n    __pyx_t_2 = (__pyx_t_5 != 0);\n    if (!__pyx_t_2) {\n    } else {\n      __pyx_t_3 = __pyx_t_2;\n      goto __pyx_L4_bool_binop_done;\n    }\n    __pyx_t_2 = (((PyObject *)__pyx_v_self->TILING13_1_) != Py_None);\n    __pyx_t_5 = (__pyx_t_2 != 0);\n    if (!__pyx_t_5) {\n    } else {\n      __pyx_t_3 = __pyx_t_5;\n      goto __pyx_L4_bool_binop_done;\n    }\n    __pyx_t_5 = (((PyObject *)__pyx_v_self->TILING13_2) != Py_None);\n    __pyx_t_2 = (__pyx_t_5 != 0);\n    if (!__pyx_t_2) {\n    } else {\n      __pyx_t_3 = __pyx_t_2;\n      goto __pyx_L4_bool_binop_done;\n    }\n    __pyx_t_2 = (((PyObject *)__pyx_v_self->TILING13_2_) != Py_None);\n    __pyx_t_5 = (__pyx_t_2 != 0);\n    if (!__pyx_t_5) {\n    } else {\n      __pyx_t_3 = __pyx_t_5;\n      goto __pyx_L4_bool_binop_done;\n    }\n    __pyx_t_5 = (((PyObject *)__pyx_v_self->TILING13_3) != Py_None);\n    __pyx_t_2 = (__pyx_t_5 != 0);\n    if (!__pyx_t_2) {\n    } else {\n      __pyx_t_3 = __pyx_t_2;\n      goto __pyx_L4_bool_binop_done;\n    }\n    __pyx_t_2 = (((PyObject *)__pyx_v_self->TILING13_3_) != Py_None);\n    __pyx_t_5 = (__pyx_t_2 != 0);\n    if (!__pyx_t_5) {\n    } else {\n      __pyx_t_3 = __pyx_t_5;\n      goto __pyx_L4_bool_binop_done;\n    }\n    __pyx_t_5 = (((PyObject *)__pyx_v_self->TILING13_4) != Py_None);\n    __pyx_t_2 = (__pyx_t_5 != 0);\n    if (!__pyx_t_2) {\n    } else {\n      __pyx_t_3 = __pyx_t_2;\n      goto __pyx_L4_bool_binop_done;\n    }\n    __pyx_t_2 = (((PyObject *)__pyx_v_self->TILING13_5_1) != Py_None);\n    __pyx_t_5 = (__pyx_t_2 != 0);\n    if (!__pyx_t_5) {\n    } else {\n      __pyx_t_3 = __pyx_t_5;\n      goto __pyx_L4_bool_binop_done;\n    }\n    __pyx_t_5 = (((PyObject *)__pyx_v_self->TILING13_5_2) != Py_None);\n    __pyx_t_2 = (__pyx_t_5 != 0);\n    if (!__pyx_t_2) {\n    } else {\n      __pyx_t_3 = __pyx_t_2;\n      goto __pyx_L4_bool_binop_done;\n    }\n    __pyx_t_2 = (((PyObject *)__pyx_v_self->TILING14) != Py_None);\n    __pyx_t_5 = (__pyx_t_2 != 0);\n    if (!__pyx_t_5) {\n    } else {\n      __pyx_t_3 = __pyx_t_5;\n      goto __pyx_L4_bool_binop_done;\n    }\n    __pyx_t_5 = (((PyObject *)__pyx_v_self->TILING2) != Py_None);\n    __pyx_t_2 = (__pyx_t_5 != 0);\n    if (!__pyx_t_2) {\n    } else {\n      __pyx_t_3 = __pyx_t_2;\n      goto __pyx_L4_bool_binop_done;\n    }\n    __pyx_t_2 = (((PyObject *)__pyx_v_self->TILING3_1) != Py_None);\n    __pyx_t_5 = (__pyx_t_2 != 0);\n    if (!__pyx_t_5) {\n    } else {\n      __pyx_t_3 = __pyx_t_5;\n      goto __pyx_L4_bool_binop_done;\n    }\n    __pyx_t_5 = (((PyObject *)__pyx_v_self->TILING3_2) != Py_None);\n    __pyx_t_2 = (__pyx_t_5 != 0);\n    if (!__pyx_t_2) {\n    } else {\n      __pyx_t_3 = __pyx_t_2;\n      goto __pyx_L4_bool_binop_done;\n    }\n    __pyx_t_2 = (((PyObject *)__pyx_v_self->TILING4_1) != Py_None);\n    __pyx_t_5 = (__pyx_t_2 != 0);\n    if (!__pyx_t_5) {\n    } else {\n      __pyx_t_3 = __pyx_t_5;\n      goto __pyx_L4_bool_binop_done;\n    }\n    __pyx_t_5 = (((PyObject *)__pyx_v_self->TILING4_2) != Py_None);\n    __pyx_t_2 = (__pyx_t_5 != 0);\n    if (!__pyx_t_2) {\n    } else {\n      __pyx_t_3 = __pyx_t_2;\n      goto __pyx_L4_bool_binop_done;\n    }\n    __pyx_t_2 = (((PyObject *)__pyx_v_self->TILING5) != Py_None);\n    __pyx_t_5 = (__pyx_t_2 != 0);\n    if (!__pyx_t_5) {\n    } else {\n      __pyx_t_3 = __pyx_t_5;\n      goto __pyx_L4_bool_binop_done;\n    }\n    __pyx_t_5 = (((PyObject *)__pyx_v_self->TILING6_1_1) != Py_None);\n    __pyx_t_2 = (__pyx_t_5 != 0);\n    if (!__pyx_t_2) {\n    } else {\n      __pyx_t_3 = __pyx_t_2;\n      goto __pyx_L4_bool_binop_done;\n    }\n    __pyx_t_2 = (((PyObject *)__pyx_v_self->TILING6_1_2) != Py_None);\n    __pyx_t_5 = (__pyx_t_2 != 0);\n    if (!__pyx_t_5) {\n    } else {\n      __pyx_t_3 = __pyx_t_5;\n      goto __pyx_L4_bool_binop_done;\n    }\n    __pyx_t_5 = (((PyObject *)__pyx_v_self->TILING6_2) != Py_None);\n    __pyx_t_2 = (__pyx_t_5 != 0);\n    if (!__pyx_t_2) {\n    } else {\n      __pyx_t_3 = __pyx_t_2;\n      goto __pyx_L4_bool_binop_done;\n    }\n    __pyx_t_2 = (((PyObject *)__pyx_v_self->TILING7_1) != Py_None);\n    __pyx_t_5 = (__pyx_t_2 != 0);\n    if (!__pyx_t_5) {\n    } else {\n      __pyx_t_3 = __pyx_t_5;\n      goto __pyx_L4_bool_binop_done;\n    }\n    __pyx_t_5 = (((PyObject *)__pyx_v_self->TILING7_2) != Py_None);\n    __pyx_t_2 = (__pyx_t_5 != 0);\n    if (!__pyx_t_2) {\n    } else {\n      __pyx_t_3 = __pyx_t_2;\n      goto __pyx_L4_bool_binop_done;\n    }\n    __pyx_t_2 = (((PyObject *)__pyx_v_self->TILING7_3) != Py_None);\n    __pyx_t_5 = (__pyx_t_2 != 0);\n    if (!__pyx_t_5) {\n    } else {\n      __pyx_t_3 = __pyx_t_5;\n      goto __pyx_L4_bool_binop_done;\n    }\n    __pyx_t_5 = (((PyObject *)__pyx_v_self->TILING7_4_1) != Py_None);\n    __pyx_t_2 = (__pyx_t_5 != 0);\n    if (!__pyx_t_2) {\n    } else {\n      __pyx_t_3 = __pyx_t_2;\n      goto __pyx_L4_bool_binop_done;\n    }\n    __pyx_t_2 = (((PyObject *)__pyx_v_self->TILING7_4_2) != Py_None);\n    __pyx_t_5 = (__pyx_t_2 != 0);\n    if (!__pyx_t_5) {\n    } else {\n      __pyx_t_3 = __pyx_t_5;\n      goto __pyx_L4_bool_binop_done;\n    }\n    __pyx_t_5 = (((PyObject *)__pyx_v_self->TILING8) != Py_None);\n    __pyx_t_2 = (__pyx_t_5 != 0);\n    if (!__pyx_t_2) {\n    } else {\n      __pyx_t_3 = __pyx_t_2;\n      goto __pyx_L4_bool_binop_done;\n    }\n    __pyx_t_2 = (((PyObject *)__pyx_v_self->TILING9) != Py_None);\n    __pyx_t_5 = (__pyx_t_2 != 0);\n    __pyx_t_3 = __pyx_t_5;\n    __pyx_L4_bool_binop_done:;\n    __pyx_v_use_setstate = __pyx_t_3;\n  }\n  __pyx_L3:;\n\n  /* \"(tree fragment)\":12\n *     else:\n *         use_setstate = self.CASES is not None or self.CASESCLASSIC is not None or self.EDGESRELX is not None or self.EDGESRELY is not None or self.EDGESRELZ is not None or self.SUBCONFIG13 is not None or self.TEST10 is not None or self.TEST12 is not None or self.TEST13 is not None or self.TEST3 is not None or self.TEST4 is not None or self.TEST6 is not None or self.TEST7 is not None or self.TILING1 is not None or self.TILING10_1_1 is not None or self.TILING10_1_1_ is not None or self.TILING10_1_2 is not None or self.TILING10_2 is not None or self.TILING10_2_ is not None or self.TILING11 is not None or self.TILING12_1_1 is not None or self.TILING12_1_1_ is not None or self.TILING12_1_2 is not None or self.TILING12_2 is not None or self.TILING12_2_ is not None or self.TILING13_1 is not None or self.TILING13_1_ is not None or self.TILING13_2 is not None or self.TILING13_2_ is not None or self.TILING13_3 is not None or self.TILING13_3_ is not None or self.TILING13_4 is not None or self.TILING13_5_1 is not None or self.TILING13_5_2 is not None or self.TILING14 is not None or self.TILING2 is not None or self.TILING3_1 is not None or self.TILING3_2 is not None or self.TILING4_1 is not None or self.TILING4_2 is not None or self.TILING5 is not None or self.TILING6_1_1 is not None or self.TILING6_1_2 is not None or self.TILING6_2 is not None or self.TILING7_1 is not None or self.TILING7_2 is not None or self.TILING7_3 is not None or self.TILING7_4_1 is not None or self.TILING7_4_2 is not None or self.TILING8 is not None or self.TILING9 is not None\n *     if use_setstate:             # <<<<<<<<<<<<<<\n *         return __pyx_unpickle_LutProvider, (type(self), 0x3035ec8, None), state\n *     else:\n */\n  __pyx_t_3 = (__pyx_v_use_setstate != 0);\n  if (__pyx_t_3) {\n\n    /* \"(tree fragment)\":13\n *         use_setstate = self.CASES is not None or self.CASESCLASSIC is not None or self.EDGESRELX is not None or self.EDGESRELY is not None or self.EDGESRELZ is not None or self.SUBCONFIG13 is not None or self.TEST10 is not None or self.TEST12 is not None or self.TEST13 is not None or self.TEST3 is not None or self.TEST4 is not None or self.TEST6 is not None or self.TEST7 is not None or self.TILING1 is not None or self.TILING10_1_1 is not None or self.TILING10_1_1_ is not None or self.TILING10_1_2 is not None or self.TILING10_2 is not None or self.TILING10_2_ is not None or self.TILING11 is not None or self.TILING12_1_1 is not None or self.TILING12_1_1_ is not None or self.TILING12_1_2 is not None or self.TILING12_2 is not None or self.TILING12_2_ is not None or self.TILING13_1 is not None or self.TILING13_1_ is not None or self.TILING13_2 is not None or self.TILING13_2_ is not None or self.TILING13_3 is not None or self.TILING13_3_ is not None or self.TILING13_4 is not None or self.TILING13_5_1 is not None or self.TILING13_5_2 is not None or self.TILING14 is not None or self.TILING2 is not None or self.TILING3_1 is not None or self.TILING3_2 is not None or self.TILING4_1 is not None or self.TILING4_2 is not None or self.TILING5 is not None or self.TILING6_1_1 is not None or self.TILING6_1_2 is not None or self.TILING6_2 is not None or self.TILING7_1 is not None or self.TILING7_2 is not None or self.TILING7_3 is not None or self.TILING7_4_1 is not None or self.TILING7_4_2 is not None or self.TILING8 is not None or self.TILING9 is not None\n *     if use_setstate:\n *         return __pyx_unpickle_LutProvider, (type(self), 0x3035ec8, None), state             # <<<<<<<<<<<<<<\n *     else:\n *         return __pyx_unpickle_LutProvider, (type(self), 0x3035ec8, state)\n */\n    __Pyx_XDECREF(__pyx_r);\n    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_LutProvider); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_4);\n    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_1);\n    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));\n    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));\n    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));\n    __Pyx_INCREF(__pyx_int_50552520);\n    __Pyx_GIVEREF(__pyx_int_50552520);\n    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_50552520);\n    __Pyx_INCREF(Py_None);\n    __Pyx_GIVEREF(Py_None);\n    PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);\n    __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_6);\n    __Pyx_GIVEREF(__pyx_t_4);\n    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);\n    __Pyx_GIVEREF(__pyx_t_1);\n    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1);\n    __Pyx_INCREF(__pyx_v_state);\n    __Pyx_GIVEREF(__pyx_v_state);\n    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);\n    __pyx_t_4 = 0;\n    __pyx_t_1 = 0;\n    __pyx_r = __pyx_t_6;\n    __pyx_t_6 = 0;\n    goto __pyx_L0;\n\n    /* \"(tree fragment)\":12\n *     else:\n *         use_setstate = self.CASES is not None or self.CASESCLASSIC is not None or self.EDGESRELX is not None or self.EDGESRELY is not None or self.EDGESRELZ is not None or self.SUBCONFIG13 is not None or self.TEST10 is not None or self.TEST12 is not None or self.TEST13 is not None or self.TEST3 is not None or self.TEST4 is not None or self.TEST6 is not None or self.TEST7 is not None or self.TILING1 is not None or self.TILING10_1_1 is not None or self.TILING10_1_1_ is not None or self.TILING10_1_2 is not None or self.TILING10_2 is not None or self.TILING10_2_ is not None or self.TILING11 is not None or self.TILING12_1_1 is not None or self.TILING12_1_1_ is not None or self.TILING12_1_2 is not None or self.TILING12_2 is not None or self.TILING12_2_ is not None or self.TILING13_1 is not None or self.TILING13_1_ is not None or self.TILING13_2 is not None or self.TILING13_2_ is not None or self.TILING13_3 is not None or self.TILING13_3_ is not None or self.TILING13_4 is not None or self.TILING13_5_1 is not None or self.TILING13_5_2 is not None or self.TILING14 is not None or self.TILING2 is not None or self.TILING3_1 is not None or self.TILING3_2 is not None or self.TILING4_1 is not None or self.TILING4_2 is not None or self.TILING5 is not None or self.TILING6_1_1 is not None or self.TILING6_1_2 is not None or self.TILING6_2 is not None or self.TILING7_1 is not None or self.TILING7_2 is not None or self.TILING7_3 is not None or self.TILING7_4_1 is not None or self.TILING7_4_2 is not None or self.TILING8 is not None or self.TILING9 is not None\n *     if use_setstate:             # <<<<<<<<<<<<<<\n *         return __pyx_unpickle_LutProvider, (type(self), 0x3035ec8, None), state\n *     else:\n */\n  }\n\n  /* \"(tree fragment)\":15\n *         return __pyx_unpickle_LutProvider, (type(self), 0x3035ec8, None), state\n *     else:\n *         return __pyx_unpickle_LutProvider, (type(self), 0x3035ec8, state)             # <<<<<<<<<<<<<<\n * def __setstate_cython__(self, __pyx_state):\n *     __pyx_unpickle_LutProvider__set_state(self, __pyx_state)\n */\n  /*else*/ {\n    __Pyx_XDECREF(__pyx_r);\n    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_LutProvider); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 15, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_6);\n    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_1);\n    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));\n    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));\n    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));\n    __Pyx_INCREF(__pyx_int_50552520);\n    __Pyx_GIVEREF(__pyx_int_50552520);\n    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_50552520);\n    __Pyx_INCREF(__pyx_v_state);\n    __Pyx_GIVEREF(__pyx_v_state);\n    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);\n    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_4);\n    __Pyx_GIVEREF(__pyx_t_6);\n    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);\n    __Pyx_GIVEREF(__pyx_t_1);\n    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);\n    __pyx_t_6 = 0;\n    __pyx_t_1 = 0;\n    __pyx_r = __pyx_t_4;\n    __pyx_t_4 = 0;\n    goto __pyx_L0;\n  }\n\n  /* \"(tree fragment)\":1\n * def __reduce_cython__(self):             # <<<<<<<<<<<<<<\n *     cdef tuple state\n *     cdef object _dict\n */\n\n  /* function exit code */\n  __pyx_L1_error:;\n  __Pyx_XDECREF(__pyx_t_1);\n  __Pyx_XDECREF(__pyx_t_4);\n  __Pyx_XDECREF(__pyx_t_6);\n  __Pyx_AddTraceback(\"_marching_cubes_lewiner_cy.LutProvider.__reduce_cython__\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n  __pyx_r = NULL;\n  __pyx_L0:;\n  __Pyx_XDECREF(__pyx_v_state);\n  __Pyx_XDECREF(__pyx_v__dict);\n  __Pyx_XGIVEREF(__pyx_r);\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\n/* \"(tree fragment)\":16\n *     else:\n *         return __pyx_unpickle_LutProvider, (type(self), 0x3035ec8, state)\n * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<\n *     __pyx_unpickle_LutProvider__set_state(self, __pyx_state)\n */\n\n/* Python wrapper */\nstatic PyObject *__pyx_pw_26_marching_cubes_lewiner_cy_11LutProvider_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/\nstatic PyObject *__pyx_pw_26_marching_cubes_lewiner_cy_11LutProvider_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {\n  PyObject *__pyx_r = 0;\n  __Pyx_RefNannyDeclarations\n  __Pyx_RefNannySetupContext(\"__setstate_cython__ (wrapper)\", 0);\n  __pyx_r = __pyx_pf_26_marching_cubes_lewiner_cy_11LutProvider_4__setstate_cython__(((struct __pyx_obj_26_marching_cubes_lewiner_cy_LutProvider *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));\n\n  /* function exit code */\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\nstatic PyObject *__pyx_pf_26_marching_cubes_lewiner_cy_11LutProvider_4__setstate_cython__(struct __pyx_obj_26_marching_cubes_lewiner_cy_LutProvider *__pyx_v_self, PyObject *__pyx_v___pyx_state) {\n  PyObject *__pyx_r = NULL;\n  __Pyx_RefNannyDeclarations\n  PyObject *__pyx_t_1 = NULL;\n  int __pyx_lineno = 0;\n  const char *__pyx_filename = NULL;\n  int __pyx_clineno = 0;\n  __Pyx_RefNannySetupContext(\"__setstate_cython__\", 0);\n\n  /* \"(tree fragment)\":17\n *         return __pyx_unpickle_LutProvider, (type(self), 0x3035ec8, state)\n * def __setstate_cython__(self, __pyx_state):\n *     __pyx_unpickle_LutProvider__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<\n */\n  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, \"Expected %.16s, got %.200s\", \"tuple\", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 17, __pyx_L1_error)\n  __pyx_t_1 = __pyx_f_26_marching_cubes_lewiner_cy___pyx_unpickle_LutProvider__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n\n  /* \"(tree fragment)\":16\n *     else:\n *         return __pyx_unpickle_LutProvider, (type(self), 0x3035ec8, state)\n * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<\n *     __pyx_unpickle_LutProvider__set_state(self, __pyx_state)\n */\n\n  /* function exit code */\n  __pyx_r = Py_None; __Pyx_INCREF(Py_None);\n  goto __pyx_L0;\n  __pyx_L1_error:;\n  __Pyx_XDECREF(__pyx_t_1);\n  __Pyx_AddTraceback(\"_marching_cubes_lewiner_cy.LutProvider.__setstate_cython__\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n  __pyx_r = NULL;\n  __pyx_L0:;\n  __Pyx_XGIVEREF(__pyx_r);\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\n/* \"_marching_cubes_lewiner_cy.pyx\":933\n *         self.SUBCONFIG13 = Lut(SUBCONFIG13)\n * \n * def marching_cubes(float[:, :, :] im not None, double isovalue,             # <<<<<<<<<<<<<<\n *                    LutProvider luts, int st=1, int classic=0,\n *                    np.ndarray[np.npy_bool, ndim=3, cast=True] mask=None):\n */\n\n/* Python wrapper */\nstatic PyObject *__pyx_pw_26_marching_cubes_lewiner_cy_3marching_cubes(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/\nstatic char __pyx_doc_26_marching_cubes_lewiner_cy_2marching_cubes[] = \" marching_cubes(im, double isovalue, LutProvider luts, int st=1, int classic=0)\\n    Main entry to apply marching cubes.\\n\\n    Masked version of marching cubes. This function will check a\\n    masking array (same size as im) to decide if the algorithm must be\\n    computed for a given voxel. This adds a small overhead that\\n    rapidly gets compensated by the fewer computed cubes\\n    Returns (vertices, faces, normals, values)\\n    \";\nstatic PyMethodDef __pyx_mdef_26_marching_cubes_lewiner_cy_3marching_cubes = {\"marching_cubes\", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_26_marching_cubes_lewiner_cy_3marching_cubes, METH_VARARGS|METH_KEYWORDS, __pyx_doc_26_marching_cubes_lewiner_cy_2marching_cubes};\nstatic PyObject *__pyx_pw_26_marching_cubes_lewiner_cy_3marching_cubes(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {\n  __Pyx_memviewslice __pyx_v_im = { 0, 0, { 0 }, { 0 }, { 0 } };\n  double __pyx_v_isovalue;\n  struct __pyx_obj_26_marching_cubes_lewiner_cy_LutProvider *__pyx_v_luts = 0;\n  int __pyx_v_st;\n  int __pyx_v_classic;\n  PyArrayObject *__pyx_v_mask = 0;\n  int __pyx_lineno = 0;\n  const char *__pyx_filename = NULL;\n  int __pyx_clineno = 0;\n  PyObject *__pyx_r = 0;\n  __Pyx_RefNannyDeclarations\n  __Pyx_RefNannySetupContext(\"marching_cubes (wrapper)\", 0);\n  {\n    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_im,&__pyx_n_s_isovalue,&__pyx_n_s_luts,&__pyx_n_s_st,&__pyx_n_s_classic,&__pyx_n_s_mask,0};\n    PyObject* values[6] = {0,0,0,0,0,0};\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":935\n * def marching_cubes(float[:, :, :] im not None, double isovalue,\n *                    LutProvider luts, int st=1, int classic=0,\n *                    np.ndarray[np.npy_bool, ndim=3, cast=True] mask=None):             # <<<<<<<<<<<<<<\n *     \"\"\" marching_cubes(im, double isovalue, LutProvider luts, int st=1, int classic=0)\n *     Main entry to apply marching cubes.\n */\n    values[5] = (PyObject *)((PyArrayObject *)Py_None);\n    if (unlikely(__pyx_kwds)) {\n      Py_ssize_t kw_args;\n      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);\n      switch (pos_args) {\n        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);\n        CYTHON_FALLTHROUGH;\n        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);\n        CYTHON_FALLTHROUGH;\n        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);\n        CYTHON_FALLTHROUGH;\n        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);\n        CYTHON_FALLTHROUGH;\n        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);\n        CYTHON_FALLTHROUGH;\n        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);\n        CYTHON_FALLTHROUGH;\n        case  0: break;\n        default: goto __pyx_L5_argtuple_error;\n      }\n      kw_args = PyDict_Size(__pyx_kwds);\n      switch (pos_args) {\n        case  0:\n        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_im)) != 0)) kw_args--;\n        else goto __pyx_L5_argtuple_error;\n        CYTHON_FALLTHROUGH;\n        case  1:\n        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_isovalue)) != 0)) kw_args--;\n        else {\n          __Pyx_RaiseArgtupleInvalid(\"marching_cubes\", 0, 3, 6, 1); __PYX_ERR(0, 933, __pyx_L3_error)\n        }\n        CYTHON_FALLTHROUGH;\n        case  2:\n        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_luts)) != 0)) kw_args--;\n        else {\n          __Pyx_RaiseArgtupleInvalid(\"marching_cubes\", 0, 3, 6, 2); __PYX_ERR(0, 933, __pyx_L3_error)\n        }\n        CYTHON_FALLTHROUGH;\n        case  3:\n        if (kw_args > 0) {\n          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_st);\n          if (value) { values[3] = value; kw_args--; }\n        }\n        CYTHON_FALLTHROUGH;\n        case  4:\n        if (kw_args > 0) {\n          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_classic);\n          if (value) { values[4] = value; kw_args--; }\n        }\n        CYTHON_FALLTHROUGH;\n        case  5:\n        if (kw_args > 0) {\n          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mask);\n          if (value) { values[5] = value; kw_args--; }\n        }\n      }\n      if (unlikely(kw_args > 0)) {\n        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, \"marching_cubes\") < 0)) __PYX_ERR(0, 933, __pyx_L3_error)\n      }\n    } else {\n      switch (PyTuple_GET_SIZE(__pyx_args)) {\n        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);\n        CYTHON_FALLTHROUGH;\n        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);\n        CYTHON_FALLTHROUGH;\n        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);\n        CYTHON_FALLTHROUGH;\n        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);\n        values[1] = PyTuple_GET_ITEM(__pyx_args, 1);\n        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);\n        break;\n        default: goto __pyx_L5_argtuple_error;\n      }\n    }\n    __pyx_v_im = __Pyx_PyObject_to_MemoryviewSlice_dsdsds_float(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_im.memview)) __PYX_ERR(0, 933, __pyx_L3_error)\n    __pyx_v_isovalue = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_isovalue == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 933, __pyx_L3_error)\n    __pyx_v_luts = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_LutProvider *)values[2]);\n    if (values[3]) {\n      __pyx_v_st = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_st == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 934, __pyx_L3_error)\n    } else {\n      __pyx_v_st = ((int)1);\n    }\n    if (values[4]) {\n      __pyx_v_classic = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_classic == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 934, __pyx_L3_error)\n    } else {\n      __pyx_v_classic = ((int)0);\n    }\n    __pyx_v_mask = ((PyArrayObject *)values[5]);\n  }\n  goto __pyx_L4_argument_unpacking_done;\n  __pyx_L5_argtuple_error:;\n  __Pyx_RaiseArgtupleInvalid(\"marching_cubes\", 0, 3, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 933, __pyx_L3_error)\n  __pyx_L3_error:;\n  __Pyx_AddTraceback(\"_marching_cubes_lewiner_cy.marching_cubes\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n  __Pyx_RefNannyFinishContext();\n  return NULL;\n  __pyx_L4_argument_unpacking_done:;\n  if (unlikely(((PyObject *)__pyx_v_im.memview) == Py_None)) {\n    PyErr_Format(PyExc_TypeError, \"Argument '%.200s' must not be None\", \"im\"); __PYX_ERR(0, 933, __pyx_L1_error)\n  }\n  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_luts), __pyx_ptype_26_marching_cubes_lewiner_cy_LutProvider, 1, \"luts\", 0))) __PYX_ERR(0, 934, __pyx_L1_error)\n  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mask), __pyx_ptype_5numpy_ndarray, 1, \"mask\", 0))) __PYX_ERR(0, 935, __pyx_L1_error)\n  __pyx_r = __pyx_pf_26_marching_cubes_lewiner_cy_2marching_cubes(__pyx_self, __pyx_v_im, __pyx_v_isovalue, __pyx_v_luts, __pyx_v_st, __pyx_v_classic, __pyx_v_mask);\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":933\n *         self.SUBCONFIG13 = Lut(SUBCONFIG13)\n * \n * def marching_cubes(float[:, :, :] im not None, double isovalue,             # <<<<<<<<<<<<<<\n *                    LutProvider luts, int st=1, int classic=0,\n *                    np.ndarray[np.npy_bool, ndim=3, cast=True] mask=None):\n */\n\n  /* function exit code */\n  goto __pyx_L0;\n  __pyx_L1_error:;\n  __pyx_r = NULL;\n  __pyx_L0:;\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\nstatic PyObject *__pyx_pf_26_marching_cubes_lewiner_cy_2marching_cubes(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_im, double __pyx_v_isovalue, struct __pyx_obj_26_marching_cubes_lewiner_cy_LutProvider *__pyx_v_luts, int __pyx_v_st, int __pyx_v_classic, PyArrayObject *__pyx_v_mask) {\n  int __pyx_v_Nx;\n  int __pyx_v_Ny;\n  int __pyx_v_Nz;\n  struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *__pyx_v_cell = 0;\n  int __pyx_v_x;\n  int __pyx_v_y;\n  int __pyx_v_z;\n  int __pyx_v_x_st;\n  int __pyx_v_y_st;\n  int __pyx_v_z_st;\n  int __pyx_v_nt;\n  int __pyx_v_case;\n  int __pyx_v_config;\n  int __pyx_v_no_mask;\n  int __pyx_v_Nx_bound;\n  int __pyx_v_Ny_bound;\n  int __pyx_v_Nz_bound;\n  __Pyx_LocalBuf_ND __pyx_pybuffernd_mask;\n  __Pyx_Buffer __pyx_pybuffer_mask;\n  PyObject *__pyx_r = NULL;\n  __Pyx_RefNannyDeclarations\n  Py_ssize_t __pyx_t_1;\n  Py_ssize_t __pyx_t_2;\n  Py_ssize_t __pyx_t_3;\n  PyObject *__pyx_t_4 = NULL;\n  PyObject *__pyx_t_5 = NULL;\n  PyObject *__pyx_t_6 = NULL;\n  PyObject *__pyx_t_7 = NULL;\n  int __pyx_t_8;\n  long __pyx_t_9;\n  long __pyx_t_10;\n  long __pyx_t_11;\n  int __pyx_t_12;\n  Py_ssize_t __pyx_t_13;\n  Py_ssize_t __pyx_t_14;\n  Py_ssize_t __pyx_t_15;\n  Py_ssize_t __pyx_t_16;\n  Py_ssize_t __pyx_t_17;\n  Py_ssize_t __pyx_t_18;\n  Py_ssize_t __pyx_t_19;\n  Py_ssize_t __pyx_t_20;\n  Py_ssize_t __pyx_t_21;\n  Py_ssize_t __pyx_t_22;\n  Py_ssize_t __pyx_t_23;\n  Py_ssize_t __pyx_t_24;\n  Py_ssize_t __pyx_t_25;\n  Py_ssize_t __pyx_t_26;\n  Py_ssize_t __pyx_t_27;\n  Py_ssize_t __pyx_t_28;\n  Py_ssize_t __pyx_t_29;\n  Py_ssize_t __pyx_t_30;\n  Py_ssize_t __pyx_t_31;\n  Py_ssize_t __pyx_t_32;\n  Py_ssize_t __pyx_t_33;\n  Py_ssize_t __pyx_t_34;\n  Py_ssize_t __pyx_t_35;\n  Py_ssize_t __pyx_t_36;\n  PyObject *__pyx_t_37 = NULL;\n  PyObject *__pyx_t_38 = NULL;\n  int __pyx_lineno = 0;\n  const char *__pyx_filename = NULL;\n  int __pyx_clineno = 0;\n  __Pyx_RefNannySetupContext(\"marching_cubes\", 0);\n  __pyx_pybuffer_mask.pybuffer.buf = NULL;\n  __pyx_pybuffer_mask.refcount = 0;\n  __pyx_pybuffernd_mask.data = NULL;\n  __pyx_pybuffernd_mask.rcbuffer = &__pyx_pybuffer_mask;\n  {\n    __Pyx_BufFmt_StackElem __pyx_stack[1];\n    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_mask.rcbuffer->pybuffer, (PyObject*)__pyx_v_mask, &__Pyx_TypeInfo_nn_npy_bool, PyBUF_FORMAT| PyBUF_STRIDES, 3, 1, __pyx_stack) == -1)) __PYX_ERR(0, 933, __pyx_L1_error)\n  }\n  __pyx_pybuffernd_mask.diminfo[0].strides = __pyx_pybuffernd_mask.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_mask.diminfo[0].shape = __pyx_pybuffernd_mask.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_mask.diminfo[1].strides = __pyx_pybuffernd_mask.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_mask.diminfo[1].shape = __pyx_pybuffernd_mask.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_mask.diminfo[2].strides = __pyx_pybuffernd_mask.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_mask.diminfo[2].shape = __pyx_pybuffernd_mask.rcbuffer->pybuffer.shape[2];\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":947\n *     # Get dimemsnions\n *     cdef int Nx, Ny, Nz\n *     Nx, Ny, Nz = im.shape[2], im.shape[1], im.shape[0]             # <<<<<<<<<<<<<<\n * \n *     # Create cell to use throughout\n */\n  __pyx_t_1 = (__pyx_v_im.shape[2]);\n  __pyx_t_2 = (__pyx_v_im.shape[1]);\n  __pyx_t_3 = (__pyx_v_im.shape[0]);\n  __pyx_v_Nx = __pyx_t_1;\n  __pyx_v_Ny = __pyx_t_2;\n  __pyx_v_Nz = __pyx_t_3;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":950\n * \n *     # Create cell to use throughout\n *     cdef Cell cell = Cell(luts, Nx, Ny, Nz)             # <<<<<<<<<<<<<<\n * \n *     # Typedef variables\n */\n  __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_Nx); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 950, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_4);\n  __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_Ny); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 950, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_5);\n  __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_Nz); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 950, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_6);\n  __pyx_t_7 = PyTuple_New(4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 950, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_7);\n  __Pyx_INCREF(((PyObject *)__pyx_v_luts));\n  __Pyx_GIVEREF(((PyObject *)__pyx_v_luts));\n  PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_v_luts));\n  __Pyx_GIVEREF(__pyx_t_4);\n  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_4);\n  __Pyx_GIVEREF(__pyx_t_5);\n  PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_5);\n  __Pyx_GIVEREF(__pyx_t_6);\n  PyTuple_SET_ITEM(__pyx_t_7, 3, __pyx_t_6);\n  __pyx_t_4 = 0;\n  __pyx_t_5 = 0;\n  __pyx_t_6 = 0;\n  __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_26_marching_cubes_lewiner_cy_Cell), __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 950, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_6);\n  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;\n  __pyx_v_cell = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *)__pyx_t_6);\n  __pyx_t_6 = 0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":956\n *     cdef int nt\n *     cdef int case, config, subconfig\n *     cdef bint no_mask = mask is None             # <<<<<<<<<<<<<<\n *     # Unfortunately specifying a step in range() significantly degrades\n *     # performance. Therefore we use a while loop.\n */\n  __pyx_t_8 = (((PyObject *)__pyx_v_mask) == Py_None);\n  __pyx_v_no_mask = __pyx_t_8;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":962\n *     #       ->  Nx_bound = max_allowable_x + 1 - 2 * st\n *     #       ->  Nx_bound = Nx - 2 * st\n *     assert st > 0             # <<<<<<<<<<<<<<\n *     cdef int Nx_bound, Ny_bound, Nz_bound\n *     Nx_bound, Ny_bound, Nz_bound = Nx - 2 * st, Ny - 2 * st, Nz - 2 * st  # precalculated index range\n */\n  #ifndef CYTHON_WITHOUT_ASSERTIONS\n  if (unlikely(!Py_OptimizeFlag)) {\n    if (unlikely(!((__pyx_v_st > 0) != 0))) {\n      PyErr_SetNone(PyExc_AssertionError);\n      __PYX_ERR(0, 962, __pyx_L1_error)\n    }\n  }\n  #endif\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":964\n *     assert st > 0\n *     cdef int Nx_bound, Ny_bound, Nz_bound\n *     Nx_bound, Ny_bound, Nz_bound = Nx - 2 * st, Ny - 2 * st, Nz - 2 * st  # precalculated index range             # <<<<<<<<<<<<<<\n * \n *     z = -st\n */\n  __pyx_t_9 = (__pyx_v_Nx - (2 * __pyx_v_st));\n  __pyx_t_10 = (__pyx_v_Ny - (2 * __pyx_v_st));\n  __pyx_t_11 = (__pyx_v_Nz - (2 * __pyx_v_st));\n  __pyx_v_Nx_bound = __pyx_t_9;\n  __pyx_v_Ny_bound = __pyx_t_10;\n  __pyx_v_Nz_bound = __pyx_t_11;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":966\n *     Nx_bound, Ny_bound, Nz_bound = Nx - 2 * st, Ny - 2 * st, Nz - 2 * st  # precalculated index range\n * \n *     z = -st             # <<<<<<<<<<<<<<\n *     while z < Nz_bound:\n *         z += st\n */\n  __pyx_v_z = (-__pyx_v_st);\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":967\n * \n *     z = -st\n *     while z < Nz_bound:             # <<<<<<<<<<<<<<\n *         z += st\n *         z_st = z + st\n */\n  while (1) {\n    __pyx_t_8 = ((__pyx_v_z < __pyx_v_Nz_bound) != 0);\n    if (!__pyx_t_8) break;\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":968\n *     z = -st\n *     while z < Nz_bound:\n *         z += st             # <<<<<<<<<<<<<<\n *         z_st = z + st\n * \n */\n    __pyx_v_z = (__pyx_v_z + __pyx_v_st);\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":969\n *     while z < Nz_bound:\n *         z += st\n *         z_st = z + st             # <<<<<<<<<<<<<<\n * \n *         cell.new_z_value()  # Indicate that we enter a new layer\n */\n    __pyx_v_z_st = (__pyx_v_z + __pyx_v_st);\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":971\n *         z_st = z + st\n * \n *         cell.new_z_value()  # Indicate that we enter a new layer             # <<<<<<<<<<<<<<\n *         y = -st\n *         while y < Ny_bound:\n */\n    ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_cell->__pyx_vtab)->new_z_value(__pyx_v_cell);\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":972\n * \n *         cell.new_z_value()  # Indicate that we enter a new layer\n *         y = -st             # <<<<<<<<<<<<<<\n *         while y < Ny_bound:\n *             y += st\n */\n    __pyx_v_y = (-__pyx_v_st);\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":973\n *         cell.new_z_value()  # Indicate that we enter a new layer\n *         y = -st\n *         while y < Ny_bound:             # <<<<<<<<<<<<<<\n *             y += st\n *             y_st = y + st\n */\n    while (1) {\n      __pyx_t_8 = ((__pyx_v_y < __pyx_v_Ny_bound) != 0);\n      if (!__pyx_t_8) break;\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":974\n *         y = -st\n *         while y < Ny_bound:\n *             y += st             # <<<<<<<<<<<<<<\n *             y_st = y + st\n * \n */\n      __pyx_v_y = (__pyx_v_y + __pyx_v_st);\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":975\n *         while y < Ny_bound:\n *             y += st\n *             y_st = y + st             # <<<<<<<<<<<<<<\n * \n *             x = -st\n */\n      __pyx_v_y_st = (__pyx_v_y + __pyx_v_st);\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":977\n *             y_st = y + st\n * \n *             x = -st             # <<<<<<<<<<<<<<\n *             while x < Nx_bound:\n *                 x += st\n */\n      __pyx_v_x = (-__pyx_v_st);\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":978\n * \n *             x = -st\n *             while x < Nx_bound:             # <<<<<<<<<<<<<<\n *                 x += st\n *                 x_st = x + st\n */\n      while (1) {\n        __pyx_t_8 = ((__pyx_v_x < __pyx_v_Nx_bound) != 0);\n        if (!__pyx_t_8) break;\n\n        /* \"_marching_cubes_lewiner_cy.pyx\":979\n *             x = -st\n *             while x < Nx_bound:\n *                 x += st             # <<<<<<<<<<<<<<\n *                 x_st = x + st\n *                 if no_mask or mask[z_st, y_st, x_st]:\n */\n        __pyx_v_x = (__pyx_v_x + __pyx_v_st);\n\n        /* \"_marching_cubes_lewiner_cy.pyx\":980\n *             while x < Nx_bound:\n *                 x += st\n *                 x_st = x + st             # <<<<<<<<<<<<<<\n *                 if no_mask or mask[z_st, y_st, x_st]:\n *                     # Initialize cell\n */\n        __pyx_v_x_st = (__pyx_v_x + __pyx_v_st);\n\n        /* \"_marching_cubes_lewiner_cy.pyx\":981\n *                 x += st\n *                 x_st = x + st\n *                 if no_mask or mask[z_st, y_st, x_st]:             # <<<<<<<<<<<<<<\n *                     # Initialize cell\n *                     cell.set_cube(isovalue, x, y, z, st,\n */\n        __pyx_t_12 = (__pyx_v_no_mask != 0);\n        if (!__pyx_t_12) {\n        } else {\n          __pyx_t_8 = __pyx_t_12;\n          goto __pyx_L10_bool_binop_done;\n        }\n        __pyx_t_13 = __pyx_v_z_st;\n        __pyx_t_14 = __pyx_v_y_st;\n        __pyx_t_15 = __pyx_v_x_st;\n        __pyx_t_12 = ((*__Pyx_BufPtrStrided3d(npy_bool *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_mask.diminfo[0].strides, __pyx_t_14, __pyx_pybuffernd_mask.diminfo[1].strides, __pyx_t_15, __pyx_pybuffernd_mask.diminfo[2].strides)) != 0);\n        __pyx_t_8 = __pyx_t_12;\n        __pyx_L10_bool_binop_done:;\n        if (__pyx_t_8) {\n\n          /* \"_marching_cubes_lewiner_cy.pyx\":984\n *                     # Initialize cell\n *                     cell.set_cube(isovalue, x, y, z, st,\n *                         im[z   ,y, x], im[z   ,y, x_st], im[z   ,y_st, x_st], im[z   ,y_st, x],             # <<<<<<<<<<<<<<\n *                         im[z_st,y, x], im[z_st,y, x_st], im[z_st,y_st, x_st], im[z_st,y_st, x] )\n * \n */\n          __pyx_t_15 = __pyx_v_z;\n          __pyx_t_14 = __pyx_v_y;\n          __pyx_t_13 = __pyx_v_x;\n          __pyx_t_16 = __pyx_v_z;\n          __pyx_t_17 = __pyx_v_y;\n          __pyx_t_18 = __pyx_v_x_st;\n          __pyx_t_19 = __pyx_v_z;\n          __pyx_t_20 = __pyx_v_y_st;\n          __pyx_t_21 = __pyx_v_x_st;\n          __pyx_t_22 = __pyx_v_z;\n          __pyx_t_23 = __pyx_v_y_st;\n          __pyx_t_24 = __pyx_v_x;\n\n          /* \"_marching_cubes_lewiner_cy.pyx\":985\n *                     cell.set_cube(isovalue, x, y, z, st,\n *                         im[z   ,y, x], im[z   ,y, x_st], im[z   ,y_st, x_st], im[z   ,y_st, x],\n *                         im[z_st,y, x], im[z_st,y, x_st], im[z_st,y_st, x_st], im[z_st,y_st, x] )             # <<<<<<<<<<<<<<\n * \n *                     # Do classic!\n */\n          __pyx_t_25 = __pyx_v_z_st;\n          __pyx_t_26 = __pyx_v_y;\n          __pyx_t_27 = __pyx_v_x;\n          __pyx_t_28 = __pyx_v_z_st;\n          __pyx_t_29 = __pyx_v_y;\n          __pyx_t_30 = __pyx_v_x_st;\n          __pyx_t_31 = __pyx_v_z_st;\n          __pyx_t_32 = __pyx_v_y_st;\n          __pyx_t_33 = __pyx_v_x_st;\n          __pyx_t_34 = __pyx_v_z_st;\n          __pyx_t_35 = __pyx_v_y_st;\n          __pyx_t_36 = __pyx_v_x;\n\n          /* \"_marching_cubes_lewiner_cy.pyx\":983\n *                 if no_mask or mask[z_st, y_st, x_st]:\n *                     # Initialize cell\n *                     cell.set_cube(isovalue, x, y, z, st,             # <<<<<<<<<<<<<<\n *                         im[z   ,y, x], im[z   ,y, x_st], im[z   ,y_st, x_st], im[z   ,y_st, x],\n *                         im[z_st,y, x], im[z_st,y, x_st], im[z_st,y_st, x_st], im[z_st,y_st, x] )\n */\n          ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_cell->__pyx_vtab)->set_cube(__pyx_v_cell, __pyx_v_isovalue, __pyx_v_x, __pyx_v_y, __pyx_v_z, __pyx_v_st, (*((float *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_im.data + __pyx_t_15 * __pyx_v_im.strides[0]) ) + __pyx_t_14 * __pyx_v_im.strides[1]) ) + __pyx_t_13 * __pyx_v_im.strides[2]) ))), (*((float *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_im.data + __pyx_t_16 * __pyx_v_im.strides[0]) ) + __pyx_t_17 * __pyx_v_im.strides[1]) ) + __pyx_t_18 * __pyx_v_im.strides[2]) ))), (*((float *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_im.data + __pyx_t_19 * __pyx_v_im.strides[0]) ) + __pyx_t_20 * __pyx_v_im.strides[1]) ) + __pyx_t_21 * __pyx_v_im.strides[2]) ))), (*((float *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_im.data + __pyx_t_22 * __pyx_v_im.strides[0]) ) + __pyx_t_23 * __pyx_v_im.strides[1]) ) + __pyx_t_24 * __pyx_v_im.strides[2]) ))), (*((float *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_im.data + __pyx_t_25 * __pyx_v_im.strides[0]) ) + __pyx_t_26 * __pyx_v_im.strides[1]) ) + __pyx_t_27 * __pyx_v_im.strides[2]) ))), (*((float *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_im.data + __pyx_t_28 * __pyx_v_im.strides[0]) ) + __pyx_t_29 * __pyx_v_im.strides[1]) ) + __pyx_t_30 * __pyx_v_im.strides[2]) ))), (*((float *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_im.data + __pyx_t_31 * __pyx_v_im.strides[0]) ) + __pyx_t_32 * __pyx_v_im.strides[1]) ) + __pyx_t_33 * __pyx_v_im.strides[2]) ))), (*((float *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_im.data + __pyx_t_34 * __pyx_v_im.strides[0]) ) + __pyx_t_35 * __pyx_v_im.strides[1]) ) + __pyx_t_36 * __pyx_v_im.strides[2]) ))));\n\n          /* \"_marching_cubes_lewiner_cy.pyx\":988\n * \n *                     # Do classic!\n *                     if classic:             # <<<<<<<<<<<<<<\n *                         # Determine number of vertices\n *                         nt = 0\n */\n          __pyx_t_8 = (__pyx_v_classic != 0);\n          if (__pyx_t_8) {\n\n            /* \"_marching_cubes_lewiner_cy.pyx\":990\n *                     if classic:\n *                         # Determine number of vertices\n *                         nt = 0             # <<<<<<<<<<<<<<\n *                         while luts.CASESCLASSIC.get2(cell.index, 3*nt) != -1:\n *                             nt += 1\n */\n            __pyx_v_nt = 0;\n\n            /* \"_marching_cubes_lewiner_cy.pyx\":991\n *                         # Determine number of vertices\n *                         nt = 0\n *                         while luts.CASESCLASSIC.get2(cell.index, 3*nt) != -1:             # <<<<<<<<<<<<<<\n *                             nt += 1\n *                         # Add triangles\n */\n            while (1) {\n              __pyx_t_8 = ((((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Lut *)__pyx_v_luts->CASESCLASSIC->__pyx_vtab)->get2(__pyx_v_luts->CASESCLASSIC, __pyx_v_cell->index, (3 * __pyx_v_nt)) != -1L) != 0);\n              if (!__pyx_t_8) break;\n\n              /* \"_marching_cubes_lewiner_cy.pyx\":992\n *                         nt = 0\n *                         while luts.CASESCLASSIC.get2(cell.index, 3*nt) != -1:\n *                             nt += 1             # <<<<<<<<<<<<<<\n *                         # Add triangles\n *                         if nt > 0:\n */\n              __pyx_v_nt = (__pyx_v_nt + 1);\n            }\n\n            /* \"_marching_cubes_lewiner_cy.pyx\":994\n *                             nt += 1\n *                         # Add triangles\n *                         if nt > 0:             # <<<<<<<<<<<<<<\n *                             cell.add_triangles(luts.CASESCLASSIC, cell.index, nt)\n *                     else:\n */\n            __pyx_t_8 = ((__pyx_v_nt > 0) != 0);\n            if (__pyx_t_8) {\n\n              /* \"_marching_cubes_lewiner_cy.pyx\":995\n *                         # Add triangles\n *                         if nt > 0:\n *                             cell.add_triangles(luts.CASESCLASSIC, cell.index, nt)             # <<<<<<<<<<<<<<\n *                     else:\n *                         # Get case, if non-nul, enter the big switch\n */\n              __pyx_t_6 = ((PyObject *)__pyx_v_luts->CASESCLASSIC);\n              __Pyx_INCREF(__pyx_t_6);\n              ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_cell->__pyx_vtab)->add_triangles(__pyx_v_cell, ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_6), __pyx_v_cell->index, __pyx_v_nt);\n              __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;\n\n              /* \"_marching_cubes_lewiner_cy.pyx\":994\n *                             nt += 1\n *                         # Add triangles\n *                         if nt > 0:             # <<<<<<<<<<<<<<\n *                             cell.add_triangles(luts.CASESCLASSIC, cell.index, nt)\n *                     else:\n */\n            }\n\n            /* \"_marching_cubes_lewiner_cy.pyx\":988\n * \n *                     # Do classic!\n *                     if classic:             # <<<<<<<<<<<<<<\n *                         # Determine number of vertices\n *                         nt = 0\n */\n            goto __pyx_L12;\n          }\n\n          /* \"_marching_cubes_lewiner_cy.pyx\":998\n *                     else:\n *                         # Get case, if non-nul, enter the big switch\n *                         case = luts.CASES.get2(cell.index, 0)             # <<<<<<<<<<<<<<\n *                         if case > 0:\n *                             config = luts.CASES.get2(cell.index, 1)\n */\n          /*else*/ {\n            __pyx_v_case = ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Lut *)__pyx_v_luts->CASES->__pyx_vtab)->get2(__pyx_v_luts->CASES, __pyx_v_cell->index, 0);\n\n            /* \"_marching_cubes_lewiner_cy.pyx\":999\n *                         # Get case, if non-nul, enter the big switch\n *                         case = luts.CASES.get2(cell.index, 0)\n *                         if case > 0:             # <<<<<<<<<<<<<<\n *                             config = luts.CASES.get2(cell.index, 1)\n *                             the_big_switch(luts, cell, case, config)\n */\n            __pyx_t_8 = ((__pyx_v_case > 0) != 0);\n            if (__pyx_t_8) {\n\n              /* \"_marching_cubes_lewiner_cy.pyx\":1000\n *                         case = luts.CASES.get2(cell.index, 0)\n *                         if case > 0:\n *                             config = luts.CASES.get2(cell.index, 1)             # <<<<<<<<<<<<<<\n *                             the_big_switch(luts, cell, case, config)\n * \n */\n              __pyx_v_config = ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Lut *)__pyx_v_luts->CASES->__pyx_vtab)->get2(__pyx_v_luts->CASES, __pyx_v_cell->index, 1);\n\n              /* \"_marching_cubes_lewiner_cy.pyx\":1001\n *                         if case > 0:\n *                             config = luts.CASES.get2(cell.index, 1)\n *                             the_big_switch(luts, cell, case, config)             # <<<<<<<<<<<<<<\n * \n *     # Done\n */\n              __pyx_f_26_marching_cubes_lewiner_cy_the_big_switch(__pyx_v_luts, __pyx_v_cell, __pyx_v_case, __pyx_v_config);\n\n              /* \"_marching_cubes_lewiner_cy.pyx\":999\n *                         # Get case, if non-nul, enter the big switch\n *                         case = luts.CASES.get2(cell.index, 0)\n *                         if case > 0:             # <<<<<<<<<<<<<<\n *                             config = luts.CASES.get2(cell.index, 1)\n *                             the_big_switch(luts, cell, case, config)\n */\n            }\n          }\n          __pyx_L12:;\n\n          /* \"_marching_cubes_lewiner_cy.pyx\":981\n *                 x += st\n *                 x_st = x + st\n *                 if no_mask or mask[z_st, y_st, x_st]:             # <<<<<<<<<<<<<<\n *                     # Initialize cell\n *                     cell.set_cube(isovalue, x, y, z, st,\n */\n        }\n      }\n    }\n  }\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":1004\n * \n *     # Done\n *     return cell.get_vertices(), cell.get_faces(), cell.get_normals(), cell.get_values()             # <<<<<<<<<<<<<<\n * \n * \n */\n  __Pyx_XDECREF(__pyx_r);\n  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_cell), __pyx_n_s_get_vertices); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1004, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_7);\n  __pyx_t_5 = NULL;\n  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {\n    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);\n    if (likely(__pyx_t_5)) {\n      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);\n      __Pyx_INCREF(__pyx_t_5);\n      __Pyx_INCREF(function);\n      __Pyx_DECREF_SET(__pyx_t_7, function);\n    }\n  }\n  __pyx_t_6 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_7);\n  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;\n  if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1004, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_6);\n  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;\n  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_cell), __pyx_n_s_get_faces); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1004, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_5);\n  __pyx_t_4 = NULL;\n  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {\n    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);\n    if (likely(__pyx_t_4)) {\n      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);\n      __Pyx_INCREF(__pyx_t_4);\n      __Pyx_INCREF(function);\n      __Pyx_DECREF_SET(__pyx_t_5, function);\n    }\n  }\n  __pyx_t_7 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_5);\n  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;\n  if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1004, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_7);\n  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;\n  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_cell), __pyx_n_s_get_normals); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1004, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_4);\n  __pyx_t_37 = NULL;\n  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {\n    __pyx_t_37 = PyMethod_GET_SELF(__pyx_t_4);\n    if (likely(__pyx_t_37)) {\n      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);\n      __Pyx_INCREF(__pyx_t_37);\n      __Pyx_INCREF(function);\n      __Pyx_DECREF_SET(__pyx_t_4, function);\n    }\n  }\n  __pyx_t_5 = (__pyx_t_37) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_37) : __Pyx_PyObject_CallNoArg(__pyx_t_4);\n  __Pyx_XDECREF(__pyx_t_37); __pyx_t_37 = 0;\n  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1004, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_5);\n  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;\n  __pyx_t_37 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_cell), __pyx_n_s_get_values); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 1004, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_37);\n  __pyx_t_38 = NULL;\n  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_37))) {\n    __pyx_t_38 = PyMethod_GET_SELF(__pyx_t_37);\n    if (likely(__pyx_t_38)) {\n      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_37);\n      __Pyx_INCREF(__pyx_t_38);\n      __Pyx_INCREF(function);\n      __Pyx_DECREF_SET(__pyx_t_37, function);\n    }\n  }\n  __pyx_t_4 = (__pyx_t_38) ? __Pyx_PyObject_CallOneArg(__pyx_t_37, __pyx_t_38) : __Pyx_PyObject_CallNoArg(__pyx_t_37);\n  __Pyx_XDECREF(__pyx_t_38); __pyx_t_38 = 0;\n  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1004, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_4);\n  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;\n  __pyx_t_37 = PyTuple_New(4); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 1004, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_37);\n  __Pyx_GIVEREF(__pyx_t_6);\n  PyTuple_SET_ITEM(__pyx_t_37, 0, __pyx_t_6);\n  __Pyx_GIVEREF(__pyx_t_7);\n  PyTuple_SET_ITEM(__pyx_t_37, 1, __pyx_t_7);\n  __Pyx_GIVEREF(__pyx_t_5);\n  PyTuple_SET_ITEM(__pyx_t_37, 2, __pyx_t_5);\n  __Pyx_GIVEREF(__pyx_t_4);\n  PyTuple_SET_ITEM(__pyx_t_37, 3, __pyx_t_4);\n  __pyx_t_6 = 0;\n  __pyx_t_7 = 0;\n  __pyx_t_5 = 0;\n  __pyx_t_4 = 0;\n  __pyx_r = __pyx_t_37;\n  __pyx_t_37 = 0;\n  goto __pyx_L0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":933\n *         self.SUBCONFIG13 = Lut(SUBCONFIG13)\n * \n * def marching_cubes(float[:, :, :] im not None, double isovalue,             # <<<<<<<<<<<<<<\n *                    LutProvider luts, int st=1, int classic=0,\n *                    np.ndarray[np.npy_bool, ndim=3, cast=True] mask=None):\n */\n\n  /* function exit code */\n  __pyx_L1_error:;\n  __Pyx_XDECREF(__pyx_t_4);\n  __Pyx_XDECREF(__pyx_t_5);\n  __Pyx_XDECREF(__pyx_t_6);\n  __Pyx_XDECREF(__pyx_t_7);\n  __Pyx_XDECREF(__pyx_t_37);\n  __Pyx_XDECREF(__pyx_t_38);\n  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;\n    __Pyx_PyThreadState_declare\n    __Pyx_PyThreadState_assign\n    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);\n    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer);\n  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}\n  __Pyx_AddTraceback(\"_marching_cubes_lewiner_cy.marching_cubes\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n  __pyx_r = NULL;\n  goto __pyx_L2;\n  __pyx_L0:;\n  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer);\n  __pyx_L2:;\n  __Pyx_XDECREF((PyObject *)__pyx_v_cell);\n  __PYX_XDEC_MEMVIEW(&__pyx_v_im, 1);\n  __Pyx_XGIVEREF(__pyx_r);\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\n/* \"_marching_cubes_lewiner_cy.pyx\":1008\n * \n * \n * def marching_cubes_udf(float[:, :, :] im not None, float[:, :, :, :] grads not None,             # <<<<<<<<<<<<<<\n *                    LutProvider luts, int st=1, int classic=0,\n *                    np.ndarray[np.npy_bool, ndim=3, cast=True] mask=None):\n */\n\n/* Python wrapper */\nstatic PyObject *__pyx_pw_26_marching_cubes_lewiner_cy_5marching_cubes_udf(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/\nstatic char __pyx_doc_26_marching_cubes_lewiner_cy_4marching_cubes_udf[] = \" marching_cubes(im, grads, double isovalue, LutProvider luts, int st=1, int classic=0)\\n    Main entry to apply marching cubes.\\n\\n    Masked version of marching cubes. This function will check a\\n    masking array (same size as im) to decide if the algorithm must be\\n    computed for a given voxel. This adds a small overhead that\\n    rapidly gets compensated by the fewer computed cubes\\n    Returns (vertices, faces, normals, values)\\n    \";\nstatic PyMethodDef __pyx_mdef_26_marching_cubes_lewiner_cy_5marching_cubes_udf = {\"marching_cubes_udf\", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_26_marching_cubes_lewiner_cy_5marching_cubes_udf, METH_VARARGS|METH_KEYWORDS, __pyx_doc_26_marching_cubes_lewiner_cy_4marching_cubes_udf};\nstatic PyObject *__pyx_pw_26_marching_cubes_lewiner_cy_5marching_cubes_udf(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {\n  __Pyx_memviewslice __pyx_v_im = { 0, 0, { 0 }, { 0 }, { 0 } };\n  __Pyx_memviewslice __pyx_v_grads = { 0, 0, { 0 }, { 0 }, { 0 } };\n  struct __pyx_obj_26_marching_cubes_lewiner_cy_LutProvider *__pyx_v_luts = 0;\n  int __pyx_v_st;\n  CYTHON_UNUSED int __pyx_v_classic;\n  PyArrayObject *__pyx_v_mask = 0;\n  int __pyx_lineno = 0;\n  const char *__pyx_filename = NULL;\n  int __pyx_clineno = 0;\n  PyObject *__pyx_r = 0;\n  __Pyx_RefNannyDeclarations\n  __Pyx_RefNannySetupContext(\"marching_cubes_udf (wrapper)\", 0);\n  {\n    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_im,&__pyx_n_s_grads,&__pyx_n_s_luts,&__pyx_n_s_st,&__pyx_n_s_classic,&__pyx_n_s_mask,0};\n    PyObject* values[6] = {0,0,0,0,0,0};\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":1010\n * def marching_cubes_udf(float[:, :, :] im not None, float[:, :, :, :] grads not None,\n *                    LutProvider luts, int st=1, int classic=0,\n *                    np.ndarray[np.npy_bool, ndim=3, cast=True] mask=None):             # <<<<<<<<<<<<<<\n *     \"\"\" marching_cubes(im, grads, double isovalue, LutProvider luts, int st=1, int classic=0)\n *     Main entry to apply marching cubes.\n */\n    values[5] = (PyObject *)((PyArrayObject *)Py_None);\n    if (unlikely(__pyx_kwds)) {\n      Py_ssize_t kw_args;\n      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);\n      switch (pos_args) {\n        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);\n        CYTHON_FALLTHROUGH;\n        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);\n        CYTHON_FALLTHROUGH;\n        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);\n        CYTHON_FALLTHROUGH;\n        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);\n        CYTHON_FALLTHROUGH;\n        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);\n        CYTHON_FALLTHROUGH;\n        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);\n        CYTHON_FALLTHROUGH;\n        case  0: break;\n        default: goto __pyx_L5_argtuple_error;\n      }\n      kw_args = PyDict_Size(__pyx_kwds);\n      switch (pos_args) {\n        case  0:\n        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_im)) != 0)) kw_args--;\n        else goto __pyx_L5_argtuple_error;\n        CYTHON_FALLTHROUGH;\n        case  1:\n        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grads)) != 0)) kw_args--;\n        else {\n          __Pyx_RaiseArgtupleInvalid(\"marching_cubes_udf\", 0, 3, 6, 1); __PYX_ERR(0, 1008, __pyx_L3_error)\n        }\n        CYTHON_FALLTHROUGH;\n        case  2:\n        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_luts)) != 0)) kw_args--;\n        else {\n          __Pyx_RaiseArgtupleInvalid(\"marching_cubes_udf\", 0, 3, 6, 2); __PYX_ERR(0, 1008, __pyx_L3_error)\n        }\n        CYTHON_FALLTHROUGH;\n        case  3:\n        if (kw_args > 0) {\n          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_st);\n          if (value) { values[3] = value; kw_args--; }\n        }\n        CYTHON_FALLTHROUGH;\n        case  4:\n        if (kw_args > 0) {\n          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_classic);\n          if (value) { values[4] = value; kw_args--; }\n        }\n        CYTHON_FALLTHROUGH;\n        case  5:\n        if (kw_args > 0) {\n          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mask);\n          if (value) { values[5] = value; kw_args--; }\n        }\n      }\n      if (unlikely(kw_args > 0)) {\n        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, \"marching_cubes_udf\") < 0)) __PYX_ERR(0, 1008, __pyx_L3_error)\n      }\n    } else {\n      switch (PyTuple_GET_SIZE(__pyx_args)) {\n        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);\n        CYTHON_FALLTHROUGH;\n        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);\n        CYTHON_FALLTHROUGH;\n        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);\n        CYTHON_FALLTHROUGH;\n        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);\n        values[1] = PyTuple_GET_ITEM(__pyx_args, 1);\n        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);\n        break;\n        default: goto __pyx_L5_argtuple_error;\n      }\n    }\n    __pyx_v_im = __Pyx_PyObject_to_MemoryviewSlice_dsdsds_float(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_im.memview)) __PYX_ERR(0, 1008, __pyx_L3_error)\n    __pyx_v_grads = __Pyx_PyObject_to_MemoryviewSlice_dsdsdsds_float(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_grads.memview)) __PYX_ERR(0, 1008, __pyx_L3_error)\n    __pyx_v_luts = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_LutProvider *)values[2]);\n    if (values[3]) {\n      __pyx_v_st = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_st == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1009, __pyx_L3_error)\n    } else {\n      __pyx_v_st = ((int)1);\n    }\n    if (values[4]) {\n      __pyx_v_classic = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_classic == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1009, __pyx_L3_error)\n    } else {\n      __pyx_v_classic = ((int)0);\n    }\n    __pyx_v_mask = ((PyArrayObject *)values[5]);\n  }\n  goto __pyx_L4_argument_unpacking_done;\n  __pyx_L5_argtuple_error:;\n  __Pyx_RaiseArgtupleInvalid(\"marching_cubes_udf\", 0, 3, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1008, __pyx_L3_error)\n  __pyx_L3_error:;\n  __Pyx_AddTraceback(\"_marching_cubes_lewiner_cy.marching_cubes_udf\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n  __Pyx_RefNannyFinishContext();\n  return NULL;\n  __pyx_L4_argument_unpacking_done:;\n  if (unlikely(((PyObject *)__pyx_v_im.memview) == Py_None)) {\n    PyErr_Format(PyExc_TypeError, \"Argument '%.200s' must not be None\", \"im\"); __PYX_ERR(0, 1008, __pyx_L1_error)\n  }\n  if (unlikely(((PyObject *)__pyx_v_grads.memview) == Py_None)) {\n    PyErr_Format(PyExc_TypeError, \"Argument '%.200s' must not be None\", \"grads\"); __PYX_ERR(0, 1008, __pyx_L1_error)\n  }\n  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_luts), __pyx_ptype_26_marching_cubes_lewiner_cy_LutProvider, 1, \"luts\", 0))) __PYX_ERR(0, 1009, __pyx_L1_error)\n  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mask), __pyx_ptype_5numpy_ndarray, 1, \"mask\", 0))) __PYX_ERR(0, 1010, __pyx_L1_error)\n  __pyx_r = __pyx_pf_26_marching_cubes_lewiner_cy_4marching_cubes_udf(__pyx_self, __pyx_v_im, __pyx_v_grads, __pyx_v_luts, __pyx_v_st, __pyx_v_classic, __pyx_v_mask);\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":1008\n * \n * \n * def marching_cubes_udf(float[:, :, :] im not None, float[:, :, :, :] grads not None,             # <<<<<<<<<<<<<<\n *                    LutProvider luts, int st=1, int classic=0,\n *                    np.ndarray[np.npy_bool, ndim=3, cast=True] mask=None):\n */\n\n  /* function exit code */\n  goto __pyx_L0;\n  __pyx_L1_error:;\n  __pyx_r = NULL;\n  __pyx_L0:;\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\nstatic PyObject *__pyx_pf_26_marching_cubes_lewiner_cy_4marching_cubes_udf(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_im, __Pyx_memviewslice __pyx_v_grads, struct __pyx_obj_26_marching_cubes_lewiner_cy_LutProvider *__pyx_v_luts, int __pyx_v_st, CYTHON_UNUSED int __pyx_v_classic, PyArrayObject *__pyx_v_mask) {\n  int __pyx_v_Nx;\n  int __pyx_v_Ny;\n  int __pyx_v_Nz;\n  PyObject *__pyx_v_voxel_size = 0;\n  struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *__pyx_v_cell = 0;\n  int __pyx_v_x;\n  int __pyx_v_y;\n  int __pyx_v_z;\n  int __pyx_v_x_st;\n  int __pyx_v_y_st;\n  int __pyx_v_z_st;\n  int __pyx_v_case;\n  int __pyx_v_config;\n  int __pyx_v_no_mask;\n  int __pyx_v_Nx_bound;\n  int __pyx_v_Ny_bound;\n  int __pyx_v_Nz_bound;\n  __Pyx_memviewslice __pyx_v_base_vec = { 0, 0, { 0 }, { 0 }, { 0 } };\n  float __pyx_v_avg_cube_val;\n  float __pyx_v_max_cube_val;\n  PyArrayObject *__pyx_v_inwards_facing_normals_ref = 0;\n  int __pyx_v_inwards_facing_normals_bool;\n  __Pyx_LocalBuf_ND __pyx_pybuffernd_mask;\n  __Pyx_Buffer __pyx_pybuffer_mask;\n  PyObject *__pyx_r = NULL;\n  __Pyx_RefNannyDeclarations\n  Py_ssize_t __pyx_t_1;\n  Py_ssize_t __pyx_t_2;\n  Py_ssize_t __pyx_t_3;\n  PyObject *__pyx_t_4 = NULL;\n  PyObject *__pyx_t_5 = NULL;\n  PyObject *__pyx_t_6 = NULL;\n  PyObject *__pyx_t_7 = NULL;\n  int __pyx_t_8;\n  long __pyx_t_9;\n  long __pyx_t_10;\n  long __pyx_t_11;\n  PyObject *__pyx_t_12 = NULL;\n  PyObject *__pyx_t_13 = NULL;\n  int __pyx_t_14;\n  Py_ssize_t __pyx_t_15;\n  Py_ssize_t __pyx_t_16;\n  Py_ssize_t __pyx_t_17;\n  Py_ssize_t __pyx_t_18;\n  Py_ssize_t __pyx_t_19;\n  Py_ssize_t __pyx_t_20;\n  Py_ssize_t __pyx_t_21;\n  Py_ssize_t __pyx_t_22;\n  Py_ssize_t __pyx_t_23;\n  Py_ssize_t __pyx_t_24;\n  Py_ssize_t __pyx_t_25;\n  Py_ssize_t __pyx_t_26;\n  Py_ssize_t __pyx_t_27;\n  Py_ssize_t __pyx_t_28;\n  Py_ssize_t __pyx_t_29;\n  Py_ssize_t __pyx_t_30;\n  Py_ssize_t __pyx_t_31;\n  Py_ssize_t __pyx_t_32;\n  Py_ssize_t __pyx_t_33;\n  Py_ssize_t __pyx_t_34;\n  Py_ssize_t __pyx_t_35;\n  Py_ssize_t __pyx_t_36;\n  Py_ssize_t __pyx_t_37;\n  Py_ssize_t __pyx_t_38;\n  __Pyx_memviewslice __pyx_t_39 = { 0, 0, { 0 }, { 0 }, { 0 } };\n  __Pyx_memviewslice __pyx_t_40 = { 0, 0, { 0 }, { 0 }, { 0 } };\n  __Pyx_memviewslice __pyx_t_41 = { 0, 0, { 0 }, { 0 }, { 0 } };\n  __Pyx_memviewslice __pyx_t_42 = { 0, 0, { 0 }, { 0 }, { 0 } };\n  __Pyx_memviewslice __pyx_t_43 = { 0, 0, { 0 }, { 0 }, { 0 } };\n  __Pyx_memviewslice __pyx_t_44 = { 0, 0, { 0 }, { 0 }, { 0 } };\n  __Pyx_memviewslice __pyx_t_45 = { 0, 0, { 0 }, { 0 }, { 0 } };\n  __Pyx_memviewslice __pyx_t_46 = { 0, 0, { 0 }, { 0 }, { 0 } };\n  int __pyx_lineno = 0;\n  const char *__pyx_filename = NULL;\n  int __pyx_clineno = 0;\n  __Pyx_RefNannySetupContext(\"marching_cubes_udf\", 0);\n  __pyx_pybuffer_mask.pybuffer.buf = NULL;\n  __pyx_pybuffer_mask.refcount = 0;\n  __pyx_pybuffernd_mask.data = NULL;\n  __pyx_pybuffernd_mask.rcbuffer = &__pyx_pybuffer_mask;\n  {\n    __Pyx_BufFmt_StackElem __pyx_stack[1];\n    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_mask.rcbuffer->pybuffer, (PyObject*)__pyx_v_mask, &__Pyx_TypeInfo_nn_npy_bool, PyBUF_FORMAT| PyBUF_STRIDES, 3, 1, __pyx_stack) == -1)) __PYX_ERR(0, 1008, __pyx_L1_error)\n  }\n  __pyx_pybuffernd_mask.diminfo[0].strides = __pyx_pybuffernd_mask.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_mask.diminfo[0].shape = __pyx_pybuffernd_mask.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_mask.diminfo[1].strides = __pyx_pybuffernd_mask.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_mask.diminfo[1].shape = __pyx_pybuffernd_mask.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_mask.diminfo[2].strides = __pyx_pybuffernd_mask.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_mask.diminfo[2].shape = __pyx_pybuffernd_mask.rcbuffer->pybuffer.shape[2];\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":1022\n *     # Get dimemsnions\n *     cdef int Nx, Ny, Nz\n *     Nx, Ny, Nz = im.shape[2], im.shape[1], im.shape[0]             # <<<<<<<<<<<<<<\n *     # Compute voxel size\n *     cdef voxel_size = 2.0 / (Nx - 1)\n */\n  __pyx_t_1 = (__pyx_v_im.shape[2]);\n  __pyx_t_2 = (__pyx_v_im.shape[1]);\n  __pyx_t_3 = (__pyx_v_im.shape[0]);\n  __pyx_v_Nx = __pyx_t_1;\n  __pyx_v_Ny = __pyx_t_2;\n  __pyx_v_Nz = __pyx_t_3;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":1024\n *     Nx, Ny, Nz = im.shape[2], im.shape[1], im.shape[0]\n *     # Compute voxel size\n *     cdef voxel_size = 2.0 / (Nx - 1)             # <<<<<<<<<<<<<<\n * \n *     # Create cell to use throughout\n */\n  __pyx_t_4 = PyFloat_FromDouble((2.0 / (__pyx_v_Nx - 1))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1024, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_4);\n  __pyx_v_voxel_size = __pyx_t_4;\n  __pyx_t_4 = 0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":1027\n * \n *     # Create cell to use throughout\n *     cdef Cell cell = Cell(luts, Nx, Ny, Nz)             # <<<<<<<<<<<<<<\n * \n *     # Typedef variables\n */\n  __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_Nx); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1027, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_4);\n  __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_Ny); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1027, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_5);\n  __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_Nz); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1027, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_6);\n  __pyx_t_7 = PyTuple_New(4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1027, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_7);\n  __Pyx_INCREF(((PyObject *)__pyx_v_luts));\n  __Pyx_GIVEREF(((PyObject *)__pyx_v_luts));\n  PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_v_luts));\n  __Pyx_GIVEREF(__pyx_t_4);\n  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_4);\n  __Pyx_GIVEREF(__pyx_t_5);\n  PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_5);\n  __Pyx_GIVEREF(__pyx_t_6);\n  PyTuple_SET_ITEM(__pyx_t_7, 3, __pyx_t_6);\n  __pyx_t_4 = 0;\n  __pyx_t_5 = 0;\n  __pyx_t_6 = 0;\n  __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_26_marching_cubes_lewiner_cy_Cell), __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1027, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_6);\n  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;\n  __pyx_v_cell = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *)__pyx_t_6);\n  __pyx_t_6 = 0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":1033\n *     cdef int nt\n *     cdef int case, config, subconfig\n *     cdef bint no_mask = mask is None             # <<<<<<<<<<<<<<\n *     # Unfortunately specifying a step in range() significantly degrades\n *     # performance. Therefore we use a while loop.\n */\n  __pyx_t_8 = (((PyObject *)__pyx_v_mask) == Py_None);\n  __pyx_v_no_mask = __pyx_t_8;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":1039\n *     #       ->  Nx_bound = max_allowable_x + 1 - 2 * st\n *     #       ->  Nx_bound = Nx - 2 * st\n *     assert st > 0             # <<<<<<<<<<<<<<\n *     cdef int Nx_bound, Ny_bound, Nz_bound\n *     Nx_bound, Ny_bound, Nz_bound = Nx - 2 * st, Ny - 2 * st, Nz - 2 * st  # precalculated index range\n */\n  #ifndef CYTHON_WITHOUT_ASSERTIONS\n  if (unlikely(!Py_OptimizeFlag)) {\n    if (unlikely(!((__pyx_v_st > 0) != 0))) {\n      PyErr_SetNone(PyExc_AssertionError);\n      __PYX_ERR(0, 1039, __pyx_L1_error)\n    }\n  }\n  #endif\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":1041\n *     assert st > 0\n *     cdef int Nx_bound, Ny_bound, Nz_bound\n *     Nx_bound, Ny_bound, Nz_bound = Nx - 2 * st, Ny - 2 * st, Nz - 2 * st  # precalculated index range             # <<<<<<<<<<<<<<\n *     cdef float[:] base_vec\n * \n */\n  __pyx_t_9 = (__pyx_v_Nx - (2 * __pyx_v_st));\n  __pyx_t_10 = (__pyx_v_Ny - (2 * __pyx_v_st));\n  __pyx_t_11 = (__pyx_v_Nz - (2 * __pyx_v_st));\n  __pyx_v_Nx_bound = __pyx_t_9;\n  __pyx_v_Ny_bound = __pyx_t_10;\n  __pyx_v_Nz_bound = __pyx_t_11;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":1046\n *     cdef float avg_cube_val\n *     cdef float max_cube_val\n *     cdef np.ndarray inwards_facing_normals_ref= np.array([[[[1., 1., 1.],             # <<<<<<<<<<<<<<\n *                                         [1., 1., -1.]],\n *                                         [[1., -1., 1.],\n */\n  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1046, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_6);\n  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_array); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1046, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_7);\n  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;\n  __pyx_t_6 = PyList_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1046, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_6);\n  __Pyx_INCREF(__pyx_float_1_);\n  __Pyx_GIVEREF(__pyx_float_1_);\n  PyList_SET_ITEM(__pyx_t_6, 0, __pyx_float_1_);\n  __Pyx_INCREF(__pyx_float_1_);\n  __Pyx_GIVEREF(__pyx_float_1_);\n  PyList_SET_ITEM(__pyx_t_6, 1, __pyx_float_1_);\n  __Pyx_INCREF(__pyx_float_1_);\n  __Pyx_GIVEREF(__pyx_float_1_);\n  PyList_SET_ITEM(__pyx_t_6, 2, __pyx_float_1_);\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":1047\n *     cdef float max_cube_val\n *     cdef np.ndarray inwards_facing_normals_ref= np.array([[[[1., 1., 1.],\n *                                         [1., 1., -1.]],             # <<<<<<<<<<<<<<\n *                                         [[1., -1., 1.],\n *                                         [1., -1., -1.]]],\n */\n  __pyx_t_5 = PyList_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1047, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_5);\n  __Pyx_INCREF(__pyx_float_1_);\n  __Pyx_GIVEREF(__pyx_float_1_);\n  PyList_SET_ITEM(__pyx_t_5, 0, __pyx_float_1_);\n  __Pyx_INCREF(__pyx_float_1_);\n  __Pyx_GIVEREF(__pyx_float_1_);\n  PyList_SET_ITEM(__pyx_t_5, 1, __pyx_float_1_);\n  __Pyx_INCREF(__pyx_float_neg_1_);\n  __Pyx_GIVEREF(__pyx_float_neg_1_);\n  PyList_SET_ITEM(__pyx_t_5, 2, __pyx_float_neg_1_);\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":1046\n *     cdef float avg_cube_val\n *     cdef float max_cube_val\n *     cdef np.ndarray inwards_facing_normals_ref= np.array([[[[1., 1., 1.],             # <<<<<<<<<<<<<<\n *                                         [1., 1., -1.]],\n *                                         [[1., -1., 1.],\n */\n  __pyx_t_4 = PyList_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1046, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_4);\n  __Pyx_GIVEREF(__pyx_t_6);\n  PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);\n  __Pyx_GIVEREF(__pyx_t_5);\n  PyList_SET_ITEM(__pyx_t_4, 1, __pyx_t_5);\n  __pyx_t_6 = 0;\n  __pyx_t_5 = 0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":1048\n *     cdef np.ndarray inwards_facing_normals_ref= np.array([[[[1., 1., 1.],\n *                                         [1., 1., -1.]],\n *                                         [[1., -1., 1.],             # <<<<<<<<<<<<<<\n *                                         [1., -1., -1.]]],\n *                                         [[[-1., 1., 1.],\n */\n  __pyx_t_5 = PyList_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1048, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_5);\n  __Pyx_INCREF(__pyx_float_1_);\n  __Pyx_GIVEREF(__pyx_float_1_);\n  PyList_SET_ITEM(__pyx_t_5, 0, __pyx_float_1_);\n  __Pyx_INCREF(__pyx_float_neg_1_);\n  __Pyx_GIVEREF(__pyx_float_neg_1_);\n  PyList_SET_ITEM(__pyx_t_5, 1, __pyx_float_neg_1_);\n  __Pyx_INCREF(__pyx_float_1_);\n  __Pyx_GIVEREF(__pyx_float_1_);\n  PyList_SET_ITEM(__pyx_t_5, 2, __pyx_float_1_);\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":1049\n *                                         [1., 1., -1.]],\n *                                         [[1., -1., 1.],\n *                                         [1., -1., -1.]]],             # <<<<<<<<<<<<<<\n *                                         [[[-1., 1., 1.],\n *                                         [-1., 1., -1.]],\n */\n  __pyx_t_6 = PyList_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1049, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_6);\n  __Pyx_INCREF(__pyx_float_1_);\n  __Pyx_GIVEREF(__pyx_float_1_);\n  PyList_SET_ITEM(__pyx_t_6, 0, __pyx_float_1_);\n  __Pyx_INCREF(__pyx_float_neg_1_);\n  __Pyx_GIVEREF(__pyx_float_neg_1_);\n  PyList_SET_ITEM(__pyx_t_6, 1, __pyx_float_neg_1_);\n  __Pyx_INCREF(__pyx_float_neg_1_);\n  __Pyx_GIVEREF(__pyx_float_neg_1_);\n  PyList_SET_ITEM(__pyx_t_6, 2, __pyx_float_neg_1_);\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":1048\n *     cdef np.ndarray inwards_facing_normals_ref= np.array([[[[1., 1., 1.],\n *                                         [1., 1., -1.]],\n *                                         [[1., -1., 1.],             # <<<<<<<<<<<<<<\n *                                         [1., -1., -1.]]],\n *                                         [[[-1., 1., 1.],\n */\n  __pyx_t_12 = PyList_New(2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1048, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_12);\n  __Pyx_GIVEREF(__pyx_t_5);\n  PyList_SET_ITEM(__pyx_t_12, 0, __pyx_t_5);\n  __Pyx_GIVEREF(__pyx_t_6);\n  PyList_SET_ITEM(__pyx_t_12, 1, __pyx_t_6);\n  __pyx_t_5 = 0;\n  __pyx_t_6 = 0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":1046\n *     cdef float avg_cube_val\n *     cdef float max_cube_val\n *     cdef np.ndarray inwards_facing_normals_ref= np.array([[[[1., 1., 1.],             # <<<<<<<<<<<<<<\n *                                         [1., 1., -1.]],\n *                                         [[1., -1., 1.],\n */\n  __pyx_t_6 = PyList_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1046, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_6);\n  __Pyx_GIVEREF(__pyx_t_4);\n  PyList_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);\n  __Pyx_GIVEREF(__pyx_t_12);\n  PyList_SET_ITEM(__pyx_t_6, 1, __pyx_t_12);\n  __pyx_t_4 = 0;\n  __pyx_t_12 = 0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":1050\n *                                         [[1., -1., 1.],\n *                                         [1., -1., -1.]]],\n *                                         [[[-1., 1., 1.],             # <<<<<<<<<<<<<<\n *                                         [-1., 1., -1.]],\n *                                         [[-1., -1., 1.],\n */\n  __pyx_t_12 = PyList_New(3); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1050, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_12);\n  __Pyx_INCREF(__pyx_float_neg_1_);\n  __Pyx_GIVEREF(__pyx_float_neg_1_);\n  PyList_SET_ITEM(__pyx_t_12, 0, __pyx_float_neg_1_);\n  __Pyx_INCREF(__pyx_float_1_);\n  __Pyx_GIVEREF(__pyx_float_1_);\n  PyList_SET_ITEM(__pyx_t_12, 1, __pyx_float_1_);\n  __Pyx_INCREF(__pyx_float_1_);\n  __Pyx_GIVEREF(__pyx_float_1_);\n  PyList_SET_ITEM(__pyx_t_12, 2, __pyx_float_1_);\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":1051\n *                                         [1., -1., -1.]]],\n *                                         [[[-1., 1., 1.],\n *                                         [-1., 1., -1.]],             # <<<<<<<<<<<<<<\n *                                         [[-1., -1., 1.],\n *                                         [-1., -1., -1.]]]], dtype=np.float32)\n */\n  __pyx_t_4 = PyList_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1051, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_4);\n  __Pyx_INCREF(__pyx_float_neg_1_);\n  __Pyx_GIVEREF(__pyx_float_neg_1_);\n  PyList_SET_ITEM(__pyx_t_4, 0, __pyx_float_neg_1_);\n  __Pyx_INCREF(__pyx_float_1_);\n  __Pyx_GIVEREF(__pyx_float_1_);\n  PyList_SET_ITEM(__pyx_t_4, 1, __pyx_float_1_);\n  __Pyx_INCREF(__pyx_float_neg_1_);\n  __Pyx_GIVEREF(__pyx_float_neg_1_);\n  PyList_SET_ITEM(__pyx_t_4, 2, __pyx_float_neg_1_);\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":1050\n *                                         [[1., -1., 1.],\n *                                         [1., -1., -1.]]],\n *                                         [[[-1., 1., 1.],             # <<<<<<<<<<<<<<\n *                                         [-1., 1., -1.]],\n *                                         [[-1., -1., 1.],\n */\n  __pyx_t_5 = PyList_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1050, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_5);\n  __Pyx_GIVEREF(__pyx_t_12);\n  PyList_SET_ITEM(__pyx_t_5, 0, __pyx_t_12);\n  __Pyx_GIVEREF(__pyx_t_4);\n  PyList_SET_ITEM(__pyx_t_5, 1, __pyx_t_4);\n  __pyx_t_12 = 0;\n  __pyx_t_4 = 0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":1052\n *                                         [[[-1., 1., 1.],\n *                                         [-1., 1., -1.]],\n *                                         [[-1., -1., 1.],             # <<<<<<<<<<<<<<\n *                                         [-1., -1., -1.]]]], dtype=np.float32)\n *     cdef int inwards_facing_normals_bool\n */\n  __pyx_t_4 = PyList_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1052, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_4);\n  __Pyx_INCREF(__pyx_float_neg_1_);\n  __Pyx_GIVEREF(__pyx_float_neg_1_);\n  PyList_SET_ITEM(__pyx_t_4, 0, __pyx_float_neg_1_);\n  __Pyx_INCREF(__pyx_float_neg_1_);\n  __Pyx_GIVEREF(__pyx_float_neg_1_);\n  PyList_SET_ITEM(__pyx_t_4, 1, __pyx_float_neg_1_);\n  __Pyx_INCREF(__pyx_float_1_);\n  __Pyx_GIVEREF(__pyx_float_1_);\n  PyList_SET_ITEM(__pyx_t_4, 2, __pyx_float_1_);\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":1053\n *                                         [-1., 1., -1.]],\n *                                         [[-1., -1., 1.],\n *                                         [-1., -1., -1.]]]], dtype=np.float32)             # <<<<<<<<<<<<<<\n *     cdef int inwards_facing_normals_bool\n * \n */\n  __pyx_t_12 = PyList_New(3); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1053, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_12);\n  __Pyx_INCREF(__pyx_float_neg_1_);\n  __Pyx_GIVEREF(__pyx_float_neg_1_);\n  PyList_SET_ITEM(__pyx_t_12, 0, __pyx_float_neg_1_);\n  __Pyx_INCREF(__pyx_float_neg_1_);\n  __Pyx_GIVEREF(__pyx_float_neg_1_);\n  PyList_SET_ITEM(__pyx_t_12, 1, __pyx_float_neg_1_);\n  __Pyx_INCREF(__pyx_float_neg_1_);\n  __Pyx_GIVEREF(__pyx_float_neg_1_);\n  PyList_SET_ITEM(__pyx_t_12, 2, __pyx_float_neg_1_);\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":1052\n *                                         [[[-1., 1., 1.],\n *                                         [-1., 1., -1.]],\n *                                         [[-1., -1., 1.],             # <<<<<<<<<<<<<<\n *                                         [-1., -1., -1.]]]], dtype=np.float32)\n *     cdef int inwards_facing_normals_bool\n */\n  __pyx_t_13 = PyList_New(2); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1052, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_13);\n  __Pyx_GIVEREF(__pyx_t_4);\n  PyList_SET_ITEM(__pyx_t_13, 0, __pyx_t_4);\n  __Pyx_GIVEREF(__pyx_t_12);\n  PyList_SET_ITEM(__pyx_t_13, 1, __pyx_t_12);\n  __pyx_t_4 = 0;\n  __pyx_t_12 = 0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":1050\n *                                         [[1., -1., 1.],\n *                                         [1., -1., -1.]]],\n *                                         [[[-1., 1., 1.],             # <<<<<<<<<<<<<<\n *                                         [-1., 1., -1.]],\n *                                         [[-1., -1., 1.],\n */\n  __pyx_t_12 = PyList_New(2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1050, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_12);\n  __Pyx_GIVEREF(__pyx_t_5);\n  PyList_SET_ITEM(__pyx_t_12, 0, __pyx_t_5);\n  __Pyx_GIVEREF(__pyx_t_13);\n  PyList_SET_ITEM(__pyx_t_12, 1, __pyx_t_13);\n  __pyx_t_5 = 0;\n  __pyx_t_13 = 0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":1046\n *     cdef float avg_cube_val\n *     cdef float max_cube_val\n *     cdef np.ndarray inwards_facing_normals_ref= np.array([[[[1., 1., 1.],             # <<<<<<<<<<<<<<\n *                                         [1., 1., -1.]],\n *                                         [[1., -1., 1.],\n */\n  __pyx_t_13 = PyList_New(2); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1046, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_13);\n  __Pyx_GIVEREF(__pyx_t_6);\n  PyList_SET_ITEM(__pyx_t_13, 0, __pyx_t_6);\n  __Pyx_GIVEREF(__pyx_t_12);\n  PyList_SET_ITEM(__pyx_t_13, 1, __pyx_t_12);\n  __pyx_t_6 = 0;\n  __pyx_t_12 = 0;\n  __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1046, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_12);\n  __Pyx_GIVEREF(__pyx_t_13);\n  PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_13);\n  __pyx_t_13 = 0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":1053\n *                                         [-1., 1., -1.]],\n *                                         [[-1., -1., 1.],\n *                                         [-1., -1., -1.]]]], dtype=np.float32)             # <<<<<<<<<<<<<<\n *     cdef int inwards_facing_normals_bool\n * \n */\n  __pyx_t_13 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1053, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_13);\n  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1053, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_6);\n  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_float32); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1053, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_5);\n  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;\n  if (PyDict_SetItem(__pyx_t_13, __pyx_n_s_dtype, __pyx_t_5) < 0) __PYX_ERR(0, 1053, __pyx_L1_error)\n  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":1046\n *     cdef float avg_cube_val\n *     cdef float max_cube_val\n *     cdef np.ndarray inwards_facing_normals_ref= np.array([[[[1., 1., 1.],             # <<<<<<<<<<<<<<\n *                                         [1., 1., -1.]],\n *                                         [[1., -1., 1.],\n */\n  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_12, __pyx_t_13); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1046, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_5);\n  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;\n  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;\n  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;\n  if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1046, __pyx_L1_error)\n  __pyx_v_inwards_facing_normals_ref = ((PyArrayObject *)__pyx_t_5);\n  __pyx_t_5 = 0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":1057\n * \n * \n *     z = -st             # <<<<<<<<<<<<<<\n *     while z < Nz_bound:\n *         z += st\n */\n  __pyx_v_z = (-__pyx_v_st);\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":1058\n * \n *     z = -st\n *     while z < Nz_bound:             # <<<<<<<<<<<<<<\n *         z += st\n *         z_st = z + st\n */\n  while (1) {\n    __pyx_t_8 = ((__pyx_v_z < __pyx_v_Nz_bound) != 0);\n    if (!__pyx_t_8) break;\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":1059\n *     z = -st\n *     while z < Nz_bound:\n *         z += st             # <<<<<<<<<<<<<<\n *         z_st = z + st\n * \n */\n    __pyx_v_z = (__pyx_v_z + __pyx_v_st);\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":1060\n *     while z < Nz_bound:\n *         z += st\n *         z_st = z + st             # <<<<<<<<<<<<<<\n * \n *         cell.new_z_value()  # Indicate that we enter a new layer\n */\n    __pyx_v_z_st = (__pyx_v_z + __pyx_v_st);\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":1062\n *         z_st = z + st\n * \n *         cell.new_z_value()  # Indicate that we enter a new layer             # <<<<<<<<<<<<<<\n *         y = -st\n *         while y < Ny_bound:\n */\n    ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_cell->__pyx_vtab)->new_z_value(__pyx_v_cell);\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":1063\n * \n *         cell.new_z_value()  # Indicate that we enter a new layer\n *         y = -st             # <<<<<<<<<<<<<<\n *         while y < Ny_bound:\n *             y += st\n */\n    __pyx_v_y = (-__pyx_v_st);\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":1064\n *         cell.new_z_value()  # Indicate that we enter a new layer\n *         y = -st\n *         while y < Ny_bound:             # <<<<<<<<<<<<<<\n *             y += st\n *             y_st = y + st\n */\n    while (1) {\n      __pyx_t_8 = ((__pyx_v_y < __pyx_v_Ny_bound) != 0);\n      if (!__pyx_t_8) break;\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1065\n *         y = -st\n *         while y < Ny_bound:\n *             y += st             # <<<<<<<<<<<<<<\n *             y_st = y + st\n * \n */\n      __pyx_v_y = (__pyx_v_y + __pyx_v_st);\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1066\n *         while y < Ny_bound:\n *             y += st\n *             y_st = y + st             # <<<<<<<<<<<<<<\n * \n *             x = -st\n */\n      __pyx_v_y_st = (__pyx_v_y + __pyx_v_st);\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1068\n *             y_st = y + st\n * \n *             x = -st             # <<<<<<<<<<<<<<\n *             while x < Nx_bound:\n *                 x += st\n */\n      __pyx_v_x = (-__pyx_v_st);\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1069\n * \n *             x = -st\n *             while x < Nx_bound:             # <<<<<<<<<<<<<<\n *                 x += st\n *                 x_st = x + st\n */\n      while (1) {\n        __pyx_t_8 = ((__pyx_v_x < __pyx_v_Nx_bound) != 0);\n        if (!__pyx_t_8) break;\n\n        /* \"_marching_cubes_lewiner_cy.pyx\":1070\n *             x = -st\n *             while x < Nx_bound:\n *                 x += st             # <<<<<<<<<<<<<<\n *                 x_st = x + st\n *                 if no_mask or mask[z_st, y_st, x_st]:\n */\n        __pyx_v_x = (__pyx_v_x + __pyx_v_st);\n\n        /* \"_marching_cubes_lewiner_cy.pyx\":1071\n *             while x < Nx_bound:\n *                 x += st\n *                 x_st = x + st             # <<<<<<<<<<<<<<\n *                 if no_mask or mask[z_st, y_st, x_st]:\n * \n */\n        __pyx_v_x_st = (__pyx_v_x + __pyx_v_st);\n\n        /* \"_marching_cubes_lewiner_cy.pyx\":1072\n *                 x += st\n *                 x_st = x + st\n *                 if no_mask or mask[z_st, y_st, x_st]:             # <<<<<<<<<<<<<<\n * \n *                     avg_cube_val = avg_cube( im[z   ,y, x], im[z   ,y, x_st], im[z   ,y_st, x_st], im[z   ,y_st, x],\n */\n        __pyx_t_14 = (__pyx_v_no_mask != 0);\n        if (!__pyx_t_14) {\n        } else {\n          __pyx_t_8 = __pyx_t_14;\n          goto __pyx_L10_bool_binop_done;\n        }\n        __pyx_t_15 = __pyx_v_z_st;\n        __pyx_t_16 = __pyx_v_y_st;\n        __pyx_t_17 = __pyx_v_x_st;\n        __pyx_t_14 = ((*__Pyx_BufPtrStrided3d(npy_bool *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_mask.diminfo[0].strides, __pyx_t_16, __pyx_pybuffernd_mask.diminfo[1].strides, __pyx_t_17, __pyx_pybuffernd_mask.diminfo[2].strides)) != 0);\n        __pyx_t_8 = __pyx_t_14;\n        __pyx_L10_bool_binop_done:;\n        if (__pyx_t_8) {\n\n          /* \"_marching_cubes_lewiner_cy.pyx\":1074\n *                 if no_mask or mask[z_st, y_st, x_st]:\n * \n *                     avg_cube_val = avg_cube( im[z   ,y, x], im[z   ,y, x_st], im[z   ,y_st, x_st], im[z   ,y_st, x],             # <<<<<<<<<<<<<<\n *                                     im[z_st,y, x], im[z_st,y, x_st], im[z_st,y_st, x_st], im[z_st,y_st, x])\n * \n */\n          __pyx_t_17 = __pyx_v_z;\n          __pyx_t_16 = __pyx_v_y;\n          __pyx_t_15 = __pyx_v_x;\n          __pyx_t_18 = __pyx_v_z;\n          __pyx_t_19 = __pyx_v_y;\n          __pyx_t_20 = __pyx_v_x_st;\n          __pyx_t_21 = __pyx_v_z;\n          __pyx_t_22 = __pyx_v_y_st;\n          __pyx_t_23 = __pyx_v_x_st;\n          __pyx_t_24 = __pyx_v_z;\n          __pyx_t_25 = __pyx_v_y_st;\n          __pyx_t_26 = __pyx_v_x;\n\n          /* \"_marching_cubes_lewiner_cy.pyx\":1075\n * \n *                     avg_cube_val = avg_cube( im[z   ,y, x], im[z   ,y, x_st], im[z   ,y_st, x_st], im[z   ,y_st, x],\n *                                     im[z_st,y, x], im[z_st,y, x_st], im[z_st,y_st, x_st], im[z_st,y_st, x])             # <<<<<<<<<<<<<<\n * \n *                     max_cube_val = max_cube( im[z   ,y, x], im[z   ,y, x_st], im[z   ,y_st, x_st], im[z   ,y_st, x],\n */\n          __pyx_t_27 = __pyx_v_z_st;\n          __pyx_t_28 = __pyx_v_y;\n          __pyx_t_29 = __pyx_v_x;\n          __pyx_t_30 = __pyx_v_z_st;\n          __pyx_t_31 = __pyx_v_y;\n          __pyx_t_32 = __pyx_v_x_st;\n          __pyx_t_33 = __pyx_v_z_st;\n          __pyx_t_34 = __pyx_v_y_st;\n          __pyx_t_35 = __pyx_v_x_st;\n          __pyx_t_36 = __pyx_v_z_st;\n          __pyx_t_37 = __pyx_v_y_st;\n          __pyx_t_38 = __pyx_v_x;\n\n          /* \"_marching_cubes_lewiner_cy.pyx\":1074\n *                 if no_mask or mask[z_st, y_st, x_st]:\n * \n *                     avg_cube_val = avg_cube( im[z   ,y, x], im[z   ,y, x_st], im[z   ,y_st, x_st], im[z   ,y_st, x],             # <<<<<<<<<<<<<<\n *                                     im[z_st,y, x], im[z_st,y, x_st], im[z_st,y_st, x_st], im[z_st,y_st, x])\n * \n */\n          __pyx_v_avg_cube_val = __pyx_f_26_marching_cubes_lewiner_cy_avg_cube((*((float *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_im.data + __pyx_t_17 * __pyx_v_im.strides[0]) ) + __pyx_t_16 * __pyx_v_im.strides[1]) ) + __pyx_t_15 * __pyx_v_im.strides[2]) ))), (*((float *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_im.data + __pyx_t_18 * __pyx_v_im.strides[0]) ) + __pyx_t_19 * __pyx_v_im.strides[1]) ) + __pyx_t_20 * __pyx_v_im.strides[2]) ))), (*((float *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_im.data + __pyx_t_21 * __pyx_v_im.strides[0]) ) + __pyx_t_22 * __pyx_v_im.strides[1]) ) + __pyx_t_23 * __pyx_v_im.strides[2]) ))), (*((float *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_im.data + __pyx_t_24 * __pyx_v_im.strides[0]) ) + __pyx_t_25 * __pyx_v_im.strides[1]) ) + __pyx_t_26 * __pyx_v_im.strides[2]) ))), (*((float *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_im.data + __pyx_t_27 * __pyx_v_im.strides[0]) ) + __pyx_t_28 * __pyx_v_im.strides[1]) ) + __pyx_t_29 * __pyx_v_im.strides[2]) ))), (*((float *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_im.data + __pyx_t_30 * __pyx_v_im.strides[0]) ) + __pyx_t_31 * __pyx_v_im.strides[1]) ) + __pyx_t_32 * __pyx_v_im.strides[2]) ))), (*((float *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_im.data + __pyx_t_33 * __pyx_v_im.strides[0]) ) + __pyx_t_34 * __pyx_v_im.strides[1]) ) + __pyx_t_35 * __pyx_v_im.strides[2]) ))), (*((float *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_im.data + __pyx_t_36 * __pyx_v_im.strides[0]) ) + __pyx_t_37 * __pyx_v_im.strides[1]) ) + __pyx_t_38 * __pyx_v_im.strides[2]) ))));\n\n          /* \"_marching_cubes_lewiner_cy.pyx\":1077\n *                                     im[z_st,y, x], im[z_st,y, x_st], im[z_st,y_st, x_st], im[z_st,y_st, x])\n * \n *                     max_cube_val = max_cube( im[z   ,y, x], im[z   ,y, x_st], im[z   ,y_st, x_st], im[z   ,y_st, x],             # <<<<<<<<<<<<<<\n *                                     im[z_st,y, x], im[z_st,y, x_st], im[z_st,y_st, x_st], im[z_st,y_st, x])\n * \n */\n          __pyx_t_38 = __pyx_v_z;\n          __pyx_t_37 = __pyx_v_y;\n          __pyx_t_36 = __pyx_v_x;\n          __pyx_t_35 = __pyx_v_z;\n          __pyx_t_34 = __pyx_v_y;\n          __pyx_t_33 = __pyx_v_x_st;\n          __pyx_t_32 = __pyx_v_z;\n          __pyx_t_31 = __pyx_v_y_st;\n          __pyx_t_30 = __pyx_v_x_st;\n          __pyx_t_29 = __pyx_v_z;\n          __pyx_t_28 = __pyx_v_y_st;\n          __pyx_t_27 = __pyx_v_x;\n\n          /* \"_marching_cubes_lewiner_cy.pyx\":1078\n * \n *                     max_cube_val = max_cube( im[z   ,y, x], im[z   ,y, x_st], im[z   ,y_st, x_st], im[z   ,y_st, x],\n *                                     im[z_st,y, x], im[z_st,y, x_st], im[z_st,y_st, x_st], im[z_st,y_st, x])             # <<<<<<<<<<<<<<\n * \n *                     if avg_cube_val < 1.05 * voxel_size and max_cube_val <= 1.74 * voxel_size:\n */\n          __pyx_t_26 = __pyx_v_z_st;\n          __pyx_t_25 = __pyx_v_y;\n          __pyx_t_24 = __pyx_v_x;\n          __pyx_t_23 = __pyx_v_z_st;\n          __pyx_t_22 = __pyx_v_y;\n          __pyx_t_21 = __pyx_v_x_st;\n          __pyx_t_20 = __pyx_v_z_st;\n          __pyx_t_19 = __pyx_v_y_st;\n          __pyx_t_18 = __pyx_v_x_st;\n          __pyx_t_15 = __pyx_v_z_st;\n          __pyx_t_16 = __pyx_v_y_st;\n          __pyx_t_17 = __pyx_v_x;\n\n          /* \"_marching_cubes_lewiner_cy.pyx\":1077\n *                                     im[z_st,y, x], im[z_st,y, x_st], im[z_st,y_st, x_st], im[z_st,y_st, x])\n * \n *                     max_cube_val = max_cube( im[z   ,y, x], im[z   ,y, x_st], im[z   ,y_st, x_st], im[z   ,y_st, x],             # <<<<<<<<<<<<<<\n *                                     im[z_st,y, x], im[z_st,y, x_st], im[z_st,y_st, x_st], im[z_st,y_st, x])\n * \n */\n          __pyx_v_max_cube_val = __pyx_f_26_marching_cubes_lewiner_cy_max_cube((*((float *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_im.data + __pyx_t_38 * __pyx_v_im.strides[0]) ) + __pyx_t_37 * __pyx_v_im.strides[1]) ) + __pyx_t_36 * __pyx_v_im.strides[2]) ))), (*((float *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_im.data + __pyx_t_35 * __pyx_v_im.strides[0]) ) + __pyx_t_34 * __pyx_v_im.strides[1]) ) + __pyx_t_33 * __pyx_v_im.strides[2]) ))), (*((float *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_im.data + __pyx_t_32 * __pyx_v_im.strides[0]) ) + __pyx_t_31 * __pyx_v_im.strides[1]) ) + __pyx_t_30 * __pyx_v_im.strides[2]) ))), (*((float *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_im.data + __pyx_t_29 * __pyx_v_im.strides[0]) ) + __pyx_t_28 * __pyx_v_im.strides[1]) ) + __pyx_t_27 * __pyx_v_im.strides[2]) ))), (*((float *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_im.data + __pyx_t_26 * __pyx_v_im.strides[0]) ) + __pyx_t_25 * __pyx_v_im.strides[1]) ) + __pyx_t_24 * __pyx_v_im.strides[2]) ))), (*((float *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_im.data + __pyx_t_23 * __pyx_v_im.strides[0]) ) + __pyx_t_22 * __pyx_v_im.strides[1]) ) + __pyx_t_21 * __pyx_v_im.strides[2]) ))), (*((float *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_im.data + __pyx_t_20 * __pyx_v_im.strides[0]) ) + __pyx_t_19 * __pyx_v_im.strides[1]) ) + __pyx_t_18 * __pyx_v_im.strides[2]) ))), (*((float *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_im.data + __pyx_t_15 * __pyx_v_im.strides[0]) ) + __pyx_t_16 * __pyx_v_im.strides[1]) ) + __pyx_t_17 * __pyx_v_im.strides[2]) ))));\n\n          /* \"_marching_cubes_lewiner_cy.pyx\":1080\n *                                     im[z_st,y, x], im[z_st,y, x_st], im[z_st,y_st, x_st], im[z_st,y_st, x])\n * \n *                     if avg_cube_val < 1.05 * voxel_size and max_cube_val <= 1.74 * voxel_size:             # <<<<<<<<<<<<<<\n *                         # Choose base vector for the dot product that is not (0,0,0)\n *                         # in a corner of the cube\n */\n          __pyx_t_5 = PyFloat_FromDouble(__pyx_v_avg_cube_val); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1080, __pyx_L1_error)\n          __Pyx_GOTREF(__pyx_t_5);\n          __pyx_t_13 = PyNumber_Multiply(__pyx_float_1_05, __pyx_v_voxel_size); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1080, __pyx_L1_error)\n          __Pyx_GOTREF(__pyx_t_13);\n          __pyx_t_12 = PyObject_RichCompare(__pyx_t_5, __pyx_t_13, Py_LT); __Pyx_XGOTREF(__pyx_t_12); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1080, __pyx_L1_error)\n          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;\n          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;\n          __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(0, 1080, __pyx_L1_error)\n          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;\n          if (__pyx_t_14) {\n          } else {\n            __pyx_t_8 = __pyx_t_14;\n            goto __pyx_L13_bool_binop_done;\n          }\n          __pyx_t_12 = PyFloat_FromDouble(__pyx_v_max_cube_val); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1080, __pyx_L1_error)\n          __Pyx_GOTREF(__pyx_t_12);\n          __pyx_t_13 = PyNumber_Multiply(__pyx_float_1_74, __pyx_v_voxel_size); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1080, __pyx_L1_error)\n          __Pyx_GOTREF(__pyx_t_13);\n          __pyx_t_5 = PyObject_RichCompare(__pyx_t_12, __pyx_t_13, Py_LE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1080, __pyx_L1_error)\n          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;\n          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;\n          __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(0, 1080, __pyx_L1_error)\n          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;\n          __pyx_t_8 = __pyx_t_14;\n          __pyx_L13_bool_binop_done:;\n          if (__pyx_t_8) {\n\n            /* \"_marching_cubes_lewiner_cy.pyx\":1083\n *                         # Choose base vector for the dot product that is not (0,0,0)\n *                         # in a corner of the cube\n *                         if not non_zero_norm(grads[z,y,x]) == 0:             # <<<<<<<<<<<<<<\n *                             base_vec = grads[z,y,x]\n *                         elif not non_zero_norm(grads[z,y,x_st]) == 0:\n */\n            __pyx_t_39.data = __pyx_v_grads.data;\n            __pyx_t_39.memview = __pyx_v_grads.memview;\n            __PYX_INC_MEMVIEW(&__pyx_t_39, 0);\n            {\n    Py_ssize_t __pyx_tmp_idx = __pyx_v_z;\n    Py_ssize_t __pyx_tmp_stride = __pyx_v_grads.strides[0];\n        __pyx_t_39.data += __pyx_tmp_idx * __pyx_tmp_stride;\n}\n\n{\n    Py_ssize_t __pyx_tmp_idx = __pyx_v_y;\n    Py_ssize_t __pyx_tmp_stride = __pyx_v_grads.strides[1];\n        __pyx_t_39.data += __pyx_tmp_idx * __pyx_tmp_stride;\n}\n\n{\n    Py_ssize_t __pyx_tmp_idx = __pyx_v_x;\n    Py_ssize_t __pyx_tmp_stride = __pyx_v_grads.strides[2];\n        __pyx_t_39.data += __pyx_tmp_idx * __pyx_tmp_stride;\n}\n\n__pyx_t_39.shape[0] = __pyx_v_grads.shape[3];\n__pyx_t_39.strides[0] = __pyx_v_grads.strides[3];\n    __pyx_t_39.suboffsets[0] = -1;\n\n__pyx_t_8 = ((!((__pyx_f_26_marching_cubes_lewiner_cy_non_zero_norm(__pyx_t_39) == 0) != 0)) != 0);\n            __PYX_XDEC_MEMVIEW(&__pyx_t_39, 1);\n            __pyx_t_39.memview = NULL;\n            __pyx_t_39.data = NULL;\n            if (__pyx_t_8) {\n\n              /* \"_marching_cubes_lewiner_cy.pyx\":1084\n *                         # in a corner of the cube\n *                         if not non_zero_norm(grads[z,y,x]) == 0:\n *                             base_vec = grads[z,y,x]             # <<<<<<<<<<<<<<\n *                         elif not non_zero_norm(grads[z,y,x_st]) == 0:\n *                             base_vec = grads[z,y,x_st]\n */\n              __pyx_t_39.data = __pyx_v_grads.data;\n              __pyx_t_39.memview = __pyx_v_grads.memview;\n              __PYX_INC_MEMVIEW(&__pyx_t_39, 0);\n              {\n    Py_ssize_t __pyx_tmp_idx = __pyx_v_z;\n    Py_ssize_t __pyx_tmp_stride = __pyx_v_grads.strides[0];\n        __pyx_t_39.data += __pyx_tmp_idx * __pyx_tmp_stride;\n}\n\n{\n    Py_ssize_t __pyx_tmp_idx = __pyx_v_y;\n    Py_ssize_t __pyx_tmp_stride = __pyx_v_grads.strides[1];\n        __pyx_t_39.data += __pyx_tmp_idx * __pyx_tmp_stride;\n}\n\n{\n    Py_ssize_t __pyx_tmp_idx = __pyx_v_x;\n    Py_ssize_t __pyx_tmp_stride = __pyx_v_grads.strides[2];\n        __pyx_t_39.data += __pyx_tmp_idx * __pyx_tmp_stride;\n}\n\n__pyx_t_39.shape[0] = __pyx_v_grads.shape[3];\n__pyx_t_39.strides[0] = __pyx_v_grads.strides[3];\n    __pyx_t_39.suboffsets[0] = -1;\n\n__PYX_XDEC_MEMVIEW(&__pyx_v_base_vec, 1);\n              __pyx_v_base_vec = __pyx_t_39;\n              __pyx_t_39.memview = NULL;\n              __pyx_t_39.data = NULL;\n\n              /* \"_marching_cubes_lewiner_cy.pyx\":1083\n *                         # Choose base vector for the dot product that is not (0,0,0)\n *                         # in a corner of the cube\n *                         if not non_zero_norm(grads[z,y,x]) == 0:             # <<<<<<<<<<<<<<\n *                             base_vec = grads[z,y,x]\n *                         elif not non_zero_norm(grads[z,y,x_st]) == 0:\n */\n              goto __pyx_L15;\n            }\n\n            /* \"_marching_cubes_lewiner_cy.pyx\":1085\n *                         if not non_zero_norm(grads[z,y,x]) == 0:\n *                             base_vec = grads[z,y,x]\n *                         elif not non_zero_norm(grads[z,y,x_st]) == 0:             # <<<<<<<<<<<<<<\n *                             base_vec = grads[z,y,x_st]\n *                         elif not non_zero_norm(grads[z,y_st,x]) == 0:\n */\n            __pyx_t_39.data = __pyx_v_grads.data;\n            __pyx_t_39.memview = __pyx_v_grads.memview;\n            __PYX_INC_MEMVIEW(&__pyx_t_39, 0);\n            {\n    Py_ssize_t __pyx_tmp_idx = __pyx_v_z;\n    Py_ssize_t __pyx_tmp_stride = __pyx_v_grads.strides[0];\n        __pyx_t_39.data += __pyx_tmp_idx * __pyx_tmp_stride;\n}\n\n{\n    Py_ssize_t __pyx_tmp_idx = __pyx_v_y;\n    Py_ssize_t __pyx_tmp_stride = __pyx_v_grads.strides[1];\n        __pyx_t_39.data += __pyx_tmp_idx * __pyx_tmp_stride;\n}\n\n{\n    Py_ssize_t __pyx_tmp_idx = __pyx_v_x_st;\n    Py_ssize_t __pyx_tmp_stride = __pyx_v_grads.strides[2];\n        __pyx_t_39.data += __pyx_tmp_idx * __pyx_tmp_stride;\n}\n\n__pyx_t_39.shape[0] = __pyx_v_grads.shape[3];\n__pyx_t_39.strides[0] = __pyx_v_grads.strides[3];\n    __pyx_t_39.suboffsets[0] = -1;\n\n__pyx_t_8 = ((!((__pyx_f_26_marching_cubes_lewiner_cy_non_zero_norm(__pyx_t_39) == 0) != 0)) != 0);\n            __PYX_XDEC_MEMVIEW(&__pyx_t_39, 1);\n            __pyx_t_39.memview = NULL;\n            __pyx_t_39.data = NULL;\n            if (__pyx_t_8) {\n\n              /* \"_marching_cubes_lewiner_cy.pyx\":1086\n *                             base_vec = grads[z,y,x]\n *                         elif not non_zero_norm(grads[z,y,x_st]) == 0:\n *                             base_vec = grads[z,y,x_st]             # <<<<<<<<<<<<<<\n *                         elif not non_zero_norm(grads[z,y_st,x]) == 0:\n *                             base_vec = grads[z,y_st,x]\n */\n              __pyx_t_39.data = __pyx_v_grads.data;\n              __pyx_t_39.memview = __pyx_v_grads.memview;\n              __PYX_INC_MEMVIEW(&__pyx_t_39, 0);\n              {\n    Py_ssize_t __pyx_tmp_idx = __pyx_v_z;\n    Py_ssize_t __pyx_tmp_stride = __pyx_v_grads.strides[0];\n        __pyx_t_39.data += __pyx_tmp_idx * __pyx_tmp_stride;\n}\n\n{\n    Py_ssize_t __pyx_tmp_idx = __pyx_v_y;\n    Py_ssize_t __pyx_tmp_stride = __pyx_v_grads.strides[1];\n        __pyx_t_39.data += __pyx_tmp_idx * __pyx_tmp_stride;\n}\n\n{\n    Py_ssize_t __pyx_tmp_idx = __pyx_v_x_st;\n    Py_ssize_t __pyx_tmp_stride = __pyx_v_grads.strides[2];\n        __pyx_t_39.data += __pyx_tmp_idx * __pyx_tmp_stride;\n}\n\n__pyx_t_39.shape[0] = __pyx_v_grads.shape[3];\n__pyx_t_39.strides[0] = __pyx_v_grads.strides[3];\n    __pyx_t_39.suboffsets[0] = -1;\n\n__PYX_XDEC_MEMVIEW(&__pyx_v_base_vec, 1);\n              __pyx_v_base_vec = __pyx_t_39;\n              __pyx_t_39.memview = NULL;\n              __pyx_t_39.data = NULL;\n\n              /* \"_marching_cubes_lewiner_cy.pyx\":1085\n *                         if not non_zero_norm(grads[z,y,x]) == 0:\n *                             base_vec = grads[z,y,x]\n *                         elif not non_zero_norm(grads[z,y,x_st]) == 0:             # <<<<<<<<<<<<<<\n *                             base_vec = grads[z,y,x_st]\n *                         elif not non_zero_norm(grads[z,y_st,x]) == 0:\n */\n              goto __pyx_L15;\n            }\n\n            /* \"_marching_cubes_lewiner_cy.pyx\":1087\n *                         elif not non_zero_norm(grads[z,y,x_st]) == 0:\n *                             base_vec = grads[z,y,x_st]\n *                         elif not non_zero_norm(grads[z,y_st,x]) == 0:             # <<<<<<<<<<<<<<\n *                             base_vec = grads[z,y_st,x]\n *                         elif not non_zero_norm(grads[z,y_st,x_st]) == 0:\n */\n            __pyx_t_39.data = __pyx_v_grads.data;\n            __pyx_t_39.memview = __pyx_v_grads.memview;\n            __PYX_INC_MEMVIEW(&__pyx_t_39, 0);\n            {\n    Py_ssize_t __pyx_tmp_idx = __pyx_v_z;\n    Py_ssize_t __pyx_tmp_stride = __pyx_v_grads.strides[0];\n        __pyx_t_39.data += __pyx_tmp_idx * __pyx_tmp_stride;\n}\n\n{\n    Py_ssize_t __pyx_tmp_idx = __pyx_v_y_st;\n    Py_ssize_t __pyx_tmp_stride = __pyx_v_grads.strides[1];\n        __pyx_t_39.data += __pyx_tmp_idx * __pyx_tmp_stride;\n}\n\n{\n    Py_ssize_t __pyx_tmp_idx = __pyx_v_x;\n    Py_ssize_t __pyx_tmp_stride = __pyx_v_grads.strides[2];\n        __pyx_t_39.data += __pyx_tmp_idx * __pyx_tmp_stride;\n}\n\n__pyx_t_39.shape[0] = __pyx_v_grads.shape[3];\n__pyx_t_39.strides[0] = __pyx_v_grads.strides[3];\n    __pyx_t_39.suboffsets[0] = -1;\n\n__pyx_t_8 = ((!((__pyx_f_26_marching_cubes_lewiner_cy_non_zero_norm(__pyx_t_39) == 0) != 0)) != 0);\n            __PYX_XDEC_MEMVIEW(&__pyx_t_39, 1);\n            __pyx_t_39.memview = NULL;\n            __pyx_t_39.data = NULL;\n            if (__pyx_t_8) {\n\n              /* \"_marching_cubes_lewiner_cy.pyx\":1088\n *                             base_vec = grads[z,y,x_st]\n *                         elif not non_zero_norm(grads[z,y_st,x]) == 0:\n *                             base_vec = grads[z,y_st,x]             # <<<<<<<<<<<<<<\n *                         elif not non_zero_norm(grads[z,y_st,x_st]) == 0:\n *                             base_vec = grads[z,y_st,x_st]\n */\n              __pyx_t_39.data = __pyx_v_grads.data;\n              __pyx_t_39.memview = __pyx_v_grads.memview;\n              __PYX_INC_MEMVIEW(&__pyx_t_39, 0);\n              {\n    Py_ssize_t __pyx_tmp_idx = __pyx_v_z;\n    Py_ssize_t __pyx_tmp_stride = __pyx_v_grads.strides[0];\n        __pyx_t_39.data += __pyx_tmp_idx * __pyx_tmp_stride;\n}\n\n{\n    Py_ssize_t __pyx_tmp_idx = __pyx_v_y_st;\n    Py_ssize_t __pyx_tmp_stride = __pyx_v_grads.strides[1];\n        __pyx_t_39.data += __pyx_tmp_idx * __pyx_tmp_stride;\n}\n\n{\n    Py_ssize_t __pyx_tmp_idx = __pyx_v_x;\n    Py_ssize_t __pyx_tmp_stride = __pyx_v_grads.strides[2];\n        __pyx_t_39.data += __pyx_tmp_idx * __pyx_tmp_stride;\n}\n\n__pyx_t_39.shape[0] = __pyx_v_grads.shape[3];\n__pyx_t_39.strides[0] = __pyx_v_grads.strides[3];\n    __pyx_t_39.suboffsets[0] = -1;\n\n__PYX_XDEC_MEMVIEW(&__pyx_v_base_vec, 1);\n              __pyx_v_base_vec = __pyx_t_39;\n              __pyx_t_39.memview = NULL;\n              __pyx_t_39.data = NULL;\n\n              /* \"_marching_cubes_lewiner_cy.pyx\":1087\n *                         elif not non_zero_norm(grads[z,y,x_st]) == 0:\n *                             base_vec = grads[z,y,x_st]\n *                         elif not non_zero_norm(grads[z,y_st,x]) == 0:             # <<<<<<<<<<<<<<\n *                             base_vec = grads[z,y_st,x]\n *                         elif not non_zero_norm(grads[z,y_st,x_st]) == 0:\n */\n              goto __pyx_L15;\n            }\n\n            /* \"_marching_cubes_lewiner_cy.pyx\":1089\n *                         elif not non_zero_norm(grads[z,y_st,x]) == 0:\n *                             base_vec = grads[z,y_st,x]\n *                         elif not non_zero_norm(grads[z,y_st,x_st]) == 0:             # <<<<<<<<<<<<<<\n *                             base_vec = grads[z,y_st,x_st]\n *                         elif not non_zero_norm(grads[z_st,y,x]) == 0:\n */\n            __pyx_t_39.data = __pyx_v_grads.data;\n            __pyx_t_39.memview = __pyx_v_grads.memview;\n            __PYX_INC_MEMVIEW(&__pyx_t_39, 0);\n            {\n    Py_ssize_t __pyx_tmp_idx = __pyx_v_z;\n    Py_ssize_t __pyx_tmp_stride = __pyx_v_grads.strides[0];\n        __pyx_t_39.data += __pyx_tmp_idx * __pyx_tmp_stride;\n}\n\n{\n    Py_ssize_t __pyx_tmp_idx = __pyx_v_y_st;\n    Py_ssize_t __pyx_tmp_stride = __pyx_v_grads.strides[1];\n        __pyx_t_39.data += __pyx_tmp_idx * __pyx_tmp_stride;\n}\n\n{\n    Py_ssize_t __pyx_tmp_idx = __pyx_v_x_st;\n    Py_ssize_t __pyx_tmp_stride = __pyx_v_grads.strides[2];\n        __pyx_t_39.data += __pyx_tmp_idx * __pyx_tmp_stride;\n}\n\n__pyx_t_39.shape[0] = __pyx_v_grads.shape[3];\n__pyx_t_39.strides[0] = __pyx_v_grads.strides[3];\n    __pyx_t_39.suboffsets[0] = -1;\n\n__pyx_t_8 = ((!((__pyx_f_26_marching_cubes_lewiner_cy_non_zero_norm(__pyx_t_39) == 0) != 0)) != 0);\n            __PYX_XDEC_MEMVIEW(&__pyx_t_39, 1);\n            __pyx_t_39.memview = NULL;\n            __pyx_t_39.data = NULL;\n            if (__pyx_t_8) {\n\n              /* \"_marching_cubes_lewiner_cy.pyx\":1090\n *                             base_vec = grads[z,y_st,x]\n *                         elif not non_zero_norm(grads[z,y_st,x_st]) == 0:\n *                             base_vec = grads[z,y_st,x_st]             # <<<<<<<<<<<<<<\n *                         elif not non_zero_norm(grads[z_st,y,x]) == 0:\n *                             base_vec = grads[z_st,y,x]\n */\n              __pyx_t_39.data = __pyx_v_grads.data;\n              __pyx_t_39.memview = __pyx_v_grads.memview;\n              __PYX_INC_MEMVIEW(&__pyx_t_39, 0);\n              {\n    Py_ssize_t __pyx_tmp_idx = __pyx_v_z;\n    Py_ssize_t __pyx_tmp_stride = __pyx_v_grads.strides[0];\n        __pyx_t_39.data += __pyx_tmp_idx * __pyx_tmp_stride;\n}\n\n{\n    Py_ssize_t __pyx_tmp_idx = __pyx_v_y_st;\n    Py_ssize_t __pyx_tmp_stride = __pyx_v_grads.strides[1];\n        __pyx_t_39.data += __pyx_tmp_idx * __pyx_tmp_stride;\n}\n\n{\n    Py_ssize_t __pyx_tmp_idx = __pyx_v_x_st;\n    Py_ssize_t __pyx_tmp_stride = __pyx_v_grads.strides[2];\n        __pyx_t_39.data += __pyx_tmp_idx * __pyx_tmp_stride;\n}\n\n__pyx_t_39.shape[0] = __pyx_v_grads.shape[3];\n__pyx_t_39.strides[0] = __pyx_v_grads.strides[3];\n    __pyx_t_39.suboffsets[0] = -1;\n\n__PYX_XDEC_MEMVIEW(&__pyx_v_base_vec, 1);\n              __pyx_v_base_vec = __pyx_t_39;\n              __pyx_t_39.memview = NULL;\n              __pyx_t_39.data = NULL;\n\n              /* \"_marching_cubes_lewiner_cy.pyx\":1089\n *                         elif not non_zero_norm(grads[z,y_st,x]) == 0:\n *                             base_vec = grads[z,y_st,x]\n *                         elif not non_zero_norm(grads[z,y_st,x_st]) == 0:             # <<<<<<<<<<<<<<\n *                             base_vec = grads[z,y_st,x_st]\n *                         elif not non_zero_norm(grads[z_st,y,x]) == 0:\n */\n              goto __pyx_L15;\n            }\n\n            /* \"_marching_cubes_lewiner_cy.pyx\":1091\n *                         elif not non_zero_norm(grads[z,y_st,x_st]) == 0:\n *                             base_vec = grads[z,y_st,x_st]\n *                         elif not non_zero_norm(grads[z_st,y,x]) == 0:             # <<<<<<<<<<<<<<\n *                             base_vec = grads[z_st,y,x]\n *                         elif not non_zero_norm(grads[z_st,y,x_st]) == 0:\n */\n            __pyx_t_39.data = __pyx_v_grads.data;\n            __pyx_t_39.memview = __pyx_v_grads.memview;\n            __PYX_INC_MEMVIEW(&__pyx_t_39, 0);\n            {\n    Py_ssize_t __pyx_tmp_idx = __pyx_v_z_st;\n    Py_ssize_t __pyx_tmp_stride = __pyx_v_grads.strides[0];\n        __pyx_t_39.data += __pyx_tmp_idx * __pyx_tmp_stride;\n}\n\n{\n    Py_ssize_t __pyx_tmp_idx = __pyx_v_y;\n    Py_ssize_t __pyx_tmp_stride = __pyx_v_grads.strides[1];\n        __pyx_t_39.data += __pyx_tmp_idx * __pyx_tmp_stride;\n}\n\n{\n    Py_ssize_t __pyx_tmp_idx = __pyx_v_x;\n    Py_ssize_t __pyx_tmp_stride = __pyx_v_grads.strides[2];\n        __pyx_t_39.data += __pyx_tmp_idx * __pyx_tmp_stride;\n}\n\n__pyx_t_39.shape[0] = __pyx_v_grads.shape[3];\n__pyx_t_39.strides[0] = __pyx_v_grads.strides[3];\n    __pyx_t_39.suboffsets[0] = -1;\n\n__pyx_t_8 = ((!((__pyx_f_26_marching_cubes_lewiner_cy_non_zero_norm(__pyx_t_39) == 0) != 0)) != 0);\n            __PYX_XDEC_MEMVIEW(&__pyx_t_39, 1);\n            __pyx_t_39.memview = NULL;\n            __pyx_t_39.data = NULL;\n            if (__pyx_t_8) {\n\n              /* \"_marching_cubes_lewiner_cy.pyx\":1092\n *                             base_vec = grads[z,y_st,x_st]\n *                         elif not non_zero_norm(grads[z_st,y,x]) == 0:\n *                             base_vec = grads[z_st,y,x]             # <<<<<<<<<<<<<<\n *                         elif not non_zero_norm(grads[z_st,y,x_st]) == 0:\n *                             base_vec = grads[z_st,y,x_st]\n */\n              __pyx_t_39.data = __pyx_v_grads.data;\n              __pyx_t_39.memview = __pyx_v_grads.memview;\n              __PYX_INC_MEMVIEW(&__pyx_t_39, 0);\n              {\n    Py_ssize_t __pyx_tmp_idx = __pyx_v_z_st;\n    Py_ssize_t __pyx_tmp_stride = __pyx_v_grads.strides[0];\n        __pyx_t_39.data += __pyx_tmp_idx * __pyx_tmp_stride;\n}\n\n{\n    Py_ssize_t __pyx_tmp_idx = __pyx_v_y;\n    Py_ssize_t __pyx_tmp_stride = __pyx_v_grads.strides[1];\n        __pyx_t_39.data += __pyx_tmp_idx * __pyx_tmp_stride;\n}\n\n{\n    Py_ssize_t __pyx_tmp_idx = __pyx_v_x;\n    Py_ssize_t __pyx_tmp_stride = __pyx_v_grads.strides[2];\n        __pyx_t_39.data += __pyx_tmp_idx * __pyx_tmp_stride;\n}\n\n__pyx_t_39.shape[0] = __pyx_v_grads.shape[3];\n__pyx_t_39.strides[0] = __pyx_v_grads.strides[3];\n    __pyx_t_39.suboffsets[0] = -1;\n\n__PYX_XDEC_MEMVIEW(&__pyx_v_base_vec, 1);\n              __pyx_v_base_vec = __pyx_t_39;\n              __pyx_t_39.memview = NULL;\n              __pyx_t_39.data = NULL;\n\n              /* \"_marching_cubes_lewiner_cy.pyx\":1091\n *                         elif not non_zero_norm(grads[z,y_st,x_st]) == 0:\n *                             base_vec = grads[z,y_st,x_st]\n *                         elif not non_zero_norm(grads[z_st,y,x]) == 0:             # <<<<<<<<<<<<<<\n *                             base_vec = grads[z_st,y,x]\n *                         elif not non_zero_norm(grads[z_st,y,x_st]) == 0:\n */\n              goto __pyx_L15;\n            }\n\n            /* \"_marching_cubes_lewiner_cy.pyx\":1093\n *                         elif not non_zero_norm(grads[z_st,y,x]) == 0:\n *                             base_vec = grads[z_st,y,x]\n *                         elif not non_zero_norm(grads[z_st,y,x_st]) == 0:             # <<<<<<<<<<<<<<\n *                             base_vec = grads[z_st,y,x_st]\n *                         elif not non_zero_norm(grads[z_st,y_st,x]) == 0:\n */\n            __pyx_t_39.data = __pyx_v_grads.data;\n            __pyx_t_39.memview = __pyx_v_grads.memview;\n            __PYX_INC_MEMVIEW(&__pyx_t_39, 0);\n            {\n    Py_ssize_t __pyx_tmp_idx = __pyx_v_z_st;\n    Py_ssize_t __pyx_tmp_stride = __pyx_v_grads.strides[0];\n        __pyx_t_39.data += __pyx_tmp_idx * __pyx_tmp_stride;\n}\n\n{\n    Py_ssize_t __pyx_tmp_idx = __pyx_v_y;\n    Py_ssize_t __pyx_tmp_stride = __pyx_v_grads.strides[1];\n        __pyx_t_39.data += __pyx_tmp_idx * __pyx_tmp_stride;\n}\n\n{\n    Py_ssize_t __pyx_tmp_idx = __pyx_v_x_st;\n    Py_ssize_t __pyx_tmp_stride = __pyx_v_grads.strides[2];\n        __pyx_t_39.data += __pyx_tmp_idx * __pyx_tmp_stride;\n}\n\n__pyx_t_39.shape[0] = __pyx_v_grads.shape[3];\n__pyx_t_39.strides[0] = __pyx_v_grads.strides[3];\n    __pyx_t_39.suboffsets[0] = -1;\n\n__pyx_t_8 = ((!((__pyx_f_26_marching_cubes_lewiner_cy_non_zero_norm(__pyx_t_39) == 0) != 0)) != 0);\n            __PYX_XDEC_MEMVIEW(&__pyx_t_39, 1);\n            __pyx_t_39.memview = NULL;\n            __pyx_t_39.data = NULL;\n            if (__pyx_t_8) {\n\n              /* \"_marching_cubes_lewiner_cy.pyx\":1094\n *                             base_vec = grads[z_st,y,x]\n *                         elif not non_zero_norm(grads[z_st,y,x_st]) == 0:\n *                             base_vec = grads[z_st,y,x_st]             # <<<<<<<<<<<<<<\n *                         elif not non_zero_norm(grads[z_st,y_st,x]) == 0:\n *                             base_vec = grads[z_st,y_st,x]\n */\n              __pyx_t_39.data = __pyx_v_grads.data;\n              __pyx_t_39.memview = __pyx_v_grads.memview;\n              __PYX_INC_MEMVIEW(&__pyx_t_39, 0);\n              {\n    Py_ssize_t __pyx_tmp_idx = __pyx_v_z_st;\n    Py_ssize_t __pyx_tmp_stride = __pyx_v_grads.strides[0];\n        __pyx_t_39.data += __pyx_tmp_idx * __pyx_tmp_stride;\n}\n\n{\n    Py_ssize_t __pyx_tmp_idx = __pyx_v_y;\n    Py_ssize_t __pyx_tmp_stride = __pyx_v_grads.strides[1];\n        __pyx_t_39.data += __pyx_tmp_idx * __pyx_tmp_stride;\n}\n\n{\n    Py_ssize_t __pyx_tmp_idx = __pyx_v_x_st;\n    Py_ssize_t __pyx_tmp_stride = __pyx_v_grads.strides[2];\n        __pyx_t_39.data += __pyx_tmp_idx * __pyx_tmp_stride;\n}\n\n__pyx_t_39.shape[0] = __pyx_v_grads.shape[3];\n__pyx_t_39.strides[0] = __pyx_v_grads.strides[3];\n    __pyx_t_39.suboffsets[0] = -1;\n\n__PYX_XDEC_MEMVIEW(&__pyx_v_base_vec, 1);\n              __pyx_v_base_vec = __pyx_t_39;\n              __pyx_t_39.memview = NULL;\n              __pyx_t_39.data = NULL;\n\n              /* \"_marching_cubes_lewiner_cy.pyx\":1093\n *                         elif not non_zero_norm(grads[z_st,y,x]) == 0:\n *                             base_vec = grads[z_st,y,x]\n *                         elif not non_zero_norm(grads[z_st,y,x_st]) == 0:             # <<<<<<<<<<<<<<\n *                             base_vec = grads[z_st,y,x_st]\n *                         elif not non_zero_norm(grads[z_st,y_st,x]) == 0:\n */\n              goto __pyx_L15;\n            }\n\n            /* \"_marching_cubes_lewiner_cy.pyx\":1095\n *                         elif not non_zero_norm(grads[z_st,y,x_st]) == 0:\n *                             base_vec = grads[z_st,y,x_st]\n *                         elif not non_zero_norm(grads[z_st,y_st,x]) == 0:             # <<<<<<<<<<<<<<\n *                             base_vec = grads[z_st,y_st,x]\n *                         elif not non_zero_norm(grads[z_st,y_st,x_st]) == 0:\n */\n            __pyx_t_39.data = __pyx_v_grads.data;\n            __pyx_t_39.memview = __pyx_v_grads.memview;\n            __PYX_INC_MEMVIEW(&__pyx_t_39, 0);\n            {\n    Py_ssize_t __pyx_tmp_idx = __pyx_v_z_st;\n    Py_ssize_t __pyx_tmp_stride = __pyx_v_grads.strides[0];\n        __pyx_t_39.data += __pyx_tmp_idx * __pyx_tmp_stride;\n}\n\n{\n    Py_ssize_t __pyx_tmp_idx = __pyx_v_y_st;\n    Py_ssize_t __pyx_tmp_stride = __pyx_v_grads.strides[1];\n        __pyx_t_39.data += __pyx_tmp_idx * __pyx_tmp_stride;\n}\n\n{\n    Py_ssize_t __pyx_tmp_idx = __pyx_v_x;\n    Py_ssize_t __pyx_tmp_stride = __pyx_v_grads.strides[2];\n        __pyx_t_39.data += __pyx_tmp_idx * __pyx_tmp_stride;\n}\n\n__pyx_t_39.shape[0] = __pyx_v_grads.shape[3];\n__pyx_t_39.strides[0] = __pyx_v_grads.strides[3];\n    __pyx_t_39.suboffsets[0] = -1;\n\n__pyx_t_8 = ((!((__pyx_f_26_marching_cubes_lewiner_cy_non_zero_norm(__pyx_t_39) == 0) != 0)) != 0);\n            __PYX_XDEC_MEMVIEW(&__pyx_t_39, 1);\n            __pyx_t_39.memview = NULL;\n            __pyx_t_39.data = NULL;\n            if (__pyx_t_8) {\n\n              /* \"_marching_cubes_lewiner_cy.pyx\":1096\n *                             base_vec = grads[z_st,y,x_st]\n *                         elif not non_zero_norm(grads[z_st,y_st,x]) == 0:\n *                             base_vec = grads[z_st,y_st,x]             # <<<<<<<<<<<<<<\n *                         elif not non_zero_norm(grads[z_st,y_st,x_st]) == 0:\n *                             base_vec = grads[z_st,y_st,x_st]\n */\n              __pyx_t_39.data = __pyx_v_grads.data;\n              __pyx_t_39.memview = __pyx_v_grads.memview;\n              __PYX_INC_MEMVIEW(&__pyx_t_39, 0);\n              {\n    Py_ssize_t __pyx_tmp_idx = __pyx_v_z_st;\n    Py_ssize_t __pyx_tmp_stride = __pyx_v_grads.strides[0];\n        __pyx_t_39.data += __pyx_tmp_idx * __pyx_tmp_stride;\n}\n\n{\n    Py_ssize_t __pyx_tmp_idx = __pyx_v_y_st;\n    Py_ssize_t __pyx_tmp_stride = __pyx_v_grads.strides[1];\n        __pyx_t_39.data += __pyx_tmp_idx * __pyx_tmp_stride;\n}\n\n{\n    Py_ssize_t __pyx_tmp_idx = __pyx_v_x;\n    Py_ssize_t __pyx_tmp_stride = __pyx_v_grads.strides[2];\n        __pyx_t_39.data += __pyx_tmp_idx * __pyx_tmp_stride;\n}\n\n__pyx_t_39.shape[0] = __pyx_v_grads.shape[3];\n__pyx_t_39.strides[0] = __pyx_v_grads.strides[3];\n    __pyx_t_39.suboffsets[0] = -1;\n\n__PYX_XDEC_MEMVIEW(&__pyx_v_base_vec, 1);\n              __pyx_v_base_vec = __pyx_t_39;\n              __pyx_t_39.memview = NULL;\n              __pyx_t_39.data = NULL;\n\n              /* \"_marching_cubes_lewiner_cy.pyx\":1095\n *                         elif not non_zero_norm(grads[z_st,y,x_st]) == 0:\n *                             base_vec = grads[z_st,y,x_st]\n *                         elif not non_zero_norm(grads[z_st,y_st,x]) == 0:             # <<<<<<<<<<<<<<\n *                             base_vec = grads[z_st,y_st,x]\n *                         elif not non_zero_norm(grads[z_st,y_st,x_st]) == 0:\n */\n              goto __pyx_L15;\n            }\n\n            /* \"_marching_cubes_lewiner_cy.pyx\":1097\n *                         elif not non_zero_norm(grads[z_st,y_st,x]) == 0:\n *                             base_vec = grads[z_st,y_st,x]\n *                         elif not non_zero_norm(grads[z_st,y_st,x_st]) == 0:             # <<<<<<<<<<<<<<\n *                             base_vec = grads[z_st,y_st,x_st]\n *                         # else:\n */\n            __pyx_t_39.data = __pyx_v_grads.data;\n            __pyx_t_39.memview = __pyx_v_grads.memview;\n            __PYX_INC_MEMVIEW(&__pyx_t_39, 0);\n            {\n    Py_ssize_t __pyx_tmp_idx = __pyx_v_z_st;\n    Py_ssize_t __pyx_tmp_stride = __pyx_v_grads.strides[0];\n        __pyx_t_39.data += __pyx_tmp_idx * __pyx_tmp_stride;\n}\n\n{\n    Py_ssize_t __pyx_tmp_idx = __pyx_v_y_st;\n    Py_ssize_t __pyx_tmp_stride = __pyx_v_grads.strides[1];\n        __pyx_t_39.data += __pyx_tmp_idx * __pyx_tmp_stride;\n}\n\n{\n    Py_ssize_t __pyx_tmp_idx = __pyx_v_x_st;\n    Py_ssize_t __pyx_tmp_stride = __pyx_v_grads.strides[2];\n        __pyx_t_39.data += __pyx_tmp_idx * __pyx_tmp_stride;\n}\n\n__pyx_t_39.shape[0] = __pyx_v_grads.shape[3];\n__pyx_t_39.strides[0] = __pyx_v_grads.strides[3];\n    __pyx_t_39.suboffsets[0] = -1;\n\n__pyx_t_8 = ((!((__pyx_f_26_marching_cubes_lewiner_cy_non_zero_norm(__pyx_t_39) == 0) != 0)) != 0);\n            __PYX_XDEC_MEMVIEW(&__pyx_t_39, 1);\n            __pyx_t_39.memview = NULL;\n            __pyx_t_39.data = NULL;\n            if (__pyx_t_8) {\n\n              /* \"_marching_cubes_lewiner_cy.pyx\":1098\n *                             base_vec = grads[z_st,y_st,x]\n *                         elif not non_zero_norm(grads[z_st,y_st,x_st]) == 0:\n *                             base_vec = grads[z_st,y_st,x_st]             # <<<<<<<<<<<<<<\n *                         # else:\n *                         #     print('all 0 vec...')\n */\n              __pyx_t_39.data = __pyx_v_grads.data;\n              __pyx_t_39.memview = __pyx_v_grads.memview;\n              __PYX_INC_MEMVIEW(&__pyx_t_39, 0);\n              {\n    Py_ssize_t __pyx_tmp_idx = __pyx_v_z_st;\n    Py_ssize_t __pyx_tmp_stride = __pyx_v_grads.strides[0];\n        __pyx_t_39.data += __pyx_tmp_idx * __pyx_tmp_stride;\n}\n\n{\n    Py_ssize_t __pyx_tmp_idx = __pyx_v_y_st;\n    Py_ssize_t __pyx_tmp_stride = __pyx_v_grads.strides[1];\n        __pyx_t_39.data += __pyx_tmp_idx * __pyx_tmp_stride;\n}\n\n{\n    Py_ssize_t __pyx_tmp_idx = __pyx_v_x_st;\n    Py_ssize_t __pyx_tmp_stride = __pyx_v_grads.strides[2];\n        __pyx_t_39.data += __pyx_tmp_idx * __pyx_tmp_stride;\n}\n\n__pyx_t_39.shape[0] = __pyx_v_grads.shape[3];\n__pyx_t_39.strides[0] = __pyx_v_grads.strides[3];\n    __pyx_t_39.suboffsets[0] = -1;\n\n__PYX_XDEC_MEMVIEW(&__pyx_v_base_vec, 1);\n              __pyx_v_base_vec = __pyx_t_39;\n              __pyx_t_39.memview = NULL;\n              __pyx_t_39.data = NULL;\n\n              /* \"_marching_cubes_lewiner_cy.pyx\":1097\n *                         elif not non_zero_norm(grads[z_st,y_st,x]) == 0:\n *                             base_vec = grads[z_st,y_st,x]\n *                         elif not non_zero_norm(grads[z_st,y_st,x_st]) == 0:             # <<<<<<<<<<<<<<\n *                             base_vec = grads[z_st,y_st,x_st]\n *                         # else:\n */\n            }\n            __pyx_L15:;\n\n            /* \"_marching_cubes_lewiner_cy.pyx\":1104\n *                         # Initialize cell\n *                         cell.set_cube(0.0, x, y, z, st,\n *                             my_sign(dot3(base_vec, grads[z   ,y, x])) * im[z   ,y, x],             # <<<<<<<<<<<<<<\n *                             my_sign(dot3(base_vec, grads[z   ,y, x_st])) * im[z   ,y, x_st],\n *                             my_sign(dot3(base_vec, grads[z   ,y_st, x_st])) * im[z   ,y_st, x_st],\n */\n            if (unlikely(!__pyx_v_base_vec.memview)) { __Pyx_RaiseUnboundLocalError(\"base_vec\"); __PYX_ERR(0, 1104, __pyx_L1_error) }\n            __pyx_t_39.data = __pyx_v_grads.data;\n            __pyx_t_39.memview = __pyx_v_grads.memview;\n            __PYX_INC_MEMVIEW(&__pyx_t_39, 0);\n            {\n    Py_ssize_t __pyx_tmp_idx = __pyx_v_z;\n    Py_ssize_t __pyx_tmp_stride = __pyx_v_grads.strides[0];\n        __pyx_t_39.data += __pyx_tmp_idx * __pyx_tmp_stride;\n}\n\n{\n    Py_ssize_t __pyx_tmp_idx = __pyx_v_y;\n    Py_ssize_t __pyx_tmp_stride = __pyx_v_grads.strides[1];\n        __pyx_t_39.data += __pyx_tmp_idx * __pyx_tmp_stride;\n}\n\n{\n    Py_ssize_t __pyx_tmp_idx = __pyx_v_x;\n    Py_ssize_t __pyx_tmp_stride = __pyx_v_grads.strides[2];\n        __pyx_t_39.data += __pyx_tmp_idx * __pyx_tmp_stride;\n}\n\n__pyx_t_39.shape[0] = __pyx_v_grads.shape[3];\n__pyx_t_39.strides[0] = __pyx_v_grads.strides[3];\n    __pyx_t_39.suboffsets[0] = -1;\n\n__pyx_t_17 = __pyx_v_z;\n            __pyx_t_16 = __pyx_v_y;\n            __pyx_t_15 = __pyx_v_x;\n\n            /* \"_marching_cubes_lewiner_cy.pyx\":1105\n *                         cell.set_cube(0.0, x, y, z, st,\n *                             my_sign(dot3(base_vec, grads[z   ,y, x])) * im[z   ,y, x],\n *                             my_sign(dot3(base_vec, grads[z   ,y, x_st])) * im[z   ,y, x_st],             # <<<<<<<<<<<<<<\n *                             my_sign(dot3(base_vec, grads[z   ,y_st, x_st])) * im[z   ,y_st, x_st],\n *                             my_sign(dot3(base_vec, grads[z   ,y_st, x])) * im[z   ,y_st, x],\n */\n            if (unlikely(!__pyx_v_base_vec.memview)) { __Pyx_RaiseUnboundLocalError(\"base_vec\"); __PYX_ERR(0, 1105, __pyx_L1_error) }\n            __pyx_t_40.data = __pyx_v_grads.data;\n            __pyx_t_40.memview = __pyx_v_grads.memview;\n            __PYX_INC_MEMVIEW(&__pyx_t_40, 0);\n            {\n    Py_ssize_t __pyx_tmp_idx = __pyx_v_z;\n    Py_ssize_t __pyx_tmp_stride = __pyx_v_grads.strides[0];\n        __pyx_t_40.data += __pyx_tmp_idx * __pyx_tmp_stride;\n}\n\n{\n    Py_ssize_t __pyx_tmp_idx = __pyx_v_y;\n    Py_ssize_t __pyx_tmp_stride = __pyx_v_grads.strides[1];\n        __pyx_t_40.data += __pyx_tmp_idx * __pyx_tmp_stride;\n}\n\n{\n    Py_ssize_t __pyx_tmp_idx = __pyx_v_x_st;\n    Py_ssize_t __pyx_tmp_stride = __pyx_v_grads.strides[2];\n        __pyx_t_40.data += __pyx_tmp_idx * __pyx_tmp_stride;\n}\n\n__pyx_t_40.shape[0] = __pyx_v_grads.shape[3];\n__pyx_t_40.strides[0] = __pyx_v_grads.strides[3];\n    __pyx_t_40.suboffsets[0] = -1;\n\n__pyx_t_18 = __pyx_v_z;\n            __pyx_t_19 = __pyx_v_y;\n            __pyx_t_20 = __pyx_v_x_st;\n\n            /* \"_marching_cubes_lewiner_cy.pyx\":1106\n *                             my_sign(dot3(base_vec, grads[z   ,y, x])) * im[z   ,y, x],\n *                             my_sign(dot3(base_vec, grads[z   ,y, x_st])) * im[z   ,y, x_st],\n *                             my_sign(dot3(base_vec, grads[z   ,y_st, x_st])) * im[z   ,y_st, x_st],             # <<<<<<<<<<<<<<\n *                             my_sign(dot3(base_vec, grads[z   ,y_st, x])) * im[z   ,y_st, x],\n *                             my_sign(dot3(base_vec, grads[z_st,y, x])) * im[z_st,y, x],\n */\n            if (unlikely(!__pyx_v_base_vec.memview)) { __Pyx_RaiseUnboundLocalError(\"base_vec\"); __PYX_ERR(0, 1106, __pyx_L1_error) }\n            __pyx_t_41.data = __pyx_v_grads.data;\n            __pyx_t_41.memview = __pyx_v_grads.memview;\n            __PYX_INC_MEMVIEW(&__pyx_t_41, 0);\n            {\n    Py_ssize_t __pyx_tmp_idx = __pyx_v_z;\n    Py_ssize_t __pyx_tmp_stride = __pyx_v_grads.strides[0];\n        __pyx_t_41.data += __pyx_tmp_idx * __pyx_tmp_stride;\n}\n\n{\n    Py_ssize_t __pyx_tmp_idx = __pyx_v_y_st;\n    Py_ssize_t __pyx_tmp_stride = __pyx_v_grads.strides[1];\n        __pyx_t_41.data += __pyx_tmp_idx * __pyx_tmp_stride;\n}\n\n{\n    Py_ssize_t __pyx_tmp_idx = __pyx_v_x_st;\n    Py_ssize_t __pyx_tmp_stride = __pyx_v_grads.strides[2];\n        __pyx_t_41.data += __pyx_tmp_idx * __pyx_tmp_stride;\n}\n\n__pyx_t_41.shape[0] = __pyx_v_grads.shape[3];\n__pyx_t_41.strides[0] = __pyx_v_grads.strides[3];\n    __pyx_t_41.suboffsets[0] = -1;\n\n__pyx_t_21 = __pyx_v_z;\n            __pyx_t_22 = __pyx_v_y_st;\n            __pyx_t_23 = __pyx_v_x_st;\n\n            /* \"_marching_cubes_lewiner_cy.pyx\":1107\n *                             my_sign(dot3(base_vec, grads[z   ,y, x_st])) * im[z   ,y, x_st],\n *                             my_sign(dot3(base_vec, grads[z   ,y_st, x_st])) * im[z   ,y_st, x_st],\n *                             my_sign(dot3(base_vec, grads[z   ,y_st, x])) * im[z   ,y_st, x],             # <<<<<<<<<<<<<<\n *                             my_sign(dot3(base_vec, grads[z_st,y, x])) * im[z_st,y, x],\n *                             my_sign(dot3(base_vec, grads[z_st,y, x_st])) * im[z_st,y, x_st],\n */\n            if (unlikely(!__pyx_v_base_vec.memview)) { __Pyx_RaiseUnboundLocalError(\"base_vec\"); __PYX_ERR(0, 1107, __pyx_L1_error) }\n            __pyx_t_42.data = __pyx_v_grads.data;\n            __pyx_t_42.memview = __pyx_v_grads.memview;\n            __PYX_INC_MEMVIEW(&__pyx_t_42, 0);\n            {\n    Py_ssize_t __pyx_tmp_idx = __pyx_v_z;\n    Py_ssize_t __pyx_tmp_stride = __pyx_v_grads.strides[0];\n        __pyx_t_42.data += __pyx_tmp_idx * __pyx_tmp_stride;\n}\n\n{\n    Py_ssize_t __pyx_tmp_idx = __pyx_v_y_st;\n    Py_ssize_t __pyx_tmp_stride = __pyx_v_grads.strides[1];\n        __pyx_t_42.data += __pyx_tmp_idx * __pyx_tmp_stride;\n}\n\n{\n    Py_ssize_t __pyx_tmp_idx = __pyx_v_x;\n    Py_ssize_t __pyx_tmp_stride = __pyx_v_grads.strides[2];\n        __pyx_t_42.data += __pyx_tmp_idx * __pyx_tmp_stride;\n}\n\n__pyx_t_42.shape[0] = __pyx_v_grads.shape[3];\n__pyx_t_42.strides[0] = __pyx_v_grads.strides[3];\n    __pyx_t_42.suboffsets[0] = -1;\n\n__pyx_t_24 = __pyx_v_z;\n            __pyx_t_25 = __pyx_v_y_st;\n            __pyx_t_26 = __pyx_v_x;\n\n            /* \"_marching_cubes_lewiner_cy.pyx\":1108\n *                             my_sign(dot3(base_vec, grads[z   ,y_st, x_st])) * im[z   ,y_st, x_st],\n *                             my_sign(dot3(base_vec, grads[z   ,y_st, x])) * im[z   ,y_st, x],\n *                             my_sign(dot3(base_vec, grads[z_st,y, x])) * im[z_st,y, x],             # <<<<<<<<<<<<<<\n *                             my_sign(dot3(base_vec, grads[z_st,y, x_st])) * im[z_st,y, x_st],\n *                             my_sign(dot3(base_vec, grads[z_st,y_st, x_st])) * im[z_st,y_st, x_st],\n */\n            if (unlikely(!__pyx_v_base_vec.memview)) { __Pyx_RaiseUnboundLocalError(\"base_vec\"); __PYX_ERR(0, 1108, __pyx_L1_error) }\n            __pyx_t_43.data = __pyx_v_grads.data;\n            __pyx_t_43.memview = __pyx_v_grads.memview;\n            __PYX_INC_MEMVIEW(&__pyx_t_43, 0);\n            {\n    Py_ssize_t __pyx_tmp_idx = __pyx_v_z_st;\n    Py_ssize_t __pyx_tmp_stride = __pyx_v_grads.strides[0];\n        __pyx_t_43.data += __pyx_tmp_idx * __pyx_tmp_stride;\n}\n\n{\n    Py_ssize_t __pyx_tmp_idx = __pyx_v_y;\n    Py_ssize_t __pyx_tmp_stride = __pyx_v_grads.strides[1];\n        __pyx_t_43.data += __pyx_tmp_idx * __pyx_tmp_stride;\n}\n\n{\n    Py_ssize_t __pyx_tmp_idx = __pyx_v_x;\n    Py_ssize_t __pyx_tmp_stride = __pyx_v_grads.strides[2];\n        __pyx_t_43.data += __pyx_tmp_idx * __pyx_tmp_stride;\n}\n\n__pyx_t_43.shape[0] = __pyx_v_grads.shape[3];\n__pyx_t_43.strides[0] = __pyx_v_grads.strides[3];\n    __pyx_t_43.suboffsets[0] = -1;\n\n__pyx_t_27 = __pyx_v_z_st;\n            __pyx_t_28 = __pyx_v_y;\n            __pyx_t_29 = __pyx_v_x;\n\n            /* \"_marching_cubes_lewiner_cy.pyx\":1109\n *                             my_sign(dot3(base_vec, grads[z   ,y_st, x])) * im[z   ,y_st, x],\n *                             my_sign(dot3(base_vec, grads[z_st,y, x])) * im[z_st,y, x],\n *                             my_sign(dot3(base_vec, grads[z_st,y, x_st])) * im[z_st,y, x_st],             # <<<<<<<<<<<<<<\n *                             my_sign(dot3(base_vec, grads[z_st,y_st, x_st])) * im[z_st,y_st, x_st],\n *                             my_sign(dot3(base_vec, grads[z_st,y_st, x])) * im[z_st,y_st, x] )\n */\n            if (unlikely(!__pyx_v_base_vec.memview)) { __Pyx_RaiseUnboundLocalError(\"base_vec\"); __PYX_ERR(0, 1109, __pyx_L1_error) }\n            __pyx_t_44.data = __pyx_v_grads.data;\n            __pyx_t_44.memview = __pyx_v_grads.memview;\n            __PYX_INC_MEMVIEW(&__pyx_t_44, 0);\n            {\n    Py_ssize_t __pyx_tmp_idx = __pyx_v_z_st;\n    Py_ssize_t __pyx_tmp_stride = __pyx_v_grads.strides[0];\n        __pyx_t_44.data += __pyx_tmp_idx * __pyx_tmp_stride;\n}\n\n{\n    Py_ssize_t __pyx_tmp_idx = __pyx_v_y;\n    Py_ssize_t __pyx_tmp_stride = __pyx_v_grads.strides[1];\n        __pyx_t_44.data += __pyx_tmp_idx * __pyx_tmp_stride;\n}\n\n{\n    Py_ssize_t __pyx_tmp_idx = __pyx_v_x_st;\n    Py_ssize_t __pyx_tmp_stride = __pyx_v_grads.strides[2];\n        __pyx_t_44.data += __pyx_tmp_idx * __pyx_tmp_stride;\n}\n\n__pyx_t_44.shape[0] = __pyx_v_grads.shape[3];\n__pyx_t_44.strides[0] = __pyx_v_grads.strides[3];\n    __pyx_t_44.suboffsets[0] = -1;\n\n__pyx_t_30 = __pyx_v_z_st;\n            __pyx_t_31 = __pyx_v_y;\n            __pyx_t_32 = __pyx_v_x_st;\n\n            /* \"_marching_cubes_lewiner_cy.pyx\":1110\n *                             my_sign(dot3(base_vec, grads[z_st,y, x])) * im[z_st,y, x],\n *                             my_sign(dot3(base_vec, grads[z_st,y, x_st])) * im[z_st,y, x_st],\n *                             my_sign(dot3(base_vec, grads[z_st,y_st, x_st])) * im[z_st,y_st, x_st],             # <<<<<<<<<<<<<<\n *                             my_sign(dot3(base_vec, grads[z_st,y_st, x])) * im[z_st,y_st, x] )\n * \n */\n            if (unlikely(!__pyx_v_base_vec.memview)) { __Pyx_RaiseUnboundLocalError(\"base_vec\"); __PYX_ERR(0, 1110, __pyx_L1_error) }\n            __pyx_t_45.data = __pyx_v_grads.data;\n            __pyx_t_45.memview = __pyx_v_grads.memview;\n            __PYX_INC_MEMVIEW(&__pyx_t_45, 0);\n            {\n    Py_ssize_t __pyx_tmp_idx = __pyx_v_z_st;\n    Py_ssize_t __pyx_tmp_stride = __pyx_v_grads.strides[0];\n        __pyx_t_45.data += __pyx_tmp_idx * __pyx_tmp_stride;\n}\n\n{\n    Py_ssize_t __pyx_tmp_idx = __pyx_v_y_st;\n    Py_ssize_t __pyx_tmp_stride = __pyx_v_grads.strides[1];\n        __pyx_t_45.data += __pyx_tmp_idx * __pyx_tmp_stride;\n}\n\n{\n    Py_ssize_t __pyx_tmp_idx = __pyx_v_x_st;\n    Py_ssize_t __pyx_tmp_stride = __pyx_v_grads.strides[2];\n        __pyx_t_45.data += __pyx_tmp_idx * __pyx_tmp_stride;\n}\n\n__pyx_t_45.shape[0] = __pyx_v_grads.shape[3];\n__pyx_t_45.strides[0] = __pyx_v_grads.strides[3];\n    __pyx_t_45.suboffsets[0] = -1;\n\n__pyx_t_33 = __pyx_v_z_st;\n            __pyx_t_34 = __pyx_v_y_st;\n            __pyx_t_35 = __pyx_v_x_st;\n\n            /* \"_marching_cubes_lewiner_cy.pyx\":1111\n *                             my_sign(dot3(base_vec, grads[z_st,y, x_st])) * im[z_st,y, x_st],\n *                             my_sign(dot3(base_vec, grads[z_st,y_st, x_st])) * im[z_st,y_st, x_st],\n *                             my_sign(dot3(base_vec, grads[z_st,y_st, x])) * im[z_st,y_st, x] )             # <<<<<<<<<<<<<<\n * \n *                         # Get case, if non-nul, enter the big switch\n */\n            if (unlikely(!__pyx_v_base_vec.memview)) { __Pyx_RaiseUnboundLocalError(\"base_vec\"); __PYX_ERR(0, 1111, __pyx_L1_error) }\n            __pyx_t_46.data = __pyx_v_grads.data;\n            __pyx_t_46.memview = __pyx_v_grads.memview;\n            __PYX_INC_MEMVIEW(&__pyx_t_46, 0);\n            {\n    Py_ssize_t __pyx_tmp_idx = __pyx_v_z_st;\n    Py_ssize_t __pyx_tmp_stride = __pyx_v_grads.strides[0];\n        __pyx_t_46.data += __pyx_tmp_idx * __pyx_tmp_stride;\n}\n\n{\n    Py_ssize_t __pyx_tmp_idx = __pyx_v_y_st;\n    Py_ssize_t __pyx_tmp_stride = __pyx_v_grads.strides[1];\n        __pyx_t_46.data += __pyx_tmp_idx * __pyx_tmp_stride;\n}\n\n{\n    Py_ssize_t __pyx_tmp_idx = __pyx_v_x;\n    Py_ssize_t __pyx_tmp_stride = __pyx_v_grads.strides[2];\n        __pyx_t_46.data += __pyx_tmp_idx * __pyx_tmp_stride;\n}\n\n__pyx_t_46.shape[0] = __pyx_v_grads.shape[3];\n__pyx_t_46.strides[0] = __pyx_v_grads.strides[3];\n    __pyx_t_46.suboffsets[0] = -1;\n\n__pyx_t_36 = __pyx_v_z_st;\n            __pyx_t_37 = __pyx_v_y_st;\n            __pyx_t_38 = __pyx_v_x;\n\n            /* \"_marching_cubes_lewiner_cy.pyx\":1103\n * \n *                         # Initialize cell\n *                         cell.set_cube(0.0, x, y, z, st,             # <<<<<<<<<<<<<<\n *                             my_sign(dot3(base_vec, grads[z   ,y, x])) * im[z   ,y, x],\n *                             my_sign(dot3(base_vec, grads[z   ,y, x_st])) * im[z   ,y, x_st],\n */\n            ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_cell->__pyx_vtab)->set_cube(__pyx_v_cell, 0.0, __pyx_v_x, __pyx_v_y, __pyx_v_z, __pyx_v_st, (__pyx_f_26_marching_cubes_lewiner_cy_my_sign(__pyx_f_26_marching_cubes_lewiner_cy_dot3(__pyx_v_base_vec, __pyx_t_39)) * (*((float *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_im.data + __pyx_t_17 * __pyx_v_im.strides[0]) ) + __pyx_t_16 * __pyx_v_im.strides[1]) ) + __pyx_t_15 * __pyx_v_im.strides[2]) )))), (__pyx_f_26_marching_cubes_lewiner_cy_my_sign(__pyx_f_26_marching_cubes_lewiner_cy_dot3(__pyx_v_base_vec, __pyx_t_40)) * (*((float *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_im.data + __pyx_t_18 * __pyx_v_im.strides[0]) ) + __pyx_t_19 * __pyx_v_im.strides[1]) ) + __pyx_t_20 * __pyx_v_im.strides[2]) )))), (__pyx_f_26_marching_cubes_lewiner_cy_my_sign(__pyx_f_26_marching_cubes_lewiner_cy_dot3(__pyx_v_base_vec, __pyx_t_41)) * (*((float *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_im.data + __pyx_t_21 * __pyx_v_im.strides[0]) ) + __pyx_t_22 * __pyx_v_im.strides[1]) ) + __pyx_t_23 * __pyx_v_im.strides[2]) )))), (__pyx_f_26_marching_cubes_lewiner_cy_my_sign(__pyx_f_26_marching_cubes_lewiner_cy_dot3(__pyx_v_base_vec, __pyx_t_42)) * (*((float *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_im.data + __pyx_t_24 * __pyx_v_im.strides[0]) ) + __pyx_t_25 * __pyx_v_im.strides[1]) ) + __pyx_t_26 * __pyx_v_im.strides[2]) )))), (__pyx_f_26_marching_cubes_lewiner_cy_my_sign(__pyx_f_26_marching_cubes_lewiner_cy_dot3(__pyx_v_base_vec, __pyx_t_43)) * (*((float *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_im.data + __pyx_t_27 * __pyx_v_im.strides[0]) ) + __pyx_t_28 * __pyx_v_im.strides[1]) ) + __pyx_t_29 * __pyx_v_im.strides[2]) )))), (__pyx_f_26_marching_cubes_lewiner_cy_my_sign(__pyx_f_26_marching_cubes_lewiner_cy_dot3(__pyx_v_base_vec, __pyx_t_44)) * (*((float *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_im.data + __pyx_t_30 * __pyx_v_im.strides[0]) ) + __pyx_t_31 * __pyx_v_im.strides[1]) ) + __pyx_t_32 * __pyx_v_im.strides[2]) )))), (__pyx_f_26_marching_cubes_lewiner_cy_my_sign(__pyx_f_26_marching_cubes_lewiner_cy_dot3(__pyx_v_base_vec, __pyx_t_45)) * (*((float *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_im.data + __pyx_t_33 * __pyx_v_im.strides[0]) ) + __pyx_t_34 * __pyx_v_im.strides[1]) ) + __pyx_t_35 * __pyx_v_im.strides[2]) )))), (__pyx_f_26_marching_cubes_lewiner_cy_my_sign(__pyx_f_26_marching_cubes_lewiner_cy_dot3(__pyx_v_base_vec, __pyx_t_46)) * (*((float *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_im.data + __pyx_t_36 * __pyx_v_im.strides[0]) ) + __pyx_t_37 * __pyx_v_im.strides[1]) ) + __pyx_t_38 * __pyx_v_im.strides[2]) )))));\n            __PYX_XDEC_MEMVIEW(&__pyx_t_39, 1);\n            __pyx_t_39.memview = NULL;\n            __pyx_t_39.data = NULL;\n            __PYX_XDEC_MEMVIEW(&__pyx_t_40, 1);\n            __pyx_t_40.memview = NULL;\n            __pyx_t_40.data = NULL;\n            __PYX_XDEC_MEMVIEW(&__pyx_t_41, 1);\n            __pyx_t_41.memview = NULL;\n            __pyx_t_41.data = NULL;\n            __PYX_XDEC_MEMVIEW(&__pyx_t_42, 1);\n            __pyx_t_42.memview = NULL;\n            __pyx_t_42.data = NULL;\n            __PYX_XDEC_MEMVIEW(&__pyx_t_43, 1);\n            __pyx_t_43.memview = NULL;\n            __pyx_t_43.data = NULL;\n            __PYX_XDEC_MEMVIEW(&__pyx_t_44, 1);\n            __pyx_t_44.memview = NULL;\n            __pyx_t_44.data = NULL;\n            __PYX_XDEC_MEMVIEW(&__pyx_t_45, 1);\n            __pyx_t_45.memview = NULL;\n            __pyx_t_45.data = NULL;\n            __PYX_XDEC_MEMVIEW(&__pyx_t_46, 1);\n            __pyx_t_46.memview = NULL;\n            __pyx_t_46.data = NULL;\n\n            /* \"_marching_cubes_lewiner_cy.pyx\":1114\n * \n *                         # Get case, if non-nul, enter the big switch\n *                         case = luts.CASES.get2(cell.index, 0)             # <<<<<<<<<<<<<<\n *                         if case > 0:\n *                             inwards_facing_normals_bool = inwards_facing_normals(inwards_facing_normals_ref,\n */\n            __pyx_v_case = ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Lut *)__pyx_v_luts->CASES->__pyx_vtab)->get2(__pyx_v_luts->CASES, __pyx_v_cell->index, 0);\n\n            /* \"_marching_cubes_lewiner_cy.pyx\":1115\n *                         # Get case, if non-nul, enter the big switch\n *                         case = luts.CASES.get2(cell.index, 0)\n *                         if case > 0:             # <<<<<<<<<<<<<<\n *                             inwards_facing_normals_bool = inwards_facing_normals(inwards_facing_normals_ref,\n *                                                             grads[z   ,y,x], grads[z   ,y,x_st], grads[z   ,y_st,x_st], grads[z   ,y_st,x],\n */\n            __pyx_t_8 = ((__pyx_v_case > 0) != 0);\n            if (__pyx_t_8) {\n\n              /* \"_marching_cubes_lewiner_cy.pyx\":1117\n *                         if case > 0:\n *                             inwards_facing_normals_bool = inwards_facing_normals(inwards_facing_normals_ref,\n *                                                             grads[z   ,y,x], grads[z   ,y,x_st], grads[z   ,y_st,x_st], grads[z   ,y_st,x],             # <<<<<<<<<<<<<<\n *                                                             grads[z_st,y,x], grads[z_st,y,x_st], grads[z_st,y_st,x_st], grads[z_st,y_st,x])\n *                             if inwards_facing_normals_bool:\n */\n              __pyx_t_46.data = __pyx_v_grads.data;\n              __pyx_t_46.memview = __pyx_v_grads.memview;\n              __PYX_INC_MEMVIEW(&__pyx_t_46, 0);\n              {\n    Py_ssize_t __pyx_tmp_idx = __pyx_v_z;\n    Py_ssize_t __pyx_tmp_stride = __pyx_v_grads.strides[0];\n        __pyx_t_46.data += __pyx_tmp_idx * __pyx_tmp_stride;\n}\n\n{\n    Py_ssize_t __pyx_tmp_idx = __pyx_v_y;\n    Py_ssize_t __pyx_tmp_stride = __pyx_v_grads.strides[1];\n        __pyx_t_46.data += __pyx_tmp_idx * __pyx_tmp_stride;\n}\n\n{\n    Py_ssize_t __pyx_tmp_idx = __pyx_v_x;\n    Py_ssize_t __pyx_tmp_stride = __pyx_v_grads.strides[2];\n        __pyx_t_46.data += __pyx_tmp_idx * __pyx_tmp_stride;\n}\n\n__pyx_t_46.shape[0] = __pyx_v_grads.shape[3];\n__pyx_t_46.strides[0] = __pyx_v_grads.strides[3];\n    __pyx_t_46.suboffsets[0] = -1;\n\n__pyx_t_45.data = __pyx_v_grads.data;\n              __pyx_t_45.memview = __pyx_v_grads.memview;\n              __PYX_INC_MEMVIEW(&__pyx_t_45, 0);\n              {\n    Py_ssize_t __pyx_tmp_idx = __pyx_v_z;\n    Py_ssize_t __pyx_tmp_stride = __pyx_v_grads.strides[0];\n        __pyx_t_45.data += __pyx_tmp_idx * __pyx_tmp_stride;\n}\n\n{\n    Py_ssize_t __pyx_tmp_idx = __pyx_v_y;\n    Py_ssize_t __pyx_tmp_stride = __pyx_v_grads.strides[1];\n        __pyx_t_45.data += __pyx_tmp_idx * __pyx_tmp_stride;\n}\n\n{\n    Py_ssize_t __pyx_tmp_idx = __pyx_v_x_st;\n    Py_ssize_t __pyx_tmp_stride = __pyx_v_grads.strides[2];\n        __pyx_t_45.data += __pyx_tmp_idx * __pyx_tmp_stride;\n}\n\n__pyx_t_45.shape[0] = __pyx_v_grads.shape[3];\n__pyx_t_45.strides[0] = __pyx_v_grads.strides[3];\n    __pyx_t_45.suboffsets[0] = -1;\n\n__pyx_t_44.data = __pyx_v_grads.data;\n              __pyx_t_44.memview = __pyx_v_grads.memview;\n              __PYX_INC_MEMVIEW(&__pyx_t_44, 0);\n              {\n    Py_ssize_t __pyx_tmp_idx = __pyx_v_z;\n    Py_ssize_t __pyx_tmp_stride = __pyx_v_grads.strides[0];\n        __pyx_t_44.data += __pyx_tmp_idx * __pyx_tmp_stride;\n}\n\n{\n    Py_ssize_t __pyx_tmp_idx = __pyx_v_y_st;\n    Py_ssize_t __pyx_tmp_stride = __pyx_v_grads.strides[1];\n        __pyx_t_44.data += __pyx_tmp_idx * __pyx_tmp_stride;\n}\n\n{\n    Py_ssize_t __pyx_tmp_idx = __pyx_v_x_st;\n    Py_ssize_t __pyx_tmp_stride = __pyx_v_grads.strides[2];\n        __pyx_t_44.data += __pyx_tmp_idx * __pyx_tmp_stride;\n}\n\n__pyx_t_44.shape[0] = __pyx_v_grads.shape[3];\n__pyx_t_44.strides[0] = __pyx_v_grads.strides[3];\n    __pyx_t_44.suboffsets[0] = -1;\n\n__pyx_t_43.data = __pyx_v_grads.data;\n              __pyx_t_43.memview = __pyx_v_grads.memview;\n              __PYX_INC_MEMVIEW(&__pyx_t_43, 0);\n              {\n    Py_ssize_t __pyx_tmp_idx = __pyx_v_z;\n    Py_ssize_t __pyx_tmp_stride = __pyx_v_grads.strides[0];\n        __pyx_t_43.data += __pyx_tmp_idx * __pyx_tmp_stride;\n}\n\n{\n    Py_ssize_t __pyx_tmp_idx = __pyx_v_y_st;\n    Py_ssize_t __pyx_tmp_stride = __pyx_v_grads.strides[1];\n        __pyx_t_43.data += __pyx_tmp_idx * __pyx_tmp_stride;\n}\n\n{\n    Py_ssize_t __pyx_tmp_idx = __pyx_v_x;\n    Py_ssize_t __pyx_tmp_stride = __pyx_v_grads.strides[2];\n        __pyx_t_43.data += __pyx_tmp_idx * __pyx_tmp_stride;\n}\n\n__pyx_t_43.shape[0] = __pyx_v_grads.shape[3];\n__pyx_t_43.strides[0] = __pyx_v_grads.strides[3];\n    __pyx_t_43.suboffsets[0] = -1;\n\n__pyx_t_42.data = __pyx_v_grads.data;\n\n              /* \"_marching_cubes_lewiner_cy.pyx\":1118\n *                             inwards_facing_normals_bool = inwards_facing_normals(inwards_facing_normals_ref,\n *                                                             grads[z   ,y,x], grads[z   ,y,x_st], grads[z   ,y_st,x_st], grads[z   ,y_st,x],\n *                                                             grads[z_st,y,x], grads[z_st,y,x_st], grads[z_st,y_st,x_st], grads[z_st,y_st,x])             # <<<<<<<<<<<<<<\n *                             if inwards_facing_normals_bool:\n *                                 config = luts.CASES.get2(cell.index, 1)\n */\n              __pyx_t_42.memview = __pyx_v_grads.memview;\n              __PYX_INC_MEMVIEW(&__pyx_t_42, 0);\n              {\n    Py_ssize_t __pyx_tmp_idx = __pyx_v_z_st;\n    Py_ssize_t __pyx_tmp_stride = __pyx_v_grads.strides[0];\n        __pyx_t_42.data += __pyx_tmp_idx * __pyx_tmp_stride;\n}\n\n{\n    Py_ssize_t __pyx_tmp_idx = __pyx_v_y;\n    Py_ssize_t __pyx_tmp_stride = __pyx_v_grads.strides[1];\n        __pyx_t_42.data += __pyx_tmp_idx * __pyx_tmp_stride;\n}\n\n{\n    Py_ssize_t __pyx_tmp_idx = __pyx_v_x;\n    Py_ssize_t __pyx_tmp_stride = __pyx_v_grads.strides[2];\n        __pyx_t_42.data += __pyx_tmp_idx * __pyx_tmp_stride;\n}\n\n__pyx_t_42.shape[0] = __pyx_v_grads.shape[3];\n__pyx_t_42.strides[0] = __pyx_v_grads.strides[3];\n    __pyx_t_42.suboffsets[0] = -1;\n\n__pyx_t_41.data = __pyx_v_grads.data;\n              __pyx_t_41.memview = __pyx_v_grads.memview;\n              __PYX_INC_MEMVIEW(&__pyx_t_41, 0);\n              {\n    Py_ssize_t __pyx_tmp_idx = __pyx_v_z_st;\n    Py_ssize_t __pyx_tmp_stride = __pyx_v_grads.strides[0];\n        __pyx_t_41.data += __pyx_tmp_idx * __pyx_tmp_stride;\n}\n\n{\n    Py_ssize_t __pyx_tmp_idx = __pyx_v_y;\n    Py_ssize_t __pyx_tmp_stride = __pyx_v_grads.strides[1];\n        __pyx_t_41.data += __pyx_tmp_idx * __pyx_tmp_stride;\n}\n\n{\n    Py_ssize_t __pyx_tmp_idx = __pyx_v_x_st;\n    Py_ssize_t __pyx_tmp_stride = __pyx_v_grads.strides[2];\n        __pyx_t_41.data += __pyx_tmp_idx * __pyx_tmp_stride;\n}\n\n__pyx_t_41.shape[0] = __pyx_v_grads.shape[3];\n__pyx_t_41.strides[0] = __pyx_v_grads.strides[3];\n    __pyx_t_41.suboffsets[0] = -1;\n\n__pyx_t_40.data = __pyx_v_grads.data;\n              __pyx_t_40.memview = __pyx_v_grads.memview;\n              __PYX_INC_MEMVIEW(&__pyx_t_40, 0);\n              {\n    Py_ssize_t __pyx_tmp_idx = __pyx_v_z_st;\n    Py_ssize_t __pyx_tmp_stride = __pyx_v_grads.strides[0];\n        __pyx_t_40.data += __pyx_tmp_idx * __pyx_tmp_stride;\n}\n\n{\n    Py_ssize_t __pyx_tmp_idx = __pyx_v_y_st;\n    Py_ssize_t __pyx_tmp_stride = __pyx_v_grads.strides[1];\n        __pyx_t_40.data += __pyx_tmp_idx * __pyx_tmp_stride;\n}\n\n{\n    Py_ssize_t __pyx_tmp_idx = __pyx_v_x_st;\n    Py_ssize_t __pyx_tmp_stride = __pyx_v_grads.strides[2];\n        __pyx_t_40.data += __pyx_tmp_idx * __pyx_tmp_stride;\n}\n\n__pyx_t_40.shape[0] = __pyx_v_grads.shape[3];\n__pyx_t_40.strides[0] = __pyx_v_grads.strides[3];\n    __pyx_t_40.suboffsets[0] = -1;\n\n__pyx_t_39.data = __pyx_v_grads.data;\n              __pyx_t_39.memview = __pyx_v_grads.memview;\n              __PYX_INC_MEMVIEW(&__pyx_t_39, 0);\n              {\n    Py_ssize_t __pyx_tmp_idx = __pyx_v_z_st;\n    Py_ssize_t __pyx_tmp_stride = __pyx_v_grads.strides[0];\n        __pyx_t_39.data += __pyx_tmp_idx * __pyx_tmp_stride;\n}\n\n{\n    Py_ssize_t __pyx_tmp_idx = __pyx_v_y_st;\n    Py_ssize_t __pyx_tmp_stride = __pyx_v_grads.strides[1];\n        __pyx_t_39.data += __pyx_tmp_idx * __pyx_tmp_stride;\n}\n\n{\n    Py_ssize_t __pyx_tmp_idx = __pyx_v_x;\n    Py_ssize_t __pyx_tmp_stride = __pyx_v_grads.strides[2];\n        __pyx_t_39.data += __pyx_tmp_idx * __pyx_tmp_stride;\n}\n\n__pyx_t_39.shape[0] = __pyx_v_grads.shape[3];\n__pyx_t_39.strides[0] = __pyx_v_grads.strides[3];\n    __pyx_t_39.suboffsets[0] = -1;\n\n__pyx_v_inwards_facing_normals_bool = __pyx_f_26_marching_cubes_lewiner_cy_inwards_facing_normals(__pyx_v_inwards_facing_normals_ref, __pyx_t_46, __pyx_t_45, __pyx_t_44, __pyx_t_43, __pyx_t_42, __pyx_t_41, __pyx_t_40, __pyx_t_39);\n\n              /* \"_marching_cubes_lewiner_cy.pyx\":1116\n *                         case = luts.CASES.get2(cell.index, 0)\n *                         if case > 0:\n *                             inwards_facing_normals_bool = inwards_facing_normals(inwards_facing_normals_ref,             # <<<<<<<<<<<<<<\n *                                                             grads[z   ,y,x], grads[z   ,y,x_st], grads[z   ,y_st,x_st], grads[z   ,y_st,x],\n *                                                             grads[z_st,y,x], grads[z_st,y,x_st], grads[z_st,y_st,x_st], grads[z_st,y_st,x])\n */\n              __PYX_XDEC_MEMVIEW(&__pyx_t_46, 1);\n              __pyx_t_46.memview = NULL;\n              __pyx_t_46.data = NULL;\n              __PYX_XDEC_MEMVIEW(&__pyx_t_45, 1);\n              __pyx_t_45.memview = NULL;\n              __pyx_t_45.data = NULL;\n              __PYX_XDEC_MEMVIEW(&__pyx_t_44, 1);\n              __pyx_t_44.memview = NULL;\n              __pyx_t_44.data = NULL;\n              __PYX_XDEC_MEMVIEW(&__pyx_t_43, 1);\n              __pyx_t_43.memview = NULL;\n              __pyx_t_43.data = NULL;\n              __PYX_XDEC_MEMVIEW(&__pyx_t_42, 1);\n              __pyx_t_42.memview = NULL;\n              __pyx_t_42.data = NULL;\n              __PYX_XDEC_MEMVIEW(&__pyx_t_41, 1);\n              __pyx_t_41.memview = NULL;\n              __pyx_t_41.data = NULL;\n              __PYX_XDEC_MEMVIEW(&__pyx_t_40, 1);\n              __pyx_t_40.memview = NULL;\n              __pyx_t_40.data = NULL;\n              __PYX_XDEC_MEMVIEW(&__pyx_t_39, 1);\n              __pyx_t_39.memview = NULL;\n              __pyx_t_39.data = NULL;\n\n              /* \"_marching_cubes_lewiner_cy.pyx\":1119\n *                                                             grads[z   ,y,x], grads[z   ,y,x_st], grads[z   ,y_st,x_st], grads[z   ,y_st,x],\n *                                                             grads[z_st,y,x], grads[z_st,y,x_st], grads[z_st,y_st,x_st], grads[z_st,y_st,x])\n *                             if inwards_facing_normals_bool:             # <<<<<<<<<<<<<<\n *                                 config = luts.CASES.get2(cell.index, 1)\n *                                 the_big_switch(luts, cell, case, config)\n */\n              __pyx_t_8 = (__pyx_v_inwards_facing_normals_bool != 0);\n              if (__pyx_t_8) {\n\n                /* \"_marching_cubes_lewiner_cy.pyx\":1120\n *                                                             grads[z_st,y,x], grads[z_st,y,x_st], grads[z_st,y_st,x_st], grads[z_st,y_st,x])\n *                             if inwards_facing_normals_bool:\n *                                 config = luts.CASES.get2(cell.index, 1)             # <<<<<<<<<<<<<<\n *                                 the_big_switch(luts, cell, case, config)\n * \n */\n                __pyx_v_config = ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Lut *)__pyx_v_luts->CASES->__pyx_vtab)->get2(__pyx_v_luts->CASES, __pyx_v_cell->index, 1);\n\n                /* \"_marching_cubes_lewiner_cy.pyx\":1121\n *                             if inwards_facing_normals_bool:\n *                                 config = luts.CASES.get2(cell.index, 1)\n *                                 the_big_switch(luts, cell, case, config)             # <<<<<<<<<<<<<<\n * \n * \n */\n                __pyx_f_26_marching_cubes_lewiner_cy_the_big_switch(__pyx_v_luts, __pyx_v_cell, __pyx_v_case, __pyx_v_config);\n\n                /* \"_marching_cubes_lewiner_cy.pyx\":1119\n *                                                             grads[z   ,y,x], grads[z   ,y,x_st], grads[z   ,y_st,x_st], grads[z   ,y_st,x],\n *                                                             grads[z_st,y,x], grads[z_st,y,x_st], grads[z_st,y_st,x_st], grads[z_st,y_st,x])\n *                             if inwards_facing_normals_bool:             # <<<<<<<<<<<<<<\n *                                 config = luts.CASES.get2(cell.index, 1)\n *                                 the_big_switch(luts, cell, case, config)\n */\n              }\n\n              /* \"_marching_cubes_lewiner_cy.pyx\":1115\n *                         # Get case, if non-nul, enter the big switch\n *                         case = luts.CASES.get2(cell.index, 0)\n *                         if case > 0:             # <<<<<<<<<<<<<<\n *                             inwards_facing_normals_bool = inwards_facing_normals(inwards_facing_normals_ref,\n *                                                             grads[z   ,y,x], grads[z   ,y,x_st], grads[z   ,y_st,x_st], grads[z   ,y_st,x],\n */\n            }\n\n            /* \"_marching_cubes_lewiner_cy.pyx\":1080\n *                                     im[z_st,y, x], im[z_st,y, x_st], im[z_st,y_st, x_st], im[z_st,y_st, x])\n * \n *                     if avg_cube_val < 1.05 * voxel_size and max_cube_val <= 1.74 * voxel_size:             # <<<<<<<<<<<<<<\n *                         # Choose base vector for the dot product that is not (0,0,0)\n *                         # in a corner of the cube\n */\n          }\n\n          /* \"_marching_cubes_lewiner_cy.pyx\":1072\n *                 x += st\n *                 x_st = x + st\n *                 if no_mask or mask[z_st, y_st, x_st]:             # <<<<<<<<<<<<<<\n * \n *                     avg_cube_val = avg_cube( im[z   ,y, x], im[z   ,y, x_st], im[z   ,y_st, x_st], im[z   ,y_st, x],\n */\n        }\n      }\n    }\n  }\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":1125\n * \n *     # Done\n *     return cell.get_vertices(), cell.get_faces(), cell.get_normals(), cell.get_values()             # <<<<<<<<<<<<<<\n * \n * \n */\n  __Pyx_XDECREF(__pyx_r);\n  __pyx_t_13 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_cell), __pyx_n_s_get_vertices); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1125, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_13);\n  __pyx_t_12 = NULL;\n  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_13))) {\n    __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_13);\n    if (likely(__pyx_t_12)) {\n      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13);\n      __Pyx_INCREF(__pyx_t_12);\n      __Pyx_INCREF(function);\n      __Pyx_DECREF_SET(__pyx_t_13, function);\n    }\n  }\n  __pyx_t_5 = (__pyx_t_12) ? __Pyx_PyObject_CallOneArg(__pyx_t_13, __pyx_t_12) : __Pyx_PyObject_CallNoArg(__pyx_t_13);\n  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;\n  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1125, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_5);\n  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;\n  __pyx_t_12 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_cell), __pyx_n_s_get_faces); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1125, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_12);\n  __pyx_t_7 = NULL;\n  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_12))) {\n    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_12);\n    if (likely(__pyx_t_7)) {\n      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);\n      __Pyx_INCREF(__pyx_t_7);\n      __Pyx_INCREF(function);\n      __Pyx_DECREF_SET(__pyx_t_12, function);\n    }\n  }\n  __pyx_t_13 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_12);\n  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;\n  if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1125, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_13);\n  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;\n  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_cell), __pyx_n_s_get_normals); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1125, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_7);\n  __pyx_t_6 = NULL;\n  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {\n    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);\n    if (likely(__pyx_t_6)) {\n      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);\n      __Pyx_INCREF(__pyx_t_6);\n      __Pyx_INCREF(function);\n      __Pyx_DECREF_SET(__pyx_t_7, function);\n    }\n  }\n  __pyx_t_12 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_7);\n  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;\n  if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1125, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_12);\n  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;\n  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_cell), __pyx_n_s_get_values); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1125, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_6);\n  __pyx_t_4 = NULL;\n  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {\n    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);\n    if (likely(__pyx_t_4)) {\n      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);\n      __Pyx_INCREF(__pyx_t_4);\n      __Pyx_INCREF(function);\n      __Pyx_DECREF_SET(__pyx_t_6, function);\n    }\n  }\n  __pyx_t_7 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_6);\n  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;\n  if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1125, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_7);\n  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;\n  __pyx_t_6 = PyTuple_New(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1125, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_6);\n  __Pyx_GIVEREF(__pyx_t_5);\n  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5);\n  __Pyx_GIVEREF(__pyx_t_13);\n  PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_13);\n  __Pyx_GIVEREF(__pyx_t_12);\n  PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_12);\n  __Pyx_GIVEREF(__pyx_t_7);\n  PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_t_7);\n  __pyx_t_5 = 0;\n  __pyx_t_13 = 0;\n  __pyx_t_12 = 0;\n  __pyx_t_7 = 0;\n  __pyx_r = __pyx_t_6;\n  __pyx_t_6 = 0;\n  goto __pyx_L0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":1008\n * \n * \n * def marching_cubes_udf(float[:, :, :] im not None, float[:, :, :, :] grads not None,             # <<<<<<<<<<<<<<\n *                    LutProvider luts, int st=1, int classic=0,\n *                    np.ndarray[np.npy_bool, ndim=3, cast=True] mask=None):\n */\n\n  /* function exit code */\n  __pyx_L1_error:;\n  __Pyx_XDECREF(__pyx_t_4);\n  __Pyx_XDECREF(__pyx_t_5);\n  __Pyx_XDECREF(__pyx_t_6);\n  __Pyx_XDECREF(__pyx_t_7);\n  __Pyx_XDECREF(__pyx_t_12);\n  __Pyx_XDECREF(__pyx_t_13);\n  __PYX_XDEC_MEMVIEW(&__pyx_t_39, 1);\n  __PYX_XDEC_MEMVIEW(&__pyx_t_40, 1);\n  __PYX_XDEC_MEMVIEW(&__pyx_t_41, 1);\n  __PYX_XDEC_MEMVIEW(&__pyx_t_42, 1);\n  __PYX_XDEC_MEMVIEW(&__pyx_t_43, 1);\n  __PYX_XDEC_MEMVIEW(&__pyx_t_44, 1);\n  __PYX_XDEC_MEMVIEW(&__pyx_t_45, 1);\n  __PYX_XDEC_MEMVIEW(&__pyx_t_46, 1);\n  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;\n    __Pyx_PyThreadState_declare\n    __Pyx_PyThreadState_assign\n    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);\n    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer);\n  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}\n  __Pyx_AddTraceback(\"_marching_cubes_lewiner_cy.marching_cubes_udf\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n  __pyx_r = NULL;\n  goto __pyx_L2;\n  __pyx_L0:;\n  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer);\n  __pyx_L2:;\n  __Pyx_XDECREF(__pyx_v_voxel_size);\n  __Pyx_XDECREF((PyObject *)__pyx_v_cell);\n  __PYX_XDEC_MEMVIEW(&__pyx_v_base_vec, 1);\n  __Pyx_XDECREF((PyObject *)__pyx_v_inwards_facing_normals_ref);\n  __PYX_XDEC_MEMVIEW(&__pyx_v_im, 1);\n  __PYX_XDEC_MEMVIEW(&__pyx_v_grads, 1);\n  __Pyx_XGIVEREF(__pyx_r);\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\n/* \"_marching_cubes_lewiner_cy.pyx\":1129\n * \n * \n * cdef float my_sign(float a):             # <<<<<<<<<<<<<<\n *     if a > 0:\n *         return 1.\n */\n\nstatic float __pyx_f_26_marching_cubes_lewiner_cy_my_sign(float __pyx_v_a) {\n  float __pyx_r;\n  __Pyx_RefNannyDeclarations\n  int __pyx_t_1;\n  __Pyx_RefNannySetupContext(\"my_sign\", 0);\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":1130\n * \n * cdef float my_sign(float a):\n *     if a > 0:             # <<<<<<<<<<<<<<\n *         return 1.\n *     if a < 0:\n */\n  __pyx_t_1 = ((__pyx_v_a > 0.0) != 0);\n  if (__pyx_t_1) {\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":1131\n * cdef float my_sign(float a):\n *     if a > 0:\n *         return 1.             # <<<<<<<<<<<<<<\n *     if a < 0:\n *         return -1.\n */\n    __pyx_r = 1.;\n    goto __pyx_L0;\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":1130\n * \n * cdef float my_sign(float a):\n *     if a > 0:             # <<<<<<<<<<<<<<\n *         return 1.\n *     if a < 0:\n */\n  }\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":1132\n *     if a > 0:\n *         return 1.\n *     if a < 0:             # <<<<<<<<<<<<<<\n *         return -1.\n *     if a == 0:\n */\n  __pyx_t_1 = ((__pyx_v_a < 0.0) != 0);\n  if (__pyx_t_1) {\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":1133\n *         return 1.\n *     if a < 0:\n *         return -1.             # <<<<<<<<<<<<<<\n *     if a == 0:\n *         return 0.\n */\n    __pyx_r = -1.;\n    goto __pyx_L0;\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":1132\n *     if a > 0:\n *         return 1.\n *     if a < 0:             # <<<<<<<<<<<<<<\n *         return -1.\n *     if a == 0:\n */\n  }\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":1134\n *     if a < 0:\n *         return -1.\n *     if a == 0:             # <<<<<<<<<<<<<<\n *         return 0.\n * \n */\n  __pyx_t_1 = ((__pyx_v_a == 0.0) != 0);\n  if (__pyx_t_1) {\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":1135\n *         return -1.\n *     if a == 0:\n *         return 0.             # <<<<<<<<<<<<<<\n * \n * \n */\n    __pyx_r = 0.;\n    goto __pyx_L0;\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":1134\n *     if a < 0:\n *         return -1.\n *     if a == 0:             # <<<<<<<<<<<<<<\n *         return 0.\n * \n */\n  }\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":1129\n * \n * \n * cdef float my_sign(float a):             # <<<<<<<<<<<<<<\n *     if a > 0:\n *         return 1.\n */\n\n  /* function exit code */\n  __pyx_r = 0;\n  __pyx_L0:;\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\n/* \"_marching_cubes_lewiner_cy.pyx\":1138\n * \n * \n * cdef int non_zero_norm(float[:] a):             # <<<<<<<<<<<<<<\n *     \"\"\" Returns True if the sum of absolute values > 0\n *     \"\"\"\n */\n\nstatic int __pyx_f_26_marching_cubes_lewiner_cy_non_zero_norm(__Pyx_memviewslice __pyx_v_a) {\n  int __pyx_r;\n  __Pyx_RefNannyDeclarations\n  Py_ssize_t __pyx_t_1;\n  Py_ssize_t __pyx_t_2;\n  Py_ssize_t __pyx_t_3;\n  __Pyx_RefNannySetupContext(\"non_zero_norm\", 0);\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":1141\n *     \"\"\" Returns True if the sum of absolute values > 0\n *     \"\"\"\n *     return (abs(a[0]) + abs(a[1]) + abs(a[2])) > 0             # <<<<<<<<<<<<<<\n * \n * \n */\n  __pyx_t_1 = 0;\n  __pyx_t_2 = 1;\n  __pyx_t_3 = 2;\n  __pyx_r = (((fabsf((*((float *) ( /* dim=0 */ (__pyx_v_a.data + __pyx_t_1 * __pyx_v_a.strides[0]) )))) + fabsf((*((float *) ( /* dim=0 */ (__pyx_v_a.data + __pyx_t_2 * __pyx_v_a.strides[0]) ))))) + fabsf((*((float *) ( /* dim=0 */ (__pyx_v_a.data + __pyx_t_3 * __pyx_v_a.strides[0]) ))))) > 0.0);\n  goto __pyx_L0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":1138\n * \n * \n * cdef int non_zero_norm(float[:] a):             # <<<<<<<<<<<<<<\n *     \"\"\" Returns True if the sum of absolute values > 0\n *     \"\"\"\n */\n\n  /* function exit code */\n  __pyx_L0:;\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\n/* \"_marching_cubes_lewiner_cy.pyx\":1144\n * \n * \n * cdef float avg_cube(float v1, float v2, float v3, float v4,             # <<<<<<<<<<<<<<\n *                     float v5, float v6, float v7, float v8):\n *     \"\"\" Return the average value of v_i's\n */\n\nstatic float __pyx_f_26_marching_cubes_lewiner_cy_avg_cube(float __pyx_v_v1, float __pyx_v_v2, float __pyx_v_v3, float __pyx_v_v4, float __pyx_v_v5, float __pyx_v_v6, float __pyx_v_v7, float __pyx_v_v8) {\n  float __pyx_r;\n  __Pyx_RefNannyDeclarations\n  __Pyx_RefNannySetupContext(\"avg_cube\", 0);\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":1148\n *     \"\"\" Return the average value of v_i's\n *     \"\"\"\n *     return 0.125 * (v1 + v2 + v3 + v4 + v5 + v6 + v7 + v8)             # <<<<<<<<<<<<<<\n * \n * cdef float max_cube(float v1, float v2, float v3, float v4,\n */\n  __pyx_r = (0.125 * (((((((__pyx_v_v1 + __pyx_v_v2) + __pyx_v_v3) + __pyx_v_v4) + __pyx_v_v5) + __pyx_v_v6) + __pyx_v_v7) + __pyx_v_v8));\n  goto __pyx_L0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":1144\n * \n * \n * cdef float avg_cube(float v1, float v2, float v3, float v4,             # <<<<<<<<<<<<<<\n *                     float v5, float v6, float v7, float v8):\n *     \"\"\" Return the average value of v_i's\n */\n\n  /* function exit code */\n  __pyx_L0:;\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\n/* \"_marching_cubes_lewiner_cy.pyx\":1150\n *     return 0.125 * (v1 + v2 + v3 + v4 + v5 + v6 + v7 + v8)\n * \n * cdef float max_cube(float v1, float v2, float v3, float v4,             # <<<<<<<<<<<<<<\n *                     float v5, float v6, float v7, float v8):\n *     \"\"\" Return the max value of v_i's\n */\n\nstatic float __pyx_f_26_marching_cubes_lewiner_cy_max_cube(float __pyx_v_v1, float __pyx_v_v2, float __pyx_v_v3, float __pyx_v_v4, float __pyx_v_v5, float __pyx_v_v6, float __pyx_v_v7, float __pyx_v_v8) {\n  float __pyx_r;\n  __Pyx_RefNannyDeclarations\n  float __pyx_t_1;\n  float __pyx_t_2;\n  float __pyx_t_3;\n  __Pyx_RefNannySetupContext(\"max_cube\", 0);\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":1160\n *                 v5, max(\n *                 v6, max(\n *                 v7, v8)))))))             # <<<<<<<<<<<<<<\n * \n * cdef float dot3(float[:] a, float[:] b):\n */\n  __pyx_t_1 = __pyx_v_v8;\n  __pyx_t_2 = __pyx_v_v7;\n  if (((__pyx_t_1 > __pyx_t_2) != 0)) {\n    __pyx_t_3 = __pyx_t_1;\n  } else {\n    __pyx_t_3 = __pyx_t_2;\n  }\n  __pyx_t_1 = __pyx_t_3;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":1159\n *                 v4, max(\n *                 v5, max(\n *                 v6, max(             # <<<<<<<<<<<<<<\n *                 v7, v8)))))))\n * \n */\n  __pyx_t_3 = __pyx_v_v6;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":1160\n *                 v5, max(\n *                 v6, max(\n *                 v7, v8)))))))             # <<<<<<<<<<<<<<\n * \n * cdef float dot3(float[:] a, float[:] b):\n */\n  if (((__pyx_t_1 > __pyx_t_3) != 0)) {\n    __pyx_t_2 = __pyx_t_1;\n  } else {\n    __pyx_t_2 = __pyx_t_3;\n  }\n  __pyx_t_1 = __pyx_t_2;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":1158\n *                 v3, max(\n *                 v4, max(\n *                 v5, max(             # <<<<<<<<<<<<<<\n *                 v6, max(\n *                 v7, v8)))))))\n */\n  __pyx_t_2 = __pyx_v_v5;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":1160\n *                 v5, max(\n *                 v6, max(\n *                 v7, v8)))))))             # <<<<<<<<<<<<<<\n * \n * cdef float dot3(float[:] a, float[:] b):\n */\n  if (((__pyx_t_1 > __pyx_t_2) != 0)) {\n    __pyx_t_3 = __pyx_t_1;\n  } else {\n    __pyx_t_3 = __pyx_t_2;\n  }\n  __pyx_t_1 = __pyx_t_3;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":1157\n *                 v2, max(\n *                 v3, max(\n *                 v4, max(             # <<<<<<<<<<<<<<\n *                 v5, max(\n *                 v6, max(\n */\n  __pyx_t_3 = __pyx_v_v4;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":1160\n *                 v5, max(\n *                 v6, max(\n *                 v7, v8)))))))             # <<<<<<<<<<<<<<\n * \n * cdef float dot3(float[:] a, float[:] b):\n */\n  if (((__pyx_t_1 > __pyx_t_3) != 0)) {\n    __pyx_t_2 = __pyx_t_1;\n  } else {\n    __pyx_t_2 = __pyx_t_3;\n  }\n  __pyx_t_1 = __pyx_t_2;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":1156\n *     return max(v1, max(\n *                 v2, max(\n *                 v3, max(             # <<<<<<<<<<<<<<\n *                 v4, max(\n *                 v5, max(\n */\n  __pyx_t_2 = __pyx_v_v3;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":1160\n *                 v5, max(\n *                 v6, max(\n *                 v7, v8)))))))             # <<<<<<<<<<<<<<\n * \n * cdef float dot3(float[:] a, float[:] b):\n */\n  if (((__pyx_t_1 > __pyx_t_2) != 0)) {\n    __pyx_t_3 = __pyx_t_1;\n  } else {\n    __pyx_t_3 = __pyx_t_2;\n  }\n  __pyx_t_1 = __pyx_t_3;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":1155\n *     \"\"\"\n *     return max(v1, max(\n *                 v2, max(             # <<<<<<<<<<<<<<\n *                 v3, max(\n *                 v4, max(\n */\n  __pyx_t_3 = __pyx_v_v2;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":1160\n *                 v5, max(\n *                 v6, max(\n *                 v7, v8)))))))             # <<<<<<<<<<<<<<\n * \n * cdef float dot3(float[:] a, float[:] b):\n */\n  if (((__pyx_t_1 > __pyx_t_3) != 0)) {\n    __pyx_t_2 = __pyx_t_1;\n  } else {\n    __pyx_t_2 = __pyx_t_3;\n  }\n  __pyx_t_1 = __pyx_t_2;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":1154\n *     \"\"\" Return the max value of v_i's\n *     \"\"\"\n *     return max(v1, max(             # <<<<<<<<<<<<<<\n *                 v2, max(\n *                 v3, max(\n */\n  __pyx_t_2 = __pyx_v_v1;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":1160\n *                 v5, max(\n *                 v6, max(\n *                 v7, v8)))))))             # <<<<<<<<<<<<<<\n * \n * cdef float dot3(float[:] a, float[:] b):\n */\n  if (((__pyx_t_1 > __pyx_t_2) != 0)) {\n    __pyx_t_3 = __pyx_t_1;\n  } else {\n    __pyx_t_3 = __pyx_t_2;\n  }\n  __pyx_r = __pyx_t_3;\n  goto __pyx_L0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":1150\n *     return 0.125 * (v1 + v2 + v3 + v4 + v5 + v6 + v7 + v8)\n * \n * cdef float max_cube(float v1, float v2, float v3, float v4,             # <<<<<<<<<<<<<<\n *                     float v5, float v6, float v7, float v8):\n *     \"\"\" Return the max value of v_i's\n */\n\n  /* function exit code */\n  __pyx_L0:;\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\n/* \"_marching_cubes_lewiner_cy.pyx\":1162\n *                 v7, v8)))))))\n * \n * cdef float dot3(float[:] a, float[:] b):             # <<<<<<<<<<<<<<\n *     return a[0]*b[0] + a[1]*b[1] + a[2]*b[2]\n * \n */\n\nstatic float __pyx_f_26_marching_cubes_lewiner_cy_dot3(__Pyx_memviewslice __pyx_v_a, __Pyx_memviewslice __pyx_v_b) {\n  float __pyx_r;\n  __Pyx_RefNannyDeclarations\n  Py_ssize_t __pyx_t_1;\n  Py_ssize_t __pyx_t_2;\n  Py_ssize_t __pyx_t_3;\n  Py_ssize_t __pyx_t_4;\n  Py_ssize_t __pyx_t_5;\n  Py_ssize_t __pyx_t_6;\n  __Pyx_RefNannySetupContext(\"dot3\", 0);\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":1163\n * \n * cdef float dot3(float[:] a, float[:] b):\n *     return a[0]*b[0] + a[1]*b[1] + a[2]*b[2]             # <<<<<<<<<<<<<<\n * \n * \n */\n  __pyx_t_1 = 0;\n  __pyx_t_2 = 0;\n  __pyx_t_3 = 1;\n  __pyx_t_4 = 1;\n  __pyx_t_5 = 2;\n  __pyx_t_6 = 2;\n  __pyx_r = ((((*((float *) ( /* dim=0 */ (__pyx_v_a.data + __pyx_t_1 * __pyx_v_a.strides[0]) ))) * (*((float *) ( /* dim=0 */ (__pyx_v_b.data + __pyx_t_2 * __pyx_v_b.strides[0]) )))) + ((*((float *) ( /* dim=0 */ (__pyx_v_a.data + __pyx_t_3 * __pyx_v_a.strides[0]) ))) * (*((float *) ( /* dim=0 */ (__pyx_v_b.data + __pyx_t_4 * __pyx_v_b.strides[0]) ))))) + ((*((float *) ( /* dim=0 */ (__pyx_v_a.data + __pyx_t_5 * __pyx_v_a.strides[0]) ))) * (*((float *) ( /* dim=0 */ (__pyx_v_b.data + __pyx_t_6 * __pyx_v_b.strides[0]) )))));\n  goto __pyx_L0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":1162\n *                 v7, v8)))))))\n * \n * cdef float dot3(float[:] a, float[:] b):             # <<<<<<<<<<<<<<\n *     return a[0]*b[0] + a[1]*b[1] + a[2]*b[2]\n * \n */\n\n  /* function exit code */\n  __pyx_L0:;\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\n/* \"_marching_cubes_lewiner_cy.pyx\":1166\n * \n * \n * cdef int inwards_facing_normals(np.ndarray inwards_facing_normals_ref,             # <<<<<<<<<<<<<<\n *                                 float[:] g1, float[:] g2, float[:] g3, float[:] g4,\n *                                 float[:] g5, float[:] g6, float[:] g7, float[:] g8):\n */\n\nstatic int __pyx_f_26_marching_cubes_lewiner_cy_inwards_facing_normals(PyArrayObject *__pyx_v_inwards_facing_normals_ref, __Pyx_memviewslice __pyx_v_g1, __Pyx_memviewslice __pyx_v_g2, __Pyx_memviewslice __pyx_v_g3, __Pyx_memviewslice __pyx_v_g4, __Pyx_memviewslice __pyx_v_g5, __Pyx_memviewslice __pyx_v_g6, __Pyx_memviewslice __pyx_v_g7, __Pyx_memviewslice __pyx_v_g8) {\n  int __pyx_r;\n  __Pyx_RefNannyDeclarations\n  PyObject *__pyx_t_1 = NULL;\n  __Pyx_memviewslice __pyx_t_2 = { 0, 0, { 0 }, { 0 }, { 0 } };\n  __Pyx_memviewslice __pyx_t_3 = { 0, 0, { 0 }, { 0 }, { 0 } };\n  __Pyx_memviewslice __pyx_t_4 = { 0, 0, { 0 }, { 0 }, { 0 } };\n  __Pyx_memviewslice __pyx_t_5 = { 0, 0, { 0 }, { 0 }, { 0 } };\n  __Pyx_memviewslice __pyx_t_6 = { 0, 0, { 0 }, { 0 }, { 0 } };\n  __Pyx_memviewslice __pyx_t_7 = { 0, 0, { 0 }, { 0 }, { 0 } };\n  __Pyx_memviewslice __pyx_t_8 = { 0, 0, { 0 }, { 0 }, { 0 } };\n  __Pyx_memviewslice __pyx_t_9 = { 0, 0, { 0 }, { 0 }, { 0 } };\n  int __pyx_lineno = 0;\n  const char *__pyx_filename = NULL;\n  int __pyx_clineno = 0;\n  __Pyx_RefNannySetupContext(\"inwards_facing_normals\", 0);\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":1171\n *     \"\"\" Return True if our heurisitic determines that normals are inwards facing\n *     \"\"\"\n *     return (avg_cube(dot3(inwards_facing_normals_ref[0,0,0], g1) >= -0.1,             # <<<<<<<<<<<<<<\n *                     dot3(inwards_facing_normals_ref[0,0,1], g2) >= -0.1,\n *                     dot3(inwards_facing_normals_ref[0,1,1], g3) >= -0.1,\n */\n  __pyx_t_1 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_inwards_facing_normals_ref), __pyx_tuple__5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1171, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __pyx_t_2 = __Pyx_PyObject_to_MemoryviewSlice_ds_float(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_2.memview)) __PYX_ERR(0, 1171, __pyx_L1_error)\n  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":1172\n *     \"\"\"\n *     return (avg_cube(dot3(inwards_facing_normals_ref[0,0,0], g1) >= -0.1,\n *                     dot3(inwards_facing_normals_ref[0,0,1], g2) >= -0.1,             # <<<<<<<<<<<<<<\n *                     dot3(inwards_facing_normals_ref[0,1,1], g3) >= -0.1,\n *                     dot3(inwards_facing_normals_ref[0,1,0], g4) >= -0.1,\n */\n  __pyx_t_1 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_inwards_facing_normals_ref), __pyx_tuple__6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1172, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __pyx_t_3 = __Pyx_PyObject_to_MemoryviewSlice_ds_float(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_3.memview)) __PYX_ERR(0, 1172, __pyx_L1_error)\n  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":1173\n *     return (avg_cube(dot3(inwards_facing_normals_ref[0,0,0], g1) >= -0.1,\n *                     dot3(inwards_facing_normals_ref[0,0,1], g2) >= -0.1,\n *                     dot3(inwards_facing_normals_ref[0,1,1], g3) >= -0.1,             # <<<<<<<<<<<<<<\n *                     dot3(inwards_facing_normals_ref[0,1,0], g4) >= -0.1,\n *                     dot3(inwards_facing_normals_ref[1,0,0], g5) >= -0.1,\n */\n  __pyx_t_1 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_inwards_facing_normals_ref), __pyx_tuple__7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1173, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __pyx_t_4 = __Pyx_PyObject_to_MemoryviewSlice_ds_float(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_4.memview)) __PYX_ERR(0, 1173, __pyx_L1_error)\n  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":1174\n *                     dot3(inwards_facing_normals_ref[0,0,1], g2) >= -0.1,\n *                     dot3(inwards_facing_normals_ref[0,1,1], g3) >= -0.1,\n *                     dot3(inwards_facing_normals_ref[0,1,0], g4) >= -0.1,             # <<<<<<<<<<<<<<\n *                     dot3(inwards_facing_normals_ref[1,0,0], g5) >= -0.1,\n *                     dot3(inwards_facing_normals_ref[1,0,1], g6) >= -0.1,\n */\n  __pyx_t_1 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_inwards_facing_normals_ref), __pyx_tuple__8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1174, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __pyx_t_5 = __Pyx_PyObject_to_MemoryviewSlice_ds_float(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 1174, __pyx_L1_error)\n  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":1175\n *                     dot3(inwards_facing_normals_ref[0,1,1], g3) >= -0.1,\n *                     dot3(inwards_facing_normals_ref[0,1,0], g4) >= -0.1,\n *                     dot3(inwards_facing_normals_ref[1,0,0], g5) >= -0.1,             # <<<<<<<<<<<<<<\n *                     dot3(inwards_facing_normals_ref[1,0,1], g6) >= -0.1,\n *                     dot3(inwards_facing_normals_ref[1,1,1], g7) >= -0.1,\n */\n  __pyx_t_1 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_inwards_facing_normals_ref), __pyx_tuple__9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1175, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_ds_float(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 1175, __pyx_L1_error)\n  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":1176\n *                     dot3(inwards_facing_normals_ref[0,1,0], g4) >= -0.1,\n *                     dot3(inwards_facing_normals_ref[1,0,0], g5) >= -0.1,\n *                     dot3(inwards_facing_normals_ref[1,0,1], g6) >= -0.1,             # <<<<<<<<<<<<<<\n *                     dot3(inwards_facing_normals_ref[1,1,1], g7) >= -0.1,\n *                     dot3(inwards_facing_normals_ref[1,1,0], g8) >= -0.1,\n */\n  __pyx_t_1 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_inwards_facing_normals_ref), __pyx_tuple__10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1176, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __pyx_t_7 = __Pyx_PyObject_to_MemoryviewSlice_ds_float(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_7.memview)) __PYX_ERR(0, 1176, __pyx_L1_error)\n  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":1177\n *                     dot3(inwards_facing_normals_ref[1,0,0], g5) >= -0.1,\n *                     dot3(inwards_facing_normals_ref[1,0,1], g6) >= -0.1,\n *                     dot3(inwards_facing_normals_ref[1,1,1], g7) >= -0.1,             # <<<<<<<<<<<<<<\n *                     dot3(inwards_facing_normals_ref[1,1,0], g8) >= -0.1,\n *                              ) >= 2./8.)\n */\n  __pyx_t_1 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_inwards_facing_normals_ref), __pyx_tuple__11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1177, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __pyx_t_8 = __Pyx_PyObject_to_MemoryviewSlice_ds_float(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_8.memview)) __PYX_ERR(0, 1177, __pyx_L1_error)\n  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":1178\n *                     dot3(inwards_facing_normals_ref[1,0,1], g6) >= -0.1,\n *                     dot3(inwards_facing_normals_ref[1,1,1], g7) >= -0.1,\n *                     dot3(inwards_facing_normals_ref[1,1,0], g8) >= -0.1,             # <<<<<<<<<<<<<<\n *                              ) >= 2./8.)\n * \n */\n  __pyx_t_1 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_inwards_facing_normals_ref), __pyx_tuple__12); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1178, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __pyx_t_9 = __Pyx_PyObject_to_MemoryviewSlice_ds_float(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_9.memview)) __PYX_ERR(0, 1178, __pyx_L1_error)\n  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":1179\n *                     dot3(inwards_facing_normals_ref[1,1,1], g7) >= -0.1,\n *                     dot3(inwards_facing_normals_ref[1,1,0], g8) >= -0.1,\n *                              ) >= 2./8.)             # <<<<<<<<<<<<<<\n * \n * \n */\n  __pyx_r = (__pyx_f_26_marching_cubes_lewiner_cy_avg_cube((__pyx_f_26_marching_cubes_lewiner_cy_dot3(__pyx_t_2, __pyx_v_g1) >= -0.1), (__pyx_f_26_marching_cubes_lewiner_cy_dot3(__pyx_t_3, __pyx_v_g2) >= -0.1), (__pyx_f_26_marching_cubes_lewiner_cy_dot3(__pyx_t_4, __pyx_v_g3) >= -0.1), (__pyx_f_26_marching_cubes_lewiner_cy_dot3(__pyx_t_5, __pyx_v_g4) >= -0.1), (__pyx_f_26_marching_cubes_lewiner_cy_dot3(__pyx_t_6, __pyx_v_g5) >= -0.1), (__pyx_f_26_marching_cubes_lewiner_cy_dot3(__pyx_t_7, __pyx_v_g6) >= -0.1), (__pyx_f_26_marching_cubes_lewiner_cy_dot3(__pyx_t_8, __pyx_v_g7) >= -0.1), (__pyx_f_26_marching_cubes_lewiner_cy_dot3(__pyx_t_9, __pyx_v_g8) >= -0.1)) >= (2. / 8.));\n  __PYX_XDEC_MEMVIEW(&__pyx_t_2, 1);\n  __pyx_t_2.memview = NULL;\n  __pyx_t_2.data = NULL;\n  __PYX_XDEC_MEMVIEW(&__pyx_t_3, 1);\n  __pyx_t_3.memview = NULL;\n  __pyx_t_3.data = NULL;\n  __PYX_XDEC_MEMVIEW(&__pyx_t_4, 1);\n  __pyx_t_4.memview = NULL;\n  __pyx_t_4.data = NULL;\n  __PYX_XDEC_MEMVIEW(&__pyx_t_5, 1);\n  __pyx_t_5.memview = NULL;\n  __pyx_t_5.data = NULL;\n  __PYX_XDEC_MEMVIEW(&__pyx_t_6, 1);\n  __pyx_t_6.memview = NULL;\n  __pyx_t_6.data = NULL;\n  __PYX_XDEC_MEMVIEW(&__pyx_t_7, 1);\n  __pyx_t_7.memview = NULL;\n  __pyx_t_7.data = NULL;\n  __PYX_XDEC_MEMVIEW(&__pyx_t_8, 1);\n  __pyx_t_8.memview = NULL;\n  __pyx_t_8.data = NULL;\n  __PYX_XDEC_MEMVIEW(&__pyx_t_9, 1);\n  __pyx_t_9.memview = NULL;\n  __pyx_t_9.data = NULL;\n  goto __pyx_L0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":1166\n * \n * \n * cdef int inwards_facing_normals(np.ndarray inwards_facing_normals_ref,             # <<<<<<<<<<<<<<\n *                                 float[:] g1, float[:] g2, float[:] g3, float[:] g4,\n *                                 float[:] g5, float[:] g6, float[:] g7, float[:] g8):\n */\n\n  /* function exit code */\n  __pyx_L1_error:;\n  __Pyx_XDECREF(__pyx_t_1);\n  __PYX_XDEC_MEMVIEW(&__pyx_t_2, 1);\n  __PYX_XDEC_MEMVIEW(&__pyx_t_3, 1);\n  __PYX_XDEC_MEMVIEW(&__pyx_t_4, 1);\n  __PYX_XDEC_MEMVIEW(&__pyx_t_5, 1);\n  __PYX_XDEC_MEMVIEW(&__pyx_t_6, 1);\n  __PYX_XDEC_MEMVIEW(&__pyx_t_7, 1);\n  __PYX_XDEC_MEMVIEW(&__pyx_t_8, 1);\n  __PYX_XDEC_MEMVIEW(&__pyx_t_9, 1);\n  __Pyx_WriteUnraisable(\"_marching_cubes_lewiner_cy.inwards_facing_normals\", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);\n  __pyx_r = 0;\n  __pyx_L0:;\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\n/* \"_marching_cubes_lewiner_cy.pyx\":1208\n * \n * \n * cdef void the_big_switch(LutProvider luts, Cell cell, int case, int config):             # <<<<<<<<<<<<<<\n *     \"\"\" The big switch (i.e. if-statement) that I meticulously ported from\n *     the source code provided by Lewiner et. al.\n */\n\nstatic void __pyx_f_26_marching_cubes_lewiner_cy_the_big_switch(struct __pyx_obj_26_marching_cubes_lewiner_cy_LutProvider *__pyx_v_luts, struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *__pyx_v_cell, int __pyx_v_case, int __pyx_v_config) {\n  int __pyx_v_subconfig;\n  __Pyx_RefNannyDeclarations\n  PyObject *__pyx_t_1 = NULL;\n  int __pyx_t_2;\n  int __pyx_lineno = 0;\n  const char *__pyx_filename = NULL;\n  int __pyx_clineno = 0;\n  __Pyx_RefNannySetupContext(\"the_big_switch\", 0);\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":1215\n *     \"\"\"\n * \n *     cdef int subconfig = 0             # <<<<<<<<<<<<<<\n * \n *     # Sinatures for tests\n */\n  __pyx_v_subconfig = 0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":1222\n *     #cell.add_triangles(luts.TILINGX, config, N)\n * \n *     if case == 1:             # <<<<<<<<<<<<<<\n *         cell.add_triangles(luts.TILING1, config, 1)\n * \n */\n  switch (__pyx_v_case) {\n    case 1:\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":1223\n * \n *     if case == 1:\n *         cell.add_triangles(luts.TILING1, config, 1)             # <<<<<<<<<<<<<<\n * \n *     elif case == 2:\n */\n    __pyx_t_1 = ((PyObject *)__pyx_v_luts->TILING1);\n    __Pyx_INCREF(__pyx_t_1);\n    ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_cell->__pyx_vtab)->add_triangles(__pyx_v_cell, ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1), __pyx_v_config, 1);\n    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":1222\n *     #cell.add_triangles(luts.TILINGX, config, N)\n * \n *     if case == 1:             # <<<<<<<<<<<<<<\n *         cell.add_triangles(luts.TILING1, config, 1)\n * \n */\n    break;\n    case 2:\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":1226\n * \n *     elif case == 2:\n *         cell.add_triangles(luts.TILING2, config, 2)             # <<<<<<<<<<<<<<\n * \n *     elif case == 3:\n */\n    __pyx_t_1 = ((PyObject *)__pyx_v_luts->TILING2);\n    __Pyx_INCREF(__pyx_t_1);\n    ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_cell->__pyx_vtab)->add_triangles(__pyx_v_cell, ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1), __pyx_v_config, 2);\n    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":1225\n *         cell.add_triangles(luts.TILING1, config, 1)\n * \n *     elif case == 2:             # <<<<<<<<<<<<<<\n *         cell.add_triangles(luts.TILING2, config, 2)\n * \n */\n    break;\n    case 3:\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":1229\n * \n *     elif case == 3:\n *         if test_face(cell, luts.TEST3.get1(config)):             # <<<<<<<<<<<<<<\n *             cell.add_triangles(luts.TILING3_2, config, 4)\n *         else:\n */\n    __pyx_t_2 = (__pyx_f_26_marching_cubes_lewiner_cy_test_face(__pyx_v_cell, ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Lut *)__pyx_v_luts->TEST3->__pyx_vtab)->get1(__pyx_v_luts->TEST3, __pyx_v_config)) != 0);\n    if (__pyx_t_2) {\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1230\n *     elif case == 3:\n *         if test_face(cell, luts.TEST3.get1(config)):\n *             cell.add_triangles(luts.TILING3_2, config, 4)             # <<<<<<<<<<<<<<\n *         else:\n *             cell.add_triangles(luts.TILING3_1, config, 2)\n */\n      __pyx_t_1 = ((PyObject *)__pyx_v_luts->TILING3_2);\n      __Pyx_INCREF(__pyx_t_1);\n      ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_cell->__pyx_vtab)->add_triangles(__pyx_v_cell, ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1), __pyx_v_config, 4);\n      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1229\n * \n *     elif case == 3:\n *         if test_face(cell, luts.TEST3.get1(config)):             # <<<<<<<<<<<<<<\n *             cell.add_triangles(luts.TILING3_2, config, 4)\n *         else:\n */\n      goto __pyx_L3;\n    }\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":1232\n *             cell.add_triangles(luts.TILING3_2, config, 4)\n *         else:\n *             cell.add_triangles(luts.TILING3_1, config, 2)             # <<<<<<<<<<<<<<\n * \n *     elif case == 4 :\n */\n    /*else*/ {\n      __pyx_t_1 = ((PyObject *)__pyx_v_luts->TILING3_1);\n      __Pyx_INCREF(__pyx_t_1);\n      ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_cell->__pyx_vtab)->add_triangles(__pyx_v_cell, ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1), __pyx_v_config, 2);\n      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n    }\n    __pyx_L3:;\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":1228\n *         cell.add_triangles(luts.TILING2, config, 2)\n * \n *     elif case == 3:             # <<<<<<<<<<<<<<\n *         if test_face(cell, luts.TEST3.get1(config)):\n *             cell.add_triangles(luts.TILING3_2, config, 4)\n */\n    break;\n    case 4:\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":1235\n * \n *     elif case == 4 :\n *         if test_internal(cell, luts, case, config, subconfig, luts.TEST4.get1(config)):             # <<<<<<<<<<<<<<\n *             cell.add_triangles(luts.TILING4_1, config, 2)\n *         else:\n */\n    __pyx_t_2 = (__pyx_f_26_marching_cubes_lewiner_cy_test_internal(__pyx_v_cell, __pyx_v_luts, __pyx_v_case, __pyx_v_config, __pyx_v_subconfig, ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Lut *)__pyx_v_luts->TEST4->__pyx_vtab)->get1(__pyx_v_luts->TEST4, __pyx_v_config)) != 0);\n    if (__pyx_t_2) {\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1236\n *     elif case == 4 :\n *         if test_internal(cell, luts, case, config, subconfig, luts.TEST4.get1(config)):\n *             cell.add_triangles(luts.TILING4_1, config, 2)             # <<<<<<<<<<<<<<\n *         else:\n *             cell.add_triangles(luts.TILING4_2, config, 6)\n */\n      __pyx_t_1 = ((PyObject *)__pyx_v_luts->TILING4_1);\n      __Pyx_INCREF(__pyx_t_1);\n      ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_cell->__pyx_vtab)->add_triangles(__pyx_v_cell, ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1), __pyx_v_config, 2);\n      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1235\n * \n *     elif case == 4 :\n *         if test_internal(cell, luts, case, config, subconfig, luts.TEST4.get1(config)):             # <<<<<<<<<<<<<<\n *             cell.add_triangles(luts.TILING4_1, config, 2)\n *         else:\n */\n      goto __pyx_L4;\n    }\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":1238\n *             cell.add_triangles(luts.TILING4_1, config, 2)\n *         else:\n *             cell.add_triangles(luts.TILING4_2, config, 6)             # <<<<<<<<<<<<<<\n * \n *     elif case == 5 :\n */\n    /*else*/ {\n      __pyx_t_1 = ((PyObject *)__pyx_v_luts->TILING4_2);\n      __Pyx_INCREF(__pyx_t_1);\n      ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_cell->__pyx_vtab)->add_triangles(__pyx_v_cell, ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1), __pyx_v_config, 6);\n      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n    }\n    __pyx_L4:;\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":1234\n *             cell.add_triangles(luts.TILING3_1, config, 2)\n * \n *     elif case == 4 :             # <<<<<<<<<<<<<<\n *         if test_internal(cell, luts, case, config, subconfig, luts.TEST4.get1(config)):\n *             cell.add_triangles(luts.TILING4_1, config, 2)\n */\n    break;\n    case 5:\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":1241\n * \n *     elif case == 5 :\n *         cell.add_triangles(luts.TILING5, config, 3)             # <<<<<<<<<<<<<<\n * \n *     elif case == 6 :\n */\n    __pyx_t_1 = ((PyObject *)__pyx_v_luts->TILING5);\n    __Pyx_INCREF(__pyx_t_1);\n    ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_cell->__pyx_vtab)->add_triangles(__pyx_v_cell, ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1), __pyx_v_config, 3);\n    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":1240\n *             cell.add_triangles(luts.TILING4_2, config, 6)\n * \n *     elif case == 5 :             # <<<<<<<<<<<<<<\n *         cell.add_triangles(luts.TILING5, config, 3)\n * \n */\n    break;\n    case 6:\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":1244\n * \n *     elif case == 6 :\n *         if test_face(cell, luts.TEST6.get2(config,0)):             # <<<<<<<<<<<<<<\n *             cell.add_triangles(luts.TILING6_2, config, 5)\n *         else:\n */\n    __pyx_t_2 = (__pyx_f_26_marching_cubes_lewiner_cy_test_face(__pyx_v_cell, ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Lut *)__pyx_v_luts->TEST6->__pyx_vtab)->get2(__pyx_v_luts->TEST6, __pyx_v_config, 0)) != 0);\n    if (__pyx_t_2) {\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1245\n *     elif case == 6 :\n *         if test_face(cell, luts.TEST6.get2(config,0)):\n *             cell.add_triangles(luts.TILING6_2, config, 5)             # <<<<<<<<<<<<<<\n *         else:\n *             if test_internal(cell, luts, case, config, subconfig, luts.TEST6.get2(config,1)):\n */\n      __pyx_t_1 = ((PyObject *)__pyx_v_luts->TILING6_2);\n      __Pyx_INCREF(__pyx_t_1);\n      ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_cell->__pyx_vtab)->add_triangles(__pyx_v_cell, ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1), __pyx_v_config, 5);\n      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1244\n * \n *     elif case == 6 :\n *         if test_face(cell, luts.TEST6.get2(config,0)):             # <<<<<<<<<<<<<<\n *             cell.add_triangles(luts.TILING6_2, config, 5)\n *         else:\n */\n      goto __pyx_L5;\n    }\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":1247\n *             cell.add_triangles(luts.TILING6_2, config, 5)\n *         else:\n *             if test_internal(cell, luts, case, config, subconfig, luts.TEST6.get2(config,1)):             # <<<<<<<<<<<<<<\n *                 cell.add_triangles(luts.TILING6_1_1, config, 3)\n *             else:\n */\n    /*else*/ {\n      __pyx_t_2 = (__pyx_f_26_marching_cubes_lewiner_cy_test_internal(__pyx_v_cell, __pyx_v_luts, __pyx_v_case, __pyx_v_config, __pyx_v_subconfig, ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Lut *)__pyx_v_luts->TEST6->__pyx_vtab)->get2(__pyx_v_luts->TEST6, __pyx_v_config, 1)) != 0);\n      if (__pyx_t_2) {\n\n        /* \"_marching_cubes_lewiner_cy.pyx\":1248\n *         else:\n *             if test_internal(cell, luts, case, config, subconfig, luts.TEST6.get2(config,1)):\n *                 cell.add_triangles(luts.TILING6_1_1, config, 3)             # <<<<<<<<<<<<<<\n *             else:\n *                 #cell.calculate_center_vertex() # v12 needed\n */\n        __pyx_t_1 = ((PyObject *)__pyx_v_luts->TILING6_1_1);\n        __Pyx_INCREF(__pyx_t_1);\n        ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_cell->__pyx_vtab)->add_triangles(__pyx_v_cell, ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1), __pyx_v_config, 3);\n        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n\n        /* \"_marching_cubes_lewiner_cy.pyx\":1247\n *             cell.add_triangles(luts.TILING6_2, config, 5)\n *         else:\n *             if test_internal(cell, luts, case, config, subconfig, luts.TEST6.get2(config,1)):             # <<<<<<<<<<<<<<\n *                 cell.add_triangles(luts.TILING6_1_1, config, 3)\n *             else:\n */\n        goto __pyx_L6;\n      }\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1251\n *             else:\n *                 #cell.calculate_center_vertex() # v12 needed\n *                 cell.add_triangles(luts.TILING6_1_2, config, 9)             # <<<<<<<<<<<<<<\n * \n *     elif case == 7 :\n */\n      /*else*/ {\n        __pyx_t_1 = ((PyObject *)__pyx_v_luts->TILING6_1_2);\n        __Pyx_INCREF(__pyx_t_1);\n        ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_cell->__pyx_vtab)->add_triangles(__pyx_v_cell, ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1), __pyx_v_config, 9);\n        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n      }\n      __pyx_L6:;\n    }\n    __pyx_L5:;\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":1243\n *         cell.add_triangles(luts.TILING5, config, 3)\n * \n *     elif case == 6 :             # <<<<<<<<<<<<<<\n *         if test_face(cell, luts.TEST6.get2(config,0)):\n *             cell.add_triangles(luts.TILING6_2, config, 5)\n */\n    break;\n    case 7:\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":1255\n *     elif case == 7 :\n *         # Get subconfig\n *         if test_face(cell, luts.TEST7.get2(config,0)): subconfig += 1             # <<<<<<<<<<<<<<\n *         if test_face(cell, luts.TEST7.get2(config,1)): subconfig += 2\n *         if test_face(cell, luts.TEST7.get2(config,2)): subconfig += 4\n */\n    __pyx_t_2 = (__pyx_f_26_marching_cubes_lewiner_cy_test_face(__pyx_v_cell, ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Lut *)__pyx_v_luts->TEST7->__pyx_vtab)->get2(__pyx_v_luts->TEST7, __pyx_v_config, 0)) != 0);\n    if (__pyx_t_2) {\n      __pyx_v_subconfig = (__pyx_v_subconfig + 1);\n    }\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":1256\n *         # Get subconfig\n *         if test_face(cell, luts.TEST7.get2(config,0)): subconfig += 1\n *         if test_face(cell, luts.TEST7.get2(config,1)): subconfig += 2             # <<<<<<<<<<<<<<\n *         if test_face(cell, luts.TEST7.get2(config,2)): subconfig += 4\n *         # Behavior depends on subconfig\n */\n    __pyx_t_2 = (__pyx_f_26_marching_cubes_lewiner_cy_test_face(__pyx_v_cell, ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Lut *)__pyx_v_luts->TEST7->__pyx_vtab)->get2(__pyx_v_luts->TEST7, __pyx_v_config, 1)) != 0);\n    if (__pyx_t_2) {\n      __pyx_v_subconfig = (__pyx_v_subconfig + 2);\n    }\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":1257\n *         if test_face(cell, luts.TEST7.get2(config,0)): subconfig += 1\n *         if test_face(cell, luts.TEST7.get2(config,1)): subconfig += 2\n *         if test_face(cell, luts.TEST7.get2(config,2)): subconfig += 4             # <<<<<<<<<<<<<<\n *         # Behavior depends on subconfig\n *         if subconfig == 0: cell.add_triangles(luts.TILING7_1, config, 3)\n */\n    __pyx_t_2 = (__pyx_f_26_marching_cubes_lewiner_cy_test_face(__pyx_v_cell, ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Lut *)__pyx_v_luts->TEST7->__pyx_vtab)->get2(__pyx_v_luts->TEST7, __pyx_v_config, 2)) != 0);\n    if (__pyx_t_2) {\n      __pyx_v_subconfig = (__pyx_v_subconfig + 4);\n    }\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":1259\n *         if test_face(cell, luts.TEST7.get2(config,2)): subconfig += 4\n *         # Behavior depends on subconfig\n *         if subconfig == 0: cell.add_triangles(luts.TILING7_1, config, 3)             # <<<<<<<<<<<<<<\n *         elif subconfig == 1: cell.add_triangles2(luts.TILING7_2, config, 0, 5)\n *         elif subconfig == 2: cell.add_triangles2(luts.TILING7_2, config, 1, 5)\n */\n    switch (__pyx_v_subconfig) {\n      case 0:\n      __pyx_t_1 = ((PyObject *)__pyx_v_luts->TILING7_1);\n      __Pyx_INCREF(__pyx_t_1);\n      ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_cell->__pyx_vtab)->add_triangles(__pyx_v_cell, ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1), __pyx_v_config, 3);\n      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n      break;\n      case 1:\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1260\n *         # Behavior depends on subconfig\n *         if subconfig == 0: cell.add_triangles(luts.TILING7_1, config, 3)\n *         elif subconfig == 1: cell.add_triangles2(luts.TILING7_2, config, 0, 5)             # <<<<<<<<<<<<<<\n *         elif subconfig == 2: cell.add_triangles2(luts.TILING7_2, config, 1, 5)\n *         elif subconfig == 3:\n */\n      __pyx_t_1 = ((PyObject *)__pyx_v_luts->TILING7_2);\n      __Pyx_INCREF(__pyx_t_1);\n      ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_cell->__pyx_vtab)->add_triangles2(__pyx_v_cell, ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1), __pyx_v_config, 0, 5);\n      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n      break;\n      case 2:\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1261\n *         if subconfig == 0: cell.add_triangles(luts.TILING7_1, config, 3)\n *         elif subconfig == 1: cell.add_triangles2(luts.TILING7_2, config, 0, 5)\n *         elif subconfig == 2: cell.add_triangles2(luts.TILING7_2, config, 1, 5)             # <<<<<<<<<<<<<<\n *         elif subconfig == 3:\n *             #cell.calculate_center_vertex() # v12 needed\n */\n      __pyx_t_1 = ((PyObject *)__pyx_v_luts->TILING7_2);\n      __Pyx_INCREF(__pyx_t_1);\n      ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_cell->__pyx_vtab)->add_triangles2(__pyx_v_cell, ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1), __pyx_v_config, 1, 5);\n      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n      break;\n      case 3:\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1264\n *         elif subconfig == 3:\n *             #cell.calculate_center_vertex() # v12 needed\n *             cell.add_triangles2(luts.TILING7_3, config, 0, 9)             # <<<<<<<<<<<<<<\n *         elif subconfig == 4: cell.add_triangles2(luts.TILING7_2, config, 2, 5)\n *         elif subconfig == 5:\n */\n      __pyx_t_1 = ((PyObject *)__pyx_v_luts->TILING7_3);\n      __Pyx_INCREF(__pyx_t_1);\n      ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_cell->__pyx_vtab)->add_triangles2(__pyx_v_cell, ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1), __pyx_v_config, 0, 9);\n      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1262\n *         elif subconfig == 1: cell.add_triangles2(luts.TILING7_2, config, 0, 5)\n *         elif subconfig == 2: cell.add_triangles2(luts.TILING7_2, config, 1, 5)\n *         elif subconfig == 3:             # <<<<<<<<<<<<<<\n *             #cell.calculate_center_vertex() # v12 needed\n *             cell.add_triangles2(luts.TILING7_3, config, 0, 9)\n */\n      break;\n      case 4:\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1265\n *             #cell.calculate_center_vertex() # v12 needed\n *             cell.add_triangles2(luts.TILING7_3, config, 0, 9)\n *         elif subconfig == 4: cell.add_triangles2(luts.TILING7_2, config, 2, 5)             # <<<<<<<<<<<<<<\n *         elif subconfig == 5:\n *             #cell.calculate_center_vertex() # v12 needed\n */\n      __pyx_t_1 = ((PyObject *)__pyx_v_luts->TILING7_2);\n      __Pyx_INCREF(__pyx_t_1);\n      ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_cell->__pyx_vtab)->add_triangles2(__pyx_v_cell, ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1), __pyx_v_config, 2, 5);\n      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n      break;\n      case 5:\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1268\n *         elif subconfig == 5:\n *             #cell.calculate_center_vertex() # v12 needed\n *             cell.add_triangles2(luts.TILING7_3, config, 1, 9)             # <<<<<<<<<<<<<<\n *         elif subconfig == 6:\n *             #cell.calculate_center_vertex() # v12 needed\n */\n      __pyx_t_1 = ((PyObject *)__pyx_v_luts->TILING7_3);\n      __Pyx_INCREF(__pyx_t_1);\n      ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_cell->__pyx_vtab)->add_triangles2(__pyx_v_cell, ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1), __pyx_v_config, 1, 9);\n      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1266\n *             cell.add_triangles2(luts.TILING7_3, config, 0, 9)\n *         elif subconfig == 4: cell.add_triangles2(luts.TILING7_2, config, 2, 5)\n *         elif subconfig == 5:             # <<<<<<<<<<<<<<\n *             #cell.calculate_center_vertex() # v12 needed\n *             cell.add_triangles2(luts.TILING7_3, config, 1, 9)\n */\n      break;\n      case 6:\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1271\n *         elif subconfig == 6:\n *             #cell.calculate_center_vertex() # v12 needed\n *             cell.add_triangles2(luts.TILING7_3, config, 2, 9)             # <<<<<<<<<<<<<<\n *         elif subconfig == 7:\n *             if test_internal(cell, luts, case, config, subconfig, luts.TEST7.get2(config,3)):\n */\n      __pyx_t_1 = ((PyObject *)__pyx_v_luts->TILING7_3);\n      __Pyx_INCREF(__pyx_t_1);\n      ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_cell->__pyx_vtab)->add_triangles2(__pyx_v_cell, ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1), __pyx_v_config, 2, 9);\n      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1269\n *             #cell.calculate_center_vertex() # v12 needed\n *             cell.add_triangles2(luts.TILING7_3, config, 1, 9)\n *         elif subconfig == 6:             # <<<<<<<<<<<<<<\n *             #cell.calculate_center_vertex() # v12 needed\n *             cell.add_triangles2(luts.TILING7_3, config, 2, 9)\n */\n      break;\n      case 7:\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1273\n *             cell.add_triangles2(luts.TILING7_3, config, 2, 9)\n *         elif subconfig == 7:\n *             if test_internal(cell, luts, case, config, subconfig, luts.TEST7.get2(config,3)):             # <<<<<<<<<<<<<<\n *                 cell.add_triangles(luts.TILING7_4_2, config, 9)\n *             else:\n */\n      __pyx_t_2 = (__pyx_f_26_marching_cubes_lewiner_cy_test_internal(__pyx_v_cell, __pyx_v_luts, __pyx_v_case, __pyx_v_config, __pyx_v_subconfig, ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Lut *)__pyx_v_luts->TEST7->__pyx_vtab)->get2(__pyx_v_luts->TEST7, __pyx_v_config, 3)) != 0);\n      if (__pyx_t_2) {\n\n        /* \"_marching_cubes_lewiner_cy.pyx\":1274\n *         elif subconfig == 7:\n *             if test_internal(cell, luts, case, config, subconfig, luts.TEST7.get2(config,3)):\n *                 cell.add_triangles(luts.TILING7_4_2, config, 9)             # <<<<<<<<<<<<<<\n *             else:\n *                 cell.add_triangles(luts.TILING7_4_1, config, 5)\n */\n        __pyx_t_1 = ((PyObject *)__pyx_v_luts->TILING7_4_2);\n        __Pyx_INCREF(__pyx_t_1);\n        ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_cell->__pyx_vtab)->add_triangles(__pyx_v_cell, ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1), __pyx_v_config, 9);\n        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n\n        /* \"_marching_cubes_lewiner_cy.pyx\":1273\n *             cell.add_triangles2(luts.TILING7_3, config, 2, 9)\n *         elif subconfig == 7:\n *             if test_internal(cell, luts, case, config, subconfig, luts.TEST7.get2(config,3)):             # <<<<<<<<<<<<<<\n *                 cell.add_triangles(luts.TILING7_4_2, config, 9)\n *             else:\n */\n        goto __pyx_L10;\n      }\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1276\n *                 cell.add_triangles(luts.TILING7_4_2, config, 9)\n *             else:\n *                 cell.add_triangles(luts.TILING7_4_1, config, 5)             # <<<<<<<<<<<<<<\n * \n *     elif case == 8 :\n */\n      /*else*/ {\n        __pyx_t_1 = ((PyObject *)__pyx_v_luts->TILING7_4_1);\n        __Pyx_INCREF(__pyx_t_1);\n        ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_cell->__pyx_vtab)->add_triangles(__pyx_v_cell, ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1), __pyx_v_config, 5);\n        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n      }\n      __pyx_L10:;\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1272\n *             #cell.calculate_center_vertex() # v12 needed\n *             cell.add_triangles2(luts.TILING7_3, config, 2, 9)\n *         elif subconfig == 7:             # <<<<<<<<<<<<<<\n *             if test_internal(cell, luts, case, config, subconfig, luts.TEST7.get2(config,3)):\n *                 cell.add_triangles(luts.TILING7_4_2, config, 9)\n */\n      break;\n      default: break;\n    }\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":1253\n *                 cell.add_triangles(luts.TILING6_1_2, config, 9)\n * \n *     elif case == 7 :             # <<<<<<<<<<<<<<\n *         # Get subconfig\n *         if test_face(cell, luts.TEST7.get2(config,0)): subconfig += 1\n */\n    break;\n    case 8:\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":1279\n * \n *     elif case == 8 :\n *         cell.add_triangles(luts.TILING8, config, 2)             # <<<<<<<<<<<<<<\n * \n *     elif case == 9 :\n */\n    __pyx_t_1 = ((PyObject *)__pyx_v_luts->TILING8);\n    __Pyx_INCREF(__pyx_t_1);\n    ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_cell->__pyx_vtab)->add_triangles(__pyx_v_cell, ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1), __pyx_v_config, 2);\n    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":1278\n *                 cell.add_triangles(luts.TILING7_4_1, config, 5)\n * \n *     elif case == 8 :             # <<<<<<<<<<<<<<\n *         cell.add_triangles(luts.TILING8, config, 2)\n * \n */\n    break;\n    case 9:\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":1282\n * \n *     elif case == 9 :\n *         cell.add_triangles(luts.TILING9, config, 4)             # <<<<<<<<<<<<<<\n * \n *     elif case == 10 :\n */\n    __pyx_t_1 = ((PyObject *)__pyx_v_luts->TILING9);\n    __Pyx_INCREF(__pyx_t_1);\n    ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_cell->__pyx_vtab)->add_triangles(__pyx_v_cell, ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1), __pyx_v_config, 4);\n    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":1281\n *         cell.add_triangles(luts.TILING8, config, 2)\n * \n *     elif case == 9 :             # <<<<<<<<<<<<<<\n *         cell.add_triangles(luts.TILING9, config, 4)\n * \n */\n    break;\n    case 10:\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":1285\n * \n *     elif case == 10 :\n *         if test_face(cell, luts.TEST10.get2(config,0)):             # <<<<<<<<<<<<<<\n *             if test_face(cell, luts.TEST10.get2(config,1)):\n *                 cell.add_triangles(luts.TILING10_1_1_, config, 4)\n */\n    __pyx_t_2 = (__pyx_f_26_marching_cubes_lewiner_cy_test_face(__pyx_v_cell, ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Lut *)__pyx_v_luts->TEST10->__pyx_vtab)->get2(__pyx_v_luts->TEST10, __pyx_v_config, 0)) != 0);\n    if (__pyx_t_2) {\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1286\n *     elif case == 10 :\n *         if test_face(cell, luts.TEST10.get2(config,0)):\n *             if test_face(cell, luts.TEST10.get2(config,1)):             # <<<<<<<<<<<<<<\n *                 cell.add_triangles(luts.TILING10_1_1_, config, 4)\n *             else:\n */\n      __pyx_t_2 = (__pyx_f_26_marching_cubes_lewiner_cy_test_face(__pyx_v_cell, ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Lut *)__pyx_v_luts->TEST10->__pyx_vtab)->get2(__pyx_v_luts->TEST10, __pyx_v_config, 1)) != 0);\n      if (__pyx_t_2) {\n\n        /* \"_marching_cubes_lewiner_cy.pyx\":1287\n *         if test_face(cell, luts.TEST10.get2(config,0)):\n *             if test_face(cell, luts.TEST10.get2(config,1)):\n *                 cell.add_triangles(luts.TILING10_1_1_, config, 4)             # <<<<<<<<<<<<<<\n *             else:\n *                 #cell.calculate_center_vertex() # v12 needed\n */\n        __pyx_t_1 = ((PyObject *)__pyx_v_luts->TILING10_1_1_);\n        __Pyx_INCREF(__pyx_t_1);\n        ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_cell->__pyx_vtab)->add_triangles(__pyx_v_cell, ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1), __pyx_v_config, 4);\n        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n\n        /* \"_marching_cubes_lewiner_cy.pyx\":1286\n *     elif case == 10 :\n *         if test_face(cell, luts.TEST10.get2(config,0)):\n *             if test_face(cell, luts.TEST10.get2(config,1)):             # <<<<<<<<<<<<<<\n *                 cell.add_triangles(luts.TILING10_1_1_, config, 4)\n *             else:\n */\n        goto __pyx_L12;\n      }\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1290\n *             else:\n *                 #cell.calculate_center_vertex() # v12 needed\n *                 cell.add_triangles(luts.TILING10_2, config, 8)             # <<<<<<<<<<<<<<\n *         else:\n *             if test_face(cell, luts.TEST10.get2(config,1)):\n */\n      /*else*/ {\n        __pyx_t_1 = ((PyObject *)__pyx_v_luts->TILING10_2);\n        __Pyx_INCREF(__pyx_t_1);\n        ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_cell->__pyx_vtab)->add_triangles(__pyx_v_cell, ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1), __pyx_v_config, 8);\n        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n      }\n      __pyx_L12:;\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1285\n * \n *     elif case == 10 :\n *         if test_face(cell, luts.TEST10.get2(config,0)):             # <<<<<<<<<<<<<<\n *             if test_face(cell, luts.TEST10.get2(config,1)):\n *                 cell.add_triangles(luts.TILING10_1_1_, config, 4)\n */\n      goto __pyx_L11;\n    }\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":1292\n *                 cell.add_triangles(luts.TILING10_2, config, 8)\n *         else:\n *             if test_face(cell, luts.TEST10.get2(config,1)):             # <<<<<<<<<<<<<<\n *                 #cell.calculate_center_vertex() # v12 needed\n *                 cell.add_triangles(luts.TILING10_2_, config, 8)\n */\n    /*else*/ {\n      __pyx_t_2 = (__pyx_f_26_marching_cubes_lewiner_cy_test_face(__pyx_v_cell, ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Lut *)__pyx_v_luts->TEST10->__pyx_vtab)->get2(__pyx_v_luts->TEST10, __pyx_v_config, 1)) != 0);\n      if (__pyx_t_2) {\n\n        /* \"_marching_cubes_lewiner_cy.pyx\":1294\n *             if test_face(cell, luts.TEST10.get2(config,1)):\n *                 #cell.calculate_center_vertex() # v12 needed\n *                 cell.add_triangles(luts.TILING10_2_, config, 8)             # <<<<<<<<<<<<<<\n *             else:\n *                 if test_internal(cell, luts, case, config, subconfig, luts.TEST10.get2(config,2)):\n */\n        __pyx_t_1 = ((PyObject *)__pyx_v_luts->TILING10_2_);\n        __Pyx_INCREF(__pyx_t_1);\n        ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_cell->__pyx_vtab)->add_triangles(__pyx_v_cell, ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1), __pyx_v_config, 8);\n        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n\n        /* \"_marching_cubes_lewiner_cy.pyx\":1292\n *                 cell.add_triangles(luts.TILING10_2, config, 8)\n *         else:\n *             if test_face(cell, luts.TEST10.get2(config,1)):             # <<<<<<<<<<<<<<\n *                 #cell.calculate_center_vertex() # v12 needed\n *                 cell.add_triangles(luts.TILING10_2_, config, 8)\n */\n        goto __pyx_L13;\n      }\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1296\n *                 cell.add_triangles(luts.TILING10_2_, config, 8)\n *             else:\n *                 if test_internal(cell, luts, case, config, subconfig, luts.TEST10.get2(config,2)):             # <<<<<<<<<<<<<<\n *                     cell.add_triangles(luts.TILING10_1_1, config, 4)\n *                 else:\n */\n      /*else*/ {\n        __pyx_t_2 = (__pyx_f_26_marching_cubes_lewiner_cy_test_internal(__pyx_v_cell, __pyx_v_luts, __pyx_v_case, __pyx_v_config, __pyx_v_subconfig, ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Lut *)__pyx_v_luts->TEST10->__pyx_vtab)->get2(__pyx_v_luts->TEST10, __pyx_v_config, 2)) != 0);\n        if (__pyx_t_2) {\n\n          /* \"_marching_cubes_lewiner_cy.pyx\":1297\n *             else:\n *                 if test_internal(cell, luts, case, config, subconfig, luts.TEST10.get2(config,2)):\n *                     cell.add_triangles(luts.TILING10_1_1, config, 4)             # <<<<<<<<<<<<<<\n *                 else:\n *                     cell.add_triangles(luts.TILING10_1_2, config, 8)\n */\n          __pyx_t_1 = ((PyObject *)__pyx_v_luts->TILING10_1_1);\n          __Pyx_INCREF(__pyx_t_1);\n          ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_cell->__pyx_vtab)->add_triangles(__pyx_v_cell, ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1), __pyx_v_config, 4);\n          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n\n          /* \"_marching_cubes_lewiner_cy.pyx\":1296\n *                 cell.add_triangles(luts.TILING10_2_, config, 8)\n *             else:\n *                 if test_internal(cell, luts, case, config, subconfig, luts.TEST10.get2(config,2)):             # <<<<<<<<<<<<<<\n *                     cell.add_triangles(luts.TILING10_1_1, config, 4)\n *                 else:\n */\n          goto __pyx_L14;\n        }\n\n        /* \"_marching_cubes_lewiner_cy.pyx\":1299\n *                     cell.add_triangles(luts.TILING10_1_1, config, 4)\n *                 else:\n *                     cell.add_triangles(luts.TILING10_1_2, config, 8)             # <<<<<<<<<<<<<<\n * \n *     elif case == 11 :\n */\n        /*else*/ {\n          __pyx_t_1 = ((PyObject *)__pyx_v_luts->TILING10_1_2);\n          __Pyx_INCREF(__pyx_t_1);\n          ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_cell->__pyx_vtab)->add_triangles(__pyx_v_cell, ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1), __pyx_v_config, 8);\n          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n        }\n        __pyx_L14:;\n      }\n      __pyx_L13:;\n    }\n    __pyx_L11:;\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":1284\n *         cell.add_triangles(luts.TILING9, config, 4)\n * \n *     elif case == 10 :             # <<<<<<<<<<<<<<\n *         if test_face(cell, luts.TEST10.get2(config,0)):\n *             if test_face(cell, luts.TEST10.get2(config,1)):\n */\n    break;\n    case 11:\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":1302\n * \n *     elif case == 11 :\n *         cell.add_triangles(luts.TILING11, config, 4)             # <<<<<<<<<<<<<<\n * \n *     elif case == 12 :\n */\n    __pyx_t_1 = ((PyObject *)__pyx_v_luts->TILING11);\n    __Pyx_INCREF(__pyx_t_1);\n    ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_cell->__pyx_vtab)->add_triangles(__pyx_v_cell, ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1), __pyx_v_config, 4);\n    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":1301\n *                     cell.add_triangles(luts.TILING10_1_2, config, 8)\n * \n *     elif case == 11 :             # <<<<<<<<<<<<<<\n *         cell.add_triangles(luts.TILING11, config, 4)\n * \n */\n    break;\n    case 12:\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":1305\n * \n *     elif case == 12 :\n *         if test_face(cell, luts.TEST12.get2(config,0)):             # <<<<<<<<<<<<<<\n *             if test_face(cell, luts.TEST12.get2(config,1)):\n *                 cell.add_triangles(luts.TILING12_1_1_, config, 4)\n */\n    __pyx_t_2 = (__pyx_f_26_marching_cubes_lewiner_cy_test_face(__pyx_v_cell, ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Lut *)__pyx_v_luts->TEST12->__pyx_vtab)->get2(__pyx_v_luts->TEST12, __pyx_v_config, 0)) != 0);\n    if (__pyx_t_2) {\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1306\n *     elif case == 12 :\n *         if test_face(cell, luts.TEST12.get2(config,0)):\n *             if test_face(cell, luts.TEST12.get2(config,1)):             # <<<<<<<<<<<<<<\n *                 cell.add_triangles(luts.TILING12_1_1_, config, 4)\n *             else:\n */\n      __pyx_t_2 = (__pyx_f_26_marching_cubes_lewiner_cy_test_face(__pyx_v_cell, ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Lut *)__pyx_v_luts->TEST12->__pyx_vtab)->get2(__pyx_v_luts->TEST12, __pyx_v_config, 1)) != 0);\n      if (__pyx_t_2) {\n\n        /* \"_marching_cubes_lewiner_cy.pyx\":1307\n *         if test_face(cell, luts.TEST12.get2(config,0)):\n *             if test_face(cell, luts.TEST12.get2(config,1)):\n *                 cell.add_triangles(luts.TILING12_1_1_, config, 4)             # <<<<<<<<<<<<<<\n *             else:\n *                 #cell.calculate_center_vertex() # v12 needed\n */\n        __pyx_t_1 = ((PyObject *)__pyx_v_luts->TILING12_1_1_);\n        __Pyx_INCREF(__pyx_t_1);\n        ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_cell->__pyx_vtab)->add_triangles(__pyx_v_cell, ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1), __pyx_v_config, 4);\n        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n\n        /* \"_marching_cubes_lewiner_cy.pyx\":1306\n *     elif case == 12 :\n *         if test_face(cell, luts.TEST12.get2(config,0)):\n *             if test_face(cell, luts.TEST12.get2(config,1)):             # <<<<<<<<<<<<<<\n *                 cell.add_triangles(luts.TILING12_1_1_, config, 4)\n *             else:\n */\n        goto __pyx_L16;\n      }\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1310\n *             else:\n *                 #cell.calculate_center_vertex() # v12 needed\n *                 cell.add_triangles(luts.TILING12_2, config, 8)             # <<<<<<<<<<<<<<\n *         else:\n *             if test_face(cell, luts.TEST12.get2(config,1)):\n */\n      /*else*/ {\n        __pyx_t_1 = ((PyObject *)__pyx_v_luts->TILING12_2);\n        __Pyx_INCREF(__pyx_t_1);\n        ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_cell->__pyx_vtab)->add_triangles(__pyx_v_cell, ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1), __pyx_v_config, 8);\n        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n      }\n      __pyx_L16:;\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1305\n * \n *     elif case == 12 :\n *         if test_face(cell, luts.TEST12.get2(config,0)):             # <<<<<<<<<<<<<<\n *             if test_face(cell, luts.TEST12.get2(config,1)):\n *                 cell.add_triangles(luts.TILING12_1_1_, config, 4)\n */\n      goto __pyx_L15;\n    }\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":1312\n *                 cell.add_triangles(luts.TILING12_2, config, 8)\n *         else:\n *             if test_face(cell, luts.TEST12.get2(config,1)):             # <<<<<<<<<<<<<<\n *                 #cell.calculate_center_vertex() # v12 needed\n *                 cell.add_triangles(luts.TILING12_2_, config, 8)\n */\n    /*else*/ {\n      __pyx_t_2 = (__pyx_f_26_marching_cubes_lewiner_cy_test_face(__pyx_v_cell, ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Lut *)__pyx_v_luts->TEST12->__pyx_vtab)->get2(__pyx_v_luts->TEST12, __pyx_v_config, 1)) != 0);\n      if (__pyx_t_2) {\n\n        /* \"_marching_cubes_lewiner_cy.pyx\":1314\n *             if test_face(cell, luts.TEST12.get2(config,1)):\n *                 #cell.calculate_center_vertex() # v12 needed\n *                 cell.add_triangles(luts.TILING12_2_, config, 8)             # <<<<<<<<<<<<<<\n *             else:\n *                 if test_internal(cell, luts, case, config, subconfig, luts.TEST12.get2(config,2)):\n */\n        __pyx_t_1 = ((PyObject *)__pyx_v_luts->TILING12_2_);\n        __Pyx_INCREF(__pyx_t_1);\n        ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_cell->__pyx_vtab)->add_triangles(__pyx_v_cell, ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1), __pyx_v_config, 8);\n        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n\n        /* \"_marching_cubes_lewiner_cy.pyx\":1312\n *                 cell.add_triangles(luts.TILING12_2, config, 8)\n *         else:\n *             if test_face(cell, luts.TEST12.get2(config,1)):             # <<<<<<<<<<<<<<\n *                 #cell.calculate_center_vertex() # v12 needed\n *                 cell.add_triangles(luts.TILING12_2_, config, 8)\n */\n        goto __pyx_L17;\n      }\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1316\n *                 cell.add_triangles(luts.TILING12_2_, config, 8)\n *             else:\n *                 if test_internal(cell, luts, case, config, subconfig, luts.TEST12.get2(config,2)):             # <<<<<<<<<<<<<<\n *                     cell.add_triangles(luts.TILING12_1_1, config, 4)\n *                 else:\n */\n      /*else*/ {\n        __pyx_t_2 = (__pyx_f_26_marching_cubes_lewiner_cy_test_internal(__pyx_v_cell, __pyx_v_luts, __pyx_v_case, __pyx_v_config, __pyx_v_subconfig, ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Lut *)__pyx_v_luts->TEST12->__pyx_vtab)->get2(__pyx_v_luts->TEST12, __pyx_v_config, 2)) != 0);\n        if (__pyx_t_2) {\n\n          /* \"_marching_cubes_lewiner_cy.pyx\":1317\n *             else:\n *                 if test_internal(cell, luts, case, config, subconfig, luts.TEST12.get2(config,2)):\n *                     cell.add_triangles(luts.TILING12_1_1, config, 4)             # <<<<<<<<<<<<<<\n *                 else:\n *                     cell.add_triangles(luts.TILING12_1_2, config, 8)\n */\n          __pyx_t_1 = ((PyObject *)__pyx_v_luts->TILING12_1_1);\n          __Pyx_INCREF(__pyx_t_1);\n          ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_cell->__pyx_vtab)->add_triangles(__pyx_v_cell, ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1), __pyx_v_config, 4);\n          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n\n          /* \"_marching_cubes_lewiner_cy.pyx\":1316\n *                 cell.add_triangles(luts.TILING12_2_, config, 8)\n *             else:\n *                 if test_internal(cell, luts, case, config, subconfig, luts.TEST12.get2(config,2)):             # <<<<<<<<<<<<<<\n *                     cell.add_triangles(luts.TILING12_1_1, config, 4)\n *                 else:\n */\n          goto __pyx_L18;\n        }\n\n        /* \"_marching_cubes_lewiner_cy.pyx\":1319\n *                     cell.add_triangles(luts.TILING12_1_1, config, 4)\n *                 else:\n *                     cell.add_triangles(luts.TILING12_1_2, config, 8)             # <<<<<<<<<<<<<<\n * \n *     elif case == 13 :\n */\n        /*else*/ {\n          __pyx_t_1 = ((PyObject *)__pyx_v_luts->TILING12_1_2);\n          __Pyx_INCREF(__pyx_t_1);\n          ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_cell->__pyx_vtab)->add_triangles(__pyx_v_cell, ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1), __pyx_v_config, 8);\n          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n        }\n        __pyx_L18:;\n      }\n      __pyx_L17:;\n    }\n    __pyx_L15:;\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":1304\n *         cell.add_triangles(luts.TILING11, config, 4)\n * \n *     elif case == 12 :             # <<<<<<<<<<<<<<\n *         if test_face(cell, luts.TEST12.get2(config,0)):\n *             if test_face(cell, luts.TEST12.get2(config,1)):\n */\n    break;\n    case 13:\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":1323\n *     elif case == 13 :\n *         # Calculate subconfig\n *         if test_face(cell, luts.TEST13.get2(config,0)): subconfig += 1             # <<<<<<<<<<<<<<\n *         if test_face(cell, luts.TEST13.get2(config,1)): subconfig += 2\n *         if test_face(cell, luts.TEST13.get2(config,2)): subconfig += 4\n */\n    __pyx_t_2 = (__pyx_f_26_marching_cubes_lewiner_cy_test_face(__pyx_v_cell, ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Lut *)__pyx_v_luts->TEST13->__pyx_vtab)->get2(__pyx_v_luts->TEST13, __pyx_v_config, 0)) != 0);\n    if (__pyx_t_2) {\n      __pyx_v_subconfig = (__pyx_v_subconfig + 1);\n    }\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":1324\n *         # Calculate subconfig\n *         if test_face(cell, luts.TEST13.get2(config,0)): subconfig += 1\n *         if test_face(cell, luts.TEST13.get2(config,1)): subconfig += 2             # <<<<<<<<<<<<<<\n *         if test_face(cell, luts.TEST13.get2(config,2)): subconfig += 4\n *         if test_face(cell, luts.TEST13.get2(config,3)): subconfig += 8\n */\n    __pyx_t_2 = (__pyx_f_26_marching_cubes_lewiner_cy_test_face(__pyx_v_cell, ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Lut *)__pyx_v_luts->TEST13->__pyx_vtab)->get2(__pyx_v_luts->TEST13, __pyx_v_config, 1)) != 0);\n    if (__pyx_t_2) {\n      __pyx_v_subconfig = (__pyx_v_subconfig + 2);\n    }\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":1325\n *         if test_face(cell, luts.TEST13.get2(config,0)): subconfig += 1\n *         if test_face(cell, luts.TEST13.get2(config,1)): subconfig += 2\n *         if test_face(cell, luts.TEST13.get2(config,2)): subconfig += 4             # <<<<<<<<<<<<<<\n *         if test_face(cell, luts.TEST13.get2(config,3)): subconfig += 8\n *         if test_face(cell, luts.TEST13.get2(config,4)): subconfig += 16\n */\n    __pyx_t_2 = (__pyx_f_26_marching_cubes_lewiner_cy_test_face(__pyx_v_cell, ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Lut *)__pyx_v_luts->TEST13->__pyx_vtab)->get2(__pyx_v_luts->TEST13, __pyx_v_config, 2)) != 0);\n    if (__pyx_t_2) {\n      __pyx_v_subconfig = (__pyx_v_subconfig + 4);\n    }\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":1326\n *         if test_face(cell, luts.TEST13.get2(config,1)): subconfig += 2\n *         if test_face(cell, luts.TEST13.get2(config,2)): subconfig += 4\n *         if test_face(cell, luts.TEST13.get2(config,3)): subconfig += 8             # <<<<<<<<<<<<<<\n *         if test_face(cell, luts.TEST13.get2(config,4)): subconfig += 16\n *         if test_face(cell, luts.TEST13.get2(config,5)): subconfig += 32\n */\n    __pyx_t_2 = (__pyx_f_26_marching_cubes_lewiner_cy_test_face(__pyx_v_cell, ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Lut *)__pyx_v_luts->TEST13->__pyx_vtab)->get2(__pyx_v_luts->TEST13, __pyx_v_config, 3)) != 0);\n    if (__pyx_t_2) {\n      __pyx_v_subconfig = (__pyx_v_subconfig + 8);\n    }\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":1327\n *         if test_face(cell, luts.TEST13.get2(config,2)): subconfig += 4\n *         if test_face(cell, luts.TEST13.get2(config,3)): subconfig += 8\n *         if test_face(cell, luts.TEST13.get2(config,4)): subconfig += 16             # <<<<<<<<<<<<<<\n *         if test_face(cell, luts.TEST13.get2(config,5)): subconfig += 32\n * \n */\n    __pyx_t_2 = (__pyx_f_26_marching_cubes_lewiner_cy_test_face(__pyx_v_cell, ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Lut *)__pyx_v_luts->TEST13->__pyx_vtab)->get2(__pyx_v_luts->TEST13, __pyx_v_config, 4)) != 0);\n    if (__pyx_t_2) {\n      __pyx_v_subconfig = (__pyx_v_subconfig + 16);\n    }\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":1328\n *         if test_face(cell, luts.TEST13.get2(config,3)): subconfig += 8\n *         if test_face(cell, luts.TEST13.get2(config,4)): subconfig += 16\n *         if test_face(cell, luts.TEST13.get2(config,5)): subconfig += 32             # <<<<<<<<<<<<<<\n * \n *         # Map via LUT\n */\n    __pyx_t_2 = (__pyx_f_26_marching_cubes_lewiner_cy_test_face(__pyx_v_cell, ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Lut *)__pyx_v_luts->TEST13->__pyx_vtab)->get2(__pyx_v_luts->TEST13, __pyx_v_config, 5)) != 0);\n    if (__pyx_t_2) {\n      __pyx_v_subconfig = (__pyx_v_subconfig + 32);\n    }\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":1331\n * \n *         # Map via LUT\n *         subconfig = luts.SUBCONFIG13.get1(subconfig)             # <<<<<<<<<<<<<<\n * \n *         # Behavior depends on subconfig\n */\n    __pyx_v_subconfig = ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Lut *)__pyx_v_luts->SUBCONFIG13->__pyx_vtab)->get1(__pyx_v_luts->SUBCONFIG13, __pyx_v_subconfig);\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":1334\n * \n *         # Behavior depends on subconfig\n *         if subconfig==0:    cell.add_triangles(luts.TILING13_1, config, 4)             # <<<<<<<<<<<<<<\n *         elif subconfig==1:  cell.add_triangles2(luts.TILING13_2, config, 0, 6)\n *         elif subconfig==2:  cell.add_triangles2(luts.TILING13_2, config, 1, 6)\n */\n    switch (__pyx_v_subconfig) {\n      case 0:\n      __pyx_t_1 = ((PyObject *)__pyx_v_luts->TILING13_1);\n      __Pyx_INCREF(__pyx_t_1);\n      ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_cell->__pyx_vtab)->add_triangles(__pyx_v_cell, ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1), __pyx_v_config, 4);\n      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n      break;\n      case 1:\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1335\n *         # Behavior depends on subconfig\n *         if subconfig==0:    cell.add_triangles(luts.TILING13_1, config, 4)\n *         elif subconfig==1:  cell.add_triangles2(luts.TILING13_2, config, 0, 6)             # <<<<<<<<<<<<<<\n *         elif subconfig==2:  cell.add_triangles2(luts.TILING13_2, config, 1, 6)\n *         elif subconfig==3:  cell.add_triangles2(luts.TILING13_2, config, 2, 6)\n */\n      __pyx_t_1 = ((PyObject *)__pyx_v_luts->TILING13_2);\n      __Pyx_INCREF(__pyx_t_1);\n      ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_cell->__pyx_vtab)->add_triangles2(__pyx_v_cell, ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1), __pyx_v_config, 0, 6);\n      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n      break;\n      case 2:\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1336\n *         if subconfig==0:    cell.add_triangles(luts.TILING13_1, config, 4)\n *         elif subconfig==1:  cell.add_triangles2(luts.TILING13_2, config, 0, 6)\n *         elif subconfig==2:  cell.add_triangles2(luts.TILING13_2, config, 1, 6)             # <<<<<<<<<<<<<<\n *         elif subconfig==3:  cell.add_triangles2(luts.TILING13_2, config, 2, 6)\n *         elif subconfig==4:  cell.add_triangles2(luts.TILING13_2, config, 3, 6)\n */\n      __pyx_t_1 = ((PyObject *)__pyx_v_luts->TILING13_2);\n      __Pyx_INCREF(__pyx_t_1);\n      ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_cell->__pyx_vtab)->add_triangles2(__pyx_v_cell, ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1), __pyx_v_config, 1, 6);\n      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n      break;\n      case 3:\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1337\n *         elif subconfig==1:  cell.add_triangles2(luts.TILING13_2, config, 0, 6)\n *         elif subconfig==2:  cell.add_triangles2(luts.TILING13_2, config, 1, 6)\n *         elif subconfig==3:  cell.add_triangles2(luts.TILING13_2, config, 2, 6)             # <<<<<<<<<<<<<<\n *         elif subconfig==4:  cell.add_triangles2(luts.TILING13_2, config, 3, 6)\n *         elif subconfig==5:  cell.add_triangles2(luts.TILING13_2, config, 4, 6)\n */\n      __pyx_t_1 = ((PyObject *)__pyx_v_luts->TILING13_2);\n      __Pyx_INCREF(__pyx_t_1);\n      ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_cell->__pyx_vtab)->add_triangles2(__pyx_v_cell, ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1), __pyx_v_config, 2, 6);\n      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n      break;\n      case 4:\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1338\n *         elif subconfig==2:  cell.add_triangles2(luts.TILING13_2, config, 1, 6)\n *         elif subconfig==3:  cell.add_triangles2(luts.TILING13_2, config, 2, 6)\n *         elif subconfig==4:  cell.add_triangles2(luts.TILING13_2, config, 3, 6)             # <<<<<<<<<<<<<<\n *         elif subconfig==5:  cell.add_triangles2(luts.TILING13_2, config, 4, 6)\n *         elif subconfig==6:  cell.add_triangles2(luts.TILING13_2, config, 5, 6)\n */\n      __pyx_t_1 = ((PyObject *)__pyx_v_luts->TILING13_2);\n      __Pyx_INCREF(__pyx_t_1);\n      ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_cell->__pyx_vtab)->add_triangles2(__pyx_v_cell, ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1), __pyx_v_config, 3, 6);\n      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n      break;\n      case 5:\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1339\n *         elif subconfig==3:  cell.add_triangles2(luts.TILING13_2, config, 2, 6)\n *         elif subconfig==4:  cell.add_triangles2(luts.TILING13_2, config, 3, 6)\n *         elif subconfig==5:  cell.add_triangles2(luts.TILING13_2, config, 4, 6)             # <<<<<<<<<<<<<<\n *         elif subconfig==6:  cell.add_triangles2(luts.TILING13_2, config, 5, 6)\n *         #\n */\n      __pyx_t_1 = ((PyObject *)__pyx_v_luts->TILING13_2);\n      __Pyx_INCREF(__pyx_t_1);\n      ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_cell->__pyx_vtab)->add_triangles2(__pyx_v_cell, ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1), __pyx_v_config, 4, 6);\n      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n      break;\n      case 6:\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1340\n *         elif subconfig==4:  cell.add_triangles2(luts.TILING13_2, config, 3, 6)\n *         elif subconfig==5:  cell.add_triangles2(luts.TILING13_2, config, 4, 6)\n *         elif subconfig==6:  cell.add_triangles2(luts.TILING13_2, config, 5, 6)             # <<<<<<<<<<<<<<\n *         #\n *         elif subconfig==7:\n */\n      __pyx_t_1 = ((PyObject *)__pyx_v_luts->TILING13_2);\n      __Pyx_INCREF(__pyx_t_1);\n      ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_cell->__pyx_vtab)->add_triangles2(__pyx_v_cell, ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1), __pyx_v_config, 5, 6);\n      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n      break;\n      case 7:\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1344\n *         elif subconfig==7:\n *             #cell.calculate_center_vertex() # v12 needed\n *             cell.add_triangles2(luts.TILING13_3, config, 0, 10)             # <<<<<<<<<<<<<<\n *         elif subconfig==8:\n *             #cell.calculate_center_vertex() # v12 needed\n */\n      __pyx_t_1 = ((PyObject *)__pyx_v_luts->TILING13_3);\n      __Pyx_INCREF(__pyx_t_1);\n      ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_cell->__pyx_vtab)->add_triangles2(__pyx_v_cell, ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1), __pyx_v_config, 0, 10);\n      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1342\n *         elif subconfig==6:  cell.add_triangles2(luts.TILING13_2, config, 5, 6)\n *         #\n *         elif subconfig==7:             # <<<<<<<<<<<<<<\n *             #cell.calculate_center_vertex() # v12 needed\n *             cell.add_triangles2(luts.TILING13_3, config, 0, 10)\n */\n      break;\n      case 8:\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1347\n *         elif subconfig==8:\n *             #cell.calculate_center_vertex() # v12 needed\n *             cell.add_triangles2(luts.TILING13_3, config, 1, 10)             # <<<<<<<<<<<<<<\n *         elif subconfig==9:\n *             #cell.calculate_center_vertex() # v12 needed\n */\n      __pyx_t_1 = ((PyObject *)__pyx_v_luts->TILING13_3);\n      __Pyx_INCREF(__pyx_t_1);\n      ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_cell->__pyx_vtab)->add_triangles2(__pyx_v_cell, ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1), __pyx_v_config, 1, 10);\n      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1345\n *             #cell.calculate_center_vertex() # v12 needed\n *             cell.add_triangles2(luts.TILING13_3, config, 0, 10)\n *         elif subconfig==8:             # <<<<<<<<<<<<<<\n *             #cell.calculate_center_vertex() # v12 needed\n *             cell.add_triangles2(luts.TILING13_3, config, 1, 10)\n */\n      break;\n      case 9:\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1350\n *         elif subconfig==9:\n *             #cell.calculate_center_vertex() # v12 needed\n *             cell.add_triangles2(luts.TILING13_3, config, 2, 10)             # <<<<<<<<<<<<<<\n *         elif subconfig==10:\n *             #cell.calculate_center_vertex() # v12 needed\n */\n      __pyx_t_1 = ((PyObject *)__pyx_v_luts->TILING13_3);\n      __Pyx_INCREF(__pyx_t_1);\n      ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_cell->__pyx_vtab)->add_triangles2(__pyx_v_cell, ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1), __pyx_v_config, 2, 10);\n      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1348\n *             #cell.calculate_center_vertex() # v12 needed\n *             cell.add_triangles2(luts.TILING13_3, config, 1, 10)\n *         elif subconfig==9:             # <<<<<<<<<<<<<<\n *             #cell.calculate_center_vertex() # v12 needed\n *             cell.add_triangles2(luts.TILING13_3, config, 2, 10)\n */\n      break;\n      case 10:\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1353\n *         elif subconfig==10:\n *             #cell.calculate_center_vertex() # v12 needed\n *             cell.add_triangles2(luts.TILING13_3, config, 3, 10)             # <<<<<<<<<<<<<<\n *         elif subconfig==11:\n *             #cell.calculate_center_vertex() # v12 needed\n */\n      __pyx_t_1 = ((PyObject *)__pyx_v_luts->TILING13_3);\n      __Pyx_INCREF(__pyx_t_1);\n      ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_cell->__pyx_vtab)->add_triangles2(__pyx_v_cell, ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1), __pyx_v_config, 3, 10);\n      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1351\n *             #cell.calculate_center_vertex() # v12 needed\n *             cell.add_triangles2(luts.TILING13_3, config, 2, 10)\n *         elif subconfig==10:             # <<<<<<<<<<<<<<\n *             #cell.calculate_center_vertex() # v12 needed\n *             cell.add_triangles2(luts.TILING13_3, config, 3, 10)\n */\n      break;\n      case 11:\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1356\n *         elif subconfig==11:\n *             #cell.calculate_center_vertex() # v12 needed\n *             cell.add_triangles2(luts.TILING13_3, config, 4, 10)             # <<<<<<<<<<<<<<\n *         elif subconfig==12:\n *             #cell.calculate_center_vertex() # v12 needed\n */\n      __pyx_t_1 = ((PyObject *)__pyx_v_luts->TILING13_3);\n      __Pyx_INCREF(__pyx_t_1);\n      ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_cell->__pyx_vtab)->add_triangles2(__pyx_v_cell, ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1), __pyx_v_config, 4, 10);\n      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1354\n *             #cell.calculate_center_vertex() # v12 needed\n *             cell.add_triangles2(luts.TILING13_3, config, 3, 10)\n *         elif subconfig==11:             # <<<<<<<<<<<<<<\n *             #cell.calculate_center_vertex() # v12 needed\n *             cell.add_triangles2(luts.TILING13_3, config, 4, 10)\n */\n      break;\n      case 12:\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1359\n *         elif subconfig==12:\n *             #cell.calculate_center_vertex() # v12 needed\n *             cell.add_triangles2(luts.TILING13_3, config, 5, 10)             # <<<<<<<<<<<<<<\n *         elif subconfig==13:\n *             #cell.calculate_center_vertex() # v12 needed\n */\n      __pyx_t_1 = ((PyObject *)__pyx_v_luts->TILING13_3);\n      __Pyx_INCREF(__pyx_t_1);\n      ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_cell->__pyx_vtab)->add_triangles2(__pyx_v_cell, ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1), __pyx_v_config, 5, 10);\n      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1357\n *             #cell.calculate_center_vertex() # v12 needed\n *             cell.add_triangles2(luts.TILING13_3, config, 4, 10)\n *         elif subconfig==12:             # <<<<<<<<<<<<<<\n *             #cell.calculate_center_vertex() # v12 needed\n *             cell.add_triangles2(luts.TILING13_3, config, 5, 10)\n */\n      break;\n      case 13:\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1362\n *         elif subconfig==13:\n *             #cell.calculate_center_vertex() # v12 needed\n *             cell.add_triangles2(luts.TILING13_3, config, 6, 10)             # <<<<<<<<<<<<<<\n *         elif subconfig==14:\n *             #cell.calculate_center_vertex() # v12 needed\n */\n      __pyx_t_1 = ((PyObject *)__pyx_v_luts->TILING13_3);\n      __Pyx_INCREF(__pyx_t_1);\n      ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_cell->__pyx_vtab)->add_triangles2(__pyx_v_cell, ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1), __pyx_v_config, 6, 10);\n      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1360\n *             #cell.calculate_center_vertex() # v12 needed\n *             cell.add_triangles2(luts.TILING13_3, config, 5, 10)\n *         elif subconfig==13:             # <<<<<<<<<<<<<<\n *             #cell.calculate_center_vertex() # v12 needed\n *             cell.add_triangles2(luts.TILING13_3, config, 6, 10)\n */\n      break;\n      case 14:\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1365\n *         elif subconfig==14:\n *             #cell.calculate_center_vertex() # v12 needed\n *             cell.add_triangles2(luts.TILING13_3, config, 7, 10)             # <<<<<<<<<<<<<<\n *         elif subconfig==15:\n *             #cell.calculate_center_vertex() # v12 needed\n */\n      __pyx_t_1 = ((PyObject *)__pyx_v_luts->TILING13_3);\n      __Pyx_INCREF(__pyx_t_1);\n      ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_cell->__pyx_vtab)->add_triangles2(__pyx_v_cell, ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1), __pyx_v_config, 7, 10);\n      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1363\n *             #cell.calculate_center_vertex() # v12 needed\n *             cell.add_triangles2(luts.TILING13_3, config, 6, 10)\n *         elif subconfig==14:             # <<<<<<<<<<<<<<\n *             #cell.calculate_center_vertex() # v12 needed\n *             cell.add_triangles2(luts.TILING13_3, config, 7, 10)\n */\n      break;\n      case 15:\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1368\n *         elif subconfig==15:\n *             #cell.calculate_center_vertex() # v12 needed\n *             cell.add_triangles2(luts.TILING13_3, config, 8, 10)             # <<<<<<<<<<<<<<\n *         elif subconfig==16:\n *             #cell.calculate_center_vertex() # v12 needed\n */\n      __pyx_t_1 = ((PyObject *)__pyx_v_luts->TILING13_3);\n      __Pyx_INCREF(__pyx_t_1);\n      ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_cell->__pyx_vtab)->add_triangles2(__pyx_v_cell, ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1), __pyx_v_config, 8, 10);\n      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1366\n *             #cell.calculate_center_vertex() # v12 needed\n *             cell.add_triangles2(luts.TILING13_3, config, 7, 10)\n *         elif subconfig==15:             # <<<<<<<<<<<<<<\n *             #cell.calculate_center_vertex() # v12 needed\n *             cell.add_triangles2(luts.TILING13_3, config, 8, 10)\n */\n      break;\n      case 16:\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1371\n *         elif subconfig==16:\n *             #cell.calculate_center_vertex() # v12 needed\n *             cell.add_triangles2(luts.TILING13_3, config, 9, 10)             # <<<<<<<<<<<<<<\n *         elif subconfig==17:\n *             #cell.calculate_center_vertex() # v12 needed\n */\n      __pyx_t_1 = ((PyObject *)__pyx_v_luts->TILING13_3);\n      __Pyx_INCREF(__pyx_t_1);\n      ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_cell->__pyx_vtab)->add_triangles2(__pyx_v_cell, ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1), __pyx_v_config, 9, 10);\n      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1369\n *             #cell.calculate_center_vertex() # v12 needed\n *             cell.add_triangles2(luts.TILING13_3, config, 8, 10)\n *         elif subconfig==16:             # <<<<<<<<<<<<<<\n *             #cell.calculate_center_vertex() # v12 needed\n *             cell.add_triangles2(luts.TILING13_3, config, 9, 10)\n */\n      break;\n      case 17:\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1374\n *         elif subconfig==17:\n *             #cell.calculate_center_vertex() # v12 needed\n *             cell.add_triangles2(luts.TILING13_3, config, 10, 10)             # <<<<<<<<<<<<<<\n *         elif subconfig==18:\n *             #cell.calculate_center_vertex() # v12 needed\n */\n      __pyx_t_1 = ((PyObject *)__pyx_v_luts->TILING13_3);\n      __Pyx_INCREF(__pyx_t_1);\n      ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_cell->__pyx_vtab)->add_triangles2(__pyx_v_cell, ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1), __pyx_v_config, 10, 10);\n      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1372\n *             #cell.calculate_center_vertex() # v12 needed\n *             cell.add_triangles2(luts.TILING13_3, config, 9, 10)\n *         elif subconfig==17:             # <<<<<<<<<<<<<<\n *             #cell.calculate_center_vertex() # v12 needed\n *             cell.add_triangles2(luts.TILING13_3, config, 10, 10)\n */\n      break;\n      case 18:\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1377\n *         elif subconfig==18:\n *             #cell.calculate_center_vertex() # v12 needed\n *             cell.add_triangles2(luts.TILING13_3, config, 11, 10)             # <<<<<<<<<<<<<<\n *         #\n *         elif subconfig==19:\n */\n      __pyx_t_1 = ((PyObject *)__pyx_v_luts->TILING13_3);\n      __Pyx_INCREF(__pyx_t_1);\n      ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_cell->__pyx_vtab)->add_triangles2(__pyx_v_cell, ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1), __pyx_v_config, 11, 10);\n      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1375\n *             #cell.calculate_center_vertex() # v12 needed\n *             cell.add_triangles2(luts.TILING13_3, config, 10, 10)\n *         elif subconfig==18:             # <<<<<<<<<<<<<<\n *             #cell.calculate_center_vertex() # v12 needed\n *             cell.add_triangles2(luts.TILING13_3, config, 11, 10)\n */\n      break;\n      case 19:\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1381\n *         elif subconfig==19:\n *             #cell.calculate_center_vertex() # v12 needed\n *             cell.add_triangles2(luts.TILING13_4, config, 0, 12)             # <<<<<<<<<<<<<<\n *         elif subconfig==20:\n *             #cell.calculate_center_vertex() # v12 needed\n */\n      __pyx_t_1 = ((PyObject *)__pyx_v_luts->TILING13_4);\n      __Pyx_INCREF(__pyx_t_1);\n      ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_cell->__pyx_vtab)->add_triangles2(__pyx_v_cell, ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1), __pyx_v_config, 0, 12);\n      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1379\n *             cell.add_triangles2(luts.TILING13_3, config, 11, 10)\n *         #\n *         elif subconfig==19:             # <<<<<<<<<<<<<<\n *             #cell.calculate_center_vertex() # v12 needed\n *             cell.add_triangles2(luts.TILING13_4, config, 0, 12)\n */\n      break;\n      case 20:\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1384\n *         elif subconfig==20:\n *             #cell.calculate_center_vertex() # v12 needed\n *             cell.add_triangles2(luts.TILING13_4, config, 1, 12)             # <<<<<<<<<<<<<<\n *         elif subconfig==21:\n *             #cell.calculate_center_vertex() # v12 needed\n */\n      __pyx_t_1 = ((PyObject *)__pyx_v_luts->TILING13_4);\n      __Pyx_INCREF(__pyx_t_1);\n      ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_cell->__pyx_vtab)->add_triangles2(__pyx_v_cell, ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1), __pyx_v_config, 1, 12);\n      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1382\n *             #cell.calculate_center_vertex() # v12 needed\n *             cell.add_triangles2(luts.TILING13_4, config, 0, 12)\n *         elif subconfig==20:             # <<<<<<<<<<<<<<\n *             #cell.calculate_center_vertex() # v12 needed\n *             cell.add_triangles2(luts.TILING13_4, config, 1, 12)\n */\n      break;\n      case 21:\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1387\n *         elif subconfig==21:\n *             #cell.calculate_center_vertex() # v12 needed\n *             cell.add_triangles2(luts.TILING13_4, config, 2, 12)             # <<<<<<<<<<<<<<\n *         elif subconfig==22:\n *             #cell.calculate_center_vertex() # v12 needed\n */\n      __pyx_t_1 = ((PyObject *)__pyx_v_luts->TILING13_4);\n      __Pyx_INCREF(__pyx_t_1);\n      ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_cell->__pyx_vtab)->add_triangles2(__pyx_v_cell, ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1), __pyx_v_config, 2, 12);\n      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1385\n *             #cell.calculate_center_vertex() # v12 needed\n *             cell.add_triangles2(luts.TILING13_4, config, 1, 12)\n *         elif subconfig==21:             # <<<<<<<<<<<<<<\n *             #cell.calculate_center_vertex() # v12 needed\n *             cell.add_triangles2(luts.TILING13_4, config, 2, 12)\n */\n      break;\n      case 22:\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1390\n *         elif subconfig==22:\n *             #cell.calculate_center_vertex() # v12 needed\n *             cell.add_triangles2(luts.TILING13_4, config, 3, 12)             # <<<<<<<<<<<<<<\n *         #\n *         elif subconfig==23:\n */\n      __pyx_t_1 = ((PyObject *)__pyx_v_luts->TILING13_4);\n      __Pyx_INCREF(__pyx_t_1);\n      ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_cell->__pyx_vtab)->add_triangles2(__pyx_v_cell, ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1), __pyx_v_config, 3, 12);\n      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1388\n *             #cell.calculate_center_vertex() # v12 needed\n *             cell.add_triangles2(luts.TILING13_4, config, 2, 12)\n *         elif subconfig==22:             # <<<<<<<<<<<<<<\n *             #cell.calculate_center_vertex() # v12 needed\n *             cell.add_triangles2(luts.TILING13_4, config, 3, 12)\n */\n      break;\n      case 23:\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1393\n *         #\n *         elif subconfig==23:\n *             subconfig = 0 # Note: the original source code sets the subconfig, without apparent reason             # <<<<<<<<<<<<<<\n *             if test_internal(cell, luts, case, config, subconfig, luts.TEST13.get2(config,6)):\n *                 cell.add_triangles2(luts.TILING13_5_1, config, 0, 6)\n */\n      __pyx_v_subconfig = 0;\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1394\n *         elif subconfig==23:\n *             subconfig = 0 # Note: the original source code sets the subconfig, without apparent reason\n *             if test_internal(cell, luts, case, config, subconfig, luts.TEST13.get2(config,6)):             # <<<<<<<<<<<<<<\n *                 cell.add_triangles2(luts.TILING13_5_1, config, 0, 6)\n *             else:\n */\n      __pyx_t_2 = (__pyx_f_26_marching_cubes_lewiner_cy_test_internal(__pyx_v_cell, __pyx_v_luts, __pyx_v_case, __pyx_v_config, __pyx_v_subconfig, ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Lut *)__pyx_v_luts->TEST13->__pyx_vtab)->get2(__pyx_v_luts->TEST13, __pyx_v_config, 6)) != 0);\n      if (__pyx_t_2) {\n\n        /* \"_marching_cubes_lewiner_cy.pyx\":1395\n *             subconfig = 0 # Note: the original source code sets the subconfig, without apparent reason\n *             if test_internal(cell, luts, case, config, subconfig, luts.TEST13.get2(config,6)):\n *                 cell.add_triangles2(luts.TILING13_5_1, config, 0, 6)             # <<<<<<<<<<<<<<\n *             else:\n *                 cell.add_triangles2(luts.TILING13_5_2, config, 0, 10)\n */\n        __pyx_t_1 = ((PyObject *)__pyx_v_luts->TILING13_5_1);\n        __Pyx_INCREF(__pyx_t_1);\n        ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_cell->__pyx_vtab)->add_triangles2(__pyx_v_cell, ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1), __pyx_v_config, 0, 6);\n        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n\n        /* \"_marching_cubes_lewiner_cy.pyx\":1394\n *         elif subconfig==23:\n *             subconfig = 0 # Note: the original source code sets the subconfig, without apparent reason\n *             if test_internal(cell, luts, case, config, subconfig, luts.TEST13.get2(config,6)):             # <<<<<<<<<<<<<<\n *                 cell.add_triangles2(luts.TILING13_5_1, config, 0, 6)\n *             else:\n */\n        goto __pyx_L25;\n      }\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1397\n *                 cell.add_triangles2(luts.TILING13_5_1, config, 0, 6)\n *             else:\n *                 cell.add_triangles2(luts.TILING13_5_2, config, 0, 10)             # <<<<<<<<<<<<<<\n *         elif subconfig==24:\n *             subconfig = 1\n */\n      /*else*/ {\n        __pyx_t_1 = ((PyObject *)__pyx_v_luts->TILING13_5_2);\n        __Pyx_INCREF(__pyx_t_1);\n        ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_cell->__pyx_vtab)->add_triangles2(__pyx_v_cell, ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1), __pyx_v_config, 0, 10);\n        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n      }\n      __pyx_L25:;\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1392\n *             cell.add_triangles2(luts.TILING13_4, config, 3, 12)\n *         #\n *         elif subconfig==23:             # <<<<<<<<<<<<<<\n *             subconfig = 0 # Note: the original source code sets the subconfig, without apparent reason\n *             if test_internal(cell, luts, case, config, subconfig, luts.TEST13.get2(config,6)):\n */\n      break;\n      case 24:\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1399\n *                 cell.add_triangles2(luts.TILING13_5_2, config, 0, 10)\n *         elif subconfig==24:\n *             subconfig = 1             # <<<<<<<<<<<<<<\n *             if test_internal(cell, luts, case, config, subconfig, luts.TEST13.get2(config,6)):\n *                 cell.add_triangles2(luts.TILING13_5_1, config, 1, 6)\n */\n      __pyx_v_subconfig = 1;\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1400\n *         elif subconfig==24:\n *             subconfig = 1\n *             if test_internal(cell, luts, case, config, subconfig, luts.TEST13.get2(config,6)):             # <<<<<<<<<<<<<<\n *                 cell.add_triangles2(luts.TILING13_5_1, config, 1, 6)\n *             else:\n */\n      __pyx_t_2 = (__pyx_f_26_marching_cubes_lewiner_cy_test_internal(__pyx_v_cell, __pyx_v_luts, __pyx_v_case, __pyx_v_config, __pyx_v_subconfig, ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Lut *)__pyx_v_luts->TEST13->__pyx_vtab)->get2(__pyx_v_luts->TEST13, __pyx_v_config, 6)) != 0);\n      if (__pyx_t_2) {\n\n        /* \"_marching_cubes_lewiner_cy.pyx\":1401\n *             subconfig = 1\n *             if test_internal(cell, luts, case, config, subconfig, luts.TEST13.get2(config,6)):\n *                 cell.add_triangles2(luts.TILING13_5_1, config, 1, 6)             # <<<<<<<<<<<<<<\n *             else:\n *                 cell.add_triangles2(luts.TILING13_5_2, config, 1, 10)\n */\n        __pyx_t_1 = ((PyObject *)__pyx_v_luts->TILING13_5_1);\n        __Pyx_INCREF(__pyx_t_1);\n        ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_cell->__pyx_vtab)->add_triangles2(__pyx_v_cell, ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1), __pyx_v_config, 1, 6);\n        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n\n        /* \"_marching_cubes_lewiner_cy.pyx\":1400\n *         elif subconfig==24:\n *             subconfig = 1\n *             if test_internal(cell, luts, case, config, subconfig, luts.TEST13.get2(config,6)):             # <<<<<<<<<<<<<<\n *                 cell.add_triangles2(luts.TILING13_5_1, config, 1, 6)\n *             else:\n */\n        goto __pyx_L26;\n      }\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1403\n *                 cell.add_triangles2(luts.TILING13_5_1, config, 1, 6)\n *             else:\n *                 cell.add_triangles2(luts.TILING13_5_2, config, 1, 10)             # <<<<<<<<<<<<<<\n *         elif subconfig==25:\n *             subconfig = 2 ;\n */\n      /*else*/ {\n        __pyx_t_1 = ((PyObject *)__pyx_v_luts->TILING13_5_2);\n        __Pyx_INCREF(__pyx_t_1);\n        ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_cell->__pyx_vtab)->add_triangles2(__pyx_v_cell, ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1), __pyx_v_config, 1, 10);\n        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n      }\n      __pyx_L26:;\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1398\n *             else:\n *                 cell.add_triangles2(luts.TILING13_5_2, config, 0, 10)\n *         elif subconfig==24:             # <<<<<<<<<<<<<<\n *             subconfig = 1\n *             if test_internal(cell, luts, case, config, subconfig, luts.TEST13.get2(config,6)):\n */\n      break;\n      case 25:\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1405\n *                 cell.add_triangles2(luts.TILING13_5_2, config, 1, 10)\n *         elif subconfig==25:\n *             subconfig = 2 ;             # <<<<<<<<<<<<<<\n *             if test_internal(cell, luts, case, config, subconfig, luts.TEST13.get2(config,6)):\n *                 cell.add_triangles2(luts.TILING13_5_1, config, 2, 6)\n */\n      __pyx_v_subconfig = 2;\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1406\n *         elif subconfig==25:\n *             subconfig = 2 ;\n *             if test_internal(cell, luts, case, config, subconfig, luts.TEST13.get2(config,6)):             # <<<<<<<<<<<<<<\n *                 cell.add_triangles2(luts.TILING13_5_1, config, 2, 6)\n *             else:\n */\n      __pyx_t_2 = (__pyx_f_26_marching_cubes_lewiner_cy_test_internal(__pyx_v_cell, __pyx_v_luts, __pyx_v_case, __pyx_v_config, __pyx_v_subconfig, ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Lut *)__pyx_v_luts->TEST13->__pyx_vtab)->get2(__pyx_v_luts->TEST13, __pyx_v_config, 6)) != 0);\n      if (__pyx_t_2) {\n\n        /* \"_marching_cubes_lewiner_cy.pyx\":1407\n *             subconfig = 2 ;\n *             if test_internal(cell, luts, case, config, subconfig, luts.TEST13.get2(config,6)):\n *                 cell.add_triangles2(luts.TILING13_5_1, config, 2, 6)             # <<<<<<<<<<<<<<\n *             else:\n *                 cell.add_triangles2(luts.TILING13_5_2, config, 2, 10)\n */\n        __pyx_t_1 = ((PyObject *)__pyx_v_luts->TILING13_5_1);\n        __Pyx_INCREF(__pyx_t_1);\n        ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_cell->__pyx_vtab)->add_triangles2(__pyx_v_cell, ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1), __pyx_v_config, 2, 6);\n        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n\n        /* \"_marching_cubes_lewiner_cy.pyx\":1406\n *         elif subconfig==25:\n *             subconfig = 2 ;\n *             if test_internal(cell, luts, case, config, subconfig, luts.TEST13.get2(config,6)):             # <<<<<<<<<<<<<<\n *                 cell.add_triangles2(luts.TILING13_5_1, config, 2, 6)\n *             else:\n */\n        goto __pyx_L27;\n      }\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1409\n *                 cell.add_triangles2(luts.TILING13_5_1, config, 2, 6)\n *             else:\n *                 cell.add_triangles2(luts.TILING13_5_2, config, 2, 10)             # <<<<<<<<<<<<<<\n *         elif subconfig==26:\n *             subconfig = 3 ;\n */\n      /*else*/ {\n        __pyx_t_1 = ((PyObject *)__pyx_v_luts->TILING13_5_2);\n        __Pyx_INCREF(__pyx_t_1);\n        ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_cell->__pyx_vtab)->add_triangles2(__pyx_v_cell, ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1), __pyx_v_config, 2, 10);\n        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n      }\n      __pyx_L27:;\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1404\n *             else:\n *                 cell.add_triangles2(luts.TILING13_5_2, config, 1, 10)\n *         elif subconfig==25:             # <<<<<<<<<<<<<<\n *             subconfig = 2 ;\n *             if test_internal(cell, luts, case, config, subconfig, luts.TEST13.get2(config,6)):\n */\n      break;\n      case 26:\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1411\n *                 cell.add_triangles2(luts.TILING13_5_2, config, 2, 10)\n *         elif subconfig==26:\n *             subconfig = 3 ;             # <<<<<<<<<<<<<<\n *             if test_internal(cell, luts, case, config, subconfig, luts.TEST13.get2(config,6)):\n *                 cell.add_triangles2(luts.TILING13_5_1, config, 3, 6)\n */\n      __pyx_v_subconfig = 3;\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1412\n *         elif subconfig==26:\n *             subconfig = 3 ;\n *             if test_internal(cell, luts, case, config, subconfig, luts.TEST13.get2(config,6)):             # <<<<<<<<<<<<<<\n *                 cell.add_triangles2(luts.TILING13_5_1, config, 3, 6)\n *             else:\n */\n      __pyx_t_2 = (__pyx_f_26_marching_cubes_lewiner_cy_test_internal(__pyx_v_cell, __pyx_v_luts, __pyx_v_case, __pyx_v_config, __pyx_v_subconfig, ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Lut *)__pyx_v_luts->TEST13->__pyx_vtab)->get2(__pyx_v_luts->TEST13, __pyx_v_config, 6)) != 0);\n      if (__pyx_t_2) {\n\n        /* \"_marching_cubes_lewiner_cy.pyx\":1413\n *             subconfig = 3 ;\n *             if test_internal(cell, luts, case, config, subconfig, luts.TEST13.get2(config,6)):\n *                 cell.add_triangles2(luts.TILING13_5_1, config, 3, 6)             # <<<<<<<<<<<<<<\n *             else:\n *                 cell.add_triangles2(luts.TILING13_5_2, config, 3, 10)\n */\n        __pyx_t_1 = ((PyObject *)__pyx_v_luts->TILING13_5_1);\n        __Pyx_INCREF(__pyx_t_1);\n        ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_cell->__pyx_vtab)->add_triangles2(__pyx_v_cell, ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1), __pyx_v_config, 3, 6);\n        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n\n        /* \"_marching_cubes_lewiner_cy.pyx\":1412\n *         elif subconfig==26:\n *             subconfig = 3 ;\n *             if test_internal(cell, luts, case, config, subconfig, luts.TEST13.get2(config,6)):             # <<<<<<<<<<<<<<\n *                 cell.add_triangles2(luts.TILING13_5_1, config, 3, 6)\n *             else:\n */\n        goto __pyx_L28;\n      }\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1415\n *                 cell.add_triangles2(luts.TILING13_5_1, config, 3, 6)\n *             else:\n *                 cell.add_triangles2(luts.TILING13_5_2, config, 3, 10)             # <<<<<<<<<<<<<<\n *         #\n *         elif subconfig==27:\n */\n      /*else*/ {\n        __pyx_t_1 = ((PyObject *)__pyx_v_luts->TILING13_5_2);\n        __Pyx_INCREF(__pyx_t_1);\n        ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_cell->__pyx_vtab)->add_triangles2(__pyx_v_cell, ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1), __pyx_v_config, 3, 10);\n        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n      }\n      __pyx_L28:;\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1410\n *             else:\n *                 cell.add_triangles2(luts.TILING13_5_2, config, 2, 10)\n *         elif subconfig==26:             # <<<<<<<<<<<<<<\n *             subconfig = 3 ;\n *             if test_internal(cell, luts, case, config, subconfig, luts.TEST13.get2(config,6)):\n */\n      break;\n      case 27:\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1419\n *         elif subconfig==27:\n *             #cell.calculate_center_vertex() # v12 needed\n *             cell.add_triangles2(luts.TILING13_3_, config, 0, 10)             # <<<<<<<<<<<<<<\n *         elif subconfig==28:\n *             #cell.calculate_center_vertex() # v12 needed\n */\n      __pyx_t_1 = ((PyObject *)__pyx_v_luts->TILING13_3_);\n      __Pyx_INCREF(__pyx_t_1);\n      ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_cell->__pyx_vtab)->add_triangles2(__pyx_v_cell, ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1), __pyx_v_config, 0, 10);\n      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1417\n *                 cell.add_triangles2(luts.TILING13_5_2, config, 3, 10)\n *         #\n *         elif subconfig==27:             # <<<<<<<<<<<<<<\n *             #cell.calculate_center_vertex() # v12 needed\n *             cell.add_triangles2(luts.TILING13_3_, config, 0, 10)\n */\n      break;\n      case 28:\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1422\n *         elif subconfig==28:\n *             #cell.calculate_center_vertex() # v12 needed\n *             cell.add_triangles2(luts.TILING13_3_, config, 1, 10)             # <<<<<<<<<<<<<<\n *         elif subconfig==29:\n *             #cell.calculate_center_vertex() # v12 needed\n */\n      __pyx_t_1 = ((PyObject *)__pyx_v_luts->TILING13_3_);\n      __Pyx_INCREF(__pyx_t_1);\n      ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_cell->__pyx_vtab)->add_triangles2(__pyx_v_cell, ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1), __pyx_v_config, 1, 10);\n      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1420\n *             #cell.calculate_center_vertex() # v12 needed\n *             cell.add_triangles2(luts.TILING13_3_, config, 0, 10)\n *         elif subconfig==28:             # <<<<<<<<<<<<<<\n *             #cell.calculate_center_vertex() # v12 needed\n *             cell.add_triangles2(luts.TILING13_3_, config, 1, 10)\n */\n      break;\n      case 29:\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1425\n *         elif subconfig==29:\n *             #cell.calculate_center_vertex() # v12 needed\n *             cell.add_triangles2(luts.TILING13_3_, config, 2, 10)             # <<<<<<<<<<<<<<\n *         elif subconfig==30:\n *             #cell.calculate_center_vertex() # v12 needed\n */\n      __pyx_t_1 = ((PyObject *)__pyx_v_luts->TILING13_3_);\n      __Pyx_INCREF(__pyx_t_1);\n      ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_cell->__pyx_vtab)->add_triangles2(__pyx_v_cell, ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1), __pyx_v_config, 2, 10);\n      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1423\n *             #cell.calculate_center_vertex() # v12 needed\n *             cell.add_triangles2(luts.TILING13_3_, config, 1, 10)\n *         elif subconfig==29:             # <<<<<<<<<<<<<<\n *             #cell.calculate_center_vertex() # v12 needed\n *             cell.add_triangles2(luts.TILING13_3_, config, 2, 10)\n */\n      break;\n      case 30:\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1428\n *         elif subconfig==30:\n *             #cell.calculate_center_vertex() # v12 needed\n *             cell.add_triangles2(luts.TILING13_3_, config, 3, 10)             # <<<<<<<<<<<<<<\n *         elif subconfig==31:\n *             #cell.calculate_center_vertex() # v12 needed\n */\n      __pyx_t_1 = ((PyObject *)__pyx_v_luts->TILING13_3_);\n      __Pyx_INCREF(__pyx_t_1);\n      ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_cell->__pyx_vtab)->add_triangles2(__pyx_v_cell, ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1), __pyx_v_config, 3, 10);\n      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1426\n *             #cell.calculate_center_vertex() # v12 needed\n *             cell.add_triangles2(luts.TILING13_3_, config, 2, 10)\n *         elif subconfig==30:             # <<<<<<<<<<<<<<\n *             #cell.calculate_center_vertex() # v12 needed\n *             cell.add_triangles2(luts.TILING13_3_, config, 3, 10)\n */\n      break;\n      case 31:\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1431\n *         elif subconfig==31:\n *             #cell.calculate_center_vertex() # v12 needed\n *             cell.add_triangles2(luts.TILING13_3_, config, 4, 10)             # <<<<<<<<<<<<<<\n *         elif subconfig==32:\n *             #cell.calculate_center_vertex() # v12 needed\n */\n      __pyx_t_1 = ((PyObject *)__pyx_v_luts->TILING13_3_);\n      __Pyx_INCREF(__pyx_t_1);\n      ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_cell->__pyx_vtab)->add_triangles2(__pyx_v_cell, ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1), __pyx_v_config, 4, 10);\n      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1429\n *             #cell.calculate_center_vertex() # v12 needed\n *             cell.add_triangles2(luts.TILING13_3_, config, 3, 10)\n *         elif subconfig==31:             # <<<<<<<<<<<<<<\n *             #cell.calculate_center_vertex() # v12 needed\n *             cell.add_triangles2(luts.TILING13_3_, config, 4, 10)\n */\n      break;\n      case 32:\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1434\n *         elif subconfig==32:\n *             #cell.calculate_center_vertex() # v12 needed\n *             cell.add_triangles2(luts.TILING13_3_, config, 5, 10)             # <<<<<<<<<<<<<<\n *         elif subconfig==33:\n *             #cell.calculate_center_vertex() # v12 needed\n */\n      __pyx_t_1 = ((PyObject *)__pyx_v_luts->TILING13_3_);\n      __Pyx_INCREF(__pyx_t_1);\n      ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_cell->__pyx_vtab)->add_triangles2(__pyx_v_cell, ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1), __pyx_v_config, 5, 10);\n      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1432\n *             #cell.calculate_center_vertex() # v12 needed\n *             cell.add_triangles2(luts.TILING13_3_, config, 4, 10)\n *         elif subconfig==32:             # <<<<<<<<<<<<<<\n *             #cell.calculate_center_vertex() # v12 needed\n *             cell.add_triangles2(luts.TILING13_3_, config, 5, 10)\n */\n      break;\n      case 33:\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1437\n *         elif subconfig==33:\n *             #cell.calculate_center_vertex() # v12 needed\n *             cell.add_triangles2(luts.TILING13_3_, config,6, 10)             # <<<<<<<<<<<<<<\n *         elif subconfig==34:\n *             #cell.calculate_center_vertex() # v12 needed\n */\n      __pyx_t_1 = ((PyObject *)__pyx_v_luts->TILING13_3_);\n      __Pyx_INCREF(__pyx_t_1);\n      ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_cell->__pyx_vtab)->add_triangles2(__pyx_v_cell, ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1), __pyx_v_config, 6, 10);\n      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1435\n *             #cell.calculate_center_vertex() # v12 needed\n *             cell.add_triangles2(luts.TILING13_3_, config, 5, 10)\n *         elif subconfig==33:             # <<<<<<<<<<<<<<\n *             #cell.calculate_center_vertex() # v12 needed\n *             cell.add_triangles2(luts.TILING13_3_, config,6, 10)\n */\n      break;\n      case 34:\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1440\n *         elif subconfig==34:\n *             #cell.calculate_center_vertex() # v12 needed\n *             cell.add_triangles2(luts.TILING13_3_, config, 7, 10)             # <<<<<<<<<<<<<<\n *         elif subconfig==35:\n *             #cell.calculate_center_vertex() # v12 needed\n */\n      __pyx_t_1 = ((PyObject *)__pyx_v_luts->TILING13_3_);\n      __Pyx_INCREF(__pyx_t_1);\n      ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_cell->__pyx_vtab)->add_triangles2(__pyx_v_cell, ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1), __pyx_v_config, 7, 10);\n      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1438\n *             #cell.calculate_center_vertex() # v12 needed\n *             cell.add_triangles2(luts.TILING13_3_, config,6, 10)\n *         elif subconfig==34:             # <<<<<<<<<<<<<<\n *             #cell.calculate_center_vertex() # v12 needed\n *             cell.add_triangles2(luts.TILING13_3_, config, 7, 10)\n */\n      break;\n      case 35:\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1443\n *         elif subconfig==35:\n *             #cell.calculate_center_vertex() # v12 needed\n *             cell.add_triangles2(luts.TILING13_3_, config, 8, 10)             # <<<<<<<<<<<<<<\n *         elif subconfig==36:\n *             #cell.calculate_center_vertex() # v12 needed\n */\n      __pyx_t_1 = ((PyObject *)__pyx_v_luts->TILING13_3_);\n      __Pyx_INCREF(__pyx_t_1);\n      ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_cell->__pyx_vtab)->add_triangles2(__pyx_v_cell, ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1), __pyx_v_config, 8, 10);\n      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1441\n *             #cell.calculate_center_vertex() # v12 needed\n *             cell.add_triangles2(luts.TILING13_3_, config, 7, 10)\n *         elif subconfig==35:             # <<<<<<<<<<<<<<\n *             #cell.calculate_center_vertex() # v12 needed\n *             cell.add_triangles2(luts.TILING13_3_, config, 8, 10)\n */\n      break;\n      case 36:\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1446\n *         elif subconfig==36:\n *             #cell.calculate_center_vertex() # v12 needed\n *             cell.add_triangles2(luts.TILING13_3_, config, 9, 10)             # <<<<<<<<<<<<<<\n *         elif subconfig==37:\n *             #cell.calculate_center_vertex() # v12 needed\n */\n      __pyx_t_1 = ((PyObject *)__pyx_v_luts->TILING13_3_);\n      __Pyx_INCREF(__pyx_t_1);\n      ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_cell->__pyx_vtab)->add_triangles2(__pyx_v_cell, ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1), __pyx_v_config, 9, 10);\n      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1444\n *             #cell.calculate_center_vertex() # v12 needed\n *             cell.add_triangles2(luts.TILING13_3_, config, 8, 10)\n *         elif subconfig==36:             # <<<<<<<<<<<<<<\n *             #cell.calculate_center_vertex() # v12 needed\n *             cell.add_triangles2(luts.TILING13_3_, config, 9, 10)\n */\n      break;\n      case 37:\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1449\n *         elif subconfig==37:\n *             #cell.calculate_center_vertex() # v12 needed\n *             cell.add_triangles2(luts.TILING13_3_, config, 10, 10)             # <<<<<<<<<<<<<<\n *         elif subconfig==38:\n *             #cell.calculate_center_vertex() # v12 needed\n */\n      __pyx_t_1 = ((PyObject *)__pyx_v_luts->TILING13_3_);\n      __Pyx_INCREF(__pyx_t_1);\n      ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_cell->__pyx_vtab)->add_triangles2(__pyx_v_cell, ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1), __pyx_v_config, 10, 10);\n      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1447\n *             #cell.calculate_center_vertex() # v12 needed\n *             cell.add_triangles2(luts.TILING13_3_, config, 9, 10)\n *         elif subconfig==37:             # <<<<<<<<<<<<<<\n *             #cell.calculate_center_vertex() # v12 needed\n *             cell.add_triangles2(luts.TILING13_3_, config, 10, 10)\n */\n      break;\n      case 38:\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1452\n *         elif subconfig==38:\n *             #cell.calculate_center_vertex() # v12 needed\n *             cell.add_triangles2(luts.TILING13_3_, config, 11, 10)             # <<<<<<<<<<<<<<\n *         #\n *         elif subconfig==39:\n */\n      __pyx_t_1 = ((PyObject *)__pyx_v_luts->TILING13_3_);\n      __Pyx_INCREF(__pyx_t_1);\n      ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_cell->__pyx_vtab)->add_triangles2(__pyx_v_cell, ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1), __pyx_v_config, 11, 10);\n      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1450\n *             #cell.calculate_center_vertex() # v12 needed\n *             cell.add_triangles2(luts.TILING13_3_, config, 10, 10)\n *         elif subconfig==38:             # <<<<<<<<<<<<<<\n *             #cell.calculate_center_vertex() # v12 needed\n *             cell.add_triangles2(luts.TILING13_3_, config, 11, 10)\n */\n      break;\n      case 39:\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1455\n *         #\n *         elif subconfig==39:\n *             cell.add_triangles2(luts.TILING13_2_, config, 0, 6)             # <<<<<<<<<<<<<<\n *         elif subconfig==40:\n *             cell.add_triangles2(luts.TILING13_2_, config, 1, 6)\n */\n      __pyx_t_1 = ((PyObject *)__pyx_v_luts->TILING13_2_);\n      __Pyx_INCREF(__pyx_t_1);\n      ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_cell->__pyx_vtab)->add_triangles2(__pyx_v_cell, ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1), __pyx_v_config, 0, 6);\n      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1454\n *             cell.add_triangles2(luts.TILING13_3_, config, 11, 10)\n *         #\n *         elif subconfig==39:             # <<<<<<<<<<<<<<\n *             cell.add_triangles2(luts.TILING13_2_, config, 0, 6)\n *         elif subconfig==40:\n */\n      break;\n      case 40:\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1457\n *             cell.add_triangles2(luts.TILING13_2_, config, 0, 6)\n *         elif subconfig==40:\n *             cell.add_triangles2(luts.TILING13_2_, config, 1, 6)             # <<<<<<<<<<<<<<\n *         elif subconfig==41:\n *             cell.add_triangles2(luts.TILING13_2_, config, 2, 6)\n */\n      __pyx_t_1 = ((PyObject *)__pyx_v_luts->TILING13_2_);\n      __Pyx_INCREF(__pyx_t_1);\n      ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_cell->__pyx_vtab)->add_triangles2(__pyx_v_cell, ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1), __pyx_v_config, 1, 6);\n      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1456\n *         elif subconfig==39:\n *             cell.add_triangles2(luts.TILING13_2_, config, 0, 6)\n *         elif subconfig==40:             # <<<<<<<<<<<<<<\n *             cell.add_triangles2(luts.TILING13_2_, config, 1, 6)\n *         elif subconfig==41:\n */\n      break;\n      case 41:\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1459\n *             cell.add_triangles2(luts.TILING13_2_, config, 1, 6)\n *         elif subconfig==41:\n *             cell.add_triangles2(luts.TILING13_2_, config, 2, 6)             # <<<<<<<<<<<<<<\n *         elif subconfig==42:\n *             cell.add_triangles2(luts.TILING13_2_, config, 3, 6)\n */\n      __pyx_t_1 = ((PyObject *)__pyx_v_luts->TILING13_2_);\n      __Pyx_INCREF(__pyx_t_1);\n      ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_cell->__pyx_vtab)->add_triangles2(__pyx_v_cell, ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1), __pyx_v_config, 2, 6);\n      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1458\n *         elif subconfig==40:\n *             cell.add_triangles2(luts.TILING13_2_, config, 1, 6)\n *         elif subconfig==41:             # <<<<<<<<<<<<<<\n *             cell.add_triangles2(luts.TILING13_2_, config, 2, 6)\n *         elif subconfig==42:\n */\n      break;\n      case 42:\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1461\n *             cell.add_triangles2(luts.TILING13_2_, config, 2, 6)\n *         elif subconfig==42:\n *             cell.add_triangles2(luts.TILING13_2_, config, 3, 6)             # <<<<<<<<<<<<<<\n *         elif subconfig==43:\n *             cell.add_triangles2(luts.TILING13_2_, config, 4, 6)\n */\n      __pyx_t_1 = ((PyObject *)__pyx_v_luts->TILING13_2_);\n      __Pyx_INCREF(__pyx_t_1);\n      ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_cell->__pyx_vtab)->add_triangles2(__pyx_v_cell, ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1), __pyx_v_config, 3, 6);\n      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1460\n *         elif subconfig==41:\n *             cell.add_triangles2(luts.TILING13_2_, config, 2, 6)\n *         elif subconfig==42:             # <<<<<<<<<<<<<<\n *             cell.add_triangles2(luts.TILING13_2_, config, 3, 6)\n *         elif subconfig==43:\n */\n      break;\n      case 43:\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1463\n *             cell.add_triangles2(luts.TILING13_2_, config, 3, 6)\n *         elif subconfig==43:\n *             cell.add_triangles2(luts.TILING13_2_, config, 4, 6)             # <<<<<<<<<<<<<<\n *         elif subconfig==44:\n *             cell.add_triangles2(luts.TILING13_2_, config, 5, 6)\n */\n      __pyx_t_1 = ((PyObject *)__pyx_v_luts->TILING13_2_);\n      __Pyx_INCREF(__pyx_t_1);\n      ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_cell->__pyx_vtab)->add_triangles2(__pyx_v_cell, ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1), __pyx_v_config, 4, 6);\n      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1462\n *         elif subconfig==42:\n *             cell.add_triangles2(luts.TILING13_2_, config, 3, 6)\n *         elif subconfig==43:             # <<<<<<<<<<<<<<\n *             cell.add_triangles2(luts.TILING13_2_, config, 4, 6)\n *         elif subconfig==44:\n */\n      break;\n      case 44:\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1465\n *             cell.add_triangles2(luts.TILING13_2_, config, 4, 6)\n *         elif subconfig==44:\n *             cell.add_triangles2(luts.TILING13_2_, config, 5, 6)             # <<<<<<<<<<<<<<\n *         #\n *         elif subconfig==45:\n */\n      __pyx_t_1 = ((PyObject *)__pyx_v_luts->TILING13_2_);\n      __Pyx_INCREF(__pyx_t_1);\n      ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_cell->__pyx_vtab)->add_triangles2(__pyx_v_cell, ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1), __pyx_v_config, 5, 6);\n      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1464\n *         elif subconfig==43:\n *             cell.add_triangles2(luts.TILING13_2_, config, 4, 6)\n *         elif subconfig==44:             # <<<<<<<<<<<<<<\n *             cell.add_triangles2(luts.TILING13_2_, config, 5, 6)\n *         #\n */\n      break;\n      case 45:\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1468\n *         #\n *         elif subconfig==45:\n *             cell.add_triangles(luts.TILING13_1_, config, 4)             # <<<<<<<<<<<<<<\n *         #\n *         else:\n */\n      __pyx_t_1 = ((PyObject *)__pyx_v_luts->TILING13_1_);\n      __Pyx_INCREF(__pyx_t_1);\n      ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_cell->__pyx_vtab)->add_triangles(__pyx_v_cell, ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1), __pyx_v_config, 4);\n      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1467\n *             cell.add_triangles2(luts.TILING13_2_, config, 5, 6)\n *         #\n *         elif subconfig==45:             # <<<<<<<<<<<<<<\n *             cell.add_triangles(luts.TILING13_1_, config, 4)\n *         #\n */\n      break;\n      default:\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1471\n *         #\n *         else:\n *             print(\"Marching Cubes: Impossible case 13?\" )             # <<<<<<<<<<<<<<\n * \n *     elif case == 14 :\n */\n      if (__Pyx_PrintOne(0, __pyx_kp_s_Marching_Cubes_Impossible_case_1) < 0) __PYX_ERR(0, 1471, __pyx_L1_error)\n      break;\n    }\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":1321\n *                     cell.add_triangles(luts.TILING12_1_2, config, 8)\n * \n *     elif case == 13 :             # <<<<<<<<<<<<<<\n *         # Calculate subconfig\n *         if test_face(cell, luts.TEST13.get2(config,0)): subconfig += 1\n */\n    break;\n    case 14:\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":1474\n * \n *     elif case == 14 :\n *         cell.add_triangles(luts.TILING14, config, 4)             # <<<<<<<<<<<<<<\n * \n * \n */\n    __pyx_t_1 = ((PyObject *)__pyx_v_luts->TILING14);\n    __Pyx_INCREF(__pyx_t_1);\n    ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *)__pyx_v_cell->__pyx_vtab)->add_triangles(__pyx_v_cell, ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1), __pyx_v_config, 4);\n    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":1473\n *             print(\"Marching Cubes: Impossible case 13?\" )\n * \n *     elif case == 14 :             # <<<<<<<<<<<<<<\n *         cell.add_triangles(luts.TILING14, config, 4)\n * \n */\n    break;\n    default: break;\n  }\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":1208\n * \n * \n * cdef void the_big_switch(LutProvider luts, Cell cell, int case, int config):             # <<<<<<<<<<<<<<\n *     \"\"\" The big switch (i.e. if-statement) that I meticulously ported from\n *     the source code provided by Lewiner et. al.\n */\n\n  /* function exit code */\n  goto __pyx_L0;\n  __pyx_L1_error:;\n  __Pyx_XDECREF(__pyx_t_1);\n  __Pyx_WriteUnraisable(\"_marching_cubes_lewiner_cy.the_big_switch\", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);\n  __pyx_L0:;\n  __Pyx_RefNannyFinishContext();\n}\n\n/* \"_marching_cubes_lewiner_cy.pyx\":1477\n * \n * \n * cdef int test_face(Cell cell, int face):             # <<<<<<<<<<<<<<\n *     \"\"\" Return True of the face contains part of the surface.\n *     \"\"\"\n */\n\nstatic int __pyx_f_26_marching_cubes_lewiner_cy_test_face(struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *__pyx_v_cell, int __pyx_v_face) {\n  int __pyx_v_absFace;\n  double __pyx_v_A;\n  double __pyx_v_B;\n  double __pyx_v_C;\n  double __pyx_v_D;\n  double __pyx_v_AC_BD;\n  int __pyx_r;\n  __Pyx_RefNannyDeclarations\n  int __pyx_t_1;\n  double __pyx_t_2;\n  double __pyx_t_3;\n  double __pyx_t_4;\n  double __pyx_t_5;\n  int __pyx_t_6;\n  __Pyx_RefNannySetupContext(\"test_face\", 0);\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":1482\n * \n *     # Get face absolute value\n *     cdef int absFace = face             # <<<<<<<<<<<<<<\n *     if face < 0:\n *         absFace *= -1\n */\n  __pyx_v_absFace = __pyx_v_face;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":1483\n *     # Get face absolute value\n *     cdef int absFace = face\n *     if face < 0:             # <<<<<<<<<<<<<<\n *         absFace *= -1\n * \n */\n  __pyx_t_1 = ((__pyx_v_face < 0) != 0);\n  if (__pyx_t_1) {\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":1484\n *     cdef int absFace = face\n *     if face < 0:\n *         absFace *= -1             # <<<<<<<<<<<<<<\n * \n *     # Get values of corners A B C D\n */\n    __pyx_v_absFace = (__pyx_v_absFace * -1L);\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":1483\n *     # Get face absolute value\n *     cdef int absFace = face\n *     if face < 0:             # <<<<<<<<<<<<<<\n *         absFace *= -1\n * \n */\n  }\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":1488\n *     # Get values of corners A B C D\n *     cdef double A, B, C, D\n *     if absFace == 1:             # <<<<<<<<<<<<<<\n *         A, B, C, D = cell.v0, cell.v4, cell.v5, cell.v1\n *     elif absFace == 2:\n */\n  switch (__pyx_v_absFace) {\n    case 1:\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":1489\n *     cdef double A, B, C, D\n *     if absFace == 1:\n *         A, B, C, D = cell.v0, cell.v4, cell.v5, cell.v1             # <<<<<<<<<<<<<<\n *     elif absFace == 2:\n *         A, B, C, D = cell.v1, cell.v5, cell.v6, cell.v2\n */\n    __pyx_t_2 = __pyx_v_cell->v0;\n    __pyx_t_3 = __pyx_v_cell->v4;\n    __pyx_t_4 = __pyx_v_cell->v5;\n    __pyx_t_5 = __pyx_v_cell->v1;\n    __pyx_v_A = __pyx_t_2;\n    __pyx_v_B = __pyx_t_3;\n    __pyx_v_C = __pyx_t_4;\n    __pyx_v_D = __pyx_t_5;\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":1488\n *     # Get values of corners A B C D\n *     cdef double A, B, C, D\n *     if absFace == 1:             # <<<<<<<<<<<<<<\n *         A, B, C, D = cell.v0, cell.v4, cell.v5, cell.v1\n *     elif absFace == 2:\n */\n    break;\n    case 2:\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":1491\n *         A, B, C, D = cell.v0, cell.v4, cell.v5, cell.v1\n *     elif absFace == 2:\n *         A, B, C, D = cell.v1, cell.v5, cell.v6, cell.v2             # <<<<<<<<<<<<<<\n *     elif absFace == 3:\n *         A, B, C, D = cell.v2, cell.v6, cell.v7, cell.v3\n */\n    __pyx_t_5 = __pyx_v_cell->v1;\n    __pyx_t_4 = __pyx_v_cell->v5;\n    __pyx_t_3 = __pyx_v_cell->v6;\n    __pyx_t_2 = __pyx_v_cell->v2;\n    __pyx_v_A = __pyx_t_5;\n    __pyx_v_B = __pyx_t_4;\n    __pyx_v_C = __pyx_t_3;\n    __pyx_v_D = __pyx_t_2;\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":1490\n *     if absFace == 1:\n *         A, B, C, D = cell.v0, cell.v4, cell.v5, cell.v1\n *     elif absFace == 2:             # <<<<<<<<<<<<<<\n *         A, B, C, D = cell.v1, cell.v5, cell.v6, cell.v2\n *     elif absFace == 3:\n */\n    break;\n    case 3:\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":1493\n *         A, B, C, D = cell.v1, cell.v5, cell.v6, cell.v2\n *     elif absFace == 3:\n *         A, B, C, D = cell.v2, cell.v6, cell.v7, cell.v3             # <<<<<<<<<<<<<<\n *     elif absFace == 4:\n *         A, B, C, D = cell.v3, cell.v7, cell.v4, cell.v0\n */\n    __pyx_t_2 = __pyx_v_cell->v2;\n    __pyx_t_3 = __pyx_v_cell->v6;\n    __pyx_t_4 = __pyx_v_cell->v7;\n    __pyx_t_5 = __pyx_v_cell->v3;\n    __pyx_v_A = __pyx_t_2;\n    __pyx_v_B = __pyx_t_3;\n    __pyx_v_C = __pyx_t_4;\n    __pyx_v_D = __pyx_t_5;\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":1492\n *     elif absFace == 2:\n *         A, B, C, D = cell.v1, cell.v5, cell.v6, cell.v2\n *     elif absFace == 3:             # <<<<<<<<<<<<<<\n *         A, B, C, D = cell.v2, cell.v6, cell.v7, cell.v3\n *     elif absFace == 4:\n */\n    break;\n    case 4:\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":1495\n *         A, B, C, D = cell.v2, cell.v6, cell.v7, cell.v3\n *     elif absFace == 4:\n *         A, B, C, D = cell.v3, cell.v7, cell.v4, cell.v0             # <<<<<<<<<<<<<<\n *     elif absFace == 5:\n *         A, B, C, D = cell.v0, cell.v3, cell.v2, cell.v1\n */\n    __pyx_t_5 = __pyx_v_cell->v3;\n    __pyx_t_4 = __pyx_v_cell->v7;\n    __pyx_t_3 = __pyx_v_cell->v4;\n    __pyx_t_2 = __pyx_v_cell->v0;\n    __pyx_v_A = __pyx_t_5;\n    __pyx_v_B = __pyx_t_4;\n    __pyx_v_C = __pyx_t_3;\n    __pyx_v_D = __pyx_t_2;\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":1494\n *     elif absFace == 3:\n *         A, B, C, D = cell.v2, cell.v6, cell.v7, cell.v3\n *     elif absFace == 4:             # <<<<<<<<<<<<<<\n *         A, B, C, D = cell.v3, cell.v7, cell.v4, cell.v0\n *     elif absFace == 5:\n */\n    break;\n    case 5:\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":1497\n *         A, B, C, D = cell.v3, cell.v7, cell.v4, cell.v0\n *     elif absFace == 5:\n *         A, B, C, D = cell.v0, cell.v3, cell.v2, cell.v1             # <<<<<<<<<<<<<<\n *     elif absFace == 6:\n *         A, B, C, D = cell.v4, cell.v7, cell.v6, cell.v5\n */\n    __pyx_t_2 = __pyx_v_cell->v0;\n    __pyx_t_3 = __pyx_v_cell->v3;\n    __pyx_t_4 = __pyx_v_cell->v2;\n    __pyx_t_5 = __pyx_v_cell->v1;\n    __pyx_v_A = __pyx_t_2;\n    __pyx_v_B = __pyx_t_3;\n    __pyx_v_C = __pyx_t_4;\n    __pyx_v_D = __pyx_t_5;\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":1496\n *     elif absFace == 4:\n *         A, B, C, D = cell.v3, cell.v7, cell.v4, cell.v0\n *     elif absFace == 5:             # <<<<<<<<<<<<<<\n *         A, B, C, D = cell.v0, cell.v3, cell.v2, cell.v1\n *     elif absFace == 6:\n */\n    break;\n    case 6:\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":1499\n *         A, B, C, D = cell.v0, cell.v3, cell.v2, cell.v1\n *     elif absFace == 6:\n *         A, B, C, D = cell.v4, cell.v7, cell.v6, cell.v5             # <<<<<<<<<<<<<<\n * \n *     # Return sign\n */\n    __pyx_t_5 = __pyx_v_cell->v4;\n    __pyx_t_4 = __pyx_v_cell->v7;\n    __pyx_t_3 = __pyx_v_cell->v6;\n    __pyx_t_2 = __pyx_v_cell->v5;\n    __pyx_v_A = __pyx_t_5;\n    __pyx_v_B = __pyx_t_4;\n    __pyx_v_C = __pyx_t_3;\n    __pyx_v_D = __pyx_t_2;\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":1498\n *     elif absFace == 5:\n *         A, B, C, D = cell.v0, cell.v3, cell.v2, cell.v1\n *     elif absFace == 6:             # <<<<<<<<<<<<<<\n *         A, B, C, D = cell.v4, cell.v7, cell.v6, cell.v5\n * \n */\n    break;\n    default: break;\n  }\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":1502\n * \n *     # Return sign\n *     cdef double AC_BD = A*C - B*D             # <<<<<<<<<<<<<<\n *     if AC_BD > - FLT_EPSILON and AC_BD < FLT_EPSILON:\n *         return face >= 0\n */\n  __pyx_v_AC_BD = ((__pyx_v_A * __pyx_v_C) - (__pyx_v_B * __pyx_v_D));\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":1503\n *     # Return sign\n *     cdef double AC_BD = A*C - B*D\n *     if AC_BD > - FLT_EPSILON and AC_BD < FLT_EPSILON:             # <<<<<<<<<<<<<<\n *         return face >= 0\n *     else:\n */\n  __pyx_t_6 = ((__pyx_v_AC_BD > (-__pyx_v_26_marching_cubes_lewiner_cy_FLT_EPSILON)) != 0);\n  if (__pyx_t_6) {\n  } else {\n    __pyx_t_1 = __pyx_t_6;\n    goto __pyx_L5_bool_binop_done;\n  }\n  __pyx_t_6 = ((__pyx_v_AC_BD < __pyx_v_26_marching_cubes_lewiner_cy_FLT_EPSILON) != 0);\n  __pyx_t_1 = __pyx_t_6;\n  __pyx_L5_bool_binop_done:;\n  if (__pyx_t_1) {\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":1504\n *     cdef double AC_BD = A*C - B*D\n *     if AC_BD > - FLT_EPSILON and AC_BD < FLT_EPSILON:\n *         return face >= 0             # <<<<<<<<<<<<<<\n *     else:\n *         return face * A * AC_BD >= 0;  # face and A invert signs\n */\n    __pyx_r = (__pyx_v_face >= 0);\n    goto __pyx_L0;\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":1503\n *     # Return sign\n *     cdef double AC_BD = A*C - B*D\n *     if AC_BD > - FLT_EPSILON and AC_BD < FLT_EPSILON:             # <<<<<<<<<<<<<<\n *         return face >= 0\n *     else:\n */\n  }\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":1506\n *         return face >= 0\n *     else:\n *         return face * A * AC_BD >= 0;  # face and A invert signs             # <<<<<<<<<<<<<<\n * \n * \n */\n  /*else*/ {\n    __pyx_r = (((__pyx_v_face * __pyx_v_A) * __pyx_v_AC_BD) >= 0.0);\n    goto __pyx_L0;\n  }\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":1477\n * \n * \n * cdef int test_face(Cell cell, int face):             # <<<<<<<<<<<<<<\n *     \"\"\" Return True of the face contains part of the surface.\n *     \"\"\"\n */\n\n  /* function exit code */\n  __pyx_L0:;\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\n/* \"_marching_cubes_lewiner_cy.pyx\":1509\n * \n * \n * cdef int test_internal(Cell cell, LutProvider luts, int case, int config, int subconfig, int s):             # <<<<<<<<<<<<<<\n *     \"\"\" Return True of the face contains part of the surface.\n *     \"\"\"\n */\n\nstatic int __pyx_f_26_marching_cubes_lewiner_cy_test_internal(struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *__pyx_v_cell, struct __pyx_obj_26_marching_cubes_lewiner_cy_LutProvider *__pyx_v_luts, int __pyx_v_case, int __pyx_v_config, int __pyx_v_subconfig, int __pyx_v_s) {\n  double __pyx_v_t;\n  double __pyx_v_At;\n  double __pyx_v_Bt;\n  double __pyx_v_Ct;\n  double __pyx_v_Dt;\n  double __pyx_v_a;\n  double __pyx_v_b;\n  int __pyx_v_test;\n  int __pyx_v_edge;\n  int __pyx_r;\n  __Pyx_RefNannyDeclarations\n  double __pyx_t_1;\n  double __pyx_t_2;\n  double __pyx_t_3;\n  double __pyx_t_4;\n  int __pyx_t_5;\n  int __pyx_t_6;\n  PyObject *__pyx_t_7 = NULL;\n  PyObject *__pyx_t_8 = NULL;\n  int __pyx_lineno = 0;\n  const char *__pyx_filename = NULL;\n  int __pyx_clineno = 0;\n  __Pyx_RefNannySetupContext(\"test_internal\", 0);\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":1515\n *     # Typedefs\n *     cdef double t, At, Bt, Ct, Dt, a, b\n *     cdef int test = 0             # <<<<<<<<<<<<<<\n *     cdef int edge = -1 # reference edge of the triangulation\n * \n */\n  __pyx_v_test = 0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":1516\n *     cdef double t, At, Bt, Ct, Dt, a, b\n *     cdef int test = 0\n *     cdef int edge = -1 # reference edge of the triangulation             # <<<<<<<<<<<<<<\n * \n * \n */\n  __pyx_v_edge = -1;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":1521\n *     # Calculate At Bt Ct Dt a b\n *     # Select case 4, 10,  7, 12, 13\n *     At, Bt, Ct, Dt = 0.0, 0.0, 0.0, 0.0             # <<<<<<<<<<<<<<\n * \n *     if case==4 or case==10:\n */\n  __pyx_t_1 = 0.0;\n  __pyx_t_2 = 0.0;\n  __pyx_t_3 = 0.0;\n  __pyx_t_4 = 0.0;\n  __pyx_v_At = __pyx_t_1;\n  __pyx_v_Bt = __pyx_t_2;\n  __pyx_v_Ct = __pyx_t_3;\n  __pyx_v_Dt = __pyx_t_4;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":1523\n *     At, Bt, Ct, Dt = 0.0, 0.0, 0.0, 0.0\n * \n *     if case==4 or case==10:             # <<<<<<<<<<<<<<\n *         a = ( cell.v4 - cell.v0 ) * ( cell.v6 - cell.v2 ) - ( cell.v7 - cell.v3 ) * ( cell.v5 - cell.v1 )\n *         b =  cell.v2 * ( cell.v4 - cell.v0 ) + cell.v0 * ( cell.v6 - cell.v2 ) - cell.v1 * ( cell.v7 - cell.v3 ) - cell.v3 * ( cell.v5 - cell.v1 )\n */\n  switch (__pyx_v_case) {\n    case 4:\n    case 10:\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":1524\n * \n *     if case==4 or case==10:\n *         a = ( cell.v4 - cell.v0 ) * ( cell.v6 - cell.v2 ) - ( cell.v7 - cell.v3 ) * ( cell.v5 - cell.v1 )             # <<<<<<<<<<<<<<\n *         b =  cell.v2 * ( cell.v4 - cell.v0 ) + cell.v0 * ( cell.v6 - cell.v2 ) - cell.v1 * ( cell.v7 - cell.v3 ) - cell.v3 * ( cell.v5 - cell.v1 )\n *         t = - b / (2*a + FLT_EPSILON)\n */\n    __pyx_v_a = (((__pyx_v_cell->v4 - __pyx_v_cell->v0) * (__pyx_v_cell->v6 - __pyx_v_cell->v2)) - ((__pyx_v_cell->v7 - __pyx_v_cell->v3) * (__pyx_v_cell->v5 - __pyx_v_cell->v1)));\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":1525\n *     if case==4 or case==10:\n *         a = ( cell.v4 - cell.v0 ) * ( cell.v6 - cell.v2 ) - ( cell.v7 - cell.v3 ) * ( cell.v5 - cell.v1 )\n *         b =  cell.v2 * ( cell.v4 - cell.v0 ) + cell.v0 * ( cell.v6 - cell.v2 ) - cell.v1 * ( cell.v7 - cell.v3 ) - cell.v3 * ( cell.v5 - cell.v1 )             # <<<<<<<<<<<<<<\n *         t = - b / (2*a + FLT_EPSILON)\n *         if t<0 or t>1:  return s>0 ;\n */\n    __pyx_v_b = ((((__pyx_v_cell->v2 * (__pyx_v_cell->v4 - __pyx_v_cell->v0)) + (__pyx_v_cell->v0 * (__pyx_v_cell->v6 - __pyx_v_cell->v2))) - (__pyx_v_cell->v1 * (__pyx_v_cell->v7 - __pyx_v_cell->v3))) - (__pyx_v_cell->v3 * (__pyx_v_cell->v5 - __pyx_v_cell->v1)));\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":1526\n *         a = ( cell.v4 - cell.v0 ) * ( cell.v6 - cell.v2 ) - ( cell.v7 - cell.v3 ) * ( cell.v5 - cell.v1 )\n *         b =  cell.v2 * ( cell.v4 - cell.v0 ) + cell.v0 * ( cell.v6 - cell.v2 ) - cell.v1 * ( cell.v7 - cell.v3 ) - cell.v3 * ( cell.v5 - cell.v1 )\n *         t = - b / (2*a + FLT_EPSILON)             # <<<<<<<<<<<<<<\n *         if t<0 or t>1:  return s>0 ;\n * \n */\n    __pyx_v_t = ((-__pyx_v_b) / ((2.0 * __pyx_v_a) + __pyx_v_26_marching_cubes_lewiner_cy_FLT_EPSILON));\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":1527\n *         b =  cell.v2 * ( cell.v4 - cell.v0 ) + cell.v0 * ( cell.v6 - cell.v2 ) - cell.v1 * ( cell.v7 - cell.v3 ) - cell.v3 * ( cell.v5 - cell.v1 )\n *         t = - b / (2*a + FLT_EPSILON)\n *         if t<0 or t>1:  return s>0 ;             # <<<<<<<<<<<<<<\n * \n *         At = cell.v0 + ( cell.v4 - cell.v0 ) * t\n */\n    __pyx_t_6 = ((__pyx_v_t < 0.0) != 0);\n    if (!__pyx_t_6) {\n    } else {\n      __pyx_t_5 = __pyx_t_6;\n      goto __pyx_L4_bool_binop_done;\n    }\n    __pyx_t_6 = ((__pyx_v_t > 1.0) != 0);\n    __pyx_t_5 = __pyx_t_6;\n    __pyx_L4_bool_binop_done:;\n    if (__pyx_t_5) {\n      __pyx_r = (__pyx_v_s > 0);\n      goto __pyx_L0;\n    }\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":1529\n *         if t<0 or t>1:  return s>0 ;\n * \n *         At = cell.v0 + ( cell.v4 - cell.v0 ) * t             # <<<<<<<<<<<<<<\n *         Bt = cell.v3 + ( cell.v7 - cell.v3 ) * t\n *         Ct = cell.v2 + ( cell.v6 - cell.v2 ) * t\n */\n    __pyx_v_At = (__pyx_v_cell->v0 + ((__pyx_v_cell->v4 - __pyx_v_cell->v0) * __pyx_v_t));\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":1530\n * \n *         At = cell.v0 + ( cell.v4 - cell.v0 ) * t\n *         Bt = cell.v3 + ( cell.v7 - cell.v3 ) * t             # <<<<<<<<<<<<<<\n *         Ct = cell.v2 + ( cell.v6 - cell.v2 ) * t\n *         Dt = cell.v1 + ( cell.v5 - cell.v1 ) * t\n */\n    __pyx_v_Bt = (__pyx_v_cell->v3 + ((__pyx_v_cell->v7 - __pyx_v_cell->v3) * __pyx_v_t));\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":1531\n *         At = cell.v0 + ( cell.v4 - cell.v0 ) * t\n *         Bt = cell.v3 + ( cell.v7 - cell.v3 ) * t\n *         Ct = cell.v2 + ( cell.v6 - cell.v2 ) * t             # <<<<<<<<<<<<<<\n *         Dt = cell.v1 + ( cell.v5 - cell.v1 ) * t\n * \n */\n    __pyx_v_Ct = (__pyx_v_cell->v2 + ((__pyx_v_cell->v6 - __pyx_v_cell->v2) * __pyx_v_t));\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":1532\n *         Bt = cell.v3 + ( cell.v7 - cell.v3 ) * t\n *         Ct = cell.v2 + ( cell.v6 - cell.v2 ) * t\n *         Dt = cell.v1 + ( cell.v5 - cell.v1 ) * t             # <<<<<<<<<<<<<<\n * \n *     elif case==6 or case==7 or case==12 or case==13:\n */\n    __pyx_v_Dt = (__pyx_v_cell->v1 + ((__pyx_v_cell->v5 - __pyx_v_cell->v1) * __pyx_v_t));\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":1523\n *     At, Bt, Ct, Dt = 0.0, 0.0, 0.0, 0.0\n * \n *     if case==4 or case==10:             # <<<<<<<<<<<<<<\n *         a = ( cell.v4 - cell.v0 ) * ( cell.v6 - cell.v2 ) - ( cell.v7 - cell.v3 ) * ( cell.v5 - cell.v1 )\n *         b =  cell.v2 * ( cell.v4 - cell.v0 ) + cell.v0 * ( cell.v6 - cell.v2 ) - cell.v1 * ( cell.v7 - cell.v3 ) - cell.v3 * ( cell.v5 - cell.v1 )\n */\n    break;\n    case 6:\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":1534\n *         Dt = cell.v1 + ( cell.v5 - cell.v1 ) * t\n * \n *     elif case==6 or case==7 or case==12 or case==13:             # <<<<<<<<<<<<<<\n *         # Define edge\n *         if case == 6:  edge = luts.TEST6.get2(config, 2)\n */\n    case 7:\n    case 12:\n    case 13:\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":1536\n *     elif case==6 or case==7 or case==12 or case==13:\n *         # Define edge\n *         if case == 6:  edge = luts.TEST6.get2(config, 2)             # <<<<<<<<<<<<<<\n *         elif case == 7: edge = luts.TEST7.get2(config, 4)\n *         elif case == 12: edge = luts.TEST12.get2(config, 3)\n */\n    switch (__pyx_v_case) {\n      case 6:\n      __pyx_v_edge = ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Lut *)__pyx_v_luts->TEST6->__pyx_vtab)->get2(__pyx_v_luts->TEST6, __pyx_v_config, 2);\n      break;\n      case 7:\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1537\n *         # Define edge\n *         if case == 6:  edge = luts.TEST6.get2(config, 2)\n *         elif case == 7: edge = luts.TEST7.get2(config, 4)             # <<<<<<<<<<<<<<\n *         elif case == 12: edge = luts.TEST12.get2(config, 3)\n *         elif case == 13: edge = luts.TILING13_5_1.get3(config, subconfig, 0)\n */\n      __pyx_v_edge = ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Lut *)__pyx_v_luts->TEST7->__pyx_vtab)->get2(__pyx_v_luts->TEST7, __pyx_v_config, 4);\n      break;\n      case 12:\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1538\n *         if case == 6:  edge = luts.TEST6.get2(config, 2)\n *         elif case == 7: edge = luts.TEST7.get2(config, 4)\n *         elif case == 12: edge = luts.TEST12.get2(config, 3)             # <<<<<<<<<<<<<<\n *         elif case == 13: edge = luts.TILING13_5_1.get3(config, subconfig, 0)\n * \n */\n      __pyx_v_edge = ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Lut *)__pyx_v_luts->TEST12->__pyx_vtab)->get2(__pyx_v_luts->TEST12, __pyx_v_config, 3);\n      break;\n      case 13:\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1539\n *         elif case == 7: edge = luts.TEST7.get2(config, 4)\n *         elif case == 12: edge = luts.TEST12.get2(config, 3)\n *         elif case == 13: edge = luts.TILING13_5_1.get3(config, subconfig, 0)             # <<<<<<<<<<<<<<\n * \n *         if edge==0:\n */\n      __pyx_v_edge = ((struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Lut *)__pyx_v_luts->TILING13_5_1->__pyx_vtab)->get3(__pyx_v_luts->TILING13_5_1, __pyx_v_config, __pyx_v_subconfig, 0);\n      break;\n      default: break;\n    }\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":1541\n *         elif case == 13: edge = luts.TILING13_5_1.get3(config, subconfig, 0)\n * \n *         if edge==0:             # <<<<<<<<<<<<<<\n *             t  = cell.v0 / ( cell.v0 - cell.v1 + FLT_EPSILON )\n *             At = 0\n */\n    switch (__pyx_v_edge) {\n      case 0:\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1542\n * \n *         if edge==0:\n *             t  = cell.v0 / ( cell.v0 - cell.v1 + FLT_EPSILON )             # <<<<<<<<<<<<<<\n *             At = 0\n *             Bt = cell.v3 + ( cell.v2 - cell.v3 ) * t\n */\n      __pyx_v_t = (__pyx_v_cell->v0 / ((__pyx_v_cell->v0 - __pyx_v_cell->v1) + __pyx_v_26_marching_cubes_lewiner_cy_FLT_EPSILON));\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1543\n *         if edge==0:\n *             t  = cell.v0 / ( cell.v0 - cell.v1 + FLT_EPSILON )\n *             At = 0             # <<<<<<<<<<<<<<\n *             Bt = cell.v3 + ( cell.v2 - cell.v3 ) * t\n *             Ct = cell.v7 + ( cell.v6 - cell.v7 ) * t\n */\n      __pyx_v_At = 0.0;\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1544\n *             t  = cell.v0 / ( cell.v0 - cell.v1 + FLT_EPSILON )\n *             At = 0\n *             Bt = cell.v3 + ( cell.v2 - cell.v3 ) * t             # <<<<<<<<<<<<<<\n *             Ct = cell.v7 + ( cell.v6 - cell.v7 ) * t\n *             Dt = cell.v4 + ( cell.v5 - cell.v4 ) * t\n */\n      __pyx_v_Bt = (__pyx_v_cell->v3 + ((__pyx_v_cell->v2 - __pyx_v_cell->v3) * __pyx_v_t));\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1545\n *             At = 0\n *             Bt = cell.v3 + ( cell.v2 - cell.v3 ) * t\n *             Ct = cell.v7 + ( cell.v6 - cell.v7 ) * t             # <<<<<<<<<<<<<<\n *             Dt = cell.v4 + ( cell.v5 - cell.v4 ) * t\n *         elif edge==1:\n */\n      __pyx_v_Ct = (__pyx_v_cell->v7 + ((__pyx_v_cell->v6 - __pyx_v_cell->v7) * __pyx_v_t));\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1546\n *             Bt = cell.v3 + ( cell.v2 - cell.v3 ) * t\n *             Ct = cell.v7 + ( cell.v6 - cell.v7 ) * t\n *             Dt = cell.v4 + ( cell.v5 - cell.v4 ) * t             # <<<<<<<<<<<<<<\n *         elif edge==1:\n *             t  = cell.v1 / ( cell.v1 - cell.v2 + FLT_EPSILON )\n */\n      __pyx_v_Dt = (__pyx_v_cell->v4 + ((__pyx_v_cell->v5 - __pyx_v_cell->v4) * __pyx_v_t));\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1541\n *         elif case == 13: edge = luts.TILING13_5_1.get3(config, subconfig, 0)\n * \n *         if edge==0:             # <<<<<<<<<<<<<<\n *             t  = cell.v0 / ( cell.v0 - cell.v1 + FLT_EPSILON )\n *             At = 0\n */\n      break;\n      case 1:\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1548\n *             Dt = cell.v4 + ( cell.v5 - cell.v4 ) * t\n *         elif edge==1:\n *             t  = cell.v1 / ( cell.v1 - cell.v2 + FLT_EPSILON )             # <<<<<<<<<<<<<<\n *             At = 0\n *             Bt = cell.v0 + ( cell.v3 - cell.v0 ) * t\n */\n      __pyx_v_t = (__pyx_v_cell->v1 / ((__pyx_v_cell->v1 - __pyx_v_cell->v2) + __pyx_v_26_marching_cubes_lewiner_cy_FLT_EPSILON));\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1549\n *         elif edge==1:\n *             t  = cell.v1 / ( cell.v1 - cell.v2 + FLT_EPSILON )\n *             At = 0             # <<<<<<<<<<<<<<\n *             Bt = cell.v0 + ( cell.v3 - cell.v0 ) * t\n *             Ct = cell.v4 + ( cell.v7 - cell.v4 ) * t\n */\n      __pyx_v_At = 0.0;\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1550\n *             t  = cell.v1 / ( cell.v1 - cell.v2 + FLT_EPSILON )\n *             At = 0\n *             Bt = cell.v0 + ( cell.v3 - cell.v0 ) * t             # <<<<<<<<<<<<<<\n *             Ct = cell.v4 + ( cell.v7 - cell.v4 ) * t\n *             Dt = cell.v5 + ( cell.v6 - cell.v5 ) * t\n */\n      __pyx_v_Bt = (__pyx_v_cell->v0 + ((__pyx_v_cell->v3 - __pyx_v_cell->v0) * __pyx_v_t));\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1551\n *             At = 0\n *             Bt = cell.v0 + ( cell.v3 - cell.v0 ) * t\n *             Ct = cell.v4 + ( cell.v7 - cell.v4 ) * t             # <<<<<<<<<<<<<<\n *             Dt = cell.v5 + ( cell.v6 - cell.v5 ) * t\n *         elif edge==2:\n */\n      __pyx_v_Ct = (__pyx_v_cell->v4 + ((__pyx_v_cell->v7 - __pyx_v_cell->v4) * __pyx_v_t));\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1552\n *             Bt = cell.v0 + ( cell.v3 - cell.v0 ) * t\n *             Ct = cell.v4 + ( cell.v7 - cell.v4 ) * t\n *             Dt = cell.v5 + ( cell.v6 - cell.v5 ) * t             # <<<<<<<<<<<<<<\n *         elif edge==2:\n *             t  = cell.v2 / ( cell.v2 - cell.v3 + FLT_EPSILON )\n */\n      __pyx_v_Dt = (__pyx_v_cell->v5 + ((__pyx_v_cell->v6 - __pyx_v_cell->v5) * __pyx_v_t));\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1547\n *             Ct = cell.v7 + ( cell.v6 - cell.v7 ) * t\n *             Dt = cell.v4 + ( cell.v5 - cell.v4 ) * t\n *         elif edge==1:             # <<<<<<<<<<<<<<\n *             t  = cell.v1 / ( cell.v1 - cell.v2 + FLT_EPSILON )\n *             At = 0\n */\n      break;\n      case 2:\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1554\n *             Dt = cell.v5 + ( cell.v6 - cell.v5 ) * t\n *         elif edge==2:\n *             t  = cell.v2 / ( cell.v2 - cell.v3 + FLT_EPSILON )             # <<<<<<<<<<<<<<\n *             At = 0\n *             Bt = cell.v1 + ( cell.v0 - cell.v1 ) * t\n */\n      __pyx_v_t = (__pyx_v_cell->v2 / ((__pyx_v_cell->v2 - __pyx_v_cell->v3) + __pyx_v_26_marching_cubes_lewiner_cy_FLT_EPSILON));\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1555\n *         elif edge==2:\n *             t  = cell.v2 / ( cell.v2 - cell.v3 + FLT_EPSILON )\n *             At = 0             # <<<<<<<<<<<<<<\n *             Bt = cell.v1 + ( cell.v0 - cell.v1 ) * t\n *             Ct = cell.v5 + ( cell.v4 - cell.v5 ) * t\n */\n      __pyx_v_At = 0.0;\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1556\n *             t  = cell.v2 / ( cell.v2 - cell.v3 + FLT_EPSILON )\n *             At = 0\n *             Bt = cell.v1 + ( cell.v0 - cell.v1 ) * t             # <<<<<<<<<<<<<<\n *             Ct = cell.v5 + ( cell.v4 - cell.v5 ) * t\n *             Dt = cell.v6 + ( cell.v7 - cell.v6 ) * t\n */\n      __pyx_v_Bt = (__pyx_v_cell->v1 + ((__pyx_v_cell->v0 - __pyx_v_cell->v1) * __pyx_v_t));\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1557\n *             At = 0\n *             Bt = cell.v1 + ( cell.v0 - cell.v1 ) * t\n *             Ct = cell.v5 + ( cell.v4 - cell.v5 ) * t             # <<<<<<<<<<<<<<\n *             Dt = cell.v6 + ( cell.v7 - cell.v6 ) * t\n *         elif edge==3:\n */\n      __pyx_v_Ct = (__pyx_v_cell->v5 + ((__pyx_v_cell->v4 - __pyx_v_cell->v5) * __pyx_v_t));\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1558\n *             Bt = cell.v1 + ( cell.v0 - cell.v1 ) * t\n *             Ct = cell.v5 + ( cell.v4 - cell.v5 ) * t\n *             Dt = cell.v6 + ( cell.v7 - cell.v6 ) * t             # <<<<<<<<<<<<<<\n *         elif edge==3:\n *             t  = cell.v3 / ( cell.v3 - cell.v0 + FLT_EPSILON )\n */\n      __pyx_v_Dt = (__pyx_v_cell->v6 + ((__pyx_v_cell->v7 - __pyx_v_cell->v6) * __pyx_v_t));\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1553\n *             Ct = cell.v4 + ( cell.v7 - cell.v4 ) * t\n *             Dt = cell.v5 + ( cell.v6 - cell.v5 ) * t\n *         elif edge==2:             # <<<<<<<<<<<<<<\n *             t  = cell.v2 / ( cell.v2 - cell.v3 + FLT_EPSILON )\n *             At = 0\n */\n      break;\n      case 3:\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1560\n *             Dt = cell.v6 + ( cell.v7 - cell.v6 ) * t\n *         elif edge==3:\n *             t  = cell.v3 / ( cell.v3 - cell.v0 + FLT_EPSILON )             # <<<<<<<<<<<<<<\n *             At = 0\n *             Bt = cell.v2 + ( cell.v1 - cell.v2 ) * t\n */\n      __pyx_v_t = (__pyx_v_cell->v3 / ((__pyx_v_cell->v3 - __pyx_v_cell->v0) + __pyx_v_26_marching_cubes_lewiner_cy_FLT_EPSILON));\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1561\n *         elif edge==3:\n *             t  = cell.v3 / ( cell.v3 - cell.v0 + FLT_EPSILON )\n *             At = 0             # <<<<<<<<<<<<<<\n *             Bt = cell.v2 + ( cell.v1 - cell.v2 ) * t\n *             Ct = cell.v6 + ( cell.v5 - cell.v6 ) * t\n */\n      __pyx_v_At = 0.0;\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1562\n *             t  = cell.v3 / ( cell.v3 - cell.v0 + FLT_EPSILON )\n *             At = 0\n *             Bt = cell.v2 + ( cell.v1 - cell.v2 ) * t             # <<<<<<<<<<<<<<\n *             Ct = cell.v6 + ( cell.v5 - cell.v6 ) * t\n *             Dt = cell.v7 + ( cell.v4 - cell.v7 ) * t\n */\n      __pyx_v_Bt = (__pyx_v_cell->v2 + ((__pyx_v_cell->v1 - __pyx_v_cell->v2) * __pyx_v_t));\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1563\n *             At = 0\n *             Bt = cell.v2 + ( cell.v1 - cell.v2 ) * t\n *             Ct = cell.v6 + ( cell.v5 - cell.v6 ) * t             # <<<<<<<<<<<<<<\n *             Dt = cell.v7 + ( cell.v4 - cell.v7 ) * t\n *         elif edge==4:\n */\n      __pyx_v_Ct = (__pyx_v_cell->v6 + ((__pyx_v_cell->v5 - __pyx_v_cell->v6) * __pyx_v_t));\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1564\n *             Bt = cell.v2 + ( cell.v1 - cell.v2 ) * t\n *             Ct = cell.v6 + ( cell.v5 - cell.v6 ) * t\n *             Dt = cell.v7 + ( cell.v4 - cell.v7 ) * t             # <<<<<<<<<<<<<<\n *         elif edge==4:\n *             t  = cell.v4 / ( cell.v4 - cell.v5 + FLT_EPSILON )\n */\n      __pyx_v_Dt = (__pyx_v_cell->v7 + ((__pyx_v_cell->v4 - __pyx_v_cell->v7) * __pyx_v_t));\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1559\n *             Ct = cell.v5 + ( cell.v4 - cell.v5 ) * t\n *             Dt = cell.v6 + ( cell.v7 - cell.v6 ) * t\n *         elif edge==3:             # <<<<<<<<<<<<<<\n *             t  = cell.v3 / ( cell.v3 - cell.v0 + FLT_EPSILON )\n *             At = 0\n */\n      break;\n      case 4:\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1566\n *             Dt = cell.v7 + ( cell.v4 - cell.v7 ) * t\n *         elif edge==4:\n *             t  = cell.v4 / ( cell.v4 - cell.v5 + FLT_EPSILON )             # <<<<<<<<<<<<<<\n *             At = 0\n *             Bt = cell.v7 + ( cell.v6 - cell.v7 ) * t\n */\n      __pyx_v_t = (__pyx_v_cell->v4 / ((__pyx_v_cell->v4 - __pyx_v_cell->v5) + __pyx_v_26_marching_cubes_lewiner_cy_FLT_EPSILON));\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1567\n *         elif edge==4:\n *             t  = cell.v4 / ( cell.v4 - cell.v5 + FLT_EPSILON )\n *             At = 0             # <<<<<<<<<<<<<<\n *             Bt = cell.v7 + ( cell.v6 - cell.v7 ) * t\n *             Ct = cell.v3 + ( cell.v2 - cell.v3 ) * t\n */\n      __pyx_v_At = 0.0;\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1568\n *             t  = cell.v4 / ( cell.v4 - cell.v5 + FLT_EPSILON )\n *             At = 0\n *             Bt = cell.v7 + ( cell.v6 - cell.v7 ) * t             # <<<<<<<<<<<<<<\n *             Ct = cell.v3 + ( cell.v2 - cell.v3 ) * t\n *             Dt = cell.v0 + ( cell.v1 - cell.v0 ) * t\n */\n      __pyx_v_Bt = (__pyx_v_cell->v7 + ((__pyx_v_cell->v6 - __pyx_v_cell->v7) * __pyx_v_t));\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1569\n *             At = 0\n *             Bt = cell.v7 + ( cell.v6 - cell.v7 ) * t\n *             Ct = cell.v3 + ( cell.v2 - cell.v3 ) * t             # <<<<<<<<<<<<<<\n *             Dt = cell.v0 + ( cell.v1 - cell.v0 ) * t\n *         elif edge==5:\n */\n      __pyx_v_Ct = (__pyx_v_cell->v3 + ((__pyx_v_cell->v2 - __pyx_v_cell->v3) * __pyx_v_t));\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1570\n *             Bt = cell.v7 + ( cell.v6 - cell.v7 ) * t\n *             Ct = cell.v3 + ( cell.v2 - cell.v3 ) * t\n *             Dt = cell.v0 + ( cell.v1 - cell.v0 ) * t             # <<<<<<<<<<<<<<\n *         elif edge==5:\n *             t  = cell.v5 / ( cell.v5 - cell.v6 + FLT_EPSILON )\n */\n      __pyx_v_Dt = (__pyx_v_cell->v0 + ((__pyx_v_cell->v1 - __pyx_v_cell->v0) * __pyx_v_t));\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1565\n *             Ct = cell.v6 + ( cell.v5 - cell.v6 ) * t\n *             Dt = cell.v7 + ( cell.v4 - cell.v7 ) * t\n *         elif edge==4:             # <<<<<<<<<<<<<<\n *             t  = cell.v4 / ( cell.v4 - cell.v5 + FLT_EPSILON )\n *             At = 0\n */\n      break;\n      case 5:\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1572\n *             Dt = cell.v0 + ( cell.v1 - cell.v0 ) * t\n *         elif edge==5:\n *             t  = cell.v5 / ( cell.v5 - cell.v6 + FLT_EPSILON )             # <<<<<<<<<<<<<<\n *             At = 0\n *             Bt = cell.v4 + ( cell.v7 - cell.v4 ) * t\n */\n      __pyx_v_t = (__pyx_v_cell->v5 / ((__pyx_v_cell->v5 - __pyx_v_cell->v6) + __pyx_v_26_marching_cubes_lewiner_cy_FLT_EPSILON));\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1573\n *         elif edge==5:\n *             t  = cell.v5 / ( cell.v5 - cell.v6 + FLT_EPSILON )\n *             At = 0             # <<<<<<<<<<<<<<\n *             Bt = cell.v4 + ( cell.v7 - cell.v4 ) * t\n *             Ct = cell.v0 + ( cell.v3 - cell.v0 ) * t\n */\n      __pyx_v_At = 0.0;\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1574\n *             t  = cell.v5 / ( cell.v5 - cell.v6 + FLT_EPSILON )\n *             At = 0\n *             Bt = cell.v4 + ( cell.v7 - cell.v4 ) * t             # <<<<<<<<<<<<<<\n *             Ct = cell.v0 + ( cell.v3 - cell.v0 ) * t\n *             Dt = cell.v1 + ( cell.v2 - cell.v1 ) * t\n */\n      __pyx_v_Bt = (__pyx_v_cell->v4 + ((__pyx_v_cell->v7 - __pyx_v_cell->v4) * __pyx_v_t));\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1575\n *             At = 0\n *             Bt = cell.v4 + ( cell.v7 - cell.v4 ) * t\n *             Ct = cell.v0 + ( cell.v3 - cell.v0 ) * t             # <<<<<<<<<<<<<<\n *             Dt = cell.v1 + ( cell.v2 - cell.v1 ) * t\n *         elif edge==6:\n */\n      __pyx_v_Ct = (__pyx_v_cell->v0 + ((__pyx_v_cell->v3 - __pyx_v_cell->v0) * __pyx_v_t));\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1576\n *             Bt = cell.v4 + ( cell.v7 - cell.v4 ) * t\n *             Ct = cell.v0 + ( cell.v3 - cell.v0 ) * t\n *             Dt = cell.v1 + ( cell.v2 - cell.v1 ) * t             # <<<<<<<<<<<<<<\n *         elif edge==6:\n *             t  = cell.v6 / ( cell.v6 - cell.v7 + FLT_EPSILON )\n */\n      __pyx_v_Dt = (__pyx_v_cell->v1 + ((__pyx_v_cell->v2 - __pyx_v_cell->v1) * __pyx_v_t));\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1571\n *             Ct = cell.v3 + ( cell.v2 - cell.v3 ) * t\n *             Dt = cell.v0 + ( cell.v1 - cell.v0 ) * t\n *         elif edge==5:             # <<<<<<<<<<<<<<\n *             t  = cell.v5 / ( cell.v5 - cell.v6 + FLT_EPSILON )\n *             At = 0\n */\n      break;\n      case 6:\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1578\n *             Dt = cell.v1 + ( cell.v2 - cell.v1 ) * t\n *         elif edge==6:\n *             t  = cell.v6 / ( cell.v6 - cell.v7 + FLT_EPSILON )             # <<<<<<<<<<<<<<\n *             At = 0\n *             Bt = cell.v5 + ( cell.v4 - cell.v5 ) * t\n */\n      __pyx_v_t = (__pyx_v_cell->v6 / ((__pyx_v_cell->v6 - __pyx_v_cell->v7) + __pyx_v_26_marching_cubes_lewiner_cy_FLT_EPSILON));\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1579\n *         elif edge==6:\n *             t  = cell.v6 / ( cell.v6 - cell.v7 + FLT_EPSILON )\n *             At = 0             # <<<<<<<<<<<<<<\n *             Bt = cell.v5 + ( cell.v4 - cell.v5 ) * t\n *             Ct = cell.v1 + ( cell.v0 - cell.v1 ) * t\n */\n      __pyx_v_At = 0.0;\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1580\n *             t  = cell.v6 / ( cell.v6 - cell.v7 + FLT_EPSILON )\n *             At = 0\n *             Bt = cell.v5 + ( cell.v4 - cell.v5 ) * t             # <<<<<<<<<<<<<<\n *             Ct = cell.v1 + ( cell.v0 - cell.v1 ) * t\n *             Dt = cell.v2 + ( cell.v3 - cell.v2 ) * t\n */\n      __pyx_v_Bt = (__pyx_v_cell->v5 + ((__pyx_v_cell->v4 - __pyx_v_cell->v5) * __pyx_v_t));\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1581\n *             At = 0\n *             Bt = cell.v5 + ( cell.v4 - cell.v5 ) * t\n *             Ct = cell.v1 + ( cell.v0 - cell.v1 ) * t             # <<<<<<<<<<<<<<\n *             Dt = cell.v2 + ( cell.v3 - cell.v2 ) * t\n *         elif edge==7:\n */\n      __pyx_v_Ct = (__pyx_v_cell->v1 + ((__pyx_v_cell->v0 - __pyx_v_cell->v1) * __pyx_v_t));\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1582\n *             Bt = cell.v5 + ( cell.v4 - cell.v5 ) * t\n *             Ct = cell.v1 + ( cell.v0 - cell.v1 ) * t\n *             Dt = cell.v2 + ( cell.v3 - cell.v2 ) * t             # <<<<<<<<<<<<<<\n *         elif edge==7:\n *             t  = cell.v7 / ( cell.v7 - cell.v4 + FLT_EPSILON )\n */\n      __pyx_v_Dt = (__pyx_v_cell->v2 + ((__pyx_v_cell->v3 - __pyx_v_cell->v2) * __pyx_v_t));\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1577\n *             Ct = cell.v0 + ( cell.v3 - cell.v0 ) * t\n *             Dt = cell.v1 + ( cell.v2 - cell.v1 ) * t\n *         elif edge==6:             # <<<<<<<<<<<<<<\n *             t  = cell.v6 / ( cell.v6 - cell.v7 + FLT_EPSILON )\n *             At = 0\n */\n      break;\n      case 7:\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1584\n *             Dt = cell.v2 + ( cell.v3 - cell.v2 ) * t\n *         elif edge==7:\n *             t  = cell.v7 / ( cell.v7 - cell.v4 + FLT_EPSILON )             # <<<<<<<<<<<<<<\n *             At = 0\n *             Bt = cell.v6 + ( cell.v5 - cell.v6 ) * t\n */\n      __pyx_v_t = (__pyx_v_cell->v7 / ((__pyx_v_cell->v7 - __pyx_v_cell->v4) + __pyx_v_26_marching_cubes_lewiner_cy_FLT_EPSILON));\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1585\n *         elif edge==7:\n *             t  = cell.v7 / ( cell.v7 - cell.v4 + FLT_EPSILON )\n *             At = 0             # <<<<<<<<<<<<<<\n *             Bt = cell.v6 + ( cell.v5 - cell.v6 ) * t\n *             Ct = cell.v2 + ( cell.v1 - cell.v2 ) * t\n */\n      __pyx_v_At = 0.0;\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1586\n *             t  = cell.v7 / ( cell.v7 - cell.v4 + FLT_EPSILON )\n *             At = 0\n *             Bt = cell.v6 + ( cell.v5 - cell.v6 ) * t             # <<<<<<<<<<<<<<\n *             Ct = cell.v2 + ( cell.v1 - cell.v2 ) * t\n *             Dt = cell.v3 + ( cell.v0 - cell.v3 ) * t\n */\n      __pyx_v_Bt = (__pyx_v_cell->v6 + ((__pyx_v_cell->v5 - __pyx_v_cell->v6) * __pyx_v_t));\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1587\n *             At = 0\n *             Bt = cell.v6 + ( cell.v5 - cell.v6 ) * t\n *             Ct = cell.v2 + ( cell.v1 - cell.v2 ) * t             # <<<<<<<<<<<<<<\n *             Dt = cell.v3 + ( cell.v0 - cell.v3 ) * t\n *         elif edge==8:\n */\n      __pyx_v_Ct = (__pyx_v_cell->v2 + ((__pyx_v_cell->v1 - __pyx_v_cell->v2) * __pyx_v_t));\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1588\n *             Bt = cell.v6 + ( cell.v5 - cell.v6 ) * t\n *             Ct = cell.v2 + ( cell.v1 - cell.v2 ) * t\n *             Dt = cell.v3 + ( cell.v0 - cell.v3 ) * t             # <<<<<<<<<<<<<<\n *         elif edge==8:\n *             t  = cell.v0 / ( cell.v0 - cell.v4 + FLT_EPSILON )\n */\n      __pyx_v_Dt = (__pyx_v_cell->v3 + ((__pyx_v_cell->v0 - __pyx_v_cell->v3) * __pyx_v_t));\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1583\n *             Ct = cell.v1 + ( cell.v0 - cell.v1 ) * t\n *             Dt = cell.v2 + ( cell.v3 - cell.v2 ) * t\n *         elif edge==7:             # <<<<<<<<<<<<<<\n *             t  = cell.v7 / ( cell.v7 - cell.v4 + FLT_EPSILON )\n *             At = 0\n */\n      break;\n      case 8:\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1590\n *             Dt = cell.v3 + ( cell.v0 - cell.v3 ) * t\n *         elif edge==8:\n *             t  = cell.v0 / ( cell.v0 - cell.v4 + FLT_EPSILON )             # <<<<<<<<<<<<<<\n *             At = 0\n *             Bt = cell.v3 + ( cell.v7 - cell.v3 ) * t\n */\n      __pyx_v_t = (__pyx_v_cell->v0 / ((__pyx_v_cell->v0 - __pyx_v_cell->v4) + __pyx_v_26_marching_cubes_lewiner_cy_FLT_EPSILON));\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1591\n *         elif edge==8:\n *             t  = cell.v0 / ( cell.v0 - cell.v4 + FLT_EPSILON )\n *             At = 0             # <<<<<<<<<<<<<<\n *             Bt = cell.v3 + ( cell.v7 - cell.v3 ) * t\n *             Ct = cell.v2 + ( cell.v6 - cell.v2 ) * t\n */\n      __pyx_v_At = 0.0;\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1592\n *             t  = cell.v0 / ( cell.v0 - cell.v4 + FLT_EPSILON )\n *             At = 0\n *             Bt = cell.v3 + ( cell.v7 - cell.v3 ) * t             # <<<<<<<<<<<<<<\n *             Ct = cell.v2 + ( cell.v6 - cell.v2 ) * t\n *             Dt = cell.v1 + ( cell.v5 - cell.v1 ) * t\n */\n      __pyx_v_Bt = (__pyx_v_cell->v3 + ((__pyx_v_cell->v7 - __pyx_v_cell->v3) * __pyx_v_t));\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1593\n *             At = 0\n *             Bt = cell.v3 + ( cell.v7 - cell.v3 ) * t\n *             Ct = cell.v2 + ( cell.v6 - cell.v2 ) * t             # <<<<<<<<<<<<<<\n *             Dt = cell.v1 + ( cell.v5 - cell.v1 ) * t\n *         elif edge==9:\n */\n      __pyx_v_Ct = (__pyx_v_cell->v2 + ((__pyx_v_cell->v6 - __pyx_v_cell->v2) * __pyx_v_t));\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1594\n *             Bt = cell.v3 + ( cell.v7 - cell.v3 ) * t\n *             Ct = cell.v2 + ( cell.v6 - cell.v2 ) * t\n *             Dt = cell.v1 + ( cell.v5 - cell.v1 ) * t             # <<<<<<<<<<<<<<\n *         elif edge==9:\n *             t  = cell.v1 / ( cell.v1 - cell.v5 + FLT_EPSILON )\n */\n      __pyx_v_Dt = (__pyx_v_cell->v1 + ((__pyx_v_cell->v5 - __pyx_v_cell->v1) * __pyx_v_t));\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1589\n *             Ct = cell.v2 + ( cell.v1 - cell.v2 ) * t\n *             Dt = cell.v3 + ( cell.v0 - cell.v3 ) * t\n *         elif edge==8:             # <<<<<<<<<<<<<<\n *             t  = cell.v0 / ( cell.v0 - cell.v4 + FLT_EPSILON )\n *             At = 0\n */\n      break;\n      case 9:\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1596\n *             Dt = cell.v1 + ( cell.v5 - cell.v1 ) * t\n *         elif edge==9:\n *             t  = cell.v1 / ( cell.v1 - cell.v5 + FLT_EPSILON )             # <<<<<<<<<<<<<<\n *             At = 0\n *             Bt = cell.v0 + ( cell.v4 - cell.v0 ) * t\n */\n      __pyx_v_t = (__pyx_v_cell->v1 / ((__pyx_v_cell->v1 - __pyx_v_cell->v5) + __pyx_v_26_marching_cubes_lewiner_cy_FLT_EPSILON));\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1597\n *         elif edge==9:\n *             t  = cell.v1 / ( cell.v1 - cell.v5 + FLT_EPSILON )\n *             At = 0             # <<<<<<<<<<<<<<\n *             Bt = cell.v0 + ( cell.v4 - cell.v0 ) * t\n *             Ct = cell.v3 + ( cell.v7 - cell.v3 ) * t\n */\n      __pyx_v_At = 0.0;\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1598\n *             t  = cell.v1 / ( cell.v1 - cell.v5 + FLT_EPSILON )\n *             At = 0\n *             Bt = cell.v0 + ( cell.v4 - cell.v0 ) * t             # <<<<<<<<<<<<<<\n *             Ct = cell.v3 + ( cell.v7 - cell.v3 ) * t\n *             Dt = cell.v2 + ( cell.v6 - cell.v2 ) * t\n */\n      __pyx_v_Bt = (__pyx_v_cell->v0 + ((__pyx_v_cell->v4 - __pyx_v_cell->v0) * __pyx_v_t));\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1599\n *             At = 0\n *             Bt = cell.v0 + ( cell.v4 - cell.v0 ) * t\n *             Ct = cell.v3 + ( cell.v7 - cell.v3 ) * t             # <<<<<<<<<<<<<<\n *             Dt = cell.v2 + ( cell.v6 - cell.v2 ) * t\n *         elif edge==10:\n */\n      __pyx_v_Ct = (__pyx_v_cell->v3 + ((__pyx_v_cell->v7 - __pyx_v_cell->v3) * __pyx_v_t));\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1600\n *             Bt = cell.v0 + ( cell.v4 - cell.v0 ) * t\n *             Ct = cell.v3 + ( cell.v7 - cell.v3 ) * t\n *             Dt = cell.v2 + ( cell.v6 - cell.v2 ) * t             # <<<<<<<<<<<<<<\n *         elif edge==10:\n *             t  = cell.v2 / ( cell.v2 - cell.v6 + FLT_EPSILON )\n */\n      __pyx_v_Dt = (__pyx_v_cell->v2 + ((__pyx_v_cell->v6 - __pyx_v_cell->v2) * __pyx_v_t));\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1595\n *             Ct = cell.v2 + ( cell.v6 - cell.v2 ) * t\n *             Dt = cell.v1 + ( cell.v5 - cell.v1 ) * t\n *         elif edge==9:             # <<<<<<<<<<<<<<\n *             t  = cell.v1 / ( cell.v1 - cell.v5 + FLT_EPSILON )\n *             At = 0\n */\n      break;\n      case 10:\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1602\n *             Dt = cell.v2 + ( cell.v6 - cell.v2 ) * t\n *         elif edge==10:\n *             t  = cell.v2 / ( cell.v2 - cell.v6 + FLT_EPSILON )             # <<<<<<<<<<<<<<\n *             At = 0\n *             Bt = cell.v1 + ( cell.v5 - cell.v1 ) * t\n */\n      __pyx_v_t = (__pyx_v_cell->v2 / ((__pyx_v_cell->v2 - __pyx_v_cell->v6) + __pyx_v_26_marching_cubes_lewiner_cy_FLT_EPSILON));\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1603\n *         elif edge==10:\n *             t  = cell.v2 / ( cell.v2 - cell.v6 + FLT_EPSILON )\n *             At = 0             # <<<<<<<<<<<<<<\n *             Bt = cell.v1 + ( cell.v5 - cell.v1 ) * t\n *             Ct = cell.v0 + ( cell.v4 - cell.v0 ) * t\n */\n      __pyx_v_At = 0.0;\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1604\n *             t  = cell.v2 / ( cell.v2 - cell.v6 + FLT_EPSILON )\n *             At = 0\n *             Bt = cell.v1 + ( cell.v5 - cell.v1 ) * t             # <<<<<<<<<<<<<<\n *             Ct = cell.v0 + ( cell.v4 - cell.v0 ) * t\n *             Dt = cell.v3 + ( cell.v7 - cell.v3 ) * t\n */\n      __pyx_v_Bt = (__pyx_v_cell->v1 + ((__pyx_v_cell->v5 - __pyx_v_cell->v1) * __pyx_v_t));\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1605\n *             At = 0\n *             Bt = cell.v1 + ( cell.v5 - cell.v1 ) * t\n *             Ct = cell.v0 + ( cell.v4 - cell.v0 ) * t             # <<<<<<<<<<<<<<\n *             Dt = cell.v3 + ( cell.v7 - cell.v3 ) * t\n *         elif edge==11:\n */\n      __pyx_v_Ct = (__pyx_v_cell->v0 + ((__pyx_v_cell->v4 - __pyx_v_cell->v0) * __pyx_v_t));\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1606\n *             Bt = cell.v1 + ( cell.v5 - cell.v1 ) * t\n *             Ct = cell.v0 + ( cell.v4 - cell.v0 ) * t\n *             Dt = cell.v3 + ( cell.v7 - cell.v3 ) * t             # <<<<<<<<<<<<<<\n *         elif edge==11:\n *             t  = cell.v3 / ( cell.v3 - cell.v7 + FLT_EPSILON )\n */\n      __pyx_v_Dt = (__pyx_v_cell->v3 + ((__pyx_v_cell->v7 - __pyx_v_cell->v3) * __pyx_v_t));\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1601\n *             Ct = cell.v3 + ( cell.v7 - cell.v3 ) * t\n *             Dt = cell.v2 + ( cell.v6 - cell.v2 ) * t\n *         elif edge==10:             # <<<<<<<<<<<<<<\n *             t  = cell.v2 / ( cell.v2 - cell.v6 + FLT_EPSILON )\n *             At = 0\n */\n      break;\n      case 11:\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1608\n *             Dt = cell.v3 + ( cell.v7 - cell.v3 ) * t\n *         elif edge==11:\n *             t  = cell.v3 / ( cell.v3 - cell.v7 + FLT_EPSILON )             # <<<<<<<<<<<<<<\n *             At = 0\n *             Bt = cell.v2 + ( cell.v6 - cell.v2 ) * t\n */\n      __pyx_v_t = (__pyx_v_cell->v3 / ((__pyx_v_cell->v3 - __pyx_v_cell->v7) + __pyx_v_26_marching_cubes_lewiner_cy_FLT_EPSILON));\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1609\n *         elif edge==11:\n *             t  = cell.v3 / ( cell.v3 - cell.v7 + FLT_EPSILON )\n *             At = 0             # <<<<<<<<<<<<<<\n *             Bt = cell.v2 + ( cell.v6 - cell.v2 ) * t\n *             Ct = cell.v1 + ( cell.v5 - cell.v1 ) * t\n */\n      __pyx_v_At = 0.0;\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1610\n *             t  = cell.v3 / ( cell.v3 - cell.v7 + FLT_EPSILON )\n *             At = 0\n *             Bt = cell.v2 + ( cell.v6 - cell.v2 ) * t             # <<<<<<<<<<<<<<\n *             Ct = cell.v1 + ( cell.v5 - cell.v1 ) * t\n *             Dt = cell.v0 + ( cell.v4 - cell.v0 ) * t\n */\n      __pyx_v_Bt = (__pyx_v_cell->v2 + ((__pyx_v_cell->v6 - __pyx_v_cell->v2) * __pyx_v_t));\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1611\n *             At = 0\n *             Bt = cell.v2 + ( cell.v6 - cell.v2 ) * t\n *             Ct = cell.v1 + ( cell.v5 - cell.v1 ) * t             # <<<<<<<<<<<<<<\n *             Dt = cell.v0 + ( cell.v4 - cell.v0 ) * t\n *         else:\n */\n      __pyx_v_Ct = (__pyx_v_cell->v1 + ((__pyx_v_cell->v5 - __pyx_v_cell->v1) * __pyx_v_t));\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1612\n *             Bt = cell.v2 + ( cell.v6 - cell.v2 ) * t\n *             Ct = cell.v1 + ( cell.v5 - cell.v1 ) * t\n *             Dt = cell.v0 + ( cell.v4 - cell.v0 ) * t             # <<<<<<<<<<<<<<\n *         else:\n *             print( \"Invalid edge %i.\" % edge )\n */\n      __pyx_v_Dt = (__pyx_v_cell->v0 + ((__pyx_v_cell->v4 - __pyx_v_cell->v0) * __pyx_v_t));\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1607\n *             Ct = cell.v0 + ( cell.v4 - cell.v0 ) * t\n *             Dt = cell.v3 + ( cell.v7 - cell.v3 ) * t\n *         elif edge==11:             # <<<<<<<<<<<<<<\n *             t  = cell.v3 / ( cell.v3 - cell.v7 + FLT_EPSILON )\n *             At = 0\n */\n      break;\n      default:\n\n      /* \"_marching_cubes_lewiner_cy.pyx\":1614\n *             Dt = cell.v0 + ( cell.v4 - cell.v0 ) * t\n *         else:\n *             print( \"Invalid edge %i.\" % edge )             # <<<<<<<<<<<<<<\n *     else:\n *         print( \"Invalid ambiguous case %i.\" % case )\n */\n      __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_edge); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1614, __pyx_L1_error)\n      __Pyx_GOTREF(__pyx_t_7);\n      __pyx_t_8 = __Pyx_PyString_Format(__pyx_kp_s_Invalid_edge_i, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1614, __pyx_L1_error)\n      __Pyx_GOTREF(__pyx_t_8);\n      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;\n      if (__Pyx_PrintOne(0, __pyx_t_8) < 0) __PYX_ERR(0, 1614, __pyx_L1_error)\n      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;\n      break;\n    }\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":1534\n *         Dt = cell.v1 + ( cell.v5 - cell.v1 ) * t\n * \n *     elif case==6 or case==7 or case==12 or case==13:             # <<<<<<<<<<<<<<\n *         # Define edge\n *         if case == 6:  edge = luts.TEST6.get2(config, 2)\n */\n    break;\n    default:\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":1616\n *             print( \"Invalid edge %i.\" % edge )\n *     else:\n *         print( \"Invalid ambiguous case %i.\" % case )             # <<<<<<<<<<<<<<\n * \n *     # Process results\n */\n    __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_case); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1616, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_8);\n    __pyx_t_7 = __Pyx_PyString_Format(__pyx_kp_s_Invalid_ambiguous_case_i, __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1616, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_7);\n    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;\n    if (__Pyx_PrintOne(0, __pyx_t_7) < 0) __PYX_ERR(0, 1616, __pyx_L1_error)\n    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;\n    break;\n  }\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":1619\n * \n *     # Process results\n *     if At >= 0: test += 1             # <<<<<<<<<<<<<<\n *     if Bt >= 0: test += 2\n *     if Ct >= 0: test += 4\n */\n  __pyx_t_5 = ((__pyx_v_At >= 0.0) != 0);\n  if (__pyx_t_5) {\n    __pyx_v_test = (__pyx_v_test + 1);\n  }\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":1620\n *     # Process results\n *     if At >= 0: test += 1\n *     if Bt >= 0: test += 2             # <<<<<<<<<<<<<<\n *     if Ct >= 0: test += 4\n *     if Dt >= 0: test += 8\n */\n  __pyx_t_5 = ((__pyx_v_Bt >= 0.0) != 0);\n  if (__pyx_t_5) {\n    __pyx_v_test = (__pyx_v_test + 2);\n  }\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":1621\n *     if At >= 0: test += 1\n *     if Bt >= 0: test += 2\n *     if Ct >= 0: test += 4             # <<<<<<<<<<<<<<\n *     if Dt >= 0: test += 8\n * \n */\n  __pyx_t_5 = ((__pyx_v_Ct >= 0.0) != 0);\n  if (__pyx_t_5) {\n    __pyx_v_test = (__pyx_v_test + 4);\n  }\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":1622\n *     if Bt >= 0: test += 2\n *     if Ct >= 0: test += 4\n *     if Dt >= 0: test += 8             # <<<<<<<<<<<<<<\n * \n *     # Determine what to return\n */\n  __pyx_t_5 = ((__pyx_v_Dt >= 0.0) != 0);\n  if (__pyx_t_5) {\n    __pyx_v_test = (__pyx_v_test + 8);\n  }\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":1625\n * \n *     # Determine what to return\n *     if test==0: return s>0             # <<<<<<<<<<<<<<\n *     elif test==1: return s>0\n *     elif test==2: return s>0\n */\n  switch (__pyx_v_test) {\n    case 0:\n    __pyx_r = (__pyx_v_s > 0);\n    goto __pyx_L0;\n    break;\n    case 1:\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":1626\n *     # Determine what to return\n *     if test==0: return s>0\n *     elif test==1: return s>0             # <<<<<<<<<<<<<<\n *     elif test==2: return s>0\n *     elif test==3: return s>0\n */\n    __pyx_r = (__pyx_v_s > 0);\n    goto __pyx_L0;\n    break;\n    case 2:\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":1627\n *     if test==0: return s>0\n *     elif test==1: return s>0\n *     elif test==2: return s>0             # <<<<<<<<<<<<<<\n *     elif test==3: return s>0\n *     elif test==4: return s>0\n */\n    __pyx_r = (__pyx_v_s > 0);\n    goto __pyx_L0;\n    break;\n    case 3:\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":1628\n *     elif test==1: return s>0\n *     elif test==2: return s>0\n *     elif test==3: return s>0             # <<<<<<<<<<<<<<\n *     elif test==4: return s>0\n *     elif test==5:\n */\n    __pyx_r = (__pyx_v_s > 0);\n    goto __pyx_L0;\n    break;\n    case 4:\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":1629\n *     elif test==2: return s>0\n *     elif test==3: return s>0\n *     elif test==4: return s>0             # <<<<<<<<<<<<<<\n *     elif test==5:\n *         if At * Ct - Bt * Dt <  FLT_EPSILON: return s>0\n */\n    __pyx_r = (__pyx_v_s > 0);\n    goto __pyx_L0;\n    break;\n    case 5:\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":1631\n *     elif test==4: return s>0\n *     elif test==5:\n *         if At * Ct - Bt * Dt <  FLT_EPSILON: return s>0             # <<<<<<<<<<<<<<\n *     elif test==6: return s>0\n *     elif test==7: return s<0\n */\n    __pyx_t_5 = ((((__pyx_v_At * __pyx_v_Ct) - (__pyx_v_Bt * __pyx_v_Dt)) < __pyx_v_26_marching_cubes_lewiner_cy_FLT_EPSILON) != 0);\n    if (__pyx_t_5) {\n      __pyx_r = (__pyx_v_s > 0);\n      goto __pyx_L0;\n    }\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":1630\n *     elif test==3: return s>0\n *     elif test==4: return s>0\n *     elif test==5:             # <<<<<<<<<<<<<<\n *         if At * Ct - Bt * Dt <  FLT_EPSILON: return s>0\n *     elif test==6: return s>0\n */\n    break;\n    case 6:\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":1632\n *     elif test==5:\n *         if At * Ct - Bt * Dt <  FLT_EPSILON: return s>0\n *     elif test==6: return s>0             # <<<<<<<<<<<<<<\n *     elif test==7: return s<0\n *     elif test==8: return s>0\n */\n    __pyx_r = (__pyx_v_s > 0);\n    goto __pyx_L0;\n    break;\n    case 7:\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":1633\n *         if At * Ct - Bt * Dt <  FLT_EPSILON: return s>0\n *     elif test==6: return s>0\n *     elif test==7: return s<0             # <<<<<<<<<<<<<<\n *     elif test==8: return s>0\n *     elif test==9: return s>0\n */\n    __pyx_r = (__pyx_v_s < 0);\n    goto __pyx_L0;\n    break;\n    case 8:\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":1634\n *     elif test==6: return s>0\n *     elif test==7: return s<0\n *     elif test==8: return s>0             # <<<<<<<<<<<<<<\n *     elif test==9: return s>0\n *     elif test==10:\n */\n    __pyx_r = (__pyx_v_s > 0);\n    goto __pyx_L0;\n    break;\n    case 9:\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":1635\n *     elif test==7: return s<0\n *     elif test==8: return s>0\n *     elif test==9: return s>0             # <<<<<<<<<<<<<<\n *     elif test==10:\n *         if At * Ct - Bt * Dt >= FLT_EPSILON: return s>0\n */\n    __pyx_r = (__pyx_v_s > 0);\n    goto __pyx_L0;\n    break;\n    case 10:\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":1637\n *     elif test==9: return s>0\n *     elif test==10:\n *         if At * Ct - Bt * Dt >= FLT_EPSILON: return s>0             # <<<<<<<<<<<<<<\n *     elif test==11: return s<0\n *     elif test==12: return s>0\n */\n    __pyx_t_5 = ((((__pyx_v_At * __pyx_v_Ct) - (__pyx_v_Bt * __pyx_v_Dt)) >= __pyx_v_26_marching_cubes_lewiner_cy_FLT_EPSILON) != 0);\n    if (__pyx_t_5) {\n      __pyx_r = (__pyx_v_s > 0);\n      goto __pyx_L0;\n    }\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":1636\n *     elif test==8: return s>0\n *     elif test==9: return s>0\n *     elif test==10:             # <<<<<<<<<<<<<<\n *         if At * Ct - Bt * Dt >= FLT_EPSILON: return s>0\n *     elif test==11: return s<0\n */\n    break;\n    case 11:\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":1638\n *     elif test==10:\n *         if At * Ct - Bt * Dt >= FLT_EPSILON: return s>0\n *     elif test==11: return s<0             # <<<<<<<<<<<<<<\n *     elif test==12: return s>0\n *     elif test==13: return s<0\n */\n    __pyx_r = (__pyx_v_s < 0);\n    goto __pyx_L0;\n    break;\n    case 12:\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":1639\n *         if At * Ct - Bt * Dt >= FLT_EPSILON: return s>0\n *     elif test==11: return s<0\n *     elif test==12: return s>0             # <<<<<<<<<<<<<<\n *     elif test==13: return s<0\n *     elif test==14: return s<0\n */\n    __pyx_r = (__pyx_v_s > 0);\n    goto __pyx_L0;\n    break;\n    case 13:\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":1640\n *     elif test==11: return s<0\n *     elif test==12: return s>0\n *     elif test==13: return s<0             # <<<<<<<<<<<<<<\n *     elif test==14: return s<0\n *     elif test==15: return s<0\n */\n    __pyx_r = (__pyx_v_s < 0);\n    goto __pyx_L0;\n    break;\n    case 14:\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":1641\n *     elif test==12: return s>0\n *     elif test==13: return s<0\n *     elif test==14: return s<0             # <<<<<<<<<<<<<<\n *     elif test==15: return s<0\n *     else: return s<0\n */\n    __pyx_r = (__pyx_v_s < 0);\n    goto __pyx_L0;\n    break;\n    case 15:\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":1642\n *     elif test==13: return s<0\n *     elif test==14: return s<0\n *     elif test==15: return s<0             # <<<<<<<<<<<<<<\n *     else: return s<0\n */\n    __pyx_r = (__pyx_v_s < 0);\n    goto __pyx_L0;\n    break;\n    default:\n\n    /* \"_marching_cubes_lewiner_cy.pyx\":1643\n *     elif test==14: return s<0\n *     elif test==15: return s<0\n *     else: return s<0             # <<<<<<<<<<<<<<\n */\n    __pyx_r = (__pyx_v_s < 0);\n    goto __pyx_L0;\n    break;\n  }\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":1509\n * \n * \n * cdef int test_internal(Cell cell, LutProvider luts, int case, int config, int subconfig, int s):             # <<<<<<<<<<<<<<\n *     \"\"\" Return True of the face contains part of the surface.\n *     \"\"\"\n */\n\n  /* function exit code */\n  __pyx_r = 0;\n  goto __pyx_L0;\n  __pyx_L1_error:;\n  __Pyx_XDECREF(__pyx_t_7);\n  __Pyx_XDECREF(__pyx_t_8);\n  __Pyx_WriteUnraisable(\"_marching_cubes_lewiner_cy.test_internal\", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);\n  __pyx_r = 0;\n  __pyx_L0:;\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\n/* \"(tree fragment)\":1\n * def __pyx_unpickle_LutProvider(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<\n *     cdef object __pyx_PickleError\n *     cdef object __pyx_result\n */\n\n/* Python wrapper */\nstatic PyObject *__pyx_pw_26_marching_cubes_lewiner_cy_7__pyx_unpickle_LutProvider(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/\nstatic PyMethodDef __pyx_mdef_26_marching_cubes_lewiner_cy_7__pyx_unpickle_LutProvider = {\"__pyx_unpickle_LutProvider\", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_26_marching_cubes_lewiner_cy_7__pyx_unpickle_LutProvider, METH_VARARGS|METH_KEYWORDS, 0};\nstatic PyObject *__pyx_pw_26_marching_cubes_lewiner_cy_7__pyx_unpickle_LutProvider(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {\n  PyObject *__pyx_v___pyx_type = 0;\n  long __pyx_v___pyx_checksum;\n  PyObject *__pyx_v___pyx_state = 0;\n  int __pyx_lineno = 0;\n  const char *__pyx_filename = NULL;\n  int __pyx_clineno = 0;\n  PyObject *__pyx_r = 0;\n  __Pyx_RefNannyDeclarations\n  __Pyx_RefNannySetupContext(\"__pyx_unpickle_LutProvider (wrapper)\", 0);\n  {\n    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};\n    PyObject* values[3] = {0,0,0};\n    if (unlikely(__pyx_kwds)) {\n      Py_ssize_t kw_args;\n      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);\n      switch (pos_args) {\n        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);\n        CYTHON_FALLTHROUGH;\n        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);\n        CYTHON_FALLTHROUGH;\n        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);\n        CYTHON_FALLTHROUGH;\n        case  0: break;\n        default: goto __pyx_L5_argtuple_error;\n      }\n      kw_args = PyDict_Size(__pyx_kwds);\n      switch (pos_args) {\n        case  0:\n        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;\n        else goto __pyx_L5_argtuple_error;\n        CYTHON_FALLTHROUGH;\n        case  1:\n        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;\n        else {\n          __Pyx_RaiseArgtupleInvalid(\"__pyx_unpickle_LutProvider\", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)\n        }\n        CYTHON_FALLTHROUGH;\n        case  2:\n        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;\n        else {\n          __Pyx_RaiseArgtupleInvalid(\"__pyx_unpickle_LutProvider\", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)\n        }\n      }\n      if (unlikely(kw_args > 0)) {\n        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, \"__pyx_unpickle_LutProvider\") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)\n      }\n    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {\n      goto __pyx_L5_argtuple_error;\n    } else {\n      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);\n      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);\n      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);\n    }\n    __pyx_v___pyx_type = values[0];\n    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)\n    __pyx_v___pyx_state = values[2];\n  }\n  goto __pyx_L4_argument_unpacking_done;\n  __pyx_L5_argtuple_error:;\n  __Pyx_RaiseArgtupleInvalid(\"__pyx_unpickle_LutProvider\", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)\n  __pyx_L3_error:;\n  __Pyx_AddTraceback(\"_marching_cubes_lewiner_cy.__pyx_unpickle_LutProvider\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n  __Pyx_RefNannyFinishContext();\n  return NULL;\n  __pyx_L4_argument_unpacking_done:;\n  __pyx_r = __pyx_pf_26_marching_cubes_lewiner_cy_6__pyx_unpickle_LutProvider(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);\n\n  /* function exit code */\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\nstatic PyObject *__pyx_pf_26_marching_cubes_lewiner_cy_6__pyx_unpickle_LutProvider(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {\n  PyObject *__pyx_v___pyx_PickleError = 0;\n  PyObject *__pyx_v___pyx_result = 0;\n  PyObject *__pyx_r = NULL;\n  __Pyx_RefNannyDeclarations\n  PyObject *__pyx_t_1 = NULL;\n  int __pyx_t_2;\n  int __pyx_t_3;\n  PyObject *__pyx_t_4 = NULL;\n  PyObject *__pyx_t_5 = NULL;\n  PyObject *__pyx_t_6 = NULL;\n  int __pyx_lineno = 0;\n  const char *__pyx_filename = NULL;\n  int __pyx_clineno = 0;\n  __Pyx_RefNannySetupContext(\"__pyx_unpickle_LutProvider\", 0);\n\n  /* \"(tree fragment)\":4\n *     cdef object __pyx_PickleError\n *     cdef object __pyx_result\n *     if __pyx_checksum not in (0x3035ec8, 0x4a4e1b2, 0x53f5fc5):             # <<<<<<<<<<<<<<\n *         from pickle import PickleError as __pyx_PickleError\n *         raise __pyx_PickleError(\"Incompatible checksums (0x%x vs (0x3035ec8, 0x4a4e1b2, 0x53f5fc5) = (CASES, CASESCLASSIC, EDGESRELX, EDGESRELY, EDGESRELZ, SUBCONFIG13, TEST10, TEST12, TEST13, TEST3, TEST4, TEST6, TEST7, TILING1, TILING10_1_1, TILING10_1_1_, TILING10_1_2, TILING10_2, TILING10_2_, TILING11, TILING12_1_1, TILING12_1_1_, TILING12_1_2, TILING12_2, TILING12_2_, TILING13_1, TILING13_1_, TILING13_2, TILING13_2_, TILING13_3, TILING13_3_, TILING13_4, TILING13_5_1, TILING13_5_2, TILING14, TILING2, TILING3_1, TILING3_2, TILING4_1, TILING4_2, TILING5, TILING6_1_1, TILING6_1_2, TILING6_2, TILING7_1, TILING7_2, TILING7_3, TILING7_4_1, TILING7_4_2, TILING8, TILING9))\" % __pyx_checksum)\n */\n  __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__13, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 4, __pyx_L1_error)\n  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n  __pyx_t_3 = (__pyx_t_2 != 0);\n  if (__pyx_t_3) {\n\n    /* \"(tree fragment)\":5\n *     cdef object __pyx_result\n *     if __pyx_checksum not in (0x3035ec8, 0x4a4e1b2, 0x53f5fc5):\n *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<\n *         raise __pyx_PickleError(\"Incompatible checksums (0x%x vs (0x3035ec8, 0x4a4e1b2, 0x53f5fc5) = (CASES, CASESCLASSIC, EDGESRELX, EDGESRELY, EDGESRELZ, SUBCONFIG13, TEST10, TEST12, TEST13, TEST3, TEST4, TEST6, TEST7, TILING1, TILING10_1_1, TILING10_1_1_, TILING10_1_2, TILING10_2, TILING10_2_, TILING11, TILING12_1_1, TILING12_1_1_, TILING12_1_2, TILING12_2, TILING12_2_, TILING13_1, TILING13_1_, TILING13_2, TILING13_2_, TILING13_3, TILING13_3_, TILING13_4, TILING13_5_1, TILING13_5_2, TILING14, TILING2, TILING3_1, TILING3_2, TILING4_1, TILING4_2, TILING5, TILING6_1_1, TILING6_1_2, TILING6_2, TILING7_1, TILING7_2, TILING7_3, TILING7_4_1, TILING7_4_2, TILING8, TILING9))\" % __pyx_checksum)\n *     __pyx_result = LutProvider.__new__(__pyx_type)\n */\n    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_1);\n    __Pyx_INCREF(__pyx_n_s_PickleError);\n    __Pyx_GIVEREF(__pyx_n_s_PickleError);\n    PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError);\n    __pyx_t_4 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_1, -1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 5, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_4);\n    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n    __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_1);\n    __Pyx_INCREF(__pyx_t_1);\n    __pyx_v___pyx_PickleError = __pyx_t_1;\n    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;\n\n    /* \"(tree fragment)\":6\n *     if __pyx_checksum not in (0x3035ec8, 0x4a4e1b2, 0x53f5fc5):\n *         from pickle import PickleError as __pyx_PickleError\n *         raise __pyx_PickleError(\"Incompatible checksums (0x%x vs (0x3035ec8, 0x4a4e1b2, 0x53f5fc5) = (CASES, CASESCLASSIC, EDGESRELX, EDGESRELY, EDGESRELZ, SUBCONFIG13, TEST10, TEST12, TEST13, TEST3, TEST4, TEST6, TEST7, TILING1, TILING10_1_1, TILING10_1_1_, TILING10_1_2, TILING10_2, TILING10_2_, TILING11, TILING12_1_1, TILING12_1_1_, TILING12_1_2, TILING12_2, TILING12_2_, TILING13_1, TILING13_1_, TILING13_2, TILING13_2_, TILING13_3, TILING13_3_, TILING13_4, TILING13_5_1, TILING13_5_2, TILING14, TILING2, TILING3_1, TILING3_2, TILING4_1, TILING4_2, TILING5, TILING6_1_1, TILING6_1_2, TILING6_2, TILING7_1, TILING7_2, TILING7_3, TILING7_4_1, TILING7_4_2, TILING8, TILING9))\" % __pyx_checksum)             # <<<<<<<<<<<<<<\n *     __pyx_result = LutProvider.__new__(__pyx_type)\n *     if __pyx_state is not None:\n */\n    __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_1);\n    __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_0x_x_vs_0, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 6, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_5);\n    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n    __Pyx_INCREF(__pyx_v___pyx_PickleError);\n    __pyx_t_1 = __pyx_v___pyx_PickleError; __pyx_t_6 = NULL;\n    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {\n      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);\n      if (likely(__pyx_t_6)) {\n        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);\n        __Pyx_INCREF(__pyx_t_6);\n        __Pyx_INCREF(function);\n        __Pyx_DECREF_SET(__pyx_t_1, function);\n      }\n    }\n    __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5);\n    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;\n    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;\n    if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_4);\n    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n    __Pyx_Raise(__pyx_t_4, 0, 0, 0);\n    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;\n    __PYX_ERR(1, 6, __pyx_L1_error)\n\n    /* \"(tree fragment)\":4\n *     cdef object __pyx_PickleError\n *     cdef object __pyx_result\n *     if __pyx_checksum not in (0x3035ec8, 0x4a4e1b2, 0x53f5fc5):             # <<<<<<<<<<<<<<\n *         from pickle import PickleError as __pyx_PickleError\n *         raise __pyx_PickleError(\"Incompatible checksums (0x%x vs (0x3035ec8, 0x4a4e1b2, 0x53f5fc5) = (CASES, CASESCLASSIC, EDGESRELX, EDGESRELY, EDGESRELZ, SUBCONFIG13, TEST10, TEST12, TEST13, TEST3, TEST4, TEST6, TEST7, TILING1, TILING10_1_1, TILING10_1_1_, TILING10_1_2, TILING10_2, TILING10_2_, TILING11, TILING12_1_1, TILING12_1_1_, TILING12_1_2, TILING12_2, TILING12_2_, TILING13_1, TILING13_1_, TILING13_2, TILING13_2_, TILING13_3, TILING13_3_, TILING13_4, TILING13_5_1, TILING13_5_2, TILING14, TILING2, TILING3_1, TILING3_2, TILING4_1, TILING4_2, TILING5, TILING6_1_1, TILING6_1_2, TILING6_2, TILING7_1, TILING7_2, TILING7_3, TILING7_4_1, TILING7_4_2, TILING8, TILING9))\" % __pyx_checksum)\n */\n  }\n\n  /* \"(tree fragment)\":7\n *         from pickle import PickleError as __pyx_PickleError\n *         raise __pyx_PickleError(\"Incompatible checksums (0x%x vs (0x3035ec8, 0x4a4e1b2, 0x53f5fc5) = (CASES, CASESCLASSIC, EDGESRELX, EDGESRELY, EDGESRELZ, SUBCONFIG13, TEST10, TEST12, TEST13, TEST3, TEST4, TEST6, TEST7, TILING1, TILING10_1_1, TILING10_1_1_, TILING10_1_2, TILING10_2, TILING10_2_, TILING11, TILING12_1_1, TILING12_1_1_, TILING12_1_2, TILING12_2, TILING12_2_, TILING13_1, TILING13_1_, TILING13_2, TILING13_2_, TILING13_3, TILING13_3_, TILING13_4, TILING13_5_1, TILING13_5_2, TILING14, TILING2, TILING3_1, TILING3_2, TILING4_1, TILING4_2, TILING5, TILING6_1_1, TILING6_1_2, TILING6_2, TILING7_1, TILING7_2, TILING7_3, TILING7_4_1, TILING7_4_2, TILING8, TILING9))\" % __pyx_checksum)\n *     __pyx_result = LutProvider.__new__(__pyx_type)             # <<<<<<<<<<<<<<\n *     if __pyx_state is not None:\n *         __pyx_unpickle_LutProvider__set_state(<LutProvider> __pyx_result, __pyx_state)\n */\n  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_26_marching_cubes_lewiner_cy_LutProvider), __pyx_n_s_new); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 7, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __pyx_t_5 = NULL;\n  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {\n    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);\n    if (likely(__pyx_t_5)) {\n      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);\n      __Pyx_INCREF(__pyx_t_5);\n      __Pyx_INCREF(function);\n      __Pyx_DECREF_SET(__pyx_t_1, function);\n    }\n  }\n  __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v___pyx_type);\n  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;\n  if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 7, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_4);\n  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n  __pyx_v___pyx_result = __pyx_t_4;\n  __pyx_t_4 = 0;\n\n  /* \"(tree fragment)\":8\n *         raise __pyx_PickleError(\"Incompatible checksums (0x%x vs (0x3035ec8, 0x4a4e1b2, 0x53f5fc5) = (CASES, CASESCLASSIC, EDGESRELX, EDGESRELY, EDGESRELZ, SUBCONFIG13, TEST10, TEST12, TEST13, TEST3, TEST4, TEST6, TEST7, TILING1, TILING10_1_1, TILING10_1_1_, TILING10_1_2, TILING10_2, TILING10_2_, TILING11, TILING12_1_1, TILING12_1_1_, TILING12_1_2, TILING12_2, TILING12_2_, TILING13_1, TILING13_1_, TILING13_2, TILING13_2_, TILING13_3, TILING13_3_, TILING13_4, TILING13_5_1, TILING13_5_2, TILING14, TILING2, TILING3_1, TILING3_2, TILING4_1, TILING4_2, TILING5, TILING6_1_1, TILING6_1_2, TILING6_2, TILING7_1, TILING7_2, TILING7_3, TILING7_4_1, TILING7_4_2, TILING8, TILING9))\" % __pyx_checksum)\n *     __pyx_result = LutProvider.__new__(__pyx_type)\n *     if __pyx_state is not None:             # <<<<<<<<<<<<<<\n *         __pyx_unpickle_LutProvider__set_state(<LutProvider> __pyx_result, __pyx_state)\n *     return __pyx_result\n */\n  __pyx_t_3 = (__pyx_v___pyx_state != Py_None);\n  __pyx_t_2 = (__pyx_t_3 != 0);\n  if (__pyx_t_2) {\n\n    /* \"(tree fragment)\":9\n *     __pyx_result = LutProvider.__new__(__pyx_type)\n *     if __pyx_state is not None:\n *         __pyx_unpickle_LutProvider__set_state(<LutProvider> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<\n *     return __pyx_result\n * cdef __pyx_unpickle_LutProvider__set_state(LutProvider __pyx_result, tuple __pyx_state):\n */\n    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, \"Expected %.16s, got %.200s\", \"tuple\", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)\n    __pyx_t_4 = __pyx_f_26_marching_cubes_lewiner_cy___pyx_unpickle_LutProvider__set_state(((struct __pyx_obj_26_marching_cubes_lewiner_cy_LutProvider *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 9, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_4);\n    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;\n\n    /* \"(tree fragment)\":8\n *         raise __pyx_PickleError(\"Incompatible checksums (0x%x vs (0x3035ec8, 0x4a4e1b2, 0x53f5fc5) = (CASES, CASESCLASSIC, EDGESRELX, EDGESRELY, EDGESRELZ, SUBCONFIG13, TEST10, TEST12, TEST13, TEST3, TEST4, TEST6, TEST7, TILING1, TILING10_1_1, TILING10_1_1_, TILING10_1_2, TILING10_2, TILING10_2_, TILING11, TILING12_1_1, TILING12_1_1_, TILING12_1_2, TILING12_2, TILING12_2_, TILING13_1, TILING13_1_, TILING13_2, TILING13_2_, TILING13_3, TILING13_3_, TILING13_4, TILING13_5_1, TILING13_5_2, TILING14, TILING2, TILING3_1, TILING3_2, TILING4_1, TILING4_2, TILING5, TILING6_1_1, TILING6_1_2, TILING6_2, TILING7_1, TILING7_2, TILING7_3, TILING7_4_1, TILING7_4_2, TILING8, TILING9))\" % __pyx_checksum)\n *     __pyx_result = LutProvider.__new__(__pyx_type)\n *     if __pyx_state is not None:             # <<<<<<<<<<<<<<\n *         __pyx_unpickle_LutProvider__set_state(<LutProvider> __pyx_result, __pyx_state)\n *     return __pyx_result\n */\n  }\n\n  /* \"(tree fragment)\":10\n *     if __pyx_state is not None:\n *         __pyx_unpickle_LutProvider__set_state(<LutProvider> __pyx_result, __pyx_state)\n *     return __pyx_result             # <<<<<<<<<<<<<<\n * cdef __pyx_unpickle_LutProvider__set_state(LutProvider __pyx_result, tuple __pyx_state):\n *     __pyx_result.CASES = __pyx_state[0]; __pyx_result.CASESCLASSIC = __pyx_state[1]; __pyx_result.EDGESRELX = __pyx_state[2]; __pyx_result.EDGESRELY = __pyx_state[3]; __pyx_result.EDGESRELZ = __pyx_state[4]; __pyx_result.SUBCONFIG13 = __pyx_state[5]; __pyx_result.TEST10 = __pyx_state[6]; __pyx_result.TEST12 = __pyx_state[7]; __pyx_result.TEST13 = __pyx_state[8]; __pyx_result.TEST3 = __pyx_state[9]; __pyx_result.TEST4 = __pyx_state[10]; __pyx_result.TEST6 = __pyx_state[11]; __pyx_result.TEST7 = __pyx_state[12]; __pyx_result.TILING1 = __pyx_state[13]; __pyx_result.TILING10_1_1 = __pyx_state[14]; __pyx_result.TILING10_1_1_ = __pyx_state[15]; __pyx_result.TILING10_1_2 = __pyx_state[16]; __pyx_result.TILING10_2 = __pyx_state[17]; __pyx_result.TILING10_2_ = __pyx_state[18]; __pyx_result.TILING11 = __pyx_state[19]; __pyx_result.TILING12_1_1 = __pyx_state[20]; __pyx_result.TILING12_1_1_ = __pyx_state[21]; __pyx_result.TILING12_1_2 = __pyx_state[22]; __pyx_result.TILING12_2 = __pyx_state[23]; __pyx_result.TILING12_2_ = __pyx_state[24]; __pyx_result.TILING13_1 = __pyx_state[25]; __pyx_result.TILING13_1_ = __pyx_state[26]; __pyx_result.TILING13_2 = __pyx_state[27]; __pyx_result.TILING13_2_ = __pyx_state[28]; __pyx_result.TILING13_3 = __pyx_state[29]; __pyx_result.TILING13_3_ = __pyx_state[30]; __pyx_result.TILING13_4 = __pyx_state[31]; __pyx_result.TILING13_5_1 = __pyx_state[32]; __pyx_result.TILING13_5_2 = __pyx_state[33]; __pyx_result.TILING14 = __pyx_state[34]; __pyx_result.TILING2 = __pyx_state[35]; __pyx_result.TILING3_1 = __pyx_state[36]; __pyx_result.TILING3_2 = __pyx_state[37]; __pyx_result.TILING4_1 = __pyx_state[38]; __pyx_result.TILING4_2 = __pyx_state[39]; __pyx_result.TILING5 = __pyx_state[40]; __pyx_result.TILING6_1_1 = __pyx_state[41]; __pyx_result.TILING6_1_2 = __pyx_state[42]; __pyx_result.TILING6_2 = __pyx_state[43]; __pyx_result.TILING7_1 = __pyx_state[44]; __pyx_result.TILING7_2 = __pyx_state[45]; __pyx_result.TILING7_3 = __pyx_state[46]; __pyx_result.TILING7_4_1 = __pyx_state[47]; __pyx_result.TILING7_4_2 = __pyx_state[48]; __pyx_result.TILING8 = __pyx_state[49]; __pyx_result.TILING9 = __pyx_state[50]\n */\n  __Pyx_XDECREF(__pyx_r);\n  __Pyx_INCREF(__pyx_v___pyx_result);\n  __pyx_r = __pyx_v___pyx_result;\n  goto __pyx_L0;\n\n  /* \"(tree fragment)\":1\n * def __pyx_unpickle_LutProvider(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<\n *     cdef object __pyx_PickleError\n *     cdef object __pyx_result\n */\n\n  /* function exit code */\n  __pyx_L1_error:;\n  __Pyx_XDECREF(__pyx_t_1);\n  __Pyx_XDECREF(__pyx_t_4);\n  __Pyx_XDECREF(__pyx_t_5);\n  __Pyx_XDECREF(__pyx_t_6);\n  __Pyx_AddTraceback(\"_marching_cubes_lewiner_cy.__pyx_unpickle_LutProvider\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n  __pyx_r = NULL;\n  __pyx_L0:;\n  __Pyx_XDECREF(__pyx_v___pyx_PickleError);\n  __Pyx_XDECREF(__pyx_v___pyx_result);\n  __Pyx_XGIVEREF(__pyx_r);\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\n/* \"(tree fragment)\":11\n *         __pyx_unpickle_LutProvider__set_state(<LutProvider> __pyx_result, __pyx_state)\n *     return __pyx_result\n * cdef __pyx_unpickle_LutProvider__set_state(LutProvider __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<\n *     __pyx_result.CASES = __pyx_state[0]; __pyx_result.CASESCLASSIC = __pyx_state[1]; __pyx_result.EDGESRELX = __pyx_state[2]; __pyx_result.EDGESRELY = __pyx_state[3]; __pyx_result.EDGESRELZ = __pyx_state[4]; __pyx_result.SUBCONFIG13 = __pyx_state[5]; __pyx_result.TEST10 = __pyx_state[6]; __pyx_result.TEST12 = __pyx_state[7]; __pyx_result.TEST13 = __pyx_state[8]; __pyx_result.TEST3 = __pyx_state[9]; __pyx_result.TEST4 = __pyx_state[10]; __pyx_result.TEST6 = __pyx_state[11]; __pyx_result.TEST7 = __pyx_state[12]; __pyx_result.TILING1 = __pyx_state[13]; __pyx_result.TILING10_1_1 = __pyx_state[14]; __pyx_result.TILING10_1_1_ = __pyx_state[15]; __pyx_result.TILING10_1_2 = __pyx_state[16]; __pyx_result.TILING10_2 = __pyx_state[17]; __pyx_result.TILING10_2_ = __pyx_state[18]; __pyx_result.TILING11 = __pyx_state[19]; __pyx_result.TILING12_1_1 = __pyx_state[20]; __pyx_result.TILING12_1_1_ = __pyx_state[21]; __pyx_result.TILING12_1_2 = __pyx_state[22]; __pyx_result.TILING12_2 = __pyx_state[23]; __pyx_result.TILING12_2_ = __pyx_state[24]; __pyx_result.TILING13_1 = __pyx_state[25]; __pyx_result.TILING13_1_ = __pyx_state[26]; __pyx_result.TILING13_2 = __pyx_state[27]; __pyx_result.TILING13_2_ = __pyx_state[28]; __pyx_result.TILING13_3 = __pyx_state[29]; __pyx_result.TILING13_3_ = __pyx_state[30]; __pyx_result.TILING13_4 = __pyx_state[31]; __pyx_result.TILING13_5_1 = __pyx_state[32]; __pyx_result.TILING13_5_2 = __pyx_state[33]; __pyx_result.TILING14 = __pyx_state[34]; __pyx_result.TILING2 = __pyx_state[35]; __pyx_result.TILING3_1 = __pyx_state[36]; __pyx_result.TILING3_2 = __pyx_state[37]; __pyx_result.TILING4_1 = __pyx_state[38]; __pyx_result.TILING4_2 = __pyx_state[39]; __pyx_result.TILING5 = __pyx_state[40]; __pyx_result.TILING6_1_1 = __pyx_state[41]; __pyx_result.TILING6_1_2 = __pyx_state[42]; __pyx_result.TILING6_2 = __pyx_state[43]; __pyx_result.TILING7_1 = __pyx_state[44]; __pyx_result.TILING7_2 = __pyx_state[45]; __pyx_result.TILING7_3 = __pyx_state[46]; __pyx_result.TILING7_4_1 = __pyx_state[47]; __pyx_result.TILING7_4_2 = __pyx_state[48]; __pyx_result.TILING8 = __pyx_state[49]; __pyx_result.TILING9 = __pyx_state[50]\n *     if len(__pyx_state) > 51 and hasattr(__pyx_result, '__dict__'):\n */\n\nstatic PyObject *__pyx_f_26_marching_cubes_lewiner_cy___pyx_unpickle_LutProvider__set_state(struct __pyx_obj_26_marching_cubes_lewiner_cy_LutProvider *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {\n  PyObject *__pyx_r = NULL;\n  __Pyx_RefNannyDeclarations\n  PyObject *__pyx_t_1 = NULL;\n  int __pyx_t_2;\n  Py_ssize_t __pyx_t_3;\n  int __pyx_t_4;\n  int __pyx_t_5;\n  PyObject *__pyx_t_6 = NULL;\n  PyObject *__pyx_t_7 = NULL;\n  int __pyx_lineno = 0;\n  const char *__pyx_filename = NULL;\n  int __pyx_clineno = 0;\n  __Pyx_RefNannySetupContext(\"__pyx_unpickle_LutProvider__set_state\", 0);\n\n  /* \"(tree fragment)\":12\n *     return __pyx_result\n * cdef __pyx_unpickle_LutProvider__set_state(LutProvider __pyx_result, tuple __pyx_state):\n *     __pyx_result.CASES = __pyx_state[0]; __pyx_result.CASESCLASSIC = __pyx_state[1]; __pyx_result.EDGESRELX = __pyx_state[2]; __pyx_result.EDGESRELY = __pyx_state[3]; __pyx_result.EDGESRELZ = __pyx_state[4]; __pyx_result.SUBCONFIG13 = __pyx_state[5]; __pyx_result.TEST10 = __pyx_state[6]; __pyx_result.TEST12 = __pyx_state[7]; __pyx_result.TEST13 = __pyx_state[8]; __pyx_result.TEST3 = __pyx_state[9]; __pyx_result.TEST4 = __pyx_state[10]; __pyx_result.TEST6 = __pyx_state[11]; __pyx_result.TEST7 = __pyx_state[12]; __pyx_result.TILING1 = __pyx_state[13]; __pyx_result.TILING10_1_1 = __pyx_state[14]; __pyx_result.TILING10_1_1_ = __pyx_state[15]; __pyx_result.TILING10_1_2 = __pyx_state[16]; __pyx_result.TILING10_2 = __pyx_state[17]; __pyx_result.TILING10_2_ = __pyx_state[18]; __pyx_result.TILING11 = __pyx_state[19]; __pyx_result.TILING12_1_1 = __pyx_state[20]; __pyx_result.TILING12_1_1_ = __pyx_state[21]; __pyx_result.TILING12_1_2 = __pyx_state[22]; __pyx_result.TILING12_2 = __pyx_state[23]; __pyx_result.TILING12_2_ = __pyx_state[24]; __pyx_result.TILING13_1 = __pyx_state[25]; __pyx_result.TILING13_1_ = __pyx_state[26]; __pyx_result.TILING13_2 = __pyx_state[27]; __pyx_result.TILING13_2_ = __pyx_state[28]; __pyx_result.TILING13_3 = __pyx_state[29]; __pyx_result.TILING13_3_ = __pyx_state[30]; __pyx_result.TILING13_4 = __pyx_state[31]; __pyx_result.TILING13_5_1 = __pyx_state[32]; __pyx_result.TILING13_5_2 = __pyx_state[33]; __pyx_result.TILING14 = __pyx_state[34]; __pyx_result.TILING2 = __pyx_state[35]; __pyx_result.TILING3_1 = __pyx_state[36]; __pyx_result.TILING3_2 = __pyx_state[37]; __pyx_result.TILING4_1 = __pyx_state[38]; __pyx_result.TILING4_2 = __pyx_state[39]; __pyx_result.TILING5 = __pyx_state[40]; __pyx_result.TILING6_1_1 = __pyx_state[41]; __pyx_result.TILING6_1_2 = __pyx_state[42]; __pyx_result.TILING6_2 = __pyx_state[43]; __pyx_result.TILING7_1 = __pyx_state[44]; __pyx_result.TILING7_2 = __pyx_state[45]; __pyx_result.TILING7_3 = __pyx_state[46]; __pyx_result.TILING7_4_1 = __pyx_state[47]; __pyx_result.TILING7_4_2 = __pyx_state[48]; __pyx_result.TILING8 = __pyx_state[49]; __pyx_result.TILING9 = __pyx_state[50]             # <<<<<<<<<<<<<<\n *     if len(__pyx_state) > 51 and hasattr(__pyx_result, '__dict__'):\n *         __pyx_result.__dict__.update(__pyx_state[51])\n */\n  if (unlikely(__pyx_v___pyx_state == Py_None)) {\n    PyErr_SetString(PyExc_TypeError, \"'NoneType' object is not subscriptable\");\n    __PYX_ERR(1, 12, __pyx_L1_error)\n  }\n  if (!(likely(((PyTuple_GET_ITEM(__pyx_v___pyx_state, 0)) == Py_None) || likely(__Pyx_TypeTest(PyTuple_GET_ITEM(__pyx_v___pyx_state, 0), __pyx_ptype_26_marching_cubes_lewiner_cy_Lut))))) __PYX_ERR(1, 12, __pyx_L1_error)\n  __pyx_t_1 = PyTuple_GET_ITEM(__pyx_v___pyx_state, 0);\n  __Pyx_INCREF(__pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_1);\n  __Pyx_GOTREF(__pyx_v___pyx_result->CASES);\n  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->CASES));\n  __pyx_v___pyx_result->CASES = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1);\n  __pyx_t_1 = 0;\n  if (unlikely(__pyx_v___pyx_state == Py_None)) {\n    PyErr_SetString(PyExc_TypeError, \"'NoneType' object is not subscriptable\");\n    __PYX_ERR(1, 12, __pyx_L1_error)\n  }\n  if (!(likely(((PyTuple_GET_ITEM(__pyx_v___pyx_state, 1)) == Py_None) || likely(__Pyx_TypeTest(PyTuple_GET_ITEM(__pyx_v___pyx_state, 1), __pyx_ptype_26_marching_cubes_lewiner_cy_Lut))))) __PYX_ERR(1, 12, __pyx_L1_error)\n  __pyx_t_1 = PyTuple_GET_ITEM(__pyx_v___pyx_state, 1);\n  __Pyx_INCREF(__pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_1);\n  __Pyx_GOTREF(__pyx_v___pyx_result->CASESCLASSIC);\n  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->CASESCLASSIC));\n  __pyx_v___pyx_result->CASESCLASSIC = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1);\n  __pyx_t_1 = 0;\n  if (unlikely(__pyx_v___pyx_state == Py_None)) {\n    PyErr_SetString(PyExc_TypeError, \"'NoneType' object is not subscriptable\");\n    __PYX_ERR(1, 12, __pyx_L1_error)\n  }\n  if (!(likely(((PyTuple_GET_ITEM(__pyx_v___pyx_state, 2)) == Py_None) || likely(__Pyx_TypeTest(PyTuple_GET_ITEM(__pyx_v___pyx_state, 2), __pyx_ptype_26_marching_cubes_lewiner_cy_Lut))))) __PYX_ERR(1, 12, __pyx_L1_error)\n  __pyx_t_1 = PyTuple_GET_ITEM(__pyx_v___pyx_state, 2);\n  __Pyx_INCREF(__pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_1);\n  __Pyx_GOTREF(__pyx_v___pyx_result->EDGESRELX);\n  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->EDGESRELX));\n  __pyx_v___pyx_result->EDGESRELX = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1);\n  __pyx_t_1 = 0;\n  if (unlikely(__pyx_v___pyx_state == Py_None)) {\n    PyErr_SetString(PyExc_TypeError, \"'NoneType' object is not subscriptable\");\n    __PYX_ERR(1, 12, __pyx_L1_error)\n  }\n  if (!(likely(((PyTuple_GET_ITEM(__pyx_v___pyx_state, 3)) == Py_None) || likely(__Pyx_TypeTest(PyTuple_GET_ITEM(__pyx_v___pyx_state, 3), __pyx_ptype_26_marching_cubes_lewiner_cy_Lut))))) __PYX_ERR(1, 12, __pyx_L1_error)\n  __pyx_t_1 = PyTuple_GET_ITEM(__pyx_v___pyx_state, 3);\n  __Pyx_INCREF(__pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_1);\n  __Pyx_GOTREF(__pyx_v___pyx_result->EDGESRELY);\n  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->EDGESRELY));\n  __pyx_v___pyx_result->EDGESRELY = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1);\n  __pyx_t_1 = 0;\n  if (unlikely(__pyx_v___pyx_state == Py_None)) {\n    PyErr_SetString(PyExc_TypeError, \"'NoneType' object is not subscriptable\");\n    __PYX_ERR(1, 12, __pyx_L1_error)\n  }\n  if (!(likely(((PyTuple_GET_ITEM(__pyx_v___pyx_state, 4)) == Py_None) || likely(__Pyx_TypeTest(PyTuple_GET_ITEM(__pyx_v___pyx_state, 4), __pyx_ptype_26_marching_cubes_lewiner_cy_Lut))))) __PYX_ERR(1, 12, __pyx_L1_error)\n  __pyx_t_1 = PyTuple_GET_ITEM(__pyx_v___pyx_state, 4);\n  __Pyx_INCREF(__pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_1);\n  __Pyx_GOTREF(__pyx_v___pyx_result->EDGESRELZ);\n  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->EDGESRELZ));\n  __pyx_v___pyx_result->EDGESRELZ = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1);\n  __pyx_t_1 = 0;\n  if (unlikely(__pyx_v___pyx_state == Py_None)) {\n    PyErr_SetString(PyExc_TypeError, \"'NoneType' object is not subscriptable\");\n    __PYX_ERR(1, 12, __pyx_L1_error)\n  }\n  if (!(likely(((PyTuple_GET_ITEM(__pyx_v___pyx_state, 5)) == Py_None) || likely(__Pyx_TypeTest(PyTuple_GET_ITEM(__pyx_v___pyx_state, 5), __pyx_ptype_26_marching_cubes_lewiner_cy_Lut))))) __PYX_ERR(1, 12, __pyx_L1_error)\n  __pyx_t_1 = PyTuple_GET_ITEM(__pyx_v___pyx_state, 5);\n  __Pyx_INCREF(__pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_1);\n  __Pyx_GOTREF(__pyx_v___pyx_result->SUBCONFIG13);\n  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->SUBCONFIG13));\n  __pyx_v___pyx_result->SUBCONFIG13 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1);\n  __pyx_t_1 = 0;\n  if (unlikely(__pyx_v___pyx_state == Py_None)) {\n    PyErr_SetString(PyExc_TypeError, \"'NoneType' object is not subscriptable\");\n    __PYX_ERR(1, 12, __pyx_L1_error)\n  }\n  if (!(likely(((PyTuple_GET_ITEM(__pyx_v___pyx_state, 6)) == Py_None) || likely(__Pyx_TypeTest(PyTuple_GET_ITEM(__pyx_v___pyx_state, 6), __pyx_ptype_26_marching_cubes_lewiner_cy_Lut))))) __PYX_ERR(1, 12, __pyx_L1_error)\n  __pyx_t_1 = PyTuple_GET_ITEM(__pyx_v___pyx_state, 6);\n  __Pyx_INCREF(__pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_1);\n  __Pyx_GOTREF(__pyx_v___pyx_result->TEST10);\n  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->TEST10));\n  __pyx_v___pyx_result->TEST10 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1);\n  __pyx_t_1 = 0;\n  if (unlikely(__pyx_v___pyx_state == Py_None)) {\n    PyErr_SetString(PyExc_TypeError, \"'NoneType' object is not subscriptable\");\n    __PYX_ERR(1, 12, __pyx_L1_error)\n  }\n  if (!(likely(((PyTuple_GET_ITEM(__pyx_v___pyx_state, 7)) == Py_None) || likely(__Pyx_TypeTest(PyTuple_GET_ITEM(__pyx_v___pyx_state, 7), __pyx_ptype_26_marching_cubes_lewiner_cy_Lut))))) __PYX_ERR(1, 12, __pyx_L1_error)\n  __pyx_t_1 = PyTuple_GET_ITEM(__pyx_v___pyx_state, 7);\n  __Pyx_INCREF(__pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_1);\n  __Pyx_GOTREF(__pyx_v___pyx_result->TEST12);\n  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->TEST12));\n  __pyx_v___pyx_result->TEST12 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1);\n  __pyx_t_1 = 0;\n  if (unlikely(__pyx_v___pyx_state == Py_None)) {\n    PyErr_SetString(PyExc_TypeError, \"'NoneType' object is not subscriptable\");\n    __PYX_ERR(1, 12, __pyx_L1_error)\n  }\n  if (!(likely(((PyTuple_GET_ITEM(__pyx_v___pyx_state, 8)) == Py_None) || likely(__Pyx_TypeTest(PyTuple_GET_ITEM(__pyx_v___pyx_state, 8), __pyx_ptype_26_marching_cubes_lewiner_cy_Lut))))) __PYX_ERR(1, 12, __pyx_L1_error)\n  __pyx_t_1 = PyTuple_GET_ITEM(__pyx_v___pyx_state, 8);\n  __Pyx_INCREF(__pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_1);\n  __Pyx_GOTREF(__pyx_v___pyx_result->TEST13);\n  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->TEST13));\n  __pyx_v___pyx_result->TEST13 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1);\n  __pyx_t_1 = 0;\n  if (unlikely(__pyx_v___pyx_state == Py_None)) {\n    PyErr_SetString(PyExc_TypeError, \"'NoneType' object is not subscriptable\");\n    __PYX_ERR(1, 12, __pyx_L1_error)\n  }\n  if (!(likely(((PyTuple_GET_ITEM(__pyx_v___pyx_state, 9)) == Py_None) || likely(__Pyx_TypeTest(PyTuple_GET_ITEM(__pyx_v___pyx_state, 9), __pyx_ptype_26_marching_cubes_lewiner_cy_Lut))))) __PYX_ERR(1, 12, __pyx_L1_error)\n  __pyx_t_1 = PyTuple_GET_ITEM(__pyx_v___pyx_state, 9);\n  __Pyx_INCREF(__pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_1);\n  __Pyx_GOTREF(__pyx_v___pyx_result->TEST3);\n  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->TEST3));\n  __pyx_v___pyx_result->TEST3 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1);\n  __pyx_t_1 = 0;\n  if (unlikely(__pyx_v___pyx_state == Py_None)) {\n    PyErr_SetString(PyExc_TypeError, \"'NoneType' object is not subscriptable\");\n    __PYX_ERR(1, 12, __pyx_L1_error)\n  }\n  if (!(likely(((PyTuple_GET_ITEM(__pyx_v___pyx_state, 10)) == Py_None) || likely(__Pyx_TypeTest(PyTuple_GET_ITEM(__pyx_v___pyx_state, 10), __pyx_ptype_26_marching_cubes_lewiner_cy_Lut))))) __PYX_ERR(1, 12, __pyx_L1_error)\n  __pyx_t_1 = PyTuple_GET_ITEM(__pyx_v___pyx_state, 10);\n  __Pyx_INCREF(__pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_1);\n  __Pyx_GOTREF(__pyx_v___pyx_result->TEST4);\n  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->TEST4));\n  __pyx_v___pyx_result->TEST4 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1);\n  __pyx_t_1 = 0;\n  if (unlikely(__pyx_v___pyx_state == Py_None)) {\n    PyErr_SetString(PyExc_TypeError, \"'NoneType' object is not subscriptable\");\n    __PYX_ERR(1, 12, __pyx_L1_error)\n  }\n  if (!(likely(((PyTuple_GET_ITEM(__pyx_v___pyx_state, 11)) == Py_None) || likely(__Pyx_TypeTest(PyTuple_GET_ITEM(__pyx_v___pyx_state, 11), __pyx_ptype_26_marching_cubes_lewiner_cy_Lut))))) __PYX_ERR(1, 12, __pyx_L1_error)\n  __pyx_t_1 = PyTuple_GET_ITEM(__pyx_v___pyx_state, 11);\n  __Pyx_INCREF(__pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_1);\n  __Pyx_GOTREF(__pyx_v___pyx_result->TEST6);\n  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->TEST6));\n  __pyx_v___pyx_result->TEST6 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1);\n  __pyx_t_1 = 0;\n  if (unlikely(__pyx_v___pyx_state == Py_None)) {\n    PyErr_SetString(PyExc_TypeError, \"'NoneType' object is not subscriptable\");\n    __PYX_ERR(1, 12, __pyx_L1_error)\n  }\n  if (!(likely(((PyTuple_GET_ITEM(__pyx_v___pyx_state, 12)) == Py_None) || likely(__Pyx_TypeTest(PyTuple_GET_ITEM(__pyx_v___pyx_state, 12), __pyx_ptype_26_marching_cubes_lewiner_cy_Lut))))) __PYX_ERR(1, 12, __pyx_L1_error)\n  __pyx_t_1 = PyTuple_GET_ITEM(__pyx_v___pyx_state, 12);\n  __Pyx_INCREF(__pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_1);\n  __Pyx_GOTREF(__pyx_v___pyx_result->TEST7);\n  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->TEST7));\n  __pyx_v___pyx_result->TEST7 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1);\n  __pyx_t_1 = 0;\n  if (unlikely(__pyx_v___pyx_state == Py_None)) {\n    PyErr_SetString(PyExc_TypeError, \"'NoneType' object is not subscriptable\");\n    __PYX_ERR(1, 12, __pyx_L1_error)\n  }\n  if (!(likely(((PyTuple_GET_ITEM(__pyx_v___pyx_state, 13)) == Py_None) || likely(__Pyx_TypeTest(PyTuple_GET_ITEM(__pyx_v___pyx_state, 13), __pyx_ptype_26_marching_cubes_lewiner_cy_Lut))))) __PYX_ERR(1, 12, __pyx_L1_error)\n  __pyx_t_1 = PyTuple_GET_ITEM(__pyx_v___pyx_state, 13);\n  __Pyx_INCREF(__pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_1);\n  __Pyx_GOTREF(__pyx_v___pyx_result->TILING1);\n  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->TILING1));\n  __pyx_v___pyx_result->TILING1 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1);\n  __pyx_t_1 = 0;\n  if (unlikely(__pyx_v___pyx_state == Py_None)) {\n    PyErr_SetString(PyExc_TypeError, \"'NoneType' object is not subscriptable\");\n    __PYX_ERR(1, 12, __pyx_L1_error)\n  }\n  if (!(likely(((PyTuple_GET_ITEM(__pyx_v___pyx_state, 14)) == Py_None) || likely(__Pyx_TypeTest(PyTuple_GET_ITEM(__pyx_v___pyx_state, 14), __pyx_ptype_26_marching_cubes_lewiner_cy_Lut))))) __PYX_ERR(1, 12, __pyx_L1_error)\n  __pyx_t_1 = PyTuple_GET_ITEM(__pyx_v___pyx_state, 14);\n  __Pyx_INCREF(__pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_1);\n  __Pyx_GOTREF(__pyx_v___pyx_result->TILING10_1_1);\n  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->TILING10_1_1));\n  __pyx_v___pyx_result->TILING10_1_1 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1);\n  __pyx_t_1 = 0;\n  if (unlikely(__pyx_v___pyx_state == Py_None)) {\n    PyErr_SetString(PyExc_TypeError, \"'NoneType' object is not subscriptable\");\n    __PYX_ERR(1, 12, __pyx_L1_error)\n  }\n  if (!(likely(((PyTuple_GET_ITEM(__pyx_v___pyx_state, 15)) == Py_None) || likely(__Pyx_TypeTest(PyTuple_GET_ITEM(__pyx_v___pyx_state, 15), __pyx_ptype_26_marching_cubes_lewiner_cy_Lut))))) __PYX_ERR(1, 12, __pyx_L1_error)\n  __pyx_t_1 = PyTuple_GET_ITEM(__pyx_v___pyx_state, 15);\n  __Pyx_INCREF(__pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_1);\n  __Pyx_GOTREF(__pyx_v___pyx_result->TILING10_1_1_);\n  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->TILING10_1_1_));\n  __pyx_v___pyx_result->TILING10_1_1_ = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1);\n  __pyx_t_1 = 0;\n  if (unlikely(__pyx_v___pyx_state == Py_None)) {\n    PyErr_SetString(PyExc_TypeError, \"'NoneType' object is not subscriptable\");\n    __PYX_ERR(1, 12, __pyx_L1_error)\n  }\n  if (!(likely(((PyTuple_GET_ITEM(__pyx_v___pyx_state, 16)) == Py_None) || likely(__Pyx_TypeTest(PyTuple_GET_ITEM(__pyx_v___pyx_state, 16), __pyx_ptype_26_marching_cubes_lewiner_cy_Lut))))) __PYX_ERR(1, 12, __pyx_L1_error)\n  __pyx_t_1 = PyTuple_GET_ITEM(__pyx_v___pyx_state, 16);\n  __Pyx_INCREF(__pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_1);\n  __Pyx_GOTREF(__pyx_v___pyx_result->TILING10_1_2);\n  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->TILING10_1_2));\n  __pyx_v___pyx_result->TILING10_1_2 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1);\n  __pyx_t_1 = 0;\n  if (unlikely(__pyx_v___pyx_state == Py_None)) {\n    PyErr_SetString(PyExc_TypeError, \"'NoneType' object is not subscriptable\");\n    __PYX_ERR(1, 12, __pyx_L1_error)\n  }\n  if (!(likely(((PyTuple_GET_ITEM(__pyx_v___pyx_state, 17)) == Py_None) || likely(__Pyx_TypeTest(PyTuple_GET_ITEM(__pyx_v___pyx_state, 17), __pyx_ptype_26_marching_cubes_lewiner_cy_Lut))))) __PYX_ERR(1, 12, __pyx_L1_error)\n  __pyx_t_1 = PyTuple_GET_ITEM(__pyx_v___pyx_state, 17);\n  __Pyx_INCREF(__pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_1);\n  __Pyx_GOTREF(__pyx_v___pyx_result->TILING10_2);\n  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->TILING10_2));\n  __pyx_v___pyx_result->TILING10_2 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1);\n  __pyx_t_1 = 0;\n  if (unlikely(__pyx_v___pyx_state == Py_None)) {\n    PyErr_SetString(PyExc_TypeError, \"'NoneType' object is not subscriptable\");\n    __PYX_ERR(1, 12, __pyx_L1_error)\n  }\n  if (!(likely(((PyTuple_GET_ITEM(__pyx_v___pyx_state, 18)) == Py_None) || likely(__Pyx_TypeTest(PyTuple_GET_ITEM(__pyx_v___pyx_state, 18), __pyx_ptype_26_marching_cubes_lewiner_cy_Lut))))) __PYX_ERR(1, 12, __pyx_L1_error)\n  __pyx_t_1 = PyTuple_GET_ITEM(__pyx_v___pyx_state, 18);\n  __Pyx_INCREF(__pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_1);\n  __Pyx_GOTREF(__pyx_v___pyx_result->TILING10_2_);\n  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->TILING10_2_));\n  __pyx_v___pyx_result->TILING10_2_ = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1);\n  __pyx_t_1 = 0;\n  if (unlikely(__pyx_v___pyx_state == Py_None)) {\n    PyErr_SetString(PyExc_TypeError, \"'NoneType' object is not subscriptable\");\n    __PYX_ERR(1, 12, __pyx_L1_error)\n  }\n  if (!(likely(((PyTuple_GET_ITEM(__pyx_v___pyx_state, 19)) == Py_None) || likely(__Pyx_TypeTest(PyTuple_GET_ITEM(__pyx_v___pyx_state, 19), __pyx_ptype_26_marching_cubes_lewiner_cy_Lut))))) __PYX_ERR(1, 12, __pyx_L1_error)\n  __pyx_t_1 = PyTuple_GET_ITEM(__pyx_v___pyx_state, 19);\n  __Pyx_INCREF(__pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_1);\n  __Pyx_GOTREF(__pyx_v___pyx_result->TILING11);\n  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->TILING11));\n  __pyx_v___pyx_result->TILING11 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1);\n  __pyx_t_1 = 0;\n  if (unlikely(__pyx_v___pyx_state == Py_None)) {\n    PyErr_SetString(PyExc_TypeError, \"'NoneType' object is not subscriptable\");\n    __PYX_ERR(1, 12, __pyx_L1_error)\n  }\n  if (!(likely(((PyTuple_GET_ITEM(__pyx_v___pyx_state, 20)) == Py_None) || likely(__Pyx_TypeTest(PyTuple_GET_ITEM(__pyx_v___pyx_state, 20), __pyx_ptype_26_marching_cubes_lewiner_cy_Lut))))) __PYX_ERR(1, 12, __pyx_L1_error)\n  __pyx_t_1 = PyTuple_GET_ITEM(__pyx_v___pyx_state, 20);\n  __Pyx_INCREF(__pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_1);\n  __Pyx_GOTREF(__pyx_v___pyx_result->TILING12_1_1);\n  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->TILING12_1_1));\n  __pyx_v___pyx_result->TILING12_1_1 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1);\n  __pyx_t_1 = 0;\n  if (unlikely(__pyx_v___pyx_state == Py_None)) {\n    PyErr_SetString(PyExc_TypeError, \"'NoneType' object is not subscriptable\");\n    __PYX_ERR(1, 12, __pyx_L1_error)\n  }\n  if (!(likely(((PyTuple_GET_ITEM(__pyx_v___pyx_state, 21)) == Py_None) || likely(__Pyx_TypeTest(PyTuple_GET_ITEM(__pyx_v___pyx_state, 21), __pyx_ptype_26_marching_cubes_lewiner_cy_Lut))))) __PYX_ERR(1, 12, __pyx_L1_error)\n  __pyx_t_1 = PyTuple_GET_ITEM(__pyx_v___pyx_state, 21);\n  __Pyx_INCREF(__pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_1);\n  __Pyx_GOTREF(__pyx_v___pyx_result->TILING12_1_1_);\n  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->TILING12_1_1_));\n  __pyx_v___pyx_result->TILING12_1_1_ = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1);\n  __pyx_t_1 = 0;\n  if (unlikely(__pyx_v___pyx_state == Py_None)) {\n    PyErr_SetString(PyExc_TypeError, \"'NoneType' object is not subscriptable\");\n    __PYX_ERR(1, 12, __pyx_L1_error)\n  }\n  if (!(likely(((PyTuple_GET_ITEM(__pyx_v___pyx_state, 22)) == Py_None) || likely(__Pyx_TypeTest(PyTuple_GET_ITEM(__pyx_v___pyx_state, 22), __pyx_ptype_26_marching_cubes_lewiner_cy_Lut))))) __PYX_ERR(1, 12, __pyx_L1_error)\n  __pyx_t_1 = PyTuple_GET_ITEM(__pyx_v___pyx_state, 22);\n  __Pyx_INCREF(__pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_1);\n  __Pyx_GOTREF(__pyx_v___pyx_result->TILING12_1_2);\n  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->TILING12_1_2));\n  __pyx_v___pyx_result->TILING12_1_2 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1);\n  __pyx_t_1 = 0;\n  if (unlikely(__pyx_v___pyx_state == Py_None)) {\n    PyErr_SetString(PyExc_TypeError, \"'NoneType' object is not subscriptable\");\n    __PYX_ERR(1, 12, __pyx_L1_error)\n  }\n  if (!(likely(((PyTuple_GET_ITEM(__pyx_v___pyx_state, 23)) == Py_None) || likely(__Pyx_TypeTest(PyTuple_GET_ITEM(__pyx_v___pyx_state, 23), __pyx_ptype_26_marching_cubes_lewiner_cy_Lut))))) __PYX_ERR(1, 12, __pyx_L1_error)\n  __pyx_t_1 = PyTuple_GET_ITEM(__pyx_v___pyx_state, 23);\n  __Pyx_INCREF(__pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_1);\n  __Pyx_GOTREF(__pyx_v___pyx_result->TILING12_2);\n  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->TILING12_2));\n  __pyx_v___pyx_result->TILING12_2 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1);\n  __pyx_t_1 = 0;\n  if (unlikely(__pyx_v___pyx_state == Py_None)) {\n    PyErr_SetString(PyExc_TypeError, \"'NoneType' object is not subscriptable\");\n    __PYX_ERR(1, 12, __pyx_L1_error)\n  }\n  if (!(likely(((PyTuple_GET_ITEM(__pyx_v___pyx_state, 24)) == Py_None) || likely(__Pyx_TypeTest(PyTuple_GET_ITEM(__pyx_v___pyx_state, 24), __pyx_ptype_26_marching_cubes_lewiner_cy_Lut))))) __PYX_ERR(1, 12, __pyx_L1_error)\n  __pyx_t_1 = PyTuple_GET_ITEM(__pyx_v___pyx_state, 24);\n  __Pyx_INCREF(__pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_1);\n  __Pyx_GOTREF(__pyx_v___pyx_result->TILING12_2_);\n  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->TILING12_2_));\n  __pyx_v___pyx_result->TILING12_2_ = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1);\n  __pyx_t_1 = 0;\n  if (unlikely(__pyx_v___pyx_state == Py_None)) {\n    PyErr_SetString(PyExc_TypeError, \"'NoneType' object is not subscriptable\");\n    __PYX_ERR(1, 12, __pyx_L1_error)\n  }\n  if (!(likely(((PyTuple_GET_ITEM(__pyx_v___pyx_state, 25)) == Py_None) || likely(__Pyx_TypeTest(PyTuple_GET_ITEM(__pyx_v___pyx_state, 25), __pyx_ptype_26_marching_cubes_lewiner_cy_Lut))))) __PYX_ERR(1, 12, __pyx_L1_error)\n  __pyx_t_1 = PyTuple_GET_ITEM(__pyx_v___pyx_state, 25);\n  __Pyx_INCREF(__pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_1);\n  __Pyx_GOTREF(__pyx_v___pyx_result->TILING13_1);\n  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->TILING13_1));\n  __pyx_v___pyx_result->TILING13_1 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1);\n  __pyx_t_1 = 0;\n  if (unlikely(__pyx_v___pyx_state == Py_None)) {\n    PyErr_SetString(PyExc_TypeError, \"'NoneType' object is not subscriptable\");\n    __PYX_ERR(1, 12, __pyx_L1_error)\n  }\n  if (!(likely(((PyTuple_GET_ITEM(__pyx_v___pyx_state, 26)) == Py_None) || likely(__Pyx_TypeTest(PyTuple_GET_ITEM(__pyx_v___pyx_state, 26), __pyx_ptype_26_marching_cubes_lewiner_cy_Lut))))) __PYX_ERR(1, 12, __pyx_L1_error)\n  __pyx_t_1 = PyTuple_GET_ITEM(__pyx_v___pyx_state, 26);\n  __Pyx_INCREF(__pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_1);\n  __Pyx_GOTREF(__pyx_v___pyx_result->TILING13_1_);\n  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->TILING13_1_));\n  __pyx_v___pyx_result->TILING13_1_ = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1);\n  __pyx_t_1 = 0;\n  if (unlikely(__pyx_v___pyx_state == Py_None)) {\n    PyErr_SetString(PyExc_TypeError, \"'NoneType' object is not subscriptable\");\n    __PYX_ERR(1, 12, __pyx_L1_error)\n  }\n  if (!(likely(((PyTuple_GET_ITEM(__pyx_v___pyx_state, 27)) == Py_None) || likely(__Pyx_TypeTest(PyTuple_GET_ITEM(__pyx_v___pyx_state, 27), __pyx_ptype_26_marching_cubes_lewiner_cy_Lut))))) __PYX_ERR(1, 12, __pyx_L1_error)\n  __pyx_t_1 = PyTuple_GET_ITEM(__pyx_v___pyx_state, 27);\n  __Pyx_INCREF(__pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_1);\n  __Pyx_GOTREF(__pyx_v___pyx_result->TILING13_2);\n  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->TILING13_2));\n  __pyx_v___pyx_result->TILING13_2 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1);\n  __pyx_t_1 = 0;\n  if (unlikely(__pyx_v___pyx_state == Py_None)) {\n    PyErr_SetString(PyExc_TypeError, \"'NoneType' object is not subscriptable\");\n    __PYX_ERR(1, 12, __pyx_L1_error)\n  }\n  if (!(likely(((PyTuple_GET_ITEM(__pyx_v___pyx_state, 28)) == Py_None) || likely(__Pyx_TypeTest(PyTuple_GET_ITEM(__pyx_v___pyx_state, 28), __pyx_ptype_26_marching_cubes_lewiner_cy_Lut))))) __PYX_ERR(1, 12, __pyx_L1_error)\n  __pyx_t_1 = PyTuple_GET_ITEM(__pyx_v___pyx_state, 28);\n  __Pyx_INCREF(__pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_1);\n  __Pyx_GOTREF(__pyx_v___pyx_result->TILING13_2_);\n  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->TILING13_2_));\n  __pyx_v___pyx_result->TILING13_2_ = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1);\n  __pyx_t_1 = 0;\n  if (unlikely(__pyx_v___pyx_state == Py_None)) {\n    PyErr_SetString(PyExc_TypeError, \"'NoneType' object is not subscriptable\");\n    __PYX_ERR(1, 12, __pyx_L1_error)\n  }\n  if (!(likely(((PyTuple_GET_ITEM(__pyx_v___pyx_state, 29)) == Py_None) || likely(__Pyx_TypeTest(PyTuple_GET_ITEM(__pyx_v___pyx_state, 29), __pyx_ptype_26_marching_cubes_lewiner_cy_Lut))))) __PYX_ERR(1, 12, __pyx_L1_error)\n  __pyx_t_1 = PyTuple_GET_ITEM(__pyx_v___pyx_state, 29);\n  __Pyx_INCREF(__pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_1);\n  __Pyx_GOTREF(__pyx_v___pyx_result->TILING13_3);\n  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->TILING13_3));\n  __pyx_v___pyx_result->TILING13_3 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1);\n  __pyx_t_1 = 0;\n  if (unlikely(__pyx_v___pyx_state == Py_None)) {\n    PyErr_SetString(PyExc_TypeError, \"'NoneType' object is not subscriptable\");\n    __PYX_ERR(1, 12, __pyx_L1_error)\n  }\n  if (!(likely(((PyTuple_GET_ITEM(__pyx_v___pyx_state, 30)) == Py_None) || likely(__Pyx_TypeTest(PyTuple_GET_ITEM(__pyx_v___pyx_state, 30), __pyx_ptype_26_marching_cubes_lewiner_cy_Lut))))) __PYX_ERR(1, 12, __pyx_L1_error)\n  __pyx_t_1 = PyTuple_GET_ITEM(__pyx_v___pyx_state, 30);\n  __Pyx_INCREF(__pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_1);\n  __Pyx_GOTREF(__pyx_v___pyx_result->TILING13_3_);\n  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->TILING13_3_));\n  __pyx_v___pyx_result->TILING13_3_ = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1);\n  __pyx_t_1 = 0;\n  if (unlikely(__pyx_v___pyx_state == Py_None)) {\n    PyErr_SetString(PyExc_TypeError, \"'NoneType' object is not subscriptable\");\n    __PYX_ERR(1, 12, __pyx_L1_error)\n  }\n  if (!(likely(((PyTuple_GET_ITEM(__pyx_v___pyx_state, 31)) == Py_None) || likely(__Pyx_TypeTest(PyTuple_GET_ITEM(__pyx_v___pyx_state, 31), __pyx_ptype_26_marching_cubes_lewiner_cy_Lut))))) __PYX_ERR(1, 12, __pyx_L1_error)\n  __pyx_t_1 = PyTuple_GET_ITEM(__pyx_v___pyx_state, 31);\n  __Pyx_INCREF(__pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_1);\n  __Pyx_GOTREF(__pyx_v___pyx_result->TILING13_4);\n  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->TILING13_4));\n  __pyx_v___pyx_result->TILING13_4 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1);\n  __pyx_t_1 = 0;\n  if (unlikely(__pyx_v___pyx_state == Py_None)) {\n    PyErr_SetString(PyExc_TypeError, \"'NoneType' object is not subscriptable\");\n    __PYX_ERR(1, 12, __pyx_L1_error)\n  }\n  if (!(likely(((PyTuple_GET_ITEM(__pyx_v___pyx_state, 32)) == Py_None) || likely(__Pyx_TypeTest(PyTuple_GET_ITEM(__pyx_v___pyx_state, 32), __pyx_ptype_26_marching_cubes_lewiner_cy_Lut))))) __PYX_ERR(1, 12, __pyx_L1_error)\n  __pyx_t_1 = PyTuple_GET_ITEM(__pyx_v___pyx_state, 32);\n  __Pyx_INCREF(__pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_1);\n  __Pyx_GOTREF(__pyx_v___pyx_result->TILING13_5_1);\n  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->TILING13_5_1));\n  __pyx_v___pyx_result->TILING13_5_1 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1);\n  __pyx_t_1 = 0;\n  if (unlikely(__pyx_v___pyx_state == Py_None)) {\n    PyErr_SetString(PyExc_TypeError, \"'NoneType' object is not subscriptable\");\n    __PYX_ERR(1, 12, __pyx_L1_error)\n  }\n  if (!(likely(((PyTuple_GET_ITEM(__pyx_v___pyx_state, 33)) == Py_None) || likely(__Pyx_TypeTest(PyTuple_GET_ITEM(__pyx_v___pyx_state, 33), __pyx_ptype_26_marching_cubes_lewiner_cy_Lut))))) __PYX_ERR(1, 12, __pyx_L1_error)\n  __pyx_t_1 = PyTuple_GET_ITEM(__pyx_v___pyx_state, 33);\n  __Pyx_INCREF(__pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_1);\n  __Pyx_GOTREF(__pyx_v___pyx_result->TILING13_5_2);\n  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->TILING13_5_2));\n  __pyx_v___pyx_result->TILING13_5_2 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1);\n  __pyx_t_1 = 0;\n  if (unlikely(__pyx_v___pyx_state == Py_None)) {\n    PyErr_SetString(PyExc_TypeError, \"'NoneType' object is not subscriptable\");\n    __PYX_ERR(1, 12, __pyx_L1_error)\n  }\n  if (!(likely(((PyTuple_GET_ITEM(__pyx_v___pyx_state, 34)) == Py_None) || likely(__Pyx_TypeTest(PyTuple_GET_ITEM(__pyx_v___pyx_state, 34), __pyx_ptype_26_marching_cubes_lewiner_cy_Lut))))) __PYX_ERR(1, 12, __pyx_L1_error)\n  __pyx_t_1 = PyTuple_GET_ITEM(__pyx_v___pyx_state, 34);\n  __Pyx_INCREF(__pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_1);\n  __Pyx_GOTREF(__pyx_v___pyx_result->TILING14);\n  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->TILING14));\n  __pyx_v___pyx_result->TILING14 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1);\n  __pyx_t_1 = 0;\n  if (unlikely(__pyx_v___pyx_state == Py_None)) {\n    PyErr_SetString(PyExc_TypeError, \"'NoneType' object is not subscriptable\");\n    __PYX_ERR(1, 12, __pyx_L1_error)\n  }\n  if (!(likely(((PyTuple_GET_ITEM(__pyx_v___pyx_state, 35)) == Py_None) || likely(__Pyx_TypeTest(PyTuple_GET_ITEM(__pyx_v___pyx_state, 35), __pyx_ptype_26_marching_cubes_lewiner_cy_Lut))))) __PYX_ERR(1, 12, __pyx_L1_error)\n  __pyx_t_1 = PyTuple_GET_ITEM(__pyx_v___pyx_state, 35);\n  __Pyx_INCREF(__pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_1);\n  __Pyx_GOTREF(__pyx_v___pyx_result->TILING2);\n  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->TILING2));\n  __pyx_v___pyx_result->TILING2 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1);\n  __pyx_t_1 = 0;\n  if (unlikely(__pyx_v___pyx_state == Py_None)) {\n    PyErr_SetString(PyExc_TypeError, \"'NoneType' object is not subscriptable\");\n    __PYX_ERR(1, 12, __pyx_L1_error)\n  }\n  if (!(likely(((PyTuple_GET_ITEM(__pyx_v___pyx_state, 36)) == Py_None) || likely(__Pyx_TypeTest(PyTuple_GET_ITEM(__pyx_v___pyx_state, 36), __pyx_ptype_26_marching_cubes_lewiner_cy_Lut))))) __PYX_ERR(1, 12, __pyx_L1_error)\n  __pyx_t_1 = PyTuple_GET_ITEM(__pyx_v___pyx_state, 36);\n  __Pyx_INCREF(__pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_1);\n  __Pyx_GOTREF(__pyx_v___pyx_result->TILING3_1);\n  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->TILING3_1));\n  __pyx_v___pyx_result->TILING3_1 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1);\n  __pyx_t_1 = 0;\n  if (unlikely(__pyx_v___pyx_state == Py_None)) {\n    PyErr_SetString(PyExc_TypeError, \"'NoneType' object is not subscriptable\");\n    __PYX_ERR(1, 12, __pyx_L1_error)\n  }\n  if (!(likely(((PyTuple_GET_ITEM(__pyx_v___pyx_state, 37)) == Py_None) || likely(__Pyx_TypeTest(PyTuple_GET_ITEM(__pyx_v___pyx_state, 37), __pyx_ptype_26_marching_cubes_lewiner_cy_Lut))))) __PYX_ERR(1, 12, __pyx_L1_error)\n  __pyx_t_1 = PyTuple_GET_ITEM(__pyx_v___pyx_state, 37);\n  __Pyx_INCREF(__pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_1);\n  __Pyx_GOTREF(__pyx_v___pyx_result->TILING3_2);\n  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->TILING3_2));\n  __pyx_v___pyx_result->TILING3_2 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1);\n  __pyx_t_1 = 0;\n  if (unlikely(__pyx_v___pyx_state == Py_None)) {\n    PyErr_SetString(PyExc_TypeError, \"'NoneType' object is not subscriptable\");\n    __PYX_ERR(1, 12, __pyx_L1_error)\n  }\n  if (!(likely(((PyTuple_GET_ITEM(__pyx_v___pyx_state, 38)) == Py_None) || likely(__Pyx_TypeTest(PyTuple_GET_ITEM(__pyx_v___pyx_state, 38), __pyx_ptype_26_marching_cubes_lewiner_cy_Lut))))) __PYX_ERR(1, 12, __pyx_L1_error)\n  __pyx_t_1 = PyTuple_GET_ITEM(__pyx_v___pyx_state, 38);\n  __Pyx_INCREF(__pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_1);\n  __Pyx_GOTREF(__pyx_v___pyx_result->TILING4_1);\n  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->TILING4_1));\n  __pyx_v___pyx_result->TILING4_1 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1);\n  __pyx_t_1 = 0;\n  if (unlikely(__pyx_v___pyx_state == Py_None)) {\n    PyErr_SetString(PyExc_TypeError, \"'NoneType' object is not subscriptable\");\n    __PYX_ERR(1, 12, __pyx_L1_error)\n  }\n  if (!(likely(((PyTuple_GET_ITEM(__pyx_v___pyx_state, 39)) == Py_None) || likely(__Pyx_TypeTest(PyTuple_GET_ITEM(__pyx_v___pyx_state, 39), __pyx_ptype_26_marching_cubes_lewiner_cy_Lut))))) __PYX_ERR(1, 12, __pyx_L1_error)\n  __pyx_t_1 = PyTuple_GET_ITEM(__pyx_v___pyx_state, 39);\n  __Pyx_INCREF(__pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_1);\n  __Pyx_GOTREF(__pyx_v___pyx_result->TILING4_2);\n  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->TILING4_2));\n  __pyx_v___pyx_result->TILING4_2 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1);\n  __pyx_t_1 = 0;\n  if (unlikely(__pyx_v___pyx_state == Py_None)) {\n    PyErr_SetString(PyExc_TypeError, \"'NoneType' object is not subscriptable\");\n    __PYX_ERR(1, 12, __pyx_L1_error)\n  }\n  if (!(likely(((PyTuple_GET_ITEM(__pyx_v___pyx_state, 40)) == Py_None) || likely(__Pyx_TypeTest(PyTuple_GET_ITEM(__pyx_v___pyx_state, 40), __pyx_ptype_26_marching_cubes_lewiner_cy_Lut))))) __PYX_ERR(1, 12, __pyx_L1_error)\n  __pyx_t_1 = PyTuple_GET_ITEM(__pyx_v___pyx_state, 40);\n  __Pyx_INCREF(__pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_1);\n  __Pyx_GOTREF(__pyx_v___pyx_result->TILING5);\n  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->TILING5));\n  __pyx_v___pyx_result->TILING5 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1);\n  __pyx_t_1 = 0;\n  if (unlikely(__pyx_v___pyx_state == Py_None)) {\n    PyErr_SetString(PyExc_TypeError, \"'NoneType' object is not subscriptable\");\n    __PYX_ERR(1, 12, __pyx_L1_error)\n  }\n  if (!(likely(((PyTuple_GET_ITEM(__pyx_v___pyx_state, 41)) == Py_None) || likely(__Pyx_TypeTest(PyTuple_GET_ITEM(__pyx_v___pyx_state, 41), __pyx_ptype_26_marching_cubes_lewiner_cy_Lut))))) __PYX_ERR(1, 12, __pyx_L1_error)\n  __pyx_t_1 = PyTuple_GET_ITEM(__pyx_v___pyx_state, 41);\n  __Pyx_INCREF(__pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_1);\n  __Pyx_GOTREF(__pyx_v___pyx_result->TILING6_1_1);\n  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->TILING6_1_1));\n  __pyx_v___pyx_result->TILING6_1_1 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1);\n  __pyx_t_1 = 0;\n  if (unlikely(__pyx_v___pyx_state == Py_None)) {\n    PyErr_SetString(PyExc_TypeError, \"'NoneType' object is not subscriptable\");\n    __PYX_ERR(1, 12, __pyx_L1_error)\n  }\n  if (!(likely(((PyTuple_GET_ITEM(__pyx_v___pyx_state, 42)) == Py_None) || likely(__Pyx_TypeTest(PyTuple_GET_ITEM(__pyx_v___pyx_state, 42), __pyx_ptype_26_marching_cubes_lewiner_cy_Lut))))) __PYX_ERR(1, 12, __pyx_L1_error)\n  __pyx_t_1 = PyTuple_GET_ITEM(__pyx_v___pyx_state, 42);\n  __Pyx_INCREF(__pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_1);\n  __Pyx_GOTREF(__pyx_v___pyx_result->TILING6_1_2);\n  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->TILING6_1_2));\n  __pyx_v___pyx_result->TILING6_1_2 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1);\n  __pyx_t_1 = 0;\n  if (unlikely(__pyx_v___pyx_state == Py_None)) {\n    PyErr_SetString(PyExc_TypeError, \"'NoneType' object is not subscriptable\");\n    __PYX_ERR(1, 12, __pyx_L1_error)\n  }\n  if (!(likely(((PyTuple_GET_ITEM(__pyx_v___pyx_state, 43)) == Py_None) || likely(__Pyx_TypeTest(PyTuple_GET_ITEM(__pyx_v___pyx_state, 43), __pyx_ptype_26_marching_cubes_lewiner_cy_Lut))))) __PYX_ERR(1, 12, __pyx_L1_error)\n  __pyx_t_1 = PyTuple_GET_ITEM(__pyx_v___pyx_state, 43);\n  __Pyx_INCREF(__pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_1);\n  __Pyx_GOTREF(__pyx_v___pyx_result->TILING6_2);\n  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->TILING6_2));\n  __pyx_v___pyx_result->TILING6_2 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1);\n  __pyx_t_1 = 0;\n  if (unlikely(__pyx_v___pyx_state == Py_None)) {\n    PyErr_SetString(PyExc_TypeError, \"'NoneType' object is not subscriptable\");\n    __PYX_ERR(1, 12, __pyx_L1_error)\n  }\n  if (!(likely(((PyTuple_GET_ITEM(__pyx_v___pyx_state, 44)) == Py_None) || likely(__Pyx_TypeTest(PyTuple_GET_ITEM(__pyx_v___pyx_state, 44), __pyx_ptype_26_marching_cubes_lewiner_cy_Lut))))) __PYX_ERR(1, 12, __pyx_L1_error)\n  __pyx_t_1 = PyTuple_GET_ITEM(__pyx_v___pyx_state, 44);\n  __Pyx_INCREF(__pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_1);\n  __Pyx_GOTREF(__pyx_v___pyx_result->TILING7_1);\n  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->TILING7_1));\n  __pyx_v___pyx_result->TILING7_1 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1);\n  __pyx_t_1 = 0;\n  if (unlikely(__pyx_v___pyx_state == Py_None)) {\n    PyErr_SetString(PyExc_TypeError, \"'NoneType' object is not subscriptable\");\n    __PYX_ERR(1, 12, __pyx_L1_error)\n  }\n  if (!(likely(((PyTuple_GET_ITEM(__pyx_v___pyx_state, 45)) == Py_None) || likely(__Pyx_TypeTest(PyTuple_GET_ITEM(__pyx_v___pyx_state, 45), __pyx_ptype_26_marching_cubes_lewiner_cy_Lut))))) __PYX_ERR(1, 12, __pyx_L1_error)\n  __pyx_t_1 = PyTuple_GET_ITEM(__pyx_v___pyx_state, 45);\n  __Pyx_INCREF(__pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_1);\n  __Pyx_GOTREF(__pyx_v___pyx_result->TILING7_2);\n  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->TILING7_2));\n  __pyx_v___pyx_result->TILING7_2 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1);\n  __pyx_t_1 = 0;\n  if (unlikely(__pyx_v___pyx_state == Py_None)) {\n    PyErr_SetString(PyExc_TypeError, \"'NoneType' object is not subscriptable\");\n    __PYX_ERR(1, 12, __pyx_L1_error)\n  }\n  if (!(likely(((PyTuple_GET_ITEM(__pyx_v___pyx_state, 46)) == Py_None) || likely(__Pyx_TypeTest(PyTuple_GET_ITEM(__pyx_v___pyx_state, 46), __pyx_ptype_26_marching_cubes_lewiner_cy_Lut))))) __PYX_ERR(1, 12, __pyx_L1_error)\n  __pyx_t_1 = PyTuple_GET_ITEM(__pyx_v___pyx_state, 46);\n  __Pyx_INCREF(__pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_1);\n  __Pyx_GOTREF(__pyx_v___pyx_result->TILING7_3);\n  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->TILING7_3));\n  __pyx_v___pyx_result->TILING7_3 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1);\n  __pyx_t_1 = 0;\n  if (unlikely(__pyx_v___pyx_state == Py_None)) {\n    PyErr_SetString(PyExc_TypeError, \"'NoneType' object is not subscriptable\");\n    __PYX_ERR(1, 12, __pyx_L1_error)\n  }\n  if (!(likely(((PyTuple_GET_ITEM(__pyx_v___pyx_state, 47)) == Py_None) || likely(__Pyx_TypeTest(PyTuple_GET_ITEM(__pyx_v___pyx_state, 47), __pyx_ptype_26_marching_cubes_lewiner_cy_Lut))))) __PYX_ERR(1, 12, __pyx_L1_error)\n  __pyx_t_1 = PyTuple_GET_ITEM(__pyx_v___pyx_state, 47);\n  __Pyx_INCREF(__pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_1);\n  __Pyx_GOTREF(__pyx_v___pyx_result->TILING7_4_1);\n  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->TILING7_4_1));\n  __pyx_v___pyx_result->TILING7_4_1 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1);\n  __pyx_t_1 = 0;\n  if (unlikely(__pyx_v___pyx_state == Py_None)) {\n    PyErr_SetString(PyExc_TypeError, \"'NoneType' object is not subscriptable\");\n    __PYX_ERR(1, 12, __pyx_L1_error)\n  }\n  if (!(likely(((PyTuple_GET_ITEM(__pyx_v___pyx_state, 48)) == Py_None) || likely(__Pyx_TypeTest(PyTuple_GET_ITEM(__pyx_v___pyx_state, 48), __pyx_ptype_26_marching_cubes_lewiner_cy_Lut))))) __PYX_ERR(1, 12, __pyx_L1_error)\n  __pyx_t_1 = PyTuple_GET_ITEM(__pyx_v___pyx_state, 48);\n  __Pyx_INCREF(__pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_1);\n  __Pyx_GOTREF(__pyx_v___pyx_result->TILING7_4_2);\n  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->TILING7_4_2));\n  __pyx_v___pyx_result->TILING7_4_2 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1);\n  __pyx_t_1 = 0;\n  if (unlikely(__pyx_v___pyx_state == Py_None)) {\n    PyErr_SetString(PyExc_TypeError, \"'NoneType' object is not subscriptable\");\n    __PYX_ERR(1, 12, __pyx_L1_error)\n  }\n  if (!(likely(((PyTuple_GET_ITEM(__pyx_v___pyx_state, 49)) == Py_None) || likely(__Pyx_TypeTest(PyTuple_GET_ITEM(__pyx_v___pyx_state, 49), __pyx_ptype_26_marching_cubes_lewiner_cy_Lut))))) __PYX_ERR(1, 12, __pyx_L1_error)\n  __pyx_t_1 = PyTuple_GET_ITEM(__pyx_v___pyx_state, 49);\n  __Pyx_INCREF(__pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_1);\n  __Pyx_GOTREF(__pyx_v___pyx_result->TILING8);\n  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->TILING8));\n  __pyx_v___pyx_result->TILING8 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1);\n  __pyx_t_1 = 0;\n  if (unlikely(__pyx_v___pyx_state == Py_None)) {\n    PyErr_SetString(PyExc_TypeError, \"'NoneType' object is not subscriptable\");\n    __PYX_ERR(1, 12, __pyx_L1_error)\n  }\n  if (!(likely(((PyTuple_GET_ITEM(__pyx_v___pyx_state, 50)) == Py_None) || likely(__Pyx_TypeTest(PyTuple_GET_ITEM(__pyx_v___pyx_state, 50), __pyx_ptype_26_marching_cubes_lewiner_cy_Lut))))) __PYX_ERR(1, 12, __pyx_L1_error)\n  __pyx_t_1 = PyTuple_GET_ITEM(__pyx_v___pyx_state, 50);\n  __Pyx_INCREF(__pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_1);\n  __Pyx_GOTREF(__pyx_v___pyx_result->TILING9);\n  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->TILING9));\n  __pyx_v___pyx_result->TILING9 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)__pyx_t_1);\n  __pyx_t_1 = 0;\n\n  /* \"(tree fragment)\":13\n * cdef __pyx_unpickle_LutProvider__set_state(LutProvider __pyx_result, tuple __pyx_state):\n *     __pyx_result.CASES = __pyx_state[0]; __pyx_result.CASESCLASSIC = __pyx_state[1]; __pyx_result.EDGESRELX = __pyx_state[2]; __pyx_result.EDGESRELY = __pyx_state[3]; __pyx_result.EDGESRELZ = __pyx_state[4]; __pyx_result.SUBCONFIG13 = __pyx_state[5]; __pyx_result.TEST10 = __pyx_state[6]; __pyx_result.TEST12 = __pyx_state[7]; __pyx_result.TEST13 = __pyx_state[8]; __pyx_result.TEST3 = __pyx_state[9]; __pyx_result.TEST4 = __pyx_state[10]; __pyx_result.TEST6 = __pyx_state[11]; __pyx_result.TEST7 = __pyx_state[12]; __pyx_result.TILING1 = __pyx_state[13]; __pyx_result.TILING10_1_1 = __pyx_state[14]; __pyx_result.TILING10_1_1_ = __pyx_state[15]; __pyx_result.TILING10_1_2 = __pyx_state[16]; __pyx_result.TILING10_2 = __pyx_state[17]; __pyx_result.TILING10_2_ = __pyx_state[18]; __pyx_result.TILING11 = __pyx_state[19]; __pyx_result.TILING12_1_1 = __pyx_state[20]; __pyx_result.TILING12_1_1_ = __pyx_state[21]; __pyx_result.TILING12_1_2 = __pyx_state[22]; __pyx_result.TILING12_2 = __pyx_state[23]; __pyx_result.TILING12_2_ = __pyx_state[24]; __pyx_result.TILING13_1 = __pyx_state[25]; __pyx_result.TILING13_1_ = __pyx_state[26]; __pyx_result.TILING13_2 = __pyx_state[27]; __pyx_result.TILING13_2_ = __pyx_state[28]; __pyx_result.TILING13_3 = __pyx_state[29]; __pyx_result.TILING13_3_ = __pyx_state[30]; __pyx_result.TILING13_4 = __pyx_state[31]; __pyx_result.TILING13_5_1 = __pyx_state[32]; __pyx_result.TILING13_5_2 = __pyx_state[33]; __pyx_result.TILING14 = __pyx_state[34]; __pyx_result.TILING2 = __pyx_state[35]; __pyx_result.TILING3_1 = __pyx_state[36]; __pyx_result.TILING3_2 = __pyx_state[37]; __pyx_result.TILING4_1 = __pyx_state[38]; __pyx_result.TILING4_2 = __pyx_state[39]; __pyx_result.TILING5 = __pyx_state[40]; __pyx_result.TILING6_1_1 = __pyx_state[41]; __pyx_result.TILING6_1_2 = __pyx_state[42]; __pyx_result.TILING6_2 = __pyx_state[43]; __pyx_result.TILING7_1 = __pyx_state[44]; __pyx_result.TILING7_2 = __pyx_state[45]; __pyx_result.TILING7_3 = __pyx_state[46]; __pyx_result.TILING7_4_1 = __pyx_state[47]; __pyx_result.TILING7_4_2 = __pyx_state[48]; __pyx_result.TILING8 = __pyx_state[49]; __pyx_result.TILING9 = __pyx_state[50]\n *     if len(__pyx_state) > 51 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<\n *         __pyx_result.__dict__.update(__pyx_state[51])\n */\n  if (unlikely(__pyx_v___pyx_state == Py_None)) {\n    PyErr_SetString(PyExc_TypeError, \"object of type 'NoneType' has no len()\");\n    __PYX_ERR(1, 13, __pyx_L1_error)\n  }\n  __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)\n  __pyx_t_4 = ((__pyx_t_3 > 51) != 0);\n  if (__pyx_t_4) {\n  } else {\n    __pyx_t_2 = __pyx_t_4;\n    goto __pyx_L4_bool_binop_done;\n  }\n  __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)\n  __pyx_t_5 = (__pyx_t_4 != 0);\n  __pyx_t_2 = __pyx_t_5;\n  __pyx_L4_bool_binop_done:;\n  if (__pyx_t_2) {\n\n    /* \"(tree fragment)\":14\n *     __pyx_result.CASES = __pyx_state[0]; __pyx_result.CASESCLASSIC = __pyx_state[1]; __pyx_result.EDGESRELX = __pyx_state[2]; __pyx_result.EDGESRELY = __pyx_state[3]; __pyx_result.EDGESRELZ = __pyx_state[4]; __pyx_result.SUBCONFIG13 = __pyx_state[5]; __pyx_result.TEST10 = __pyx_state[6]; __pyx_result.TEST12 = __pyx_state[7]; __pyx_result.TEST13 = __pyx_state[8]; __pyx_result.TEST3 = __pyx_state[9]; __pyx_result.TEST4 = __pyx_state[10]; __pyx_result.TEST6 = __pyx_state[11]; __pyx_result.TEST7 = __pyx_state[12]; __pyx_result.TILING1 = __pyx_state[13]; __pyx_result.TILING10_1_1 = __pyx_state[14]; __pyx_result.TILING10_1_1_ = __pyx_state[15]; __pyx_result.TILING10_1_2 = __pyx_state[16]; __pyx_result.TILING10_2 = __pyx_state[17]; __pyx_result.TILING10_2_ = __pyx_state[18]; __pyx_result.TILING11 = __pyx_state[19]; __pyx_result.TILING12_1_1 = __pyx_state[20]; __pyx_result.TILING12_1_1_ = __pyx_state[21]; __pyx_result.TILING12_1_2 = __pyx_state[22]; __pyx_result.TILING12_2 = __pyx_state[23]; __pyx_result.TILING12_2_ = __pyx_state[24]; __pyx_result.TILING13_1 = __pyx_state[25]; __pyx_result.TILING13_1_ = __pyx_state[26]; __pyx_result.TILING13_2 = __pyx_state[27]; __pyx_result.TILING13_2_ = __pyx_state[28]; __pyx_result.TILING13_3 = __pyx_state[29]; __pyx_result.TILING13_3_ = __pyx_state[30]; __pyx_result.TILING13_4 = __pyx_state[31]; __pyx_result.TILING13_5_1 = __pyx_state[32]; __pyx_result.TILING13_5_2 = __pyx_state[33]; __pyx_result.TILING14 = __pyx_state[34]; __pyx_result.TILING2 = __pyx_state[35]; __pyx_result.TILING3_1 = __pyx_state[36]; __pyx_result.TILING3_2 = __pyx_state[37]; __pyx_result.TILING4_1 = __pyx_state[38]; __pyx_result.TILING4_2 = __pyx_state[39]; __pyx_result.TILING5 = __pyx_state[40]; __pyx_result.TILING6_1_1 = __pyx_state[41]; __pyx_result.TILING6_1_2 = __pyx_state[42]; __pyx_result.TILING6_2 = __pyx_state[43]; __pyx_result.TILING7_1 = __pyx_state[44]; __pyx_result.TILING7_2 = __pyx_state[45]; __pyx_result.TILING7_3 = __pyx_state[46]; __pyx_result.TILING7_4_1 = __pyx_state[47]; __pyx_result.TILING7_4_2 = __pyx_state[48]; __pyx_result.TILING8 = __pyx_state[49]; __pyx_result.TILING9 = __pyx_state[50]\n *     if len(__pyx_state) > 51 and hasattr(__pyx_result, '__dict__'):\n *         __pyx_result.__dict__.update(__pyx_state[51])             # <<<<<<<<<<<<<<\n */\n    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_6);\n    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_7);\n    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;\n    if (unlikely(__pyx_v___pyx_state == Py_None)) {\n      PyErr_SetString(PyExc_TypeError, \"'NoneType' object is not subscriptable\");\n      __PYX_ERR(1, 14, __pyx_L1_error)\n    }\n    __pyx_t_6 = NULL;\n    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {\n      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);\n      if (likely(__pyx_t_6)) {\n        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);\n        __Pyx_INCREF(__pyx_t_6);\n        __Pyx_INCREF(function);\n        __Pyx_DECREF_SET(__pyx_t_7, function);\n      }\n    }\n    __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_6, PyTuple_GET_ITEM(__pyx_v___pyx_state, 51)) : __Pyx_PyObject_CallOneArg(__pyx_t_7, PyTuple_GET_ITEM(__pyx_v___pyx_state, 51));\n    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;\n    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_1);\n    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;\n    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n\n    /* \"(tree fragment)\":13\n * cdef __pyx_unpickle_LutProvider__set_state(LutProvider __pyx_result, tuple __pyx_state):\n *     __pyx_result.CASES = __pyx_state[0]; __pyx_result.CASESCLASSIC = __pyx_state[1]; __pyx_result.EDGESRELX = __pyx_state[2]; __pyx_result.EDGESRELY = __pyx_state[3]; __pyx_result.EDGESRELZ = __pyx_state[4]; __pyx_result.SUBCONFIG13 = __pyx_state[5]; __pyx_result.TEST10 = __pyx_state[6]; __pyx_result.TEST12 = __pyx_state[7]; __pyx_result.TEST13 = __pyx_state[8]; __pyx_result.TEST3 = __pyx_state[9]; __pyx_result.TEST4 = __pyx_state[10]; __pyx_result.TEST6 = __pyx_state[11]; __pyx_result.TEST7 = __pyx_state[12]; __pyx_result.TILING1 = __pyx_state[13]; __pyx_result.TILING10_1_1 = __pyx_state[14]; __pyx_result.TILING10_1_1_ = __pyx_state[15]; __pyx_result.TILING10_1_2 = __pyx_state[16]; __pyx_result.TILING10_2 = __pyx_state[17]; __pyx_result.TILING10_2_ = __pyx_state[18]; __pyx_result.TILING11 = __pyx_state[19]; __pyx_result.TILING12_1_1 = __pyx_state[20]; __pyx_result.TILING12_1_1_ = __pyx_state[21]; __pyx_result.TILING12_1_2 = __pyx_state[22]; __pyx_result.TILING12_2 = __pyx_state[23]; __pyx_result.TILING12_2_ = __pyx_state[24]; __pyx_result.TILING13_1 = __pyx_state[25]; __pyx_result.TILING13_1_ = __pyx_state[26]; __pyx_result.TILING13_2 = __pyx_state[27]; __pyx_result.TILING13_2_ = __pyx_state[28]; __pyx_result.TILING13_3 = __pyx_state[29]; __pyx_result.TILING13_3_ = __pyx_state[30]; __pyx_result.TILING13_4 = __pyx_state[31]; __pyx_result.TILING13_5_1 = __pyx_state[32]; __pyx_result.TILING13_5_2 = __pyx_state[33]; __pyx_result.TILING14 = __pyx_state[34]; __pyx_result.TILING2 = __pyx_state[35]; __pyx_result.TILING3_1 = __pyx_state[36]; __pyx_result.TILING3_2 = __pyx_state[37]; __pyx_result.TILING4_1 = __pyx_state[38]; __pyx_result.TILING4_2 = __pyx_state[39]; __pyx_result.TILING5 = __pyx_state[40]; __pyx_result.TILING6_1_1 = __pyx_state[41]; __pyx_result.TILING6_1_2 = __pyx_state[42]; __pyx_result.TILING6_2 = __pyx_state[43]; __pyx_result.TILING7_1 = __pyx_state[44]; __pyx_result.TILING7_2 = __pyx_state[45]; __pyx_result.TILING7_3 = __pyx_state[46]; __pyx_result.TILING7_4_1 = __pyx_state[47]; __pyx_result.TILING7_4_2 = __pyx_state[48]; __pyx_result.TILING8 = __pyx_state[49]; __pyx_result.TILING9 = __pyx_state[50]\n *     if len(__pyx_state) > 51 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<\n *         __pyx_result.__dict__.update(__pyx_state[51])\n */\n  }\n\n  /* \"(tree fragment)\":11\n *         __pyx_unpickle_LutProvider__set_state(<LutProvider> __pyx_result, __pyx_state)\n *     return __pyx_result\n * cdef __pyx_unpickle_LutProvider__set_state(LutProvider __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<\n *     __pyx_result.CASES = __pyx_state[0]; __pyx_result.CASESCLASSIC = __pyx_state[1]; __pyx_result.EDGESRELX = __pyx_state[2]; __pyx_result.EDGESRELY = __pyx_state[3]; __pyx_result.EDGESRELZ = __pyx_state[4]; __pyx_result.SUBCONFIG13 = __pyx_state[5]; __pyx_result.TEST10 = __pyx_state[6]; __pyx_result.TEST12 = __pyx_state[7]; __pyx_result.TEST13 = __pyx_state[8]; __pyx_result.TEST3 = __pyx_state[9]; __pyx_result.TEST4 = __pyx_state[10]; __pyx_result.TEST6 = __pyx_state[11]; __pyx_result.TEST7 = __pyx_state[12]; __pyx_result.TILING1 = __pyx_state[13]; __pyx_result.TILING10_1_1 = __pyx_state[14]; __pyx_result.TILING10_1_1_ = __pyx_state[15]; __pyx_result.TILING10_1_2 = __pyx_state[16]; __pyx_result.TILING10_2 = __pyx_state[17]; __pyx_result.TILING10_2_ = __pyx_state[18]; __pyx_result.TILING11 = __pyx_state[19]; __pyx_result.TILING12_1_1 = __pyx_state[20]; __pyx_result.TILING12_1_1_ = __pyx_state[21]; __pyx_result.TILING12_1_2 = __pyx_state[22]; __pyx_result.TILING12_2 = __pyx_state[23]; __pyx_result.TILING12_2_ = __pyx_state[24]; __pyx_result.TILING13_1 = __pyx_state[25]; __pyx_result.TILING13_1_ = __pyx_state[26]; __pyx_result.TILING13_2 = __pyx_state[27]; __pyx_result.TILING13_2_ = __pyx_state[28]; __pyx_result.TILING13_3 = __pyx_state[29]; __pyx_result.TILING13_3_ = __pyx_state[30]; __pyx_result.TILING13_4 = __pyx_state[31]; __pyx_result.TILING13_5_1 = __pyx_state[32]; __pyx_result.TILING13_5_2 = __pyx_state[33]; __pyx_result.TILING14 = __pyx_state[34]; __pyx_result.TILING2 = __pyx_state[35]; __pyx_result.TILING3_1 = __pyx_state[36]; __pyx_result.TILING3_2 = __pyx_state[37]; __pyx_result.TILING4_1 = __pyx_state[38]; __pyx_result.TILING4_2 = __pyx_state[39]; __pyx_result.TILING5 = __pyx_state[40]; __pyx_result.TILING6_1_1 = __pyx_state[41]; __pyx_result.TILING6_1_2 = __pyx_state[42]; __pyx_result.TILING6_2 = __pyx_state[43]; __pyx_result.TILING7_1 = __pyx_state[44]; __pyx_result.TILING7_2 = __pyx_state[45]; __pyx_result.TILING7_3 = __pyx_state[46]; __pyx_result.TILING7_4_1 = __pyx_state[47]; __pyx_result.TILING7_4_2 = __pyx_state[48]; __pyx_result.TILING8 = __pyx_state[49]; __pyx_result.TILING9 = __pyx_state[50]\n *     if len(__pyx_state) > 51 and hasattr(__pyx_result, '__dict__'):\n */\n\n  /* function exit code */\n  __pyx_r = Py_None; __Pyx_INCREF(Py_None);\n  goto __pyx_L0;\n  __pyx_L1_error:;\n  __Pyx_XDECREF(__pyx_t_1);\n  __Pyx_XDECREF(__pyx_t_6);\n  __Pyx_XDECREF(__pyx_t_7);\n  __Pyx_AddTraceback(\"_marching_cubes_lewiner_cy.__pyx_unpickle_LutProvider__set_state\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n  __pyx_r = 0;\n  __pyx_L0:;\n  __Pyx_XGIVEREF(__pyx_r);\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\n/* \"../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd\":735\n * ctypedef npy_cdouble     complex_t\n * \n * cdef inline object PyArray_MultiIterNew1(a):             # <<<<<<<<<<<<<<\n *     return PyArray_MultiIterNew(1, <void*>a)\n * \n */\n\nstatic CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__pyx_v_a) {\n  PyObject *__pyx_r = NULL;\n  __Pyx_RefNannyDeclarations\n  PyObject *__pyx_t_1 = NULL;\n  int __pyx_lineno = 0;\n  const char *__pyx_filename = NULL;\n  int __pyx_clineno = 0;\n  __Pyx_RefNannySetupContext(\"PyArray_MultiIterNew1\", 0);\n\n  /* \"../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd\":736\n * \n * cdef inline object PyArray_MultiIterNew1(a):\n *     return PyArray_MultiIterNew(1, <void*>a)             # <<<<<<<<<<<<<<\n * \n * cdef inline object PyArray_MultiIterNew2(a, b):\n */\n  __Pyx_XDECREF(__pyx_r);\n  __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 736, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __pyx_r = __pyx_t_1;\n  __pyx_t_1 = 0;\n  goto __pyx_L0;\n\n  /* \"../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd\":735\n * ctypedef npy_cdouble     complex_t\n * \n * cdef inline object PyArray_MultiIterNew1(a):             # <<<<<<<<<<<<<<\n *     return PyArray_MultiIterNew(1, <void*>a)\n * \n */\n\n  /* function exit code */\n  __pyx_L1_error:;\n  __Pyx_XDECREF(__pyx_t_1);\n  __Pyx_AddTraceback(\"numpy.PyArray_MultiIterNew1\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n  __pyx_r = 0;\n  __pyx_L0:;\n  __Pyx_XGIVEREF(__pyx_r);\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\n/* \"../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd\":738\n *     return PyArray_MultiIterNew(1, <void*>a)\n * \n * cdef inline object PyArray_MultiIterNew2(a, b):             # <<<<<<<<<<<<<<\n *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)\n * \n */\n\nstatic CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__pyx_v_a, PyObject *__pyx_v_b) {\n  PyObject *__pyx_r = NULL;\n  __Pyx_RefNannyDeclarations\n  PyObject *__pyx_t_1 = NULL;\n  int __pyx_lineno = 0;\n  const char *__pyx_filename = NULL;\n  int __pyx_clineno = 0;\n  __Pyx_RefNannySetupContext(\"PyArray_MultiIterNew2\", 0);\n\n  /* \"../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd\":739\n * \n * cdef inline object PyArray_MultiIterNew2(a, b):\n *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)             # <<<<<<<<<<<<<<\n * \n * cdef inline object PyArray_MultiIterNew3(a, b, c):\n */\n  __Pyx_XDECREF(__pyx_r);\n  __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 739, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __pyx_r = __pyx_t_1;\n  __pyx_t_1 = 0;\n  goto __pyx_L0;\n\n  /* \"../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd\":738\n *     return PyArray_MultiIterNew(1, <void*>a)\n * \n * cdef inline object PyArray_MultiIterNew2(a, b):             # <<<<<<<<<<<<<<\n *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)\n * \n */\n\n  /* function exit code */\n  __pyx_L1_error:;\n  __Pyx_XDECREF(__pyx_t_1);\n  __Pyx_AddTraceback(\"numpy.PyArray_MultiIterNew2\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n  __pyx_r = 0;\n  __pyx_L0:;\n  __Pyx_XGIVEREF(__pyx_r);\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\n/* \"../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd\":741\n *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)\n * \n * cdef inline object PyArray_MultiIterNew3(a, b, c):             # <<<<<<<<<<<<<<\n *     return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)\n * \n */\n\nstatic CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c) {\n  PyObject *__pyx_r = NULL;\n  __Pyx_RefNannyDeclarations\n  PyObject *__pyx_t_1 = NULL;\n  int __pyx_lineno = 0;\n  const char *__pyx_filename = NULL;\n  int __pyx_clineno = 0;\n  __Pyx_RefNannySetupContext(\"PyArray_MultiIterNew3\", 0);\n\n  /* \"../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd\":742\n * \n * cdef inline object PyArray_MultiIterNew3(a, b, c):\n *     return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)             # <<<<<<<<<<<<<<\n * \n * cdef inline object PyArray_MultiIterNew4(a, b, c, d):\n */\n  __Pyx_XDECREF(__pyx_r);\n  __pyx_t_1 = PyArray_MultiIterNew(3, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 742, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __pyx_r = __pyx_t_1;\n  __pyx_t_1 = 0;\n  goto __pyx_L0;\n\n  /* \"../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd\":741\n *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)\n * \n * cdef inline object PyArray_MultiIterNew3(a, b, c):             # <<<<<<<<<<<<<<\n *     return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)\n * \n */\n\n  /* function exit code */\n  __pyx_L1_error:;\n  __Pyx_XDECREF(__pyx_t_1);\n  __Pyx_AddTraceback(\"numpy.PyArray_MultiIterNew3\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n  __pyx_r = 0;\n  __pyx_L0:;\n  __Pyx_XGIVEREF(__pyx_r);\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\n/* \"../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd\":744\n *     return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)\n * \n * cdef inline object PyArray_MultiIterNew4(a, b, c, d):             # <<<<<<<<<<<<<<\n *     return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)\n * \n */\n\nstatic CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d) {\n  PyObject *__pyx_r = NULL;\n  __Pyx_RefNannyDeclarations\n  PyObject *__pyx_t_1 = NULL;\n  int __pyx_lineno = 0;\n  const char *__pyx_filename = NULL;\n  int __pyx_clineno = 0;\n  __Pyx_RefNannySetupContext(\"PyArray_MultiIterNew4\", 0);\n\n  /* \"../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd\":745\n * \n * cdef inline object PyArray_MultiIterNew4(a, b, c, d):\n *     return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)             # <<<<<<<<<<<<<<\n * \n * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):\n */\n  __Pyx_XDECREF(__pyx_r);\n  __pyx_t_1 = PyArray_MultiIterNew(4, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 745, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __pyx_r = __pyx_t_1;\n  __pyx_t_1 = 0;\n  goto __pyx_L0;\n\n  /* \"../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd\":744\n *     return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)\n * \n * cdef inline object PyArray_MultiIterNew4(a, b, c, d):             # <<<<<<<<<<<<<<\n *     return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)\n * \n */\n\n  /* function exit code */\n  __pyx_L1_error:;\n  __Pyx_XDECREF(__pyx_t_1);\n  __Pyx_AddTraceback(\"numpy.PyArray_MultiIterNew4\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n  __pyx_r = 0;\n  __pyx_L0:;\n  __Pyx_XGIVEREF(__pyx_r);\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\n/* \"../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd\":747\n *     return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)\n * \n * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):             # <<<<<<<<<<<<<<\n *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)\n * \n */\n\nstatic CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d, PyObject *__pyx_v_e) {\n  PyObject *__pyx_r = NULL;\n  __Pyx_RefNannyDeclarations\n  PyObject *__pyx_t_1 = NULL;\n  int __pyx_lineno = 0;\n  const char *__pyx_filename = NULL;\n  int __pyx_clineno = 0;\n  __Pyx_RefNannySetupContext(\"PyArray_MultiIterNew5\", 0);\n\n  /* \"../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd\":748\n * \n * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):\n *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)             # <<<<<<<<<<<<<<\n * \n * cdef inline tuple PyDataType_SHAPE(dtype d):\n */\n  __Pyx_XDECREF(__pyx_r);\n  __pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 748, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __pyx_r = __pyx_t_1;\n  __pyx_t_1 = 0;\n  goto __pyx_L0;\n\n  /* \"../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd\":747\n *     return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)\n * \n * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):             # <<<<<<<<<<<<<<\n *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)\n * \n */\n\n  /* function exit code */\n  __pyx_L1_error:;\n  __Pyx_XDECREF(__pyx_t_1);\n  __Pyx_AddTraceback(\"numpy.PyArray_MultiIterNew5\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n  __pyx_r = 0;\n  __pyx_L0:;\n  __Pyx_XGIVEREF(__pyx_r);\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\n/* \"../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd\":750\n *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)\n * \n * cdef inline tuple PyDataType_SHAPE(dtype d):             # <<<<<<<<<<<<<<\n *     if PyDataType_HASSUBARRAY(d):\n *         return <tuple>d.subarray.shape\n */\n\nstatic CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__pyx_v_d) {\n  PyObject *__pyx_r = NULL;\n  __Pyx_RefNannyDeclarations\n  int __pyx_t_1;\n  __Pyx_RefNannySetupContext(\"PyDataType_SHAPE\", 0);\n\n  /* \"../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd\":751\n * \n * cdef inline tuple PyDataType_SHAPE(dtype d):\n *     if PyDataType_HASSUBARRAY(d):             # <<<<<<<<<<<<<<\n *         return <tuple>d.subarray.shape\n *     else:\n */\n  __pyx_t_1 = (PyDataType_HASSUBARRAY(__pyx_v_d) != 0);\n  if (__pyx_t_1) {\n\n    /* \"../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd\":752\n * cdef inline tuple PyDataType_SHAPE(dtype d):\n *     if PyDataType_HASSUBARRAY(d):\n *         return <tuple>d.subarray.shape             # <<<<<<<<<<<<<<\n *     else:\n *         return ()\n */\n    __Pyx_XDECREF(__pyx_r);\n    __Pyx_INCREF(((PyObject*)__pyx_v_d->subarray->shape));\n    __pyx_r = ((PyObject*)__pyx_v_d->subarray->shape);\n    goto __pyx_L0;\n\n    /* \"../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd\":751\n * \n * cdef inline tuple PyDataType_SHAPE(dtype d):\n *     if PyDataType_HASSUBARRAY(d):             # <<<<<<<<<<<<<<\n *         return <tuple>d.subarray.shape\n *     else:\n */\n  }\n\n  /* \"../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd\":754\n *         return <tuple>d.subarray.shape\n *     else:\n *         return ()             # <<<<<<<<<<<<<<\n * \n * \n */\n  /*else*/ {\n    __Pyx_XDECREF(__pyx_r);\n    __Pyx_INCREF(__pyx_empty_tuple);\n    __pyx_r = __pyx_empty_tuple;\n    goto __pyx_L0;\n  }\n\n  /* \"../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd\":750\n *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)\n * \n * cdef inline tuple PyDataType_SHAPE(dtype d):             # <<<<<<<<<<<<<<\n *     if PyDataType_HASSUBARRAY(d):\n *         return <tuple>d.subarray.shape\n */\n\n  /* function exit code */\n  __pyx_L0:;\n  __Pyx_XGIVEREF(__pyx_r);\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\n/* \"../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd\":929\n *     int _import_umath() except -1\n * \n * cdef inline void set_array_base(ndarray arr, object base):             # <<<<<<<<<<<<<<\n *     Py_INCREF(base) # important to do this before stealing the reference below!\n *     PyArray_SetBaseObject(arr, base)\n */\n\nstatic CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_base) {\n  __Pyx_RefNannyDeclarations\n  __Pyx_RefNannySetupContext(\"set_array_base\", 0);\n\n  /* \"../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd\":930\n * \n * cdef inline void set_array_base(ndarray arr, object base):\n *     Py_INCREF(base) # important to do this before stealing the reference below!             # <<<<<<<<<<<<<<\n *     PyArray_SetBaseObject(arr, base)\n * \n */\n  Py_INCREF(__pyx_v_base);\n\n  /* \"../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd\":931\n * cdef inline void set_array_base(ndarray arr, object base):\n *     Py_INCREF(base) # important to do this before stealing the reference below!\n *     PyArray_SetBaseObject(arr, base)             # <<<<<<<<<<<<<<\n * \n * cdef inline object get_array_base(ndarray arr):\n */\n  (void)(PyArray_SetBaseObject(__pyx_v_arr, __pyx_v_base));\n\n  /* \"../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd\":929\n *     int _import_umath() except -1\n * \n * cdef inline void set_array_base(ndarray arr, object base):             # <<<<<<<<<<<<<<\n *     Py_INCREF(base) # important to do this before stealing the reference below!\n *     PyArray_SetBaseObject(arr, base)\n */\n\n  /* function exit code */\n  __Pyx_RefNannyFinishContext();\n}\n\n/* \"../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd\":933\n *     PyArray_SetBaseObject(arr, base)\n * \n * cdef inline object get_array_base(ndarray arr):             # <<<<<<<<<<<<<<\n *     base = PyArray_BASE(arr)\n *     if base is NULL:\n */\n\nstatic CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__pyx_v_arr) {\n  PyObject *__pyx_v_base;\n  PyObject *__pyx_r = NULL;\n  __Pyx_RefNannyDeclarations\n  int __pyx_t_1;\n  __Pyx_RefNannySetupContext(\"get_array_base\", 0);\n\n  /* \"../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd\":934\n * \n * cdef inline object get_array_base(ndarray arr):\n *     base = PyArray_BASE(arr)             # <<<<<<<<<<<<<<\n *     if base is NULL:\n *         return None\n */\n  __pyx_v_base = PyArray_BASE(__pyx_v_arr);\n\n  /* \"../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd\":935\n * cdef inline object get_array_base(ndarray arr):\n *     base = PyArray_BASE(arr)\n *     if base is NULL:             # <<<<<<<<<<<<<<\n *         return None\n *     return <object>base\n */\n  __pyx_t_1 = ((__pyx_v_base == NULL) != 0);\n  if (__pyx_t_1) {\n\n    /* \"../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd\":936\n *     base = PyArray_BASE(arr)\n *     if base is NULL:\n *         return None             # <<<<<<<<<<<<<<\n *     return <object>base\n * \n */\n    __Pyx_XDECREF(__pyx_r);\n    __pyx_r = Py_None; __Pyx_INCREF(Py_None);\n    goto __pyx_L0;\n\n    /* \"../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd\":935\n * cdef inline object get_array_base(ndarray arr):\n *     base = PyArray_BASE(arr)\n *     if base is NULL:             # <<<<<<<<<<<<<<\n *         return None\n *     return <object>base\n */\n  }\n\n  /* \"../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd\":937\n *     if base is NULL:\n *         return None\n *     return <object>base             # <<<<<<<<<<<<<<\n * \n * # Versions of the import_* functions which are more suitable for\n */\n  __Pyx_XDECREF(__pyx_r);\n  __Pyx_INCREF(((PyObject *)__pyx_v_base));\n  __pyx_r = ((PyObject *)__pyx_v_base);\n  goto __pyx_L0;\n\n  /* \"../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd\":933\n *     PyArray_SetBaseObject(arr, base)\n * \n * cdef inline object get_array_base(ndarray arr):             # <<<<<<<<<<<<<<\n *     base = PyArray_BASE(arr)\n *     if base is NULL:\n */\n\n  /* function exit code */\n  __pyx_L0:;\n  __Pyx_XGIVEREF(__pyx_r);\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\n/* \"../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd\":941\n * # Versions of the import_* functions which are more suitable for\n * # Cython code.\n * cdef inline int import_array() except -1:             # <<<<<<<<<<<<<<\n *     try:\n *         __pyx_import_array()\n */\n\nstatic CYTHON_INLINE int __pyx_f_5numpy_import_array(void) {\n  int __pyx_r;\n  __Pyx_RefNannyDeclarations\n  PyObject *__pyx_t_1 = NULL;\n  PyObject *__pyx_t_2 = NULL;\n  PyObject *__pyx_t_3 = NULL;\n  int __pyx_t_4;\n  PyObject *__pyx_t_5 = NULL;\n  PyObject *__pyx_t_6 = NULL;\n  PyObject *__pyx_t_7 = NULL;\n  PyObject *__pyx_t_8 = NULL;\n  int __pyx_lineno = 0;\n  const char *__pyx_filename = NULL;\n  int __pyx_clineno = 0;\n  __Pyx_RefNannySetupContext(\"import_array\", 0);\n\n  /* \"../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd\":942\n * # Cython code.\n * cdef inline int import_array() except -1:\n *     try:             # <<<<<<<<<<<<<<\n *         __pyx_import_array()\n *     except Exception:\n */\n  {\n    __Pyx_PyThreadState_declare\n    __Pyx_PyThreadState_assign\n    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);\n    __Pyx_XGOTREF(__pyx_t_1);\n    __Pyx_XGOTREF(__pyx_t_2);\n    __Pyx_XGOTREF(__pyx_t_3);\n    /*try:*/ {\n\n      /* \"../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd\":943\n * cdef inline int import_array() except -1:\n *     try:\n *         __pyx_import_array()             # <<<<<<<<<<<<<<\n *     except Exception:\n *         raise ImportError(\"numpy.core.multiarray failed to import\")\n */\n      __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 943, __pyx_L3_error)\n\n      /* \"../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd\":942\n * # Cython code.\n * cdef inline int import_array() except -1:\n *     try:             # <<<<<<<<<<<<<<\n *         __pyx_import_array()\n *     except Exception:\n */\n    }\n    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;\n    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;\n    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;\n    goto __pyx_L8_try_end;\n    __pyx_L3_error:;\n\n    /* \"../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd\":944\n *     try:\n *         __pyx_import_array()\n *     except Exception:             # <<<<<<<<<<<<<<\n *         raise ImportError(\"numpy.core.multiarray failed to import\")\n * \n */\n    __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));\n    if (__pyx_t_4) {\n      __Pyx_AddTraceback(\"numpy.import_array\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n      if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 944, __pyx_L5_except_error)\n      __Pyx_GOTREF(__pyx_t_5);\n      __Pyx_GOTREF(__pyx_t_6);\n      __Pyx_GOTREF(__pyx_t_7);\n\n      /* \"../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd\":945\n *         __pyx_import_array()\n *     except Exception:\n *         raise ImportError(\"numpy.core.multiarray failed to import\")             # <<<<<<<<<<<<<<\n * \n * cdef inline int import_umath() except -1:\n */\n      __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 945, __pyx_L5_except_error)\n      __Pyx_GOTREF(__pyx_t_8);\n      __Pyx_Raise(__pyx_t_8, 0, 0, 0);\n      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;\n      __PYX_ERR(2, 945, __pyx_L5_except_error)\n    }\n    goto __pyx_L5_except_error;\n    __pyx_L5_except_error:;\n\n    /* \"../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd\":942\n * # Cython code.\n * cdef inline int import_array() except -1:\n *     try:             # <<<<<<<<<<<<<<\n *         __pyx_import_array()\n *     except Exception:\n */\n    __Pyx_XGIVEREF(__pyx_t_1);\n    __Pyx_XGIVEREF(__pyx_t_2);\n    __Pyx_XGIVEREF(__pyx_t_3);\n    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);\n    goto __pyx_L1_error;\n    __pyx_L8_try_end:;\n  }\n\n  /* \"../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd\":941\n * # Versions of the import_* functions which are more suitable for\n * # Cython code.\n * cdef inline int import_array() except -1:             # <<<<<<<<<<<<<<\n *     try:\n *         __pyx_import_array()\n */\n\n  /* function exit code */\n  __pyx_r = 0;\n  goto __pyx_L0;\n  __pyx_L1_error:;\n  __Pyx_XDECREF(__pyx_t_5);\n  __Pyx_XDECREF(__pyx_t_6);\n  __Pyx_XDECREF(__pyx_t_7);\n  __Pyx_XDECREF(__pyx_t_8);\n  __Pyx_AddTraceback(\"numpy.import_array\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n  __pyx_r = -1;\n  __pyx_L0:;\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\n/* \"../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd\":947\n *         raise ImportError(\"numpy.core.multiarray failed to import\")\n * \n * cdef inline int import_umath() except -1:             # <<<<<<<<<<<<<<\n *     try:\n *         _import_umath()\n */\n\nstatic CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) {\n  int __pyx_r;\n  __Pyx_RefNannyDeclarations\n  PyObject *__pyx_t_1 = NULL;\n  PyObject *__pyx_t_2 = NULL;\n  PyObject *__pyx_t_3 = NULL;\n  int __pyx_t_4;\n  PyObject *__pyx_t_5 = NULL;\n  PyObject *__pyx_t_6 = NULL;\n  PyObject *__pyx_t_7 = NULL;\n  PyObject *__pyx_t_8 = NULL;\n  int __pyx_lineno = 0;\n  const char *__pyx_filename = NULL;\n  int __pyx_clineno = 0;\n  __Pyx_RefNannySetupContext(\"import_umath\", 0);\n\n  /* \"../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd\":948\n * \n * cdef inline int import_umath() except -1:\n *     try:             # <<<<<<<<<<<<<<\n *         _import_umath()\n *     except Exception:\n */\n  {\n    __Pyx_PyThreadState_declare\n    __Pyx_PyThreadState_assign\n    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);\n    __Pyx_XGOTREF(__pyx_t_1);\n    __Pyx_XGOTREF(__pyx_t_2);\n    __Pyx_XGOTREF(__pyx_t_3);\n    /*try:*/ {\n\n      /* \"../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd\":949\n * cdef inline int import_umath() except -1:\n *     try:\n *         _import_umath()             # <<<<<<<<<<<<<<\n *     except Exception:\n *         raise ImportError(\"numpy.core.umath failed to import\")\n */\n      __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 949, __pyx_L3_error)\n\n      /* \"../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd\":948\n * \n * cdef inline int import_umath() except -1:\n *     try:             # <<<<<<<<<<<<<<\n *         _import_umath()\n *     except Exception:\n */\n    }\n    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;\n    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;\n    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;\n    goto __pyx_L8_try_end;\n    __pyx_L3_error:;\n\n    /* \"../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd\":950\n *     try:\n *         _import_umath()\n *     except Exception:             # <<<<<<<<<<<<<<\n *         raise ImportError(\"numpy.core.umath failed to import\")\n * \n */\n    __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));\n    if (__pyx_t_4) {\n      __Pyx_AddTraceback(\"numpy.import_umath\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n      if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 950, __pyx_L5_except_error)\n      __Pyx_GOTREF(__pyx_t_5);\n      __Pyx_GOTREF(__pyx_t_6);\n      __Pyx_GOTREF(__pyx_t_7);\n\n      /* \"../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd\":951\n *         _import_umath()\n *     except Exception:\n *         raise ImportError(\"numpy.core.umath failed to import\")             # <<<<<<<<<<<<<<\n * \n * cdef inline int import_ufunc() except -1:\n */\n      __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 951, __pyx_L5_except_error)\n      __Pyx_GOTREF(__pyx_t_8);\n      __Pyx_Raise(__pyx_t_8, 0, 0, 0);\n      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;\n      __PYX_ERR(2, 951, __pyx_L5_except_error)\n    }\n    goto __pyx_L5_except_error;\n    __pyx_L5_except_error:;\n\n    /* \"../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd\":948\n * \n * cdef inline int import_umath() except -1:\n *     try:             # <<<<<<<<<<<<<<\n *         _import_umath()\n *     except Exception:\n */\n    __Pyx_XGIVEREF(__pyx_t_1);\n    __Pyx_XGIVEREF(__pyx_t_2);\n    __Pyx_XGIVEREF(__pyx_t_3);\n    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);\n    goto __pyx_L1_error;\n    __pyx_L8_try_end:;\n  }\n\n  /* \"../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd\":947\n *         raise ImportError(\"numpy.core.multiarray failed to import\")\n * \n * cdef inline int import_umath() except -1:             # <<<<<<<<<<<<<<\n *     try:\n *         _import_umath()\n */\n\n  /* function exit code */\n  __pyx_r = 0;\n  goto __pyx_L0;\n  __pyx_L1_error:;\n  __Pyx_XDECREF(__pyx_t_5);\n  __Pyx_XDECREF(__pyx_t_6);\n  __Pyx_XDECREF(__pyx_t_7);\n  __Pyx_XDECREF(__pyx_t_8);\n  __Pyx_AddTraceback(\"numpy.import_umath\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n  __pyx_r = -1;\n  __pyx_L0:;\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\n/* \"../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd\":953\n *         raise ImportError(\"numpy.core.umath failed to import\")\n * \n * cdef inline int import_ufunc() except -1:             # <<<<<<<<<<<<<<\n *     try:\n *         _import_umath()\n */\n\nstatic CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) {\n  int __pyx_r;\n  __Pyx_RefNannyDeclarations\n  PyObject *__pyx_t_1 = NULL;\n  PyObject *__pyx_t_2 = NULL;\n  PyObject *__pyx_t_3 = NULL;\n  int __pyx_t_4;\n  PyObject *__pyx_t_5 = NULL;\n  PyObject *__pyx_t_6 = NULL;\n  PyObject *__pyx_t_7 = NULL;\n  PyObject *__pyx_t_8 = NULL;\n  int __pyx_lineno = 0;\n  const char *__pyx_filename = NULL;\n  int __pyx_clineno = 0;\n  __Pyx_RefNannySetupContext(\"import_ufunc\", 0);\n\n  /* \"../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd\":954\n * \n * cdef inline int import_ufunc() except -1:\n *     try:             # <<<<<<<<<<<<<<\n *         _import_umath()\n *     except Exception:\n */\n  {\n    __Pyx_PyThreadState_declare\n    __Pyx_PyThreadState_assign\n    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);\n    __Pyx_XGOTREF(__pyx_t_1);\n    __Pyx_XGOTREF(__pyx_t_2);\n    __Pyx_XGOTREF(__pyx_t_3);\n    /*try:*/ {\n\n      /* \"../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd\":955\n * cdef inline int import_ufunc() except -1:\n *     try:\n *         _import_umath()             # <<<<<<<<<<<<<<\n *     except Exception:\n *         raise ImportError(\"numpy.core.umath failed to import\")\n */\n      __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 955, __pyx_L3_error)\n\n      /* \"../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd\":954\n * \n * cdef inline int import_ufunc() except -1:\n *     try:             # <<<<<<<<<<<<<<\n *         _import_umath()\n *     except Exception:\n */\n    }\n    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;\n    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;\n    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;\n    goto __pyx_L8_try_end;\n    __pyx_L3_error:;\n\n    /* \"../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd\":956\n *     try:\n *         _import_umath()\n *     except Exception:             # <<<<<<<<<<<<<<\n *         raise ImportError(\"numpy.core.umath failed to import\")\n * \n */\n    __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));\n    if (__pyx_t_4) {\n      __Pyx_AddTraceback(\"numpy.import_ufunc\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n      if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 956, __pyx_L5_except_error)\n      __Pyx_GOTREF(__pyx_t_5);\n      __Pyx_GOTREF(__pyx_t_6);\n      __Pyx_GOTREF(__pyx_t_7);\n\n      /* \"../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd\":957\n *         _import_umath()\n *     except Exception:\n *         raise ImportError(\"numpy.core.umath failed to import\")             # <<<<<<<<<<<<<<\n * \n * cdef extern from *:\n */\n      __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 957, __pyx_L5_except_error)\n      __Pyx_GOTREF(__pyx_t_8);\n      __Pyx_Raise(__pyx_t_8, 0, 0, 0);\n      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;\n      __PYX_ERR(2, 957, __pyx_L5_except_error)\n    }\n    goto __pyx_L5_except_error;\n    __pyx_L5_except_error:;\n\n    /* \"../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd\":954\n * \n * cdef inline int import_ufunc() except -1:\n *     try:             # <<<<<<<<<<<<<<\n *         _import_umath()\n *     except Exception:\n */\n    __Pyx_XGIVEREF(__pyx_t_1);\n    __Pyx_XGIVEREF(__pyx_t_2);\n    __Pyx_XGIVEREF(__pyx_t_3);\n    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);\n    goto __pyx_L1_error;\n    __pyx_L8_try_end:;\n  }\n\n  /* \"../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd\":953\n *         raise ImportError(\"numpy.core.umath failed to import\")\n * \n * cdef inline int import_ufunc() except -1:             # <<<<<<<<<<<<<<\n *     try:\n *         _import_umath()\n */\n\n  /* function exit code */\n  __pyx_r = 0;\n  goto __pyx_L0;\n  __pyx_L1_error:;\n  __Pyx_XDECREF(__pyx_t_5);\n  __Pyx_XDECREF(__pyx_t_6);\n  __Pyx_XDECREF(__pyx_t_7);\n  __Pyx_XDECREF(__pyx_t_8);\n  __Pyx_AddTraceback(\"numpy.import_ufunc\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n  __pyx_r = -1;\n  __pyx_L0:;\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\n/* \"../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd\":967\n * \n * \n * cdef inline bint is_timedelta64_object(object obj):             # <<<<<<<<<<<<<<\n *     \"\"\"\n *     Cython equivalent of `isinstance(obj, np.timedelta64)`\n */\n\nstatic CYTHON_INLINE int __pyx_f_5numpy_is_timedelta64_object(PyObject *__pyx_v_obj) {\n  int __pyx_r;\n  __Pyx_RefNannyDeclarations\n  __Pyx_RefNannySetupContext(\"is_timedelta64_object\", 0);\n\n  /* \"../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd\":979\n *     bool\n *     \"\"\"\n *     return PyObject_TypeCheck(obj, &PyTimedeltaArrType_Type)             # <<<<<<<<<<<<<<\n * \n * \n */\n  __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyTimedeltaArrType_Type));\n  goto __pyx_L0;\n\n  /* \"../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd\":967\n * \n * \n * cdef inline bint is_timedelta64_object(object obj):             # <<<<<<<<<<<<<<\n *     \"\"\"\n *     Cython equivalent of `isinstance(obj, np.timedelta64)`\n */\n\n  /* function exit code */\n  __pyx_L0:;\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\n/* \"../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd\":982\n * \n * \n * cdef inline bint is_datetime64_object(object obj):             # <<<<<<<<<<<<<<\n *     \"\"\"\n *     Cython equivalent of `isinstance(obj, np.datetime64)`\n */\n\nstatic CYTHON_INLINE int __pyx_f_5numpy_is_datetime64_object(PyObject *__pyx_v_obj) {\n  int __pyx_r;\n  __Pyx_RefNannyDeclarations\n  __Pyx_RefNannySetupContext(\"is_datetime64_object\", 0);\n\n  /* \"../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd\":994\n *     bool\n *     \"\"\"\n *     return PyObject_TypeCheck(obj, &PyDatetimeArrType_Type)             # <<<<<<<<<<<<<<\n * \n * \n */\n  __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyDatetimeArrType_Type));\n  goto __pyx_L0;\n\n  /* \"../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd\":982\n * \n * \n * cdef inline bint is_datetime64_object(object obj):             # <<<<<<<<<<<<<<\n *     \"\"\"\n *     Cython equivalent of `isinstance(obj, np.datetime64)`\n */\n\n  /* function exit code */\n  __pyx_L0:;\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\n/* \"../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd\":997\n * \n * \n * cdef inline npy_datetime get_datetime64_value(object obj) nogil:             # <<<<<<<<<<<<<<\n *     \"\"\"\n *     returns the int64 value underlying scalar numpy datetime64 object\n */\n\nstatic CYTHON_INLINE npy_datetime __pyx_f_5numpy_get_datetime64_value(PyObject *__pyx_v_obj) {\n  npy_datetime __pyx_r;\n\n  /* \"../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd\":1004\n *     also needed.  That can be found using `get_datetime64_unit`.\n *     \"\"\"\n *     return (<PyDatetimeScalarObject*>obj).obval             # <<<<<<<<<<<<<<\n * \n * \n */\n  __pyx_r = ((PyDatetimeScalarObject *)__pyx_v_obj)->obval;\n  goto __pyx_L0;\n\n  /* \"../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd\":997\n * \n * \n * cdef inline npy_datetime get_datetime64_value(object obj) nogil:             # <<<<<<<<<<<<<<\n *     \"\"\"\n *     returns the int64 value underlying scalar numpy datetime64 object\n */\n\n  /* function exit code */\n  __pyx_L0:;\n  return __pyx_r;\n}\n\n/* \"../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd\":1007\n * \n * \n * cdef inline npy_timedelta get_timedelta64_value(object obj) nogil:             # <<<<<<<<<<<<<<\n *     \"\"\"\n *     returns the int64 value underlying scalar numpy timedelta64 object\n */\n\nstatic CYTHON_INLINE npy_timedelta __pyx_f_5numpy_get_timedelta64_value(PyObject *__pyx_v_obj) {\n  npy_timedelta __pyx_r;\n\n  /* \"../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd\":1011\n *     returns the int64 value underlying scalar numpy timedelta64 object\n *     \"\"\"\n *     return (<PyTimedeltaScalarObject*>obj).obval             # <<<<<<<<<<<<<<\n * \n * \n */\n  __pyx_r = ((PyTimedeltaScalarObject *)__pyx_v_obj)->obval;\n  goto __pyx_L0;\n\n  /* \"../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd\":1007\n * \n * \n * cdef inline npy_timedelta get_timedelta64_value(object obj) nogil:             # <<<<<<<<<<<<<<\n *     \"\"\"\n *     returns the int64 value underlying scalar numpy timedelta64 object\n */\n\n  /* function exit code */\n  __pyx_L0:;\n  return __pyx_r;\n}\n\n/* \"../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd\":1014\n * \n * \n * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil:             # <<<<<<<<<<<<<<\n *     \"\"\"\n *     returns the unit part of the dtype for a numpy datetime64 object.\n */\n\nstatic CYTHON_INLINE NPY_DATETIMEUNIT __pyx_f_5numpy_get_datetime64_unit(PyObject *__pyx_v_obj) {\n  NPY_DATETIMEUNIT __pyx_r;\n\n  /* \"../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd\":1018\n *     returns the unit part of the dtype for a numpy datetime64 object.\n *     \"\"\"\n *     return <NPY_DATETIMEUNIT>(<PyDatetimeScalarObject*>obj).obmeta.base             # <<<<<<<<<<<<<<\n */\n  __pyx_r = ((NPY_DATETIMEUNIT)((PyDatetimeScalarObject *)__pyx_v_obj)->obmeta.base);\n  goto __pyx_L0;\n\n  /* \"../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd\":1014\n * \n * \n * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil:             # <<<<<<<<<<<<<<\n *     \"\"\"\n *     returns the unit part of the dtype for a numpy datetime64 object.\n */\n\n  /* function exit code */\n  __pyx_L0:;\n  return __pyx_r;\n}\n\n/* \"View.MemoryView\":122\n *         cdef bint dtype_is_object\n * \n *     def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None,             # <<<<<<<<<<<<<<\n *                   mode=\"c\", bint allocate_buffer=True):\n * \n */\n\n/* Python wrapper */\nstatic int __pyx_array___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/\nstatic int __pyx_array___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {\n  PyObject *__pyx_v_shape = 0;\n  Py_ssize_t __pyx_v_itemsize;\n  PyObject *__pyx_v_format = 0;\n  PyObject *__pyx_v_mode = 0;\n  int __pyx_v_allocate_buffer;\n  int __pyx_lineno = 0;\n  const char *__pyx_filename = NULL;\n  int __pyx_clineno = 0;\n  int __pyx_r;\n  __Pyx_RefNannyDeclarations\n  __Pyx_RefNannySetupContext(\"__cinit__ (wrapper)\", 0);\n  {\n    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_shape,&__pyx_n_s_itemsize,&__pyx_n_s_format,&__pyx_n_s_mode,&__pyx_n_s_allocate_buffer,0};\n    PyObject* values[5] = {0,0,0,0,0};\n    values[3] = ((PyObject *)__pyx_n_s_c);\n    if (unlikely(__pyx_kwds)) {\n      Py_ssize_t kw_args;\n      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);\n      switch (pos_args) {\n        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);\n        CYTHON_FALLTHROUGH;\n        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);\n        CYTHON_FALLTHROUGH;\n        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);\n        CYTHON_FALLTHROUGH;\n        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);\n        CYTHON_FALLTHROUGH;\n        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);\n        CYTHON_FALLTHROUGH;\n        case  0: break;\n        default: goto __pyx_L5_argtuple_error;\n      }\n      kw_args = PyDict_Size(__pyx_kwds);\n      switch (pos_args) {\n        case  0:\n        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_shape)) != 0)) kw_args--;\n        else goto __pyx_L5_argtuple_error;\n        CYTHON_FALLTHROUGH;\n        case  1:\n        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_itemsize)) != 0)) kw_args--;\n        else {\n          __Pyx_RaiseArgtupleInvalid(\"__cinit__\", 0, 3, 5, 1); __PYX_ERR(1, 122, __pyx_L3_error)\n        }\n        CYTHON_FALLTHROUGH;\n        case  2:\n        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_format)) != 0)) kw_args--;\n        else {\n          __Pyx_RaiseArgtupleInvalid(\"__cinit__\", 0, 3, 5, 2); __PYX_ERR(1, 122, __pyx_L3_error)\n        }\n        CYTHON_FALLTHROUGH;\n        case  3:\n        if (kw_args > 0) {\n          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mode);\n          if (value) { values[3] = value; kw_args--; }\n        }\n        CYTHON_FALLTHROUGH;\n        case  4:\n        if (kw_args > 0) {\n          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_allocate_buffer);\n          if (value) { values[4] = value; kw_args--; }\n        }\n      }\n      if (unlikely(kw_args > 0)) {\n        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, \"__cinit__\") < 0)) __PYX_ERR(1, 122, __pyx_L3_error)\n      }\n    } else {\n      switch (PyTuple_GET_SIZE(__pyx_args)) {\n        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);\n        CYTHON_FALLTHROUGH;\n        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);\n        CYTHON_FALLTHROUGH;\n        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);\n        values[1] = PyTuple_GET_ITEM(__pyx_args, 1);\n        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);\n        break;\n        default: goto __pyx_L5_argtuple_error;\n      }\n    }\n    __pyx_v_shape = ((PyObject*)values[0]);\n    __pyx_v_itemsize = __Pyx_PyIndex_AsSsize_t(values[1]); if (unlikely((__pyx_v_itemsize == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 122, __pyx_L3_error)\n    __pyx_v_format = values[2];\n    __pyx_v_mode = values[3];\n    if (values[4]) {\n      __pyx_v_allocate_buffer = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_allocate_buffer == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 123, __pyx_L3_error)\n    } else {\n\n      /* \"View.MemoryView\":123\n * \n *     def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None,\n *                   mode=\"c\", bint allocate_buffer=True):             # <<<<<<<<<<<<<<\n * \n *         cdef int idx\n */\n      __pyx_v_allocate_buffer = ((int)1);\n    }\n  }\n  goto __pyx_L4_argument_unpacking_done;\n  __pyx_L5_argtuple_error:;\n  __Pyx_RaiseArgtupleInvalid(\"__cinit__\", 0, 3, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 122, __pyx_L3_error)\n  __pyx_L3_error:;\n  __Pyx_AddTraceback(\"View.MemoryView.array.__cinit__\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n  __Pyx_RefNannyFinishContext();\n  return -1;\n  __pyx_L4_argument_unpacking_done:;\n  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_shape), (&PyTuple_Type), 1, \"shape\", 1))) __PYX_ERR(1, 122, __pyx_L1_error)\n  if (unlikely(((PyObject *)__pyx_v_format) == Py_None)) {\n    PyErr_Format(PyExc_TypeError, \"Argument '%.200s' must not be None\", \"format\"); __PYX_ERR(1, 122, __pyx_L1_error)\n  }\n  __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(((struct __pyx_array_obj *)__pyx_v_self), __pyx_v_shape, __pyx_v_itemsize, __pyx_v_format, __pyx_v_mode, __pyx_v_allocate_buffer);\n\n  /* \"View.MemoryView\":122\n *         cdef bint dtype_is_object\n * \n *     def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None,             # <<<<<<<<<<<<<<\n *                   mode=\"c\", bint allocate_buffer=True):\n * \n */\n\n  /* function exit code */\n  goto __pyx_L0;\n  __pyx_L1_error:;\n  __pyx_r = -1;\n  __pyx_L0:;\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\nstatic int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_shape, Py_ssize_t __pyx_v_itemsize, PyObject *__pyx_v_format, PyObject *__pyx_v_mode, int __pyx_v_allocate_buffer) {\n  int __pyx_v_idx;\n  Py_ssize_t __pyx_v_i;\n  Py_ssize_t __pyx_v_dim;\n  PyObject **__pyx_v_p;\n  char __pyx_v_order;\n  int __pyx_r;\n  __Pyx_RefNannyDeclarations\n  Py_ssize_t __pyx_t_1;\n  int __pyx_t_2;\n  PyObject *__pyx_t_3 = NULL;\n  int __pyx_t_4;\n  PyObject *__pyx_t_5 = NULL;\n  PyObject *__pyx_t_6 = NULL;\n  char *__pyx_t_7;\n  int __pyx_t_8;\n  Py_ssize_t __pyx_t_9;\n  PyObject *__pyx_t_10 = NULL;\n  Py_ssize_t __pyx_t_11;\n  int __pyx_lineno = 0;\n  const char *__pyx_filename = NULL;\n  int __pyx_clineno = 0;\n  __Pyx_RefNannySetupContext(\"__cinit__\", 0);\n  __Pyx_INCREF(__pyx_v_format);\n\n  /* \"View.MemoryView\":129\n *         cdef PyObject **p\n * \n *         self.ndim = <int> len(shape)             # <<<<<<<<<<<<<<\n *         self.itemsize = itemsize\n * \n */\n  if (unlikely(__pyx_v_shape == Py_None)) {\n    PyErr_SetString(PyExc_TypeError, \"object of type 'NoneType' has no len()\");\n    __PYX_ERR(1, 129, __pyx_L1_error)\n  }\n  __pyx_t_1 = PyTuple_GET_SIZE(__pyx_v_shape); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(1, 129, __pyx_L1_error)\n  __pyx_v_self->ndim = ((int)__pyx_t_1);\n\n  /* \"View.MemoryView\":130\n * \n *         self.ndim = <int> len(shape)\n *         self.itemsize = itemsize             # <<<<<<<<<<<<<<\n * \n *         if not self.ndim:\n */\n  __pyx_v_self->itemsize = __pyx_v_itemsize;\n\n  /* \"View.MemoryView\":132\n *         self.itemsize = itemsize\n * \n *         if not self.ndim:             # <<<<<<<<<<<<<<\n *             raise ValueError(\"Empty shape tuple for cython.array\")\n * \n */\n  __pyx_t_2 = ((!(__pyx_v_self->ndim != 0)) != 0);\n  if (unlikely(__pyx_t_2)) {\n\n    /* \"View.MemoryView\":133\n * \n *         if not self.ndim:\n *             raise ValueError(\"Empty shape tuple for cython.array\")             # <<<<<<<<<<<<<<\n * \n *         if itemsize <= 0:\n */\n    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__16, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 133, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_3);\n    __Pyx_Raise(__pyx_t_3, 0, 0, 0);\n    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;\n    __PYX_ERR(1, 133, __pyx_L1_error)\n\n    /* \"View.MemoryView\":132\n *         self.itemsize = itemsize\n * \n *         if not self.ndim:             # <<<<<<<<<<<<<<\n *             raise ValueError(\"Empty shape tuple for cython.array\")\n * \n */\n  }\n\n  /* \"View.MemoryView\":135\n *             raise ValueError(\"Empty shape tuple for cython.array\")\n * \n *         if itemsize <= 0:             # <<<<<<<<<<<<<<\n *             raise ValueError(\"itemsize <= 0 for cython.array\")\n * \n */\n  __pyx_t_2 = ((__pyx_v_itemsize <= 0) != 0);\n  if (unlikely(__pyx_t_2)) {\n\n    /* \"View.MemoryView\":136\n * \n *         if itemsize <= 0:\n *             raise ValueError(\"itemsize <= 0 for cython.array\")             # <<<<<<<<<<<<<<\n * \n *         if not isinstance(format, bytes):\n */\n    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__17, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 136, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_3);\n    __Pyx_Raise(__pyx_t_3, 0, 0, 0);\n    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;\n    __PYX_ERR(1, 136, __pyx_L1_error)\n\n    /* \"View.MemoryView\":135\n *             raise ValueError(\"Empty shape tuple for cython.array\")\n * \n *         if itemsize <= 0:             # <<<<<<<<<<<<<<\n *             raise ValueError(\"itemsize <= 0 for cython.array\")\n * \n */\n  }\n\n  /* \"View.MemoryView\":138\n *             raise ValueError(\"itemsize <= 0 for cython.array\")\n * \n *         if not isinstance(format, bytes):             # <<<<<<<<<<<<<<\n *             format = format.encode('ASCII')\n *         self._format = format  # keep a reference to the byte string\n */\n  __pyx_t_2 = PyBytes_Check(__pyx_v_format); \n  __pyx_t_4 = ((!(__pyx_t_2 != 0)) != 0);\n  if (__pyx_t_4) {\n\n    /* \"View.MemoryView\":139\n * \n *         if not isinstance(format, bytes):\n *             format = format.encode('ASCII')             # <<<<<<<<<<<<<<\n *         self._format = format  # keep a reference to the byte string\n *         self.format = self._format\n */\n    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_format, __pyx_n_s_encode); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 139, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_5);\n    __pyx_t_6 = NULL;\n    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {\n      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);\n      if (likely(__pyx_t_6)) {\n        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);\n        __Pyx_INCREF(__pyx_t_6);\n        __Pyx_INCREF(function);\n        __Pyx_DECREF_SET(__pyx_t_5, function);\n      }\n    }\n    __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_n_s_ASCII) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_n_s_ASCII);\n    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;\n    if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 139, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_3);\n    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;\n    __Pyx_DECREF_SET(__pyx_v_format, __pyx_t_3);\n    __pyx_t_3 = 0;\n\n    /* \"View.MemoryView\":138\n *             raise ValueError(\"itemsize <= 0 for cython.array\")\n * \n *         if not isinstance(format, bytes):             # <<<<<<<<<<<<<<\n *             format = format.encode('ASCII')\n *         self._format = format  # keep a reference to the byte string\n */\n  }\n\n  /* \"View.MemoryView\":140\n *         if not isinstance(format, bytes):\n *             format = format.encode('ASCII')\n *         self._format = format  # keep a reference to the byte string             # <<<<<<<<<<<<<<\n *         self.format = self._format\n * \n */\n  if (!(likely(PyBytes_CheckExact(__pyx_v_format))||((__pyx_v_format) == Py_None)||(PyErr_Format(PyExc_TypeError, \"Expected %.16s, got %.200s\", \"bytes\", Py_TYPE(__pyx_v_format)->tp_name), 0))) __PYX_ERR(1, 140, __pyx_L1_error)\n  __pyx_t_3 = __pyx_v_format;\n  __Pyx_INCREF(__pyx_t_3);\n  __Pyx_GIVEREF(__pyx_t_3);\n  __Pyx_GOTREF(__pyx_v_self->_format);\n  __Pyx_DECREF(__pyx_v_self->_format);\n  __pyx_v_self->_format = ((PyObject*)__pyx_t_3);\n  __pyx_t_3 = 0;\n\n  /* \"View.MemoryView\":141\n *             format = format.encode('ASCII')\n *         self._format = format  # keep a reference to the byte string\n *         self.format = self._format             # <<<<<<<<<<<<<<\n * \n * \n */\n  if (unlikely(__pyx_v_self->_format == Py_None)) {\n    PyErr_SetString(PyExc_TypeError, \"expected bytes, NoneType found\");\n    __PYX_ERR(1, 141, __pyx_L1_error)\n  }\n  __pyx_t_7 = __Pyx_PyBytes_AsWritableString(__pyx_v_self->_format); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(1, 141, __pyx_L1_error)\n  __pyx_v_self->format = __pyx_t_7;\n\n  /* \"View.MemoryView\":144\n * \n * \n *         self._shape = <Py_ssize_t *> PyObject_Malloc(sizeof(Py_ssize_t)*self.ndim*2)             # <<<<<<<<<<<<<<\n *         self._strides = self._shape + self.ndim\n * \n */\n  __pyx_v_self->_shape = ((Py_ssize_t *)PyObject_Malloc((((sizeof(Py_ssize_t)) * __pyx_v_self->ndim) * 2)));\n\n  /* \"View.MemoryView\":145\n * \n *         self._shape = <Py_ssize_t *> PyObject_Malloc(sizeof(Py_ssize_t)*self.ndim*2)\n *         self._strides = self._shape + self.ndim             # <<<<<<<<<<<<<<\n * \n *         if not self._shape:\n */\n  __pyx_v_self->_strides = (__pyx_v_self->_shape + __pyx_v_self->ndim);\n\n  /* \"View.MemoryView\":147\n *         self._strides = self._shape + self.ndim\n * \n *         if not self._shape:             # <<<<<<<<<<<<<<\n *             raise MemoryError(\"unable to allocate shape and strides.\")\n * \n */\n  __pyx_t_4 = ((!(__pyx_v_self->_shape != 0)) != 0);\n  if (unlikely(__pyx_t_4)) {\n\n    /* \"View.MemoryView\":148\n * \n *         if not self._shape:\n *             raise MemoryError(\"unable to allocate shape and strides.\")             # <<<<<<<<<<<<<<\n * \n * \n */\n    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_MemoryError, __pyx_tuple__18, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 148, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_3);\n    __Pyx_Raise(__pyx_t_3, 0, 0, 0);\n    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;\n    __PYX_ERR(1, 148, __pyx_L1_error)\n\n    /* \"View.MemoryView\":147\n *         self._strides = self._shape + self.ndim\n * \n *         if not self._shape:             # <<<<<<<<<<<<<<\n *             raise MemoryError(\"unable to allocate shape and strides.\")\n * \n */\n  }\n\n  /* \"View.MemoryView\":151\n * \n * \n *         for idx, dim in enumerate(shape):             # <<<<<<<<<<<<<<\n *             if dim <= 0:\n *                 raise ValueError(\"Invalid shape in axis %d: %d.\" % (idx, dim))\n */\n  __pyx_t_8 = 0;\n  __pyx_t_3 = __pyx_v_shape; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = 0;\n  for (;;) {\n    if (__pyx_t_1 >= PyTuple_GET_SIZE(__pyx_t_3)) break;\n    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS\n    __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_1); __Pyx_INCREF(__pyx_t_5); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(1, 151, __pyx_L1_error)\n    #else\n    __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 151, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_5);\n    #endif\n    __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_t_5); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 151, __pyx_L1_error)\n    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;\n    __pyx_v_dim = __pyx_t_9;\n    __pyx_v_idx = __pyx_t_8;\n    __pyx_t_8 = (__pyx_t_8 + 1);\n\n    /* \"View.MemoryView\":152\n * \n *         for idx, dim in enumerate(shape):\n *             if dim <= 0:             # <<<<<<<<<<<<<<\n *                 raise ValueError(\"Invalid shape in axis %d: %d.\" % (idx, dim))\n *             self._shape[idx] = dim\n */\n    __pyx_t_4 = ((__pyx_v_dim <= 0) != 0);\n    if (unlikely(__pyx_t_4)) {\n\n      /* \"View.MemoryView\":153\n *         for idx, dim in enumerate(shape):\n *             if dim <= 0:\n *                 raise ValueError(\"Invalid shape in axis %d: %d.\" % (idx, dim))             # <<<<<<<<<<<<<<\n *             self._shape[idx] = dim\n * \n */\n      __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_idx); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 153, __pyx_L1_error)\n      __Pyx_GOTREF(__pyx_t_5);\n      __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_dim); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 153, __pyx_L1_error)\n      __Pyx_GOTREF(__pyx_t_6);\n      __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 153, __pyx_L1_error)\n      __Pyx_GOTREF(__pyx_t_10);\n      __Pyx_GIVEREF(__pyx_t_5);\n      PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_5);\n      __Pyx_GIVEREF(__pyx_t_6);\n      PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_6);\n      __pyx_t_5 = 0;\n      __pyx_t_6 = 0;\n      __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_Invalid_shape_in_axis_d_d, __pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 153, __pyx_L1_error)\n      __Pyx_GOTREF(__pyx_t_6);\n      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;\n      __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_6); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 153, __pyx_L1_error)\n      __Pyx_GOTREF(__pyx_t_10);\n      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;\n      __Pyx_Raise(__pyx_t_10, 0, 0, 0);\n      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;\n      __PYX_ERR(1, 153, __pyx_L1_error)\n\n      /* \"View.MemoryView\":152\n * \n *         for idx, dim in enumerate(shape):\n *             if dim <= 0:             # <<<<<<<<<<<<<<\n *                 raise ValueError(\"Invalid shape in axis %d: %d.\" % (idx, dim))\n *             self._shape[idx] = dim\n */\n    }\n\n    /* \"View.MemoryView\":154\n *             if dim <= 0:\n *                 raise ValueError(\"Invalid shape in axis %d: %d.\" % (idx, dim))\n *             self._shape[idx] = dim             # <<<<<<<<<<<<<<\n * \n *         cdef char order\n */\n    (__pyx_v_self->_shape[__pyx_v_idx]) = __pyx_v_dim;\n\n    /* \"View.MemoryView\":151\n * \n * \n *         for idx, dim in enumerate(shape):             # <<<<<<<<<<<<<<\n *             if dim <= 0:\n *                 raise ValueError(\"Invalid shape in axis %d: %d.\" % (idx, dim))\n */\n  }\n  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;\n\n  /* \"View.MemoryView\":157\n * \n *         cdef char order\n *         if mode == 'fortran':             # <<<<<<<<<<<<<<\n *             order = b'F'\n *             self.mode = u'fortran'\n */\n  __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_v_mode, __pyx_n_s_fortran, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(1, 157, __pyx_L1_error)\n  if (__pyx_t_4) {\n\n    /* \"View.MemoryView\":158\n *         cdef char order\n *         if mode == 'fortran':\n *             order = b'F'             # <<<<<<<<<<<<<<\n *             self.mode = u'fortran'\n *         elif mode == 'c':\n */\n    __pyx_v_order = 'F';\n\n    /* \"View.MemoryView\":159\n *         if mode == 'fortran':\n *             order = b'F'\n *             self.mode = u'fortran'             # <<<<<<<<<<<<<<\n *         elif mode == 'c':\n *             order = b'C'\n */\n    __Pyx_INCREF(__pyx_n_u_fortran);\n    __Pyx_GIVEREF(__pyx_n_u_fortran);\n    __Pyx_GOTREF(__pyx_v_self->mode);\n    __Pyx_DECREF(__pyx_v_self->mode);\n    __pyx_v_self->mode = __pyx_n_u_fortran;\n\n    /* \"View.MemoryView\":157\n * \n *         cdef char order\n *         if mode == 'fortran':             # <<<<<<<<<<<<<<\n *             order = b'F'\n *             self.mode = u'fortran'\n */\n    goto __pyx_L10;\n  }\n\n  /* \"View.MemoryView\":160\n *             order = b'F'\n *             self.mode = u'fortran'\n *         elif mode == 'c':             # <<<<<<<<<<<<<<\n *             order = b'C'\n *             self.mode = u'c'\n */\n  __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_v_mode, __pyx_n_s_c, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(1, 160, __pyx_L1_error)\n  if (likely(__pyx_t_4)) {\n\n    /* \"View.MemoryView\":161\n *             self.mode = u'fortran'\n *         elif mode == 'c':\n *             order = b'C'             # <<<<<<<<<<<<<<\n *             self.mode = u'c'\n *         else:\n */\n    __pyx_v_order = 'C';\n\n    /* \"View.MemoryView\":162\n *         elif mode == 'c':\n *             order = b'C'\n *             self.mode = u'c'             # <<<<<<<<<<<<<<\n *         else:\n *             raise ValueError(\"Invalid mode, expected 'c' or 'fortran', got %s\" % mode)\n */\n    __Pyx_INCREF(__pyx_n_u_c);\n    __Pyx_GIVEREF(__pyx_n_u_c);\n    __Pyx_GOTREF(__pyx_v_self->mode);\n    __Pyx_DECREF(__pyx_v_self->mode);\n    __pyx_v_self->mode = __pyx_n_u_c;\n\n    /* \"View.MemoryView\":160\n *             order = b'F'\n *             self.mode = u'fortran'\n *         elif mode == 'c':             # <<<<<<<<<<<<<<\n *             order = b'C'\n *             self.mode = u'c'\n */\n    goto __pyx_L10;\n  }\n\n  /* \"View.MemoryView\":164\n *             self.mode = u'c'\n *         else:\n *             raise ValueError(\"Invalid mode, expected 'c' or 'fortran', got %s\" % mode)             # <<<<<<<<<<<<<<\n * \n *         self.len = fill_contig_strides_array(self._shape, self._strides,\n */\n  /*else*/ {\n    __pyx_t_3 = __Pyx_PyString_FormatSafe(__pyx_kp_s_Invalid_mode_expected_c_or_fortr, __pyx_v_mode); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 164, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_3);\n    __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 164, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_10);\n    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;\n    __Pyx_Raise(__pyx_t_10, 0, 0, 0);\n    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;\n    __PYX_ERR(1, 164, __pyx_L1_error)\n  }\n  __pyx_L10:;\n\n  /* \"View.MemoryView\":166\n *             raise ValueError(\"Invalid mode, expected 'c' or 'fortran', got %s\" % mode)\n * \n *         self.len = fill_contig_strides_array(self._shape, self._strides,             # <<<<<<<<<<<<<<\n *                                              itemsize, self.ndim, order)\n * \n */\n  __pyx_v_self->len = __pyx_fill_contig_strides_array(__pyx_v_self->_shape, __pyx_v_self->_strides, __pyx_v_itemsize, __pyx_v_self->ndim, __pyx_v_order);\n\n  /* \"View.MemoryView\":169\n *                                              itemsize, self.ndim, order)\n * \n *         self.free_data = allocate_buffer             # <<<<<<<<<<<<<<\n *         self.dtype_is_object = format == b'O'\n *         if allocate_buffer:\n */\n  __pyx_v_self->free_data = __pyx_v_allocate_buffer;\n\n  /* \"View.MemoryView\":170\n * \n *         self.free_data = allocate_buffer\n *         self.dtype_is_object = format == b'O'             # <<<<<<<<<<<<<<\n *         if allocate_buffer:\n * \n */\n  __pyx_t_10 = PyObject_RichCompare(__pyx_v_format, __pyx_n_b_O, Py_EQ); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 170, __pyx_L1_error)\n  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 170, __pyx_L1_error)\n  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;\n  __pyx_v_self->dtype_is_object = __pyx_t_4;\n\n  /* \"View.MemoryView\":171\n *         self.free_data = allocate_buffer\n *         self.dtype_is_object = format == b'O'\n *         if allocate_buffer:             # <<<<<<<<<<<<<<\n * \n * \n */\n  __pyx_t_4 = (__pyx_v_allocate_buffer != 0);\n  if (__pyx_t_4) {\n\n    /* \"View.MemoryView\":174\n * \n * \n *             self.data = <char *>malloc(self.len)             # <<<<<<<<<<<<<<\n *             if not self.data:\n *                 raise MemoryError(\"unable to allocate array data.\")\n */\n    __pyx_v_self->data = ((char *)malloc(__pyx_v_self->len));\n\n    /* \"View.MemoryView\":175\n * \n *             self.data = <char *>malloc(self.len)\n *             if not self.data:             # <<<<<<<<<<<<<<\n *                 raise MemoryError(\"unable to allocate array data.\")\n * \n */\n    __pyx_t_4 = ((!(__pyx_v_self->data != 0)) != 0);\n    if (unlikely(__pyx_t_4)) {\n\n      /* \"View.MemoryView\":176\n *             self.data = <char *>malloc(self.len)\n *             if not self.data:\n *                 raise MemoryError(\"unable to allocate array data.\")             # <<<<<<<<<<<<<<\n * \n *             if self.dtype_is_object:\n */\n      __pyx_t_10 = __Pyx_PyObject_Call(__pyx_builtin_MemoryError, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 176, __pyx_L1_error)\n      __Pyx_GOTREF(__pyx_t_10);\n      __Pyx_Raise(__pyx_t_10, 0, 0, 0);\n      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;\n      __PYX_ERR(1, 176, __pyx_L1_error)\n\n      /* \"View.MemoryView\":175\n * \n *             self.data = <char *>malloc(self.len)\n *             if not self.data:             # <<<<<<<<<<<<<<\n *                 raise MemoryError(\"unable to allocate array data.\")\n * \n */\n    }\n\n    /* \"View.MemoryView\":178\n *                 raise MemoryError(\"unable to allocate array data.\")\n * \n *             if self.dtype_is_object:             # <<<<<<<<<<<<<<\n *                 p = <PyObject **> self.data\n *                 for i in range(self.len / itemsize):\n */\n    __pyx_t_4 = (__pyx_v_self->dtype_is_object != 0);\n    if (__pyx_t_4) {\n\n      /* \"View.MemoryView\":179\n * \n *             if self.dtype_is_object:\n *                 p = <PyObject **> self.data             # <<<<<<<<<<<<<<\n *                 for i in range(self.len / itemsize):\n *                     p[i] = Py_None\n */\n      __pyx_v_p = ((PyObject **)__pyx_v_self->data);\n\n      /* \"View.MemoryView\":180\n *             if self.dtype_is_object:\n *                 p = <PyObject **> self.data\n *                 for i in range(self.len / itemsize):             # <<<<<<<<<<<<<<\n *                     p[i] = Py_None\n *                     Py_INCREF(Py_None)\n */\n      if (unlikely(__pyx_v_itemsize == 0)) {\n        PyErr_SetString(PyExc_ZeroDivisionError, \"integer division or modulo by zero\");\n        __PYX_ERR(1, 180, __pyx_L1_error)\n      }\n      else if (sizeof(Py_ssize_t) == sizeof(long) && (!(((Py_ssize_t)-1) > 0)) && unlikely(__pyx_v_itemsize == (Py_ssize_t)-1)  && unlikely(UNARY_NEG_WOULD_OVERFLOW(__pyx_v_self->len))) {\n        PyErr_SetString(PyExc_OverflowError, \"value too large to perform division\");\n        __PYX_ERR(1, 180, __pyx_L1_error)\n      }\n      __pyx_t_1 = (__pyx_v_self->len / __pyx_v_itemsize);\n      __pyx_t_9 = __pyx_t_1;\n      for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_9; __pyx_t_11+=1) {\n        __pyx_v_i = __pyx_t_11;\n\n        /* \"View.MemoryView\":181\n *                 p = <PyObject **> self.data\n *                 for i in range(self.len / itemsize):\n *                     p[i] = Py_None             # <<<<<<<<<<<<<<\n *                     Py_INCREF(Py_None)\n * \n */\n        (__pyx_v_p[__pyx_v_i]) = Py_None;\n\n        /* \"View.MemoryView\":182\n *                 for i in range(self.len / itemsize):\n *                     p[i] = Py_None\n *                     Py_INCREF(Py_None)             # <<<<<<<<<<<<<<\n * \n *     @cname('getbuffer')\n */\n        Py_INCREF(Py_None);\n      }\n\n      /* \"View.MemoryView\":178\n *                 raise MemoryError(\"unable to allocate array data.\")\n * \n *             if self.dtype_is_object:             # <<<<<<<<<<<<<<\n *                 p = <PyObject **> self.data\n *                 for i in range(self.len / itemsize):\n */\n    }\n\n    /* \"View.MemoryView\":171\n *         self.free_data = allocate_buffer\n *         self.dtype_is_object = format == b'O'\n *         if allocate_buffer:             # <<<<<<<<<<<<<<\n * \n * \n */\n  }\n\n  /* \"View.MemoryView\":122\n *         cdef bint dtype_is_object\n * \n *     def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None,             # <<<<<<<<<<<<<<\n *                   mode=\"c\", bint allocate_buffer=True):\n * \n */\n\n  /* function exit code */\n  __pyx_r = 0;\n  goto __pyx_L0;\n  __pyx_L1_error:;\n  __Pyx_XDECREF(__pyx_t_3);\n  __Pyx_XDECREF(__pyx_t_5);\n  __Pyx_XDECREF(__pyx_t_6);\n  __Pyx_XDECREF(__pyx_t_10);\n  __Pyx_AddTraceback(\"View.MemoryView.array.__cinit__\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n  __pyx_r = -1;\n  __pyx_L0:;\n  __Pyx_XDECREF(__pyx_v_format);\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\n/* \"View.MemoryView\":185\n * \n *     @cname('getbuffer')\n *     def __getbuffer__(self, Py_buffer *info, int flags):             # <<<<<<<<<<<<<<\n *         cdef int bufmode = -1\n *         if self.mode == u\"c\":\n */\n\n/* Python wrapper */\nstatic CYTHON_UNUSED int __pyx_array_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/\nstatic CYTHON_UNUSED int __pyx_array_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {\n  int __pyx_r;\n  __Pyx_RefNannyDeclarations\n  __Pyx_RefNannySetupContext(\"__getbuffer__ (wrapper)\", 0);\n  __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(((struct __pyx_array_obj *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags));\n\n  /* function exit code */\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\nstatic int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(struct __pyx_array_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {\n  int __pyx_v_bufmode;\n  int __pyx_r;\n  __Pyx_RefNannyDeclarations\n  int __pyx_t_1;\n  int __pyx_t_2;\n  PyObject *__pyx_t_3 = NULL;\n  char *__pyx_t_4;\n  Py_ssize_t __pyx_t_5;\n  int __pyx_t_6;\n  Py_ssize_t *__pyx_t_7;\n  int __pyx_lineno = 0;\n  const char *__pyx_filename = NULL;\n  int __pyx_clineno = 0;\n  if (__pyx_v_info == NULL) {\n    PyErr_SetString(PyExc_BufferError, \"PyObject_GetBuffer: view==NULL argument is obsolete\");\n    return -1;\n  }\n  __Pyx_RefNannySetupContext(\"__getbuffer__\", 0);\n  __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None);\n  __Pyx_GIVEREF(__pyx_v_info->obj);\n\n  /* \"View.MemoryView\":186\n *     @cname('getbuffer')\n *     def __getbuffer__(self, Py_buffer *info, int flags):\n *         cdef int bufmode = -1             # <<<<<<<<<<<<<<\n *         if self.mode == u\"c\":\n *             bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS\n */\n  __pyx_v_bufmode = -1;\n\n  /* \"View.MemoryView\":187\n *     def __getbuffer__(self, Py_buffer *info, int flags):\n *         cdef int bufmode = -1\n *         if self.mode == u\"c\":             # <<<<<<<<<<<<<<\n *             bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS\n *         elif self.mode == u\"fortran\":\n */\n  __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_self->mode, __pyx_n_u_c, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 187, __pyx_L1_error)\n  __pyx_t_2 = (__pyx_t_1 != 0);\n  if (__pyx_t_2) {\n\n    /* \"View.MemoryView\":188\n *         cdef int bufmode = -1\n *         if self.mode == u\"c\":\n *             bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS             # <<<<<<<<<<<<<<\n *         elif self.mode == u\"fortran\":\n *             bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS\n */\n    __pyx_v_bufmode = (PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS);\n\n    /* \"View.MemoryView\":187\n *     def __getbuffer__(self, Py_buffer *info, int flags):\n *         cdef int bufmode = -1\n *         if self.mode == u\"c\":             # <<<<<<<<<<<<<<\n *             bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS\n *         elif self.mode == u\"fortran\":\n */\n    goto __pyx_L3;\n  }\n\n  /* \"View.MemoryView\":189\n *         if self.mode == u\"c\":\n *             bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS\n *         elif self.mode == u\"fortran\":             # <<<<<<<<<<<<<<\n *             bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS\n *         if not (flags & bufmode):\n */\n  __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_v_self->mode, __pyx_n_u_fortran, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 189, __pyx_L1_error)\n  __pyx_t_1 = (__pyx_t_2 != 0);\n  if (__pyx_t_1) {\n\n    /* \"View.MemoryView\":190\n *             bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS\n *         elif self.mode == u\"fortran\":\n *             bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS             # <<<<<<<<<<<<<<\n *         if not (flags & bufmode):\n *             raise ValueError(\"Can only create a buffer that is contiguous in memory.\")\n */\n    __pyx_v_bufmode = (PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS);\n\n    /* \"View.MemoryView\":189\n *         if self.mode == u\"c\":\n *             bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS\n *         elif self.mode == u\"fortran\":             # <<<<<<<<<<<<<<\n *             bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS\n *         if not (flags & bufmode):\n */\n  }\n  __pyx_L3:;\n\n  /* \"View.MemoryView\":191\n *         elif self.mode == u\"fortran\":\n *             bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS\n *         if not (flags & bufmode):             # <<<<<<<<<<<<<<\n *             raise ValueError(\"Can only create a buffer that is contiguous in memory.\")\n *         info.buf = self.data\n */\n  __pyx_t_1 = ((!((__pyx_v_flags & __pyx_v_bufmode) != 0)) != 0);\n  if (unlikely(__pyx_t_1)) {\n\n    /* \"View.MemoryView\":192\n *             bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS\n *         if not (flags & bufmode):\n *             raise ValueError(\"Can only create a buffer that is contiguous in memory.\")             # <<<<<<<<<<<<<<\n *         info.buf = self.data\n *         info.len = self.len\n */\n    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__20, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 192, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_3);\n    __Pyx_Raise(__pyx_t_3, 0, 0, 0);\n    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;\n    __PYX_ERR(1, 192, __pyx_L1_error)\n\n    /* \"View.MemoryView\":191\n *         elif self.mode == u\"fortran\":\n *             bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS\n *         if not (flags & bufmode):             # <<<<<<<<<<<<<<\n *             raise ValueError(\"Can only create a buffer that is contiguous in memory.\")\n *         info.buf = self.data\n */\n  }\n\n  /* \"View.MemoryView\":193\n *         if not (flags & bufmode):\n *             raise ValueError(\"Can only create a buffer that is contiguous in memory.\")\n *         info.buf = self.data             # <<<<<<<<<<<<<<\n *         info.len = self.len\n *         info.ndim = self.ndim\n */\n  __pyx_t_4 = __pyx_v_self->data;\n  __pyx_v_info->buf = __pyx_t_4;\n\n  /* \"View.MemoryView\":194\n *             raise ValueError(\"Can only create a buffer that is contiguous in memory.\")\n *         info.buf = self.data\n *         info.len = self.len             # <<<<<<<<<<<<<<\n *         info.ndim = self.ndim\n *         info.shape = self._shape\n */\n  __pyx_t_5 = __pyx_v_self->len;\n  __pyx_v_info->len = __pyx_t_5;\n\n  /* \"View.MemoryView\":195\n *         info.buf = self.data\n *         info.len = self.len\n *         info.ndim = self.ndim             # <<<<<<<<<<<<<<\n *         info.shape = self._shape\n *         info.strides = self._strides\n */\n  __pyx_t_6 = __pyx_v_self->ndim;\n  __pyx_v_info->ndim = __pyx_t_6;\n\n  /* \"View.MemoryView\":196\n *         info.len = self.len\n *         info.ndim = self.ndim\n *         info.shape = self._shape             # <<<<<<<<<<<<<<\n *         info.strides = self._strides\n *         info.suboffsets = NULL\n */\n  __pyx_t_7 = __pyx_v_self->_shape;\n  __pyx_v_info->shape = __pyx_t_7;\n\n  /* \"View.MemoryView\":197\n *         info.ndim = self.ndim\n *         info.shape = self._shape\n *         info.strides = self._strides             # <<<<<<<<<<<<<<\n *         info.suboffsets = NULL\n *         info.itemsize = self.itemsize\n */\n  __pyx_t_7 = __pyx_v_self->_strides;\n  __pyx_v_info->strides = __pyx_t_7;\n\n  /* \"View.MemoryView\":198\n *         info.shape = self._shape\n *         info.strides = self._strides\n *         info.suboffsets = NULL             # <<<<<<<<<<<<<<\n *         info.itemsize = self.itemsize\n *         info.readonly = 0\n */\n  __pyx_v_info->suboffsets = NULL;\n\n  /* \"View.MemoryView\":199\n *         info.strides = self._strides\n *         info.suboffsets = NULL\n *         info.itemsize = self.itemsize             # <<<<<<<<<<<<<<\n *         info.readonly = 0\n * \n */\n  __pyx_t_5 = __pyx_v_self->itemsize;\n  __pyx_v_info->itemsize = __pyx_t_5;\n\n  /* \"View.MemoryView\":200\n *         info.suboffsets = NULL\n *         info.itemsize = self.itemsize\n *         info.readonly = 0             # <<<<<<<<<<<<<<\n * \n *         if flags & PyBUF_FORMAT:\n */\n  __pyx_v_info->readonly = 0;\n\n  /* \"View.MemoryView\":202\n *         info.readonly = 0\n * \n *         if flags & PyBUF_FORMAT:             # <<<<<<<<<<<<<<\n *             info.format = self.format\n *         else:\n */\n  __pyx_t_1 = ((__pyx_v_flags & PyBUF_FORMAT) != 0);\n  if (__pyx_t_1) {\n\n    /* \"View.MemoryView\":203\n * \n *         if flags & PyBUF_FORMAT:\n *             info.format = self.format             # <<<<<<<<<<<<<<\n *         else:\n *             info.format = NULL\n */\n    __pyx_t_4 = __pyx_v_self->format;\n    __pyx_v_info->format = __pyx_t_4;\n\n    /* \"View.MemoryView\":202\n *         info.readonly = 0\n * \n *         if flags & PyBUF_FORMAT:             # <<<<<<<<<<<<<<\n *             info.format = self.format\n *         else:\n */\n    goto __pyx_L5;\n  }\n\n  /* \"View.MemoryView\":205\n *             info.format = self.format\n *         else:\n *             info.format = NULL             # <<<<<<<<<<<<<<\n * \n *         info.obj = self\n */\n  /*else*/ {\n    __pyx_v_info->format = NULL;\n  }\n  __pyx_L5:;\n\n  /* \"View.MemoryView\":207\n *             info.format = NULL\n * \n *         info.obj = self             # <<<<<<<<<<<<<<\n * \n *     __pyx_getbuffer = capsule(<void *> &__pyx_array_getbuffer, \"getbuffer(obj, view, flags)\")\n */\n  __Pyx_INCREF(((PyObject *)__pyx_v_self));\n  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));\n  __Pyx_GOTREF(__pyx_v_info->obj);\n  __Pyx_DECREF(__pyx_v_info->obj);\n  __pyx_v_info->obj = ((PyObject *)__pyx_v_self);\n\n  /* \"View.MemoryView\":185\n * \n *     @cname('getbuffer')\n *     def __getbuffer__(self, Py_buffer *info, int flags):             # <<<<<<<<<<<<<<\n *         cdef int bufmode = -1\n *         if self.mode == u\"c\":\n */\n\n  /* function exit code */\n  __pyx_r = 0;\n  goto __pyx_L0;\n  __pyx_L1_error:;\n  __Pyx_XDECREF(__pyx_t_3);\n  __Pyx_AddTraceback(\"View.MemoryView.array.__getbuffer__\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n  __pyx_r = -1;\n  if (__pyx_v_info->obj != NULL) {\n    __Pyx_GOTREF(__pyx_v_info->obj);\n    __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;\n  }\n  goto __pyx_L2;\n  __pyx_L0:;\n  if (__pyx_v_info->obj == Py_None) {\n    __Pyx_GOTREF(__pyx_v_info->obj);\n    __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;\n  }\n  __pyx_L2:;\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\n/* \"View.MemoryView\":211\n *     __pyx_getbuffer = capsule(<void *> &__pyx_array_getbuffer, \"getbuffer(obj, view, flags)\")\n * \n *     def __dealloc__(array self):             # <<<<<<<<<<<<<<\n *         if self.callback_free_data != NULL:\n *             self.callback_free_data(self.data)\n */\n\n/* Python wrapper */\nstatic void __pyx_array___dealloc__(PyObject *__pyx_v_self); /*proto*/\nstatic void __pyx_array___dealloc__(PyObject *__pyx_v_self) {\n  __Pyx_RefNannyDeclarations\n  __Pyx_RefNannySetupContext(\"__dealloc__ (wrapper)\", 0);\n  __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(((struct __pyx_array_obj *)__pyx_v_self));\n\n  /* function exit code */\n  __Pyx_RefNannyFinishContext();\n}\n\nstatic void __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(struct __pyx_array_obj *__pyx_v_self) {\n  __Pyx_RefNannyDeclarations\n  int __pyx_t_1;\n  __Pyx_RefNannySetupContext(\"__dealloc__\", 0);\n\n  /* \"View.MemoryView\":212\n * \n *     def __dealloc__(array self):\n *         if self.callback_free_data != NULL:             # <<<<<<<<<<<<<<\n *             self.callback_free_data(self.data)\n *         elif self.free_data:\n */\n  __pyx_t_1 = ((__pyx_v_self->callback_free_data != NULL) != 0);\n  if (__pyx_t_1) {\n\n    /* \"View.MemoryView\":213\n *     def __dealloc__(array self):\n *         if self.callback_free_data != NULL:\n *             self.callback_free_data(self.data)             # <<<<<<<<<<<<<<\n *         elif self.free_data:\n *             if self.dtype_is_object:\n */\n    __pyx_v_self->callback_free_data(__pyx_v_self->data);\n\n    /* \"View.MemoryView\":212\n * \n *     def __dealloc__(array self):\n *         if self.callback_free_data != NULL:             # <<<<<<<<<<<<<<\n *             self.callback_free_data(self.data)\n *         elif self.free_data:\n */\n    goto __pyx_L3;\n  }\n\n  /* \"View.MemoryView\":214\n *         if self.callback_free_data != NULL:\n *             self.callback_free_data(self.data)\n *         elif self.free_data:             # <<<<<<<<<<<<<<\n *             if self.dtype_is_object:\n *                 refcount_objects_in_slice(self.data, self._shape,\n */\n  __pyx_t_1 = (__pyx_v_self->free_data != 0);\n  if (__pyx_t_1) {\n\n    /* \"View.MemoryView\":215\n *             self.callback_free_data(self.data)\n *         elif self.free_data:\n *             if self.dtype_is_object:             # <<<<<<<<<<<<<<\n *                 refcount_objects_in_slice(self.data, self._shape,\n *                                           self._strides, self.ndim, False)\n */\n    __pyx_t_1 = (__pyx_v_self->dtype_is_object != 0);\n    if (__pyx_t_1) {\n\n      /* \"View.MemoryView\":216\n *         elif self.free_data:\n *             if self.dtype_is_object:\n *                 refcount_objects_in_slice(self.data, self._shape,             # <<<<<<<<<<<<<<\n *                                           self._strides, self.ndim, False)\n *             free(self.data)\n */\n      __pyx_memoryview_refcount_objects_in_slice(__pyx_v_self->data, __pyx_v_self->_shape, __pyx_v_self->_strides, __pyx_v_self->ndim, 0);\n\n      /* \"View.MemoryView\":215\n *             self.callback_free_data(self.data)\n *         elif self.free_data:\n *             if self.dtype_is_object:             # <<<<<<<<<<<<<<\n *                 refcount_objects_in_slice(self.data, self._shape,\n *                                           self._strides, self.ndim, False)\n */\n    }\n\n    /* \"View.MemoryView\":218\n *                 refcount_objects_in_slice(self.data, self._shape,\n *                                           self._strides, self.ndim, False)\n *             free(self.data)             # <<<<<<<<<<<<<<\n *         PyObject_Free(self._shape)\n * \n */\n    free(__pyx_v_self->data);\n\n    /* \"View.MemoryView\":214\n *         if self.callback_free_data != NULL:\n *             self.callback_free_data(self.data)\n *         elif self.free_data:             # <<<<<<<<<<<<<<\n *             if self.dtype_is_object:\n *                 refcount_objects_in_slice(self.data, self._shape,\n */\n  }\n  __pyx_L3:;\n\n  /* \"View.MemoryView\":219\n *                                           self._strides, self.ndim, False)\n *             free(self.data)\n *         PyObject_Free(self._shape)             # <<<<<<<<<<<<<<\n * \n *     @property\n */\n  PyObject_Free(__pyx_v_self->_shape);\n\n  /* \"View.MemoryView\":211\n *     __pyx_getbuffer = capsule(<void *> &__pyx_array_getbuffer, \"getbuffer(obj, view, flags)\")\n * \n *     def __dealloc__(array self):             # <<<<<<<<<<<<<<\n *         if self.callback_free_data != NULL:\n *             self.callback_free_data(self.data)\n */\n\n  /* function exit code */\n  __Pyx_RefNannyFinishContext();\n}\n\n/* \"View.MemoryView\":222\n * \n *     @property\n *     def memview(self):             # <<<<<<<<<<<<<<\n *         return self.get_memview()\n * \n */\n\n/* Python wrapper */\nstatic PyObject *__pyx_pw_15View_dot_MemoryView_5array_7memview_1__get__(PyObject *__pyx_v_self); /*proto*/\nstatic PyObject *__pyx_pw_15View_dot_MemoryView_5array_7memview_1__get__(PyObject *__pyx_v_self) {\n  PyObject *__pyx_r = 0;\n  __Pyx_RefNannyDeclarations\n  __Pyx_RefNannySetupContext(\"__get__ (wrapper)\", 0);\n  __pyx_r = __pyx_pf_15View_dot_MemoryView_5array_7memview___get__(((struct __pyx_array_obj *)__pyx_v_self));\n\n  /* function exit code */\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\nstatic PyObject *__pyx_pf_15View_dot_MemoryView_5array_7memview___get__(struct __pyx_array_obj *__pyx_v_self) {\n  PyObject *__pyx_r = NULL;\n  __Pyx_RefNannyDeclarations\n  PyObject *__pyx_t_1 = NULL;\n  int __pyx_lineno = 0;\n  const char *__pyx_filename = NULL;\n  int __pyx_clineno = 0;\n  __Pyx_RefNannySetupContext(\"__get__\", 0);\n\n  /* \"View.MemoryView\":223\n *     @property\n *     def memview(self):\n *         return self.get_memview()             # <<<<<<<<<<<<<<\n * \n *     @cname('get_memview')\n */\n  __Pyx_XDECREF(__pyx_r);\n  __pyx_t_1 = ((struct __pyx_vtabstruct_array *)__pyx_v_self->__pyx_vtab)->get_memview(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 223, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __pyx_r = __pyx_t_1;\n  __pyx_t_1 = 0;\n  goto __pyx_L0;\n\n  /* \"View.MemoryView\":222\n * \n *     @property\n *     def memview(self):             # <<<<<<<<<<<<<<\n *         return self.get_memview()\n * \n */\n\n  /* function exit code */\n  __pyx_L1_error:;\n  __Pyx_XDECREF(__pyx_t_1);\n  __Pyx_AddTraceback(\"View.MemoryView.array.memview.__get__\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n  __pyx_r = NULL;\n  __pyx_L0:;\n  __Pyx_XGIVEREF(__pyx_r);\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\n/* \"View.MemoryView\":226\n * \n *     @cname('get_memview')\n *     cdef get_memview(self):             # <<<<<<<<<<<<<<\n *         flags =  PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE\n *         return  memoryview(self, flags, self.dtype_is_object)\n */\n\nstatic PyObject *__pyx_array_get_memview(struct __pyx_array_obj *__pyx_v_self) {\n  int __pyx_v_flags;\n  PyObject *__pyx_r = NULL;\n  __Pyx_RefNannyDeclarations\n  PyObject *__pyx_t_1 = NULL;\n  PyObject *__pyx_t_2 = NULL;\n  PyObject *__pyx_t_3 = NULL;\n  int __pyx_lineno = 0;\n  const char *__pyx_filename = NULL;\n  int __pyx_clineno = 0;\n  __Pyx_RefNannySetupContext(\"get_memview\", 0);\n\n  /* \"View.MemoryView\":227\n *     @cname('get_memview')\n *     cdef get_memview(self):\n *         flags =  PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE             # <<<<<<<<<<<<<<\n *         return  memoryview(self, flags, self.dtype_is_object)\n * \n */\n  __pyx_v_flags = ((PyBUF_ANY_CONTIGUOUS | PyBUF_FORMAT) | PyBUF_WRITABLE);\n\n  /* \"View.MemoryView\":228\n *     cdef get_memview(self):\n *         flags =  PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE\n *         return  memoryview(self, flags, self.dtype_is_object)             # <<<<<<<<<<<<<<\n * \n *     def __len__(self):\n */\n  __Pyx_XDECREF(__pyx_r);\n  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 228, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_self->dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 228, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_2);\n  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 228, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_3);\n  __Pyx_INCREF(((PyObject *)__pyx_v_self));\n  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));\n  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_self));\n  __Pyx_GIVEREF(__pyx_t_1);\n  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_2);\n  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2);\n  __pyx_t_1 = 0;\n  __pyx_t_2 = 0;\n  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_memoryview_type), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 228, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_2);\n  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;\n  __pyx_r = __pyx_t_2;\n  __pyx_t_2 = 0;\n  goto __pyx_L0;\n\n  /* \"View.MemoryView\":226\n * \n *     @cname('get_memview')\n *     cdef get_memview(self):             # <<<<<<<<<<<<<<\n *         flags =  PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE\n *         return  memoryview(self, flags, self.dtype_is_object)\n */\n\n  /* function exit code */\n  __pyx_L1_error:;\n  __Pyx_XDECREF(__pyx_t_1);\n  __Pyx_XDECREF(__pyx_t_2);\n  __Pyx_XDECREF(__pyx_t_3);\n  __Pyx_AddTraceback(\"View.MemoryView.array.get_memview\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n  __pyx_r = 0;\n  __pyx_L0:;\n  __Pyx_XGIVEREF(__pyx_r);\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\n/* \"View.MemoryView\":230\n *         return  memoryview(self, flags, self.dtype_is_object)\n * \n *     def __len__(self):             # <<<<<<<<<<<<<<\n *         return self._shape[0]\n * \n */\n\n/* Python wrapper */\nstatic Py_ssize_t __pyx_array___len__(PyObject *__pyx_v_self); /*proto*/\nstatic Py_ssize_t __pyx_array___len__(PyObject *__pyx_v_self) {\n  Py_ssize_t __pyx_r;\n  __Pyx_RefNannyDeclarations\n  __Pyx_RefNannySetupContext(\"__len__ (wrapper)\", 0);\n  __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__len__(((struct __pyx_array_obj *)__pyx_v_self));\n\n  /* function exit code */\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\nstatic Py_ssize_t __pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__len__(struct __pyx_array_obj *__pyx_v_self) {\n  Py_ssize_t __pyx_r;\n  __Pyx_RefNannyDeclarations\n  __Pyx_RefNannySetupContext(\"__len__\", 0);\n\n  /* \"View.MemoryView\":231\n * \n *     def __len__(self):\n *         return self._shape[0]             # <<<<<<<<<<<<<<\n * \n *     def __getattr__(self, attr):\n */\n  __pyx_r = (__pyx_v_self->_shape[0]);\n  goto __pyx_L0;\n\n  /* \"View.MemoryView\":230\n *         return  memoryview(self, flags, self.dtype_is_object)\n * \n *     def __len__(self):             # <<<<<<<<<<<<<<\n *         return self._shape[0]\n * \n */\n\n  /* function exit code */\n  __pyx_L0:;\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\n/* \"View.MemoryView\":233\n *         return self._shape[0]\n * \n *     def __getattr__(self, attr):             # <<<<<<<<<<<<<<\n *         return getattr(self.memview, attr)\n * \n */\n\n/* Python wrapper */\nstatic PyObject *__pyx_array___getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_attr); /*proto*/\nstatic PyObject *__pyx_array___getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_attr) {\n  PyObject *__pyx_r = 0;\n  __Pyx_RefNannyDeclarations\n  __Pyx_RefNannySetupContext(\"__getattr__ (wrapper)\", 0);\n  __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getattr__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v_attr));\n\n  /* function exit code */\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\nstatic PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getattr__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_attr) {\n  PyObject *__pyx_r = NULL;\n  __Pyx_RefNannyDeclarations\n  PyObject *__pyx_t_1 = NULL;\n  PyObject *__pyx_t_2 = NULL;\n  int __pyx_lineno = 0;\n  const char *__pyx_filename = NULL;\n  int __pyx_clineno = 0;\n  __Pyx_RefNannySetupContext(\"__getattr__\", 0);\n\n  /* \"View.MemoryView\":234\n * \n *     def __getattr__(self, attr):\n *         return getattr(self.memview, attr)             # <<<<<<<<<<<<<<\n * \n *     def __getitem__(self, item):\n */\n  __Pyx_XDECREF(__pyx_r);\n  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_memview); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 234, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __pyx_t_2 = __Pyx_GetAttr(__pyx_t_1, __pyx_v_attr); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 234, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_2);\n  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n  __pyx_r = __pyx_t_2;\n  __pyx_t_2 = 0;\n  goto __pyx_L0;\n\n  /* \"View.MemoryView\":233\n *         return self._shape[0]\n * \n *     def __getattr__(self, attr):             # <<<<<<<<<<<<<<\n *         return getattr(self.memview, attr)\n * \n */\n\n  /* function exit code */\n  __pyx_L1_error:;\n  __Pyx_XDECREF(__pyx_t_1);\n  __Pyx_XDECREF(__pyx_t_2);\n  __Pyx_AddTraceback(\"View.MemoryView.array.__getattr__\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n  __pyx_r = NULL;\n  __pyx_L0:;\n  __Pyx_XGIVEREF(__pyx_r);\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\n/* \"View.MemoryView\":236\n *         return getattr(self.memview, attr)\n * \n *     def __getitem__(self, item):             # <<<<<<<<<<<<<<\n *         return self.memview[item]\n * \n */\n\n/* Python wrapper */\nstatic PyObject *__pyx_array___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item); /*proto*/\nstatic PyObject *__pyx_array___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item) {\n  PyObject *__pyx_r = 0;\n  __Pyx_RefNannyDeclarations\n  __Pyx_RefNannySetupContext(\"__getitem__ (wrapper)\", 0);\n  __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__getitem__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v_item));\n\n  /* function exit code */\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\nstatic PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__getitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item) {\n  PyObject *__pyx_r = NULL;\n  __Pyx_RefNannyDeclarations\n  PyObject *__pyx_t_1 = NULL;\n  PyObject *__pyx_t_2 = NULL;\n  int __pyx_lineno = 0;\n  const char *__pyx_filename = NULL;\n  int __pyx_clineno = 0;\n  __Pyx_RefNannySetupContext(\"__getitem__\", 0);\n\n  /* \"View.MemoryView\":237\n * \n *     def __getitem__(self, item):\n *         return self.memview[item]             # <<<<<<<<<<<<<<\n * \n *     def __setitem__(self, item, value):\n */\n  __Pyx_XDECREF(__pyx_r);\n  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_memview); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 237, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_item); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 237, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_2);\n  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n  __pyx_r = __pyx_t_2;\n  __pyx_t_2 = 0;\n  goto __pyx_L0;\n\n  /* \"View.MemoryView\":236\n *         return getattr(self.memview, attr)\n * \n *     def __getitem__(self, item):             # <<<<<<<<<<<<<<\n *         return self.memview[item]\n * \n */\n\n  /* function exit code */\n  __pyx_L1_error:;\n  __Pyx_XDECREF(__pyx_t_1);\n  __Pyx_XDECREF(__pyx_t_2);\n  __Pyx_AddTraceback(\"View.MemoryView.array.__getitem__\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n  __pyx_r = NULL;\n  __pyx_L0:;\n  __Pyx_XGIVEREF(__pyx_r);\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\n/* \"View.MemoryView\":239\n *         return self.memview[item]\n * \n *     def __setitem__(self, item, value):             # <<<<<<<<<<<<<<\n *         self.memview[item] = value\n * \n */\n\n/* Python wrapper */\nstatic int __pyx_array___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value); /*proto*/\nstatic int __pyx_array___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value) {\n  int __pyx_r;\n  __Pyx_RefNannyDeclarations\n  __Pyx_RefNannySetupContext(\"__setitem__ (wrapper)\", 0);\n  __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_12__setitem__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v_item), ((PyObject *)__pyx_v_value));\n\n  /* function exit code */\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\nstatic int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_12__setitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value) {\n  int __pyx_r;\n  __Pyx_RefNannyDeclarations\n  PyObject *__pyx_t_1 = NULL;\n  int __pyx_lineno = 0;\n  const char *__pyx_filename = NULL;\n  int __pyx_clineno = 0;\n  __Pyx_RefNannySetupContext(\"__setitem__\", 0);\n\n  /* \"View.MemoryView\":240\n * \n *     def __setitem__(self, item, value):\n *         self.memview[item] = value             # <<<<<<<<<<<<<<\n * \n * \n */\n  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_memview); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 240, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_v_item, __pyx_v_value) < 0)) __PYX_ERR(1, 240, __pyx_L1_error)\n  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n\n  /* \"View.MemoryView\":239\n *         return self.memview[item]\n * \n *     def __setitem__(self, item, value):             # <<<<<<<<<<<<<<\n *         self.memview[item] = value\n * \n */\n\n  /* function exit code */\n  __pyx_r = 0;\n  goto __pyx_L0;\n  __pyx_L1_error:;\n  __Pyx_XDECREF(__pyx_t_1);\n  __Pyx_AddTraceback(\"View.MemoryView.array.__setitem__\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n  __pyx_r = -1;\n  __pyx_L0:;\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\n/* \"(tree fragment)\":1\n * def __reduce_cython__(self):             # <<<<<<<<<<<<<<\n *     raise TypeError(\"no default __reduce__ due to non-trivial __cinit__\")\n * def __setstate_cython__(self, __pyx_state):\n */\n\n/* Python wrapper */\nstatic PyObject *__pyx_pw___pyx_array_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/\nstatic PyObject *__pyx_pw___pyx_array_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {\n  PyObject *__pyx_r = 0;\n  __Pyx_RefNannyDeclarations\n  __Pyx_RefNannySetupContext(\"__reduce_cython__ (wrapper)\", 0);\n  __pyx_r = __pyx_pf___pyx_array___reduce_cython__(((struct __pyx_array_obj *)__pyx_v_self));\n\n  /* function exit code */\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\nstatic PyObject *__pyx_pf___pyx_array___reduce_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self) {\n  PyObject *__pyx_r = NULL;\n  __Pyx_RefNannyDeclarations\n  PyObject *__pyx_t_1 = NULL;\n  int __pyx_lineno = 0;\n  const char *__pyx_filename = NULL;\n  int __pyx_clineno = 0;\n  __Pyx_RefNannySetupContext(\"__reduce_cython__\", 0);\n\n  /* \"(tree fragment)\":2\n * def __reduce_cython__(self):\n *     raise TypeError(\"no default __reduce__ due to non-trivial __cinit__\")             # <<<<<<<<<<<<<<\n * def __setstate_cython__(self, __pyx_state):\n *     raise TypeError(\"no default __reduce__ due to non-trivial __cinit__\")\n */\n  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__21, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __Pyx_Raise(__pyx_t_1, 0, 0, 0);\n  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n  __PYX_ERR(1, 2, __pyx_L1_error)\n\n  /* \"(tree fragment)\":1\n * def __reduce_cython__(self):             # <<<<<<<<<<<<<<\n *     raise TypeError(\"no default __reduce__ due to non-trivial __cinit__\")\n * def __setstate_cython__(self, __pyx_state):\n */\n\n  /* function exit code */\n  __pyx_L1_error:;\n  __Pyx_XDECREF(__pyx_t_1);\n  __Pyx_AddTraceback(\"View.MemoryView.array.__reduce_cython__\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n  __pyx_r = NULL;\n  __Pyx_XGIVEREF(__pyx_r);\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\n/* \"(tree fragment)\":3\n * def __reduce_cython__(self):\n *     raise TypeError(\"no default __reduce__ due to non-trivial __cinit__\")\n * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<\n *     raise TypeError(\"no default __reduce__ due to non-trivial __cinit__\")\n */\n\n/* Python wrapper */\nstatic PyObject *__pyx_pw___pyx_array_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/\nstatic PyObject *__pyx_pw___pyx_array_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {\n  PyObject *__pyx_r = 0;\n  __Pyx_RefNannyDeclarations\n  __Pyx_RefNannySetupContext(\"__setstate_cython__ (wrapper)\", 0);\n  __pyx_r = __pyx_pf___pyx_array_2__setstate_cython__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));\n\n  /* function exit code */\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\nstatic PyObject *__pyx_pf___pyx_array_2__setstate_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {\n  PyObject *__pyx_r = NULL;\n  __Pyx_RefNannyDeclarations\n  PyObject *__pyx_t_1 = NULL;\n  int __pyx_lineno = 0;\n  const char *__pyx_filename = NULL;\n  int __pyx_clineno = 0;\n  __Pyx_RefNannySetupContext(\"__setstate_cython__\", 0);\n\n  /* \"(tree fragment)\":4\n *     raise TypeError(\"no default __reduce__ due to non-trivial __cinit__\")\n * def __setstate_cython__(self, __pyx_state):\n *     raise TypeError(\"no default __reduce__ due to non-trivial __cinit__\")             # <<<<<<<<<<<<<<\n */\n  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__22, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __Pyx_Raise(__pyx_t_1, 0, 0, 0);\n  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n  __PYX_ERR(1, 4, __pyx_L1_error)\n\n  /* \"(tree fragment)\":3\n * def __reduce_cython__(self):\n *     raise TypeError(\"no default __reduce__ due to non-trivial __cinit__\")\n * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<\n *     raise TypeError(\"no default __reduce__ due to non-trivial __cinit__\")\n */\n\n  /* function exit code */\n  __pyx_L1_error:;\n  __Pyx_XDECREF(__pyx_t_1);\n  __Pyx_AddTraceback(\"View.MemoryView.array.__setstate_cython__\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n  __pyx_r = NULL;\n  __Pyx_XGIVEREF(__pyx_r);\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\n/* \"View.MemoryView\":244\n * \n * @cname(\"__pyx_array_new\")\n * cdef array array_cwrapper(tuple shape, Py_ssize_t itemsize, char *format,             # <<<<<<<<<<<<<<\n *                           char *mode, char *buf):\n *     cdef array result\n */\n\nstatic struct __pyx_array_obj *__pyx_array_new(PyObject *__pyx_v_shape, Py_ssize_t __pyx_v_itemsize, char *__pyx_v_format, char *__pyx_v_mode, char *__pyx_v_buf) {\n  struct __pyx_array_obj *__pyx_v_result = 0;\n  struct __pyx_array_obj *__pyx_r = NULL;\n  __Pyx_RefNannyDeclarations\n  int __pyx_t_1;\n  PyObject *__pyx_t_2 = NULL;\n  PyObject *__pyx_t_3 = NULL;\n  PyObject *__pyx_t_4 = NULL;\n  PyObject *__pyx_t_5 = NULL;\n  int __pyx_lineno = 0;\n  const char *__pyx_filename = NULL;\n  int __pyx_clineno = 0;\n  __Pyx_RefNannySetupContext(\"array_cwrapper\", 0);\n\n  /* \"View.MemoryView\":248\n *     cdef array result\n * \n *     if buf == NULL:             # <<<<<<<<<<<<<<\n *         result = array(shape, itemsize, format, mode.decode('ASCII'))\n *     else:\n */\n  __pyx_t_1 = ((__pyx_v_buf == NULL) != 0);\n  if (__pyx_t_1) {\n\n    /* \"View.MemoryView\":249\n * \n *     if buf == NULL:\n *         result = array(shape, itemsize, format, mode.decode('ASCII'))             # <<<<<<<<<<<<<<\n *     else:\n *         result = array(shape, itemsize, format, mode.decode('ASCII'),\n */\n    __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_itemsize); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 249, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_2);\n    __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 249, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_3);\n    __pyx_t_4 = __Pyx_decode_c_string(__pyx_v_mode, 0, strlen(__pyx_v_mode), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 249, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_4);\n    __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 249, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_5);\n    __Pyx_INCREF(__pyx_v_shape);\n    __Pyx_GIVEREF(__pyx_v_shape);\n    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_shape);\n    __Pyx_GIVEREF(__pyx_t_2);\n    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);\n    __Pyx_GIVEREF(__pyx_t_3);\n    PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_3);\n    __Pyx_GIVEREF(__pyx_t_4);\n    PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_4);\n    __pyx_t_2 = 0;\n    __pyx_t_3 = 0;\n    __pyx_t_4 = 0;\n    __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_array_type), __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 249, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_4);\n    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;\n    __pyx_v_result = ((struct __pyx_array_obj *)__pyx_t_4);\n    __pyx_t_4 = 0;\n\n    /* \"View.MemoryView\":248\n *     cdef array result\n * \n *     if buf == NULL:             # <<<<<<<<<<<<<<\n *         result = array(shape, itemsize, format, mode.decode('ASCII'))\n *     else:\n */\n    goto __pyx_L3;\n  }\n\n  /* \"View.MemoryView\":251\n *         result = array(shape, itemsize, format, mode.decode('ASCII'))\n *     else:\n *         result = array(shape, itemsize, format, mode.decode('ASCII'),             # <<<<<<<<<<<<<<\n *                        allocate_buffer=False)\n *         result.data = buf\n */\n  /*else*/ {\n    __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_itemsize); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 251, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_4);\n    __pyx_t_5 = __Pyx_PyBytes_FromString(__pyx_v_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 251, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_5);\n    __pyx_t_3 = __Pyx_decode_c_string(__pyx_v_mode, 0, strlen(__pyx_v_mode), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 251, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_3);\n    __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 251, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_2);\n    __Pyx_INCREF(__pyx_v_shape);\n    __Pyx_GIVEREF(__pyx_v_shape);\n    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_shape);\n    __Pyx_GIVEREF(__pyx_t_4);\n    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_4);\n    __Pyx_GIVEREF(__pyx_t_5);\n    PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_5);\n    __Pyx_GIVEREF(__pyx_t_3);\n    PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_t_3);\n    __pyx_t_4 = 0;\n    __pyx_t_5 = 0;\n    __pyx_t_3 = 0;\n\n    /* \"View.MemoryView\":252\n *     else:\n *         result = array(shape, itemsize, format, mode.decode('ASCII'),\n *                        allocate_buffer=False)             # <<<<<<<<<<<<<<\n *         result.data = buf\n * \n */\n    __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 252, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_3);\n    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_allocate_buffer, Py_False) < 0) __PYX_ERR(1, 252, __pyx_L1_error)\n\n    /* \"View.MemoryView\":251\n *         result = array(shape, itemsize, format, mode.decode('ASCII'))\n *     else:\n *         result = array(shape, itemsize, format, mode.decode('ASCII'),             # <<<<<<<<<<<<<<\n *                        allocate_buffer=False)\n *         result.data = buf\n */\n    __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_array_type), __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 251, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_5);\n    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;\n    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;\n    __pyx_v_result = ((struct __pyx_array_obj *)__pyx_t_5);\n    __pyx_t_5 = 0;\n\n    /* \"View.MemoryView\":253\n *         result = array(shape, itemsize, format, mode.decode('ASCII'),\n *                        allocate_buffer=False)\n *         result.data = buf             # <<<<<<<<<<<<<<\n * \n *     return result\n */\n    __pyx_v_result->data = __pyx_v_buf;\n  }\n  __pyx_L3:;\n\n  /* \"View.MemoryView\":255\n *         result.data = buf\n * \n *     return result             # <<<<<<<<<<<<<<\n * \n * \n */\n  __Pyx_XDECREF(((PyObject *)__pyx_r));\n  __Pyx_INCREF(((PyObject *)__pyx_v_result));\n  __pyx_r = __pyx_v_result;\n  goto __pyx_L0;\n\n  /* \"View.MemoryView\":244\n * \n * @cname(\"__pyx_array_new\")\n * cdef array array_cwrapper(tuple shape, Py_ssize_t itemsize, char *format,             # <<<<<<<<<<<<<<\n *                           char *mode, char *buf):\n *     cdef array result\n */\n\n  /* function exit code */\n  __pyx_L1_error:;\n  __Pyx_XDECREF(__pyx_t_2);\n  __Pyx_XDECREF(__pyx_t_3);\n  __Pyx_XDECREF(__pyx_t_4);\n  __Pyx_XDECREF(__pyx_t_5);\n  __Pyx_AddTraceback(\"View.MemoryView.array_cwrapper\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n  __pyx_r = 0;\n  __pyx_L0:;\n  __Pyx_XDECREF((PyObject *)__pyx_v_result);\n  __Pyx_XGIVEREF((PyObject *)__pyx_r);\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\n/* \"View.MemoryView\":281\n * cdef class Enum(object):\n *     cdef object name\n *     def __init__(self, name):             # <<<<<<<<<<<<<<\n *         self.name = name\n *     def __repr__(self):\n */\n\n/* Python wrapper */\nstatic int __pyx_MemviewEnum___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/\nstatic int __pyx_MemviewEnum___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {\n  PyObject *__pyx_v_name = 0;\n  int __pyx_lineno = 0;\n  const char *__pyx_filename = NULL;\n  int __pyx_clineno = 0;\n  int __pyx_r;\n  __Pyx_RefNannyDeclarations\n  __Pyx_RefNannySetupContext(\"__init__ (wrapper)\", 0);\n  {\n    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name,0};\n    PyObject* values[1] = {0};\n    if (unlikely(__pyx_kwds)) {\n      Py_ssize_t kw_args;\n      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);\n      switch (pos_args) {\n        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);\n        CYTHON_FALLTHROUGH;\n        case  0: break;\n        default: goto __pyx_L5_argtuple_error;\n      }\n      kw_args = PyDict_Size(__pyx_kwds);\n      switch (pos_args) {\n        case  0:\n        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--;\n        else goto __pyx_L5_argtuple_error;\n      }\n      if (unlikely(kw_args > 0)) {\n        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, \"__init__\") < 0)) __PYX_ERR(1, 281, __pyx_L3_error)\n      }\n    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {\n      goto __pyx_L5_argtuple_error;\n    } else {\n      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);\n    }\n    __pyx_v_name = values[0];\n  }\n  goto __pyx_L4_argument_unpacking_done;\n  __pyx_L5_argtuple_error:;\n  __Pyx_RaiseArgtupleInvalid(\"__init__\", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 281, __pyx_L3_error)\n  __pyx_L3_error:;\n  __Pyx_AddTraceback(\"View.MemoryView.Enum.__init__\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n  __Pyx_RefNannyFinishContext();\n  return -1;\n  __pyx_L4_argument_unpacking_done:;\n  __pyx_r = __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self), __pyx_v_name);\n\n  /* function exit code */\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\nstatic int __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v_name) {\n  int __pyx_r;\n  __Pyx_RefNannyDeclarations\n  __Pyx_RefNannySetupContext(\"__init__\", 0);\n\n  /* \"View.MemoryView\":282\n *     cdef object name\n *     def __init__(self, name):\n *         self.name = name             # <<<<<<<<<<<<<<\n *     def __repr__(self):\n *         return self.name\n */\n  __Pyx_INCREF(__pyx_v_name);\n  __Pyx_GIVEREF(__pyx_v_name);\n  __Pyx_GOTREF(__pyx_v_self->name);\n  __Pyx_DECREF(__pyx_v_self->name);\n  __pyx_v_self->name = __pyx_v_name;\n\n  /* \"View.MemoryView\":281\n * cdef class Enum(object):\n *     cdef object name\n *     def __init__(self, name):             # <<<<<<<<<<<<<<\n *         self.name = name\n *     def __repr__(self):\n */\n\n  /* function exit code */\n  __pyx_r = 0;\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\n/* \"View.MemoryView\":283\n *     def __init__(self, name):\n *         self.name = name\n *     def __repr__(self):             # <<<<<<<<<<<<<<\n *         return self.name\n * \n */\n\n/* Python wrapper */\nstatic PyObject *__pyx_MemviewEnum___repr__(PyObject *__pyx_v_self); /*proto*/\nstatic PyObject *__pyx_MemviewEnum___repr__(PyObject *__pyx_v_self) {\n  PyObject *__pyx_r = 0;\n  __Pyx_RefNannyDeclarations\n  __Pyx_RefNannySetupContext(\"__repr__ (wrapper)\", 0);\n  __pyx_r = __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum_2__repr__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self));\n\n  /* function exit code */\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\nstatic PyObject *__pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum_2__repr__(struct __pyx_MemviewEnum_obj *__pyx_v_self) {\n  PyObject *__pyx_r = NULL;\n  __Pyx_RefNannyDeclarations\n  __Pyx_RefNannySetupContext(\"__repr__\", 0);\n\n  /* \"View.MemoryView\":284\n *         self.name = name\n *     def __repr__(self):\n *         return self.name             # <<<<<<<<<<<<<<\n * \n * cdef generic = Enum(\"<strided and direct or indirect>\")\n */\n  __Pyx_XDECREF(__pyx_r);\n  __Pyx_INCREF(__pyx_v_self->name);\n  __pyx_r = __pyx_v_self->name;\n  goto __pyx_L0;\n\n  /* \"View.MemoryView\":283\n *     def __init__(self, name):\n *         self.name = name\n *     def __repr__(self):             # <<<<<<<<<<<<<<\n *         return self.name\n * \n */\n\n  /* function exit code */\n  __pyx_L0:;\n  __Pyx_XGIVEREF(__pyx_r);\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\n/* \"(tree fragment)\":1\n * def __reduce_cython__(self):             # <<<<<<<<<<<<<<\n *     cdef tuple state\n *     cdef object _dict\n */\n\n/* Python wrapper */\nstatic PyObject *__pyx_pw___pyx_MemviewEnum_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/\nstatic PyObject *__pyx_pw___pyx_MemviewEnum_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {\n  PyObject *__pyx_r = 0;\n  __Pyx_RefNannyDeclarations\n  __Pyx_RefNannySetupContext(\"__reduce_cython__ (wrapper)\", 0);\n  __pyx_r = __pyx_pf___pyx_MemviewEnum___reduce_cython__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self));\n\n  /* function exit code */\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\nstatic PyObject *__pyx_pf___pyx_MemviewEnum___reduce_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self) {\n  PyObject *__pyx_v_state = 0;\n  PyObject *__pyx_v__dict = 0;\n  int __pyx_v_use_setstate;\n  PyObject *__pyx_r = NULL;\n  __Pyx_RefNannyDeclarations\n  PyObject *__pyx_t_1 = NULL;\n  int __pyx_t_2;\n  int __pyx_t_3;\n  PyObject *__pyx_t_4 = NULL;\n  PyObject *__pyx_t_5 = NULL;\n  int __pyx_lineno = 0;\n  const char *__pyx_filename = NULL;\n  int __pyx_clineno = 0;\n  __Pyx_RefNannySetupContext(\"__reduce_cython__\", 0);\n\n  /* \"(tree fragment)\":5\n *     cdef object _dict\n *     cdef bint use_setstate\n *     state = (self.name,)             # <<<<<<<<<<<<<<\n *     _dict = getattr(self, '__dict__', None)\n *     if _dict is not None:\n */\n  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __Pyx_INCREF(__pyx_v_self->name);\n  __Pyx_GIVEREF(__pyx_v_self->name);\n  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->name);\n  __pyx_v_state = ((PyObject*)__pyx_t_1);\n  __pyx_t_1 = 0;\n\n  /* \"(tree fragment)\":6\n *     cdef bint use_setstate\n *     state = (self.name,)\n *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<\n *     if _dict is not None:\n *         state += (_dict,)\n */\n  __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __pyx_v__dict = __pyx_t_1;\n  __pyx_t_1 = 0;\n\n  /* \"(tree fragment)\":7\n *     state = (self.name,)\n *     _dict = getattr(self, '__dict__', None)\n *     if _dict is not None:             # <<<<<<<<<<<<<<\n *         state += (_dict,)\n *         use_setstate = True\n */\n  __pyx_t_2 = (__pyx_v__dict != Py_None);\n  __pyx_t_3 = (__pyx_t_2 != 0);\n  if (__pyx_t_3) {\n\n    /* \"(tree fragment)\":8\n *     _dict = getattr(self, '__dict__', None)\n *     if _dict is not None:\n *         state += (_dict,)             # <<<<<<<<<<<<<<\n *         use_setstate = True\n *     else:\n */\n    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_1);\n    __Pyx_INCREF(__pyx_v__dict);\n    __Pyx_GIVEREF(__pyx_v__dict);\n    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);\n    __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 8, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_4);\n    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));\n    __pyx_t_4 = 0;\n\n    /* \"(tree fragment)\":9\n *     if _dict is not None:\n *         state += (_dict,)\n *         use_setstate = True             # <<<<<<<<<<<<<<\n *     else:\n *         use_setstate = self.name is not None\n */\n    __pyx_v_use_setstate = 1;\n\n    /* \"(tree fragment)\":7\n *     state = (self.name,)\n *     _dict = getattr(self, '__dict__', None)\n *     if _dict is not None:             # <<<<<<<<<<<<<<\n *         state += (_dict,)\n *         use_setstate = True\n */\n    goto __pyx_L3;\n  }\n\n  /* \"(tree fragment)\":11\n *         use_setstate = True\n *     else:\n *         use_setstate = self.name is not None             # <<<<<<<<<<<<<<\n *     if use_setstate:\n *         return __pyx_unpickle_Enum, (type(self), 0xb068931, None), state\n */\n  /*else*/ {\n    __pyx_t_3 = (__pyx_v_self->name != Py_None);\n    __pyx_v_use_setstate = __pyx_t_3;\n  }\n  __pyx_L3:;\n\n  /* \"(tree fragment)\":12\n *     else:\n *         use_setstate = self.name is not None\n *     if use_setstate:             # <<<<<<<<<<<<<<\n *         return __pyx_unpickle_Enum, (type(self), 0xb068931, None), state\n *     else:\n */\n  __pyx_t_3 = (__pyx_v_use_setstate != 0);\n  if (__pyx_t_3) {\n\n    /* \"(tree fragment)\":13\n *         use_setstate = self.name is not None\n *     if use_setstate:\n *         return __pyx_unpickle_Enum, (type(self), 0xb068931, None), state             # <<<<<<<<<<<<<<\n *     else:\n *         return __pyx_unpickle_Enum, (type(self), 0xb068931, state)\n */\n    __Pyx_XDECREF(__pyx_r);\n    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_Enum); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_4);\n    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_1);\n    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));\n    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));\n    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));\n    __Pyx_INCREF(__pyx_int_184977713);\n    __Pyx_GIVEREF(__pyx_int_184977713);\n    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_184977713);\n    __Pyx_INCREF(Py_None);\n    __Pyx_GIVEREF(Py_None);\n    PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);\n    __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_5);\n    __Pyx_GIVEREF(__pyx_t_4);\n    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);\n    __Pyx_GIVEREF(__pyx_t_1);\n    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1);\n    __Pyx_INCREF(__pyx_v_state);\n    __Pyx_GIVEREF(__pyx_v_state);\n    PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state);\n    __pyx_t_4 = 0;\n    __pyx_t_1 = 0;\n    __pyx_r = __pyx_t_5;\n    __pyx_t_5 = 0;\n    goto __pyx_L0;\n\n    /* \"(tree fragment)\":12\n *     else:\n *         use_setstate = self.name is not None\n *     if use_setstate:             # <<<<<<<<<<<<<<\n *         return __pyx_unpickle_Enum, (type(self), 0xb068931, None), state\n *     else:\n */\n  }\n\n  /* \"(tree fragment)\":15\n *         return __pyx_unpickle_Enum, (type(self), 0xb068931, None), state\n *     else:\n *         return __pyx_unpickle_Enum, (type(self), 0xb068931, state)             # <<<<<<<<<<<<<<\n * def __setstate_cython__(self, __pyx_state):\n *     __pyx_unpickle_Enum__set_state(self, __pyx_state)\n */\n  /*else*/ {\n    __Pyx_XDECREF(__pyx_r);\n    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_Enum); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_5);\n    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_1);\n    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));\n    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));\n    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));\n    __Pyx_INCREF(__pyx_int_184977713);\n    __Pyx_GIVEREF(__pyx_int_184977713);\n    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_184977713);\n    __Pyx_INCREF(__pyx_v_state);\n    __Pyx_GIVEREF(__pyx_v_state);\n    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);\n    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_4);\n    __Pyx_GIVEREF(__pyx_t_5);\n    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);\n    __Pyx_GIVEREF(__pyx_t_1);\n    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);\n    __pyx_t_5 = 0;\n    __pyx_t_1 = 0;\n    __pyx_r = __pyx_t_4;\n    __pyx_t_4 = 0;\n    goto __pyx_L0;\n  }\n\n  /* \"(tree fragment)\":1\n * def __reduce_cython__(self):             # <<<<<<<<<<<<<<\n *     cdef tuple state\n *     cdef object _dict\n */\n\n  /* function exit code */\n  __pyx_L1_error:;\n  __Pyx_XDECREF(__pyx_t_1);\n  __Pyx_XDECREF(__pyx_t_4);\n  __Pyx_XDECREF(__pyx_t_5);\n  __Pyx_AddTraceback(\"View.MemoryView.Enum.__reduce_cython__\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n  __pyx_r = NULL;\n  __pyx_L0:;\n  __Pyx_XDECREF(__pyx_v_state);\n  __Pyx_XDECREF(__pyx_v__dict);\n  __Pyx_XGIVEREF(__pyx_r);\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\n/* \"(tree fragment)\":16\n *     else:\n *         return __pyx_unpickle_Enum, (type(self), 0xb068931, state)\n * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<\n *     __pyx_unpickle_Enum__set_state(self, __pyx_state)\n */\n\n/* Python wrapper */\nstatic PyObject *__pyx_pw___pyx_MemviewEnum_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/\nstatic PyObject *__pyx_pw___pyx_MemviewEnum_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {\n  PyObject *__pyx_r = 0;\n  __Pyx_RefNannyDeclarations\n  __Pyx_RefNannySetupContext(\"__setstate_cython__ (wrapper)\", 0);\n  __pyx_r = __pyx_pf___pyx_MemviewEnum_2__setstate_cython__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));\n\n  /* function exit code */\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\nstatic PyObject *__pyx_pf___pyx_MemviewEnum_2__setstate_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v___pyx_state) {\n  PyObject *__pyx_r = NULL;\n  __Pyx_RefNannyDeclarations\n  PyObject *__pyx_t_1 = NULL;\n  int __pyx_lineno = 0;\n  const char *__pyx_filename = NULL;\n  int __pyx_clineno = 0;\n  __Pyx_RefNannySetupContext(\"__setstate_cython__\", 0);\n\n  /* \"(tree fragment)\":17\n *         return __pyx_unpickle_Enum, (type(self), 0xb068931, state)\n * def __setstate_cython__(self, __pyx_state):\n *     __pyx_unpickle_Enum__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<\n */\n  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, \"Expected %.16s, got %.200s\", \"tuple\", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 17, __pyx_L1_error)\n  __pyx_t_1 = __pyx_unpickle_Enum__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n\n  /* \"(tree fragment)\":16\n *     else:\n *         return __pyx_unpickle_Enum, (type(self), 0xb068931, state)\n * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<\n *     __pyx_unpickle_Enum__set_state(self, __pyx_state)\n */\n\n  /* function exit code */\n  __pyx_r = Py_None; __Pyx_INCREF(Py_None);\n  goto __pyx_L0;\n  __pyx_L1_error:;\n  __Pyx_XDECREF(__pyx_t_1);\n  __Pyx_AddTraceback(\"View.MemoryView.Enum.__setstate_cython__\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n  __pyx_r = NULL;\n  __pyx_L0:;\n  __Pyx_XGIVEREF(__pyx_r);\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\n/* \"View.MemoryView\":298\n * \n * @cname('__pyx_align_pointer')\n * cdef void *align_pointer(void *memory, size_t alignment) nogil:             # <<<<<<<<<<<<<<\n *     \"Align pointer memory on a given boundary\"\n *     cdef Py_intptr_t aligned_p = <Py_intptr_t> memory\n */\n\nstatic void *__pyx_align_pointer(void *__pyx_v_memory, size_t __pyx_v_alignment) {\n  Py_intptr_t __pyx_v_aligned_p;\n  size_t __pyx_v_offset;\n  void *__pyx_r;\n  int __pyx_t_1;\n\n  /* \"View.MemoryView\":300\n * cdef void *align_pointer(void *memory, size_t alignment) nogil:\n *     \"Align pointer memory on a given boundary\"\n *     cdef Py_intptr_t aligned_p = <Py_intptr_t> memory             # <<<<<<<<<<<<<<\n *     cdef size_t offset\n * \n */\n  __pyx_v_aligned_p = ((Py_intptr_t)__pyx_v_memory);\n\n  /* \"View.MemoryView\":304\n * \n *     with cython.cdivision(True):\n *         offset = aligned_p % alignment             # <<<<<<<<<<<<<<\n * \n *     if offset > 0:\n */\n  __pyx_v_offset = (__pyx_v_aligned_p % __pyx_v_alignment);\n\n  /* \"View.MemoryView\":306\n *         offset = aligned_p % alignment\n * \n *     if offset > 0:             # <<<<<<<<<<<<<<\n *         aligned_p += alignment - offset\n * \n */\n  __pyx_t_1 = ((__pyx_v_offset > 0) != 0);\n  if (__pyx_t_1) {\n\n    /* \"View.MemoryView\":307\n * \n *     if offset > 0:\n *         aligned_p += alignment - offset             # <<<<<<<<<<<<<<\n * \n *     return <void *> aligned_p\n */\n    __pyx_v_aligned_p = (__pyx_v_aligned_p + (__pyx_v_alignment - __pyx_v_offset));\n\n    /* \"View.MemoryView\":306\n *         offset = aligned_p % alignment\n * \n *     if offset > 0:             # <<<<<<<<<<<<<<\n *         aligned_p += alignment - offset\n * \n */\n  }\n\n  /* \"View.MemoryView\":309\n *         aligned_p += alignment - offset\n * \n *     return <void *> aligned_p             # <<<<<<<<<<<<<<\n * \n * \n */\n  __pyx_r = ((void *)__pyx_v_aligned_p);\n  goto __pyx_L0;\n\n  /* \"View.MemoryView\":298\n * \n * @cname('__pyx_align_pointer')\n * cdef void *align_pointer(void *memory, size_t alignment) nogil:             # <<<<<<<<<<<<<<\n *     \"Align pointer memory on a given boundary\"\n *     cdef Py_intptr_t aligned_p = <Py_intptr_t> memory\n */\n\n  /* function exit code */\n  __pyx_L0:;\n  return __pyx_r;\n}\n\n/* \"View.MemoryView\":345\n *     cdef __Pyx_TypeInfo *typeinfo\n * \n *     def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False):             # <<<<<<<<<<<<<<\n *         self.obj = obj\n *         self.flags = flags\n */\n\n/* Python wrapper */\nstatic int __pyx_memoryview___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/\nstatic int __pyx_memoryview___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {\n  PyObject *__pyx_v_obj = 0;\n  int __pyx_v_flags;\n  int __pyx_v_dtype_is_object;\n  int __pyx_lineno = 0;\n  const char *__pyx_filename = NULL;\n  int __pyx_clineno = 0;\n  int __pyx_r;\n  __Pyx_RefNannyDeclarations\n  __Pyx_RefNannySetupContext(\"__cinit__ (wrapper)\", 0);\n  {\n    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_flags,&__pyx_n_s_dtype_is_object,0};\n    PyObject* values[3] = {0,0,0};\n    if (unlikely(__pyx_kwds)) {\n      Py_ssize_t kw_args;\n      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);\n      switch (pos_args) {\n        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);\n        CYTHON_FALLTHROUGH;\n        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);\n        CYTHON_FALLTHROUGH;\n        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);\n        CYTHON_FALLTHROUGH;\n        case  0: break;\n        default: goto __pyx_L5_argtuple_error;\n      }\n      kw_args = PyDict_Size(__pyx_kwds);\n      switch (pos_args) {\n        case  0:\n        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;\n        else goto __pyx_L5_argtuple_error;\n        CYTHON_FALLTHROUGH;\n        case  1:\n        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_flags)) != 0)) kw_args--;\n        else {\n          __Pyx_RaiseArgtupleInvalid(\"__cinit__\", 0, 2, 3, 1); __PYX_ERR(1, 345, __pyx_L3_error)\n        }\n        CYTHON_FALLTHROUGH;\n        case  2:\n        if (kw_args > 0) {\n          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dtype_is_object);\n          if (value) { values[2] = value; kw_args--; }\n        }\n      }\n      if (unlikely(kw_args > 0)) {\n        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, \"__cinit__\") < 0)) __PYX_ERR(1, 345, __pyx_L3_error)\n      }\n    } else {\n      switch (PyTuple_GET_SIZE(__pyx_args)) {\n        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);\n        CYTHON_FALLTHROUGH;\n        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);\n        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);\n        break;\n        default: goto __pyx_L5_argtuple_error;\n      }\n    }\n    __pyx_v_obj = values[0];\n    __pyx_v_flags = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_flags == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 345, __pyx_L3_error)\n    if (values[2]) {\n      __pyx_v_dtype_is_object = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_dtype_is_object == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 345, __pyx_L3_error)\n    } else {\n      __pyx_v_dtype_is_object = ((int)0);\n    }\n  }\n  goto __pyx_L4_argument_unpacking_done;\n  __pyx_L5_argtuple_error:;\n  __Pyx_RaiseArgtupleInvalid(\"__cinit__\", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 345, __pyx_L3_error)\n  __pyx_L3_error:;\n  __Pyx_AddTraceback(\"View.MemoryView.memoryview.__cinit__\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n  __Pyx_RefNannyFinishContext();\n  return -1;\n  __pyx_L4_argument_unpacking_done:;\n  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit__(((struct __pyx_memoryview_obj *)__pyx_v_self), __pyx_v_obj, __pyx_v_flags, __pyx_v_dtype_is_object);\n\n  /* function exit code */\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\nstatic int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_v_flags, int __pyx_v_dtype_is_object) {\n  int __pyx_r;\n  __Pyx_RefNannyDeclarations\n  int __pyx_t_1;\n  int __pyx_t_2;\n  int __pyx_t_3;\n  int __pyx_t_4;\n  int __pyx_lineno = 0;\n  const char *__pyx_filename = NULL;\n  int __pyx_clineno = 0;\n  __Pyx_RefNannySetupContext(\"__cinit__\", 0);\n\n  /* \"View.MemoryView\":346\n * \n *     def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False):\n *         self.obj = obj             # <<<<<<<<<<<<<<\n *         self.flags = flags\n *         if type(self) is memoryview or obj is not None:\n */\n  __Pyx_INCREF(__pyx_v_obj);\n  __Pyx_GIVEREF(__pyx_v_obj);\n  __Pyx_GOTREF(__pyx_v_self->obj);\n  __Pyx_DECREF(__pyx_v_self->obj);\n  __pyx_v_self->obj = __pyx_v_obj;\n\n  /* \"View.MemoryView\":347\n *     def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False):\n *         self.obj = obj\n *         self.flags = flags             # <<<<<<<<<<<<<<\n *         if type(self) is memoryview or obj is not None:\n *             __Pyx_GetBuffer(obj, &self.view, flags)\n */\n  __pyx_v_self->flags = __pyx_v_flags;\n\n  /* \"View.MemoryView\":348\n *         self.obj = obj\n *         self.flags = flags\n *         if type(self) is memoryview or obj is not None:             # <<<<<<<<<<<<<<\n *             __Pyx_GetBuffer(obj, &self.view, flags)\n *             if <PyObject *> self.view.obj == NULL:\n */\n  __pyx_t_2 = (((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))) == ((PyObject *)__pyx_memoryview_type));\n  __pyx_t_3 = (__pyx_t_2 != 0);\n  if (!__pyx_t_3) {\n  } else {\n    __pyx_t_1 = __pyx_t_3;\n    goto __pyx_L4_bool_binop_done;\n  }\n  __pyx_t_3 = (__pyx_v_obj != Py_None);\n  __pyx_t_2 = (__pyx_t_3 != 0);\n  __pyx_t_1 = __pyx_t_2;\n  __pyx_L4_bool_binop_done:;\n  if (__pyx_t_1) {\n\n    /* \"View.MemoryView\":349\n *         self.flags = flags\n *         if type(self) is memoryview or obj is not None:\n *             __Pyx_GetBuffer(obj, &self.view, flags)             # <<<<<<<<<<<<<<\n *             if <PyObject *> self.view.obj == NULL:\n *                 (<__pyx_buffer *> &self.view).obj = Py_None\n */\n    __pyx_t_4 = __Pyx_GetBuffer(__pyx_v_obj, (&__pyx_v_self->view), __pyx_v_flags); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 349, __pyx_L1_error)\n\n    /* \"View.MemoryView\":350\n *         if type(self) is memoryview or obj is not None:\n *             __Pyx_GetBuffer(obj, &self.view, flags)\n *             if <PyObject *> self.view.obj == NULL:             # <<<<<<<<<<<<<<\n *                 (<__pyx_buffer *> &self.view).obj = Py_None\n *                 Py_INCREF(Py_None)\n */\n    __pyx_t_1 = ((((PyObject *)__pyx_v_self->view.obj) == NULL) != 0);\n    if (__pyx_t_1) {\n\n      /* \"View.MemoryView\":351\n *             __Pyx_GetBuffer(obj, &self.view, flags)\n *             if <PyObject *> self.view.obj == NULL:\n *                 (<__pyx_buffer *> &self.view).obj = Py_None             # <<<<<<<<<<<<<<\n *                 Py_INCREF(Py_None)\n * \n */\n      ((Py_buffer *)(&__pyx_v_self->view))->obj = Py_None;\n\n      /* \"View.MemoryView\":352\n *             if <PyObject *> self.view.obj == NULL:\n *                 (<__pyx_buffer *> &self.view).obj = Py_None\n *                 Py_INCREF(Py_None)             # <<<<<<<<<<<<<<\n * \n *         global __pyx_memoryview_thread_locks_used\n */\n      Py_INCREF(Py_None);\n\n      /* \"View.MemoryView\":350\n *         if type(self) is memoryview or obj is not None:\n *             __Pyx_GetBuffer(obj, &self.view, flags)\n *             if <PyObject *> self.view.obj == NULL:             # <<<<<<<<<<<<<<\n *                 (<__pyx_buffer *> &self.view).obj = Py_None\n *                 Py_INCREF(Py_None)\n */\n    }\n\n    /* \"View.MemoryView\":348\n *         self.obj = obj\n *         self.flags = flags\n *         if type(self) is memoryview or obj is not None:             # <<<<<<<<<<<<<<\n *             __Pyx_GetBuffer(obj, &self.view, flags)\n *             if <PyObject *> self.view.obj == NULL:\n */\n  }\n\n  /* \"View.MemoryView\":355\n * \n *         global __pyx_memoryview_thread_locks_used\n *         if __pyx_memoryview_thread_locks_used < THREAD_LOCKS_PREALLOCATED:             # <<<<<<<<<<<<<<\n *             self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]\n *             __pyx_memoryview_thread_locks_used += 1\n */\n  __pyx_t_1 = ((__pyx_memoryview_thread_locks_used < 8) != 0);\n  if (__pyx_t_1) {\n\n    /* \"View.MemoryView\":356\n *         global __pyx_memoryview_thread_locks_used\n *         if __pyx_memoryview_thread_locks_used < THREAD_LOCKS_PREALLOCATED:\n *             self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]             # <<<<<<<<<<<<<<\n *             __pyx_memoryview_thread_locks_used += 1\n *         if self.lock is NULL:\n */\n    __pyx_v_self->lock = (__pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]);\n\n    /* \"View.MemoryView\":357\n *         if __pyx_memoryview_thread_locks_used < THREAD_LOCKS_PREALLOCATED:\n *             self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]\n *             __pyx_memoryview_thread_locks_used += 1             # <<<<<<<<<<<<<<\n *         if self.lock is NULL:\n *             self.lock = PyThread_allocate_lock()\n */\n    __pyx_memoryview_thread_locks_used = (__pyx_memoryview_thread_locks_used + 1);\n\n    /* \"View.MemoryView\":355\n * \n *         global __pyx_memoryview_thread_locks_used\n *         if __pyx_memoryview_thread_locks_used < THREAD_LOCKS_PREALLOCATED:             # <<<<<<<<<<<<<<\n *             self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]\n *             __pyx_memoryview_thread_locks_used += 1\n */\n  }\n\n  /* \"View.MemoryView\":358\n *             self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]\n *             __pyx_memoryview_thread_locks_used += 1\n *         if self.lock is NULL:             # <<<<<<<<<<<<<<\n *             self.lock = PyThread_allocate_lock()\n *             if self.lock is NULL:\n */\n  __pyx_t_1 = ((__pyx_v_self->lock == NULL) != 0);\n  if (__pyx_t_1) {\n\n    /* \"View.MemoryView\":359\n *             __pyx_memoryview_thread_locks_used += 1\n *         if self.lock is NULL:\n *             self.lock = PyThread_allocate_lock()             # <<<<<<<<<<<<<<\n *             if self.lock is NULL:\n *                 raise MemoryError\n */\n    __pyx_v_self->lock = PyThread_allocate_lock();\n\n    /* \"View.MemoryView\":360\n *         if self.lock is NULL:\n *             self.lock = PyThread_allocate_lock()\n *             if self.lock is NULL:             # <<<<<<<<<<<<<<\n *                 raise MemoryError\n * \n */\n    __pyx_t_1 = ((__pyx_v_self->lock == NULL) != 0);\n    if (unlikely(__pyx_t_1)) {\n\n      /* \"View.MemoryView\":361\n *             self.lock = PyThread_allocate_lock()\n *             if self.lock is NULL:\n *                 raise MemoryError             # <<<<<<<<<<<<<<\n * \n *         if flags & PyBUF_FORMAT:\n */\n      PyErr_NoMemory(); __PYX_ERR(1, 361, __pyx_L1_error)\n\n      /* \"View.MemoryView\":360\n *         if self.lock is NULL:\n *             self.lock = PyThread_allocate_lock()\n *             if self.lock is NULL:             # <<<<<<<<<<<<<<\n *                 raise MemoryError\n * \n */\n    }\n\n    /* \"View.MemoryView\":358\n *             self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]\n *             __pyx_memoryview_thread_locks_used += 1\n *         if self.lock is NULL:             # <<<<<<<<<<<<<<\n *             self.lock = PyThread_allocate_lock()\n *             if self.lock is NULL:\n */\n  }\n\n  /* \"View.MemoryView\":363\n *                 raise MemoryError\n * \n *         if flags & PyBUF_FORMAT:             # <<<<<<<<<<<<<<\n *             self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\\0')\n *         else:\n */\n  __pyx_t_1 = ((__pyx_v_flags & PyBUF_FORMAT) != 0);\n  if (__pyx_t_1) {\n\n    /* \"View.MemoryView\":364\n * \n *         if flags & PyBUF_FORMAT:\n *             self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\\0')             # <<<<<<<<<<<<<<\n *         else:\n *             self.dtype_is_object = dtype_is_object\n */\n    __pyx_t_2 = (((__pyx_v_self->view.format[0]) == 'O') != 0);\n    if (__pyx_t_2) {\n    } else {\n      __pyx_t_1 = __pyx_t_2;\n      goto __pyx_L11_bool_binop_done;\n    }\n    __pyx_t_2 = (((__pyx_v_self->view.format[1]) == '\\x00') != 0);\n    __pyx_t_1 = __pyx_t_2;\n    __pyx_L11_bool_binop_done:;\n    __pyx_v_self->dtype_is_object = __pyx_t_1;\n\n    /* \"View.MemoryView\":363\n *                 raise MemoryError\n * \n *         if flags & PyBUF_FORMAT:             # <<<<<<<<<<<<<<\n *             self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\\0')\n *         else:\n */\n    goto __pyx_L10;\n  }\n\n  /* \"View.MemoryView\":366\n *             self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\\0')\n *         else:\n *             self.dtype_is_object = dtype_is_object             # <<<<<<<<<<<<<<\n * \n *         self.acquisition_count_aligned_p = <__pyx_atomic_int *> align_pointer(\n */\n  /*else*/ {\n    __pyx_v_self->dtype_is_object = __pyx_v_dtype_is_object;\n  }\n  __pyx_L10:;\n\n  /* \"View.MemoryView\":368\n *             self.dtype_is_object = dtype_is_object\n * \n *         self.acquisition_count_aligned_p = <__pyx_atomic_int *> align_pointer(             # <<<<<<<<<<<<<<\n *                   <void *> &self.acquisition_count[0], sizeof(__pyx_atomic_int))\n *         self.typeinfo = NULL\n */\n  __pyx_v_self->acquisition_count_aligned_p = ((__pyx_atomic_int *)__pyx_align_pointer(((void *)(&(__pyx_v_self->acquisition_count[0]))), (sizeof(__pyx_atomic_int))));\n\n  /* \"View.MemoryView\":370\n *         self.acquisition_count_aligned_p = <__pyx_atomic_int *> align_pointer(\n *                   <void *> &self.acquisition_count[0], sizeof(__pyx_atomic_int))\n *         self.typeinfo = NULL             # <<<<<<<<<<<<<<\n * \n *     def __dealloc__(memoryview self):\n */\n  __pyx_v_self->typeinfo = NULL;\n\n  /* \"View.MemoryView\":345\n *     cdef __Pyx_TypeInfo *typeinfo\n * \n *     def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False):             # <<<<<<<<<<<<<<\n *         self.obj = obj\n *         self.flags = flags\n */\n\n  /* function exit code */\n  __pyx_r = 0;\n  goto __pyx_L0;\n  __pyx_L1_error:;\n  __Pyx_AddTraceback(\"View.MemoryView.memoryview.__cinit__\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n  __pyx_r = -1;\n  __pyx_L0:;\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\n/* \"View.MemoryView\":372\n *         self.typeinfo = NULL\n * \n *     def __dealloc__(memoryview self):             # <<<<<<<<<<<<<<\n *         if self.obj is not None:\n *             __Pyx_ReleaseBuffer(&self.view)\n */\n\n/* Python wrapper */\nstatic void __pyx_memoryview___dealloc__(PyObject *__pyx_v_self); /*proto*/\nstatic void __pyx_memoryview___dealloc__(PyObject *__pyx_v_self) {\n  __Pyx_RefNannyDeclarations\n  __Pyx_RefNannySetupContext(\"__dealloc__ (wrapper)\", 0);\n  __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__dealloc__(((struct __pyx_memoryview_obj *)__pyx_v_self));\n\n  /* function exit code */\n  __Pyx_RefNannyFinishContext();\n}\n\nstatic void __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__dealloc__(struct __pyx_memoryview_obj *__pyx_v_self) {\n  int __pyx_v_i;\n  __Pyx_RefNannyDeclarations\n  int __pyx_t_1;\n  int __pyx_t_2;\n  int __pyx_t_3;\n  int __pyx_t_4;\n  int __pyx_t_5;\n  PyThread_type_lock __pyx_t_6;\n  PyThread_type_lock __pyx_t_7;\n  __Pyx_RefNannySetupContext(\"__dealloc__\", 0);\n\n  /* \"View.MemoryView\":373\n * \n *     def __dealloc__(memoryview self):\n *         if self.obj is not None:             # <<<<<<<<<<<<<<\n *             __Pyx_ReleaseBuffer(&self.view)\n *         elif (<__pyx_buffer *> &self.view).obj == Py_None:\n */\n  __pyx_t_1 = (__pyx_v_self->obj != Py_None);\n  __pyx_t_2 = (__pyx_t_1 != 0);\n  if (__pyx_t_2) {\n\n    /* \"View.MemoryView\":374\n *     def __dealloc__(memoryview self):\n *         if self.obj is not None:\n *             __Pyx_ReleaseBuffer(&self.view)             # <<<<<<<<<<<<<<\n *         elif (<__pyx_buffer *> &self.view).obj == Py_None:\n * \n */\n    __Pyx_ReleaseBuffer((&__pyx_v_self->view));\n\n    /* \"View.MemoryView\":373\n * \n *     def __dealloc__(memoryview self):\n *         if self.obj is not None:             # <<<<<<<<<<<<<<\n *             __Pyx_ReleaseBuffer(&self.view)\n *         elif (<__pyx_buffer *> &self.view).obj == Py_None:\n */\n    goto __pyx_L3;\n  }\n\n  /* \"View.MemoryView\":375\n *         if self.obj is not None:\n *             __Pyx_ReleaseBuffer(&self.view)\n *         elif (<__pyx_buffer *> &self.view).obj == Py_None:             # <<<<<<<<<<<<<<\n * \n *             (<__pyx_buffer *> &self.view).obj = NULL\n */\n  __pyx_t_2 = ((((Py_buffer *)(&__pyx_v_self->view))->obj == Py_None) != 0);\n  if (__pyx_t_2) {\n\n    /* \"View.MemoryView\":377\n *         elif (<__pyx_buffer *> &self.view).obj == Py_None:\n * \n *             (<__pyx_buffer *> &self.view).obj = NULL             # <<<<<<<<<<<<<<\n *             Py_DECREF(Py_None)\n * \n */\n    ((Py_buffer *)(&__pyx_v_self->view))->obj = NULL;\n\n    /* \"View.MemoryView\":378\n * \n *             (<__pyx_buffer *> &self.view).obj = NULL\n *             Py_DECREF(Py_None)             # <<<<<<<<<<<<<<\n * \n *         cdef int i\n */\n    Py_DECREF(Py_None);\n\n    /* \"View.MemoryView\":375\n *         if self.obj is not None:\n *             __Pyx_ReleaseBuffer(&self.view)\n *         elif (<__pyx_buffer *> &self.view).obj == Py_None:             # <<<<<<<<<<<<<<\n * \n *             (<__pyx_buffer *> &self.view).obj = NULL\n */\n  }\n  __pyx_L3:;\n\n  /* \"View.MemoryView\":382\n *         cdef int i\n *         global __pyx_memoryview_thread_locks_used\n *         if self.lock != NULL:             # <<<<<<<<<<<<<<\n *             for i in range(__pyx_memoryview_thread_locks_used):\n *                 if __pyx_memoryview_thread_locks[i] is self.lock:\n */\n  __pyx_t_2 = ((__pyx_v_self->lock != NULL) != 0);\n  if (__pyx_t_2) {\n\n    /* \"View.MemoryView\":383\n *         global __pyx_memoryview_thread_locks_used\n *         if self.lock != NULL:\n *             for i in range(__pyx_memoryview_thread_locks_used):             # <<<<<<<<<<<<<<\n *                 if __pyx_memoryview_thread_locks[i] is self.lock:\n *                     __pyx_memoryview_thread_locks_used -= 1\n */\n    __pyx_t_3 = __pyx_memoryview_thread_locks_used;\n    __pyx_t_4 = __pyx_t_3;\n    for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {\n      __pyx_v_i = __pyx_t_5;\n\n      /* \"View.MemoryView\":384\n *         if self.lock != NULL:\n *             for i in range(__pyx_memoryview_thread_locks_used):\n *                 if __pyx_memoryview_thread_locks[i] is self.lock:             # <<<<<<<<<<<<<<\n *                     __pyx_memoryview_thread_locks_used -= 1\n *                     if i != __pyx_memoryview_thread_locks_used:\n */\n      __pyx_t_2 = (((__pyx_memoryview_thread_locks[__pyx_v_i]) == __pyx_v_self->lock) != 0);\n      if (__pyx_t_2) {\n\n        /* \"View.MemoryView\":385\n *             for i in range(__pyx_memoryview_thread_locks_used):\n *                 if __pyx_memoryview_thread_locks[i] is self.lock:\n *                     __pyx_memoryview_thread_locks_used -= 1             # <<<<<<<<<<<<<<\n *                     if i != __pyx_memoryview_thread_locks_used:\n *                         __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (\n */\n        __pyx_memoryview_thread_locks_used = (__pyx_memoryview_thread_locks_used - 1);\n\n        /* \"View.MemoryView\":386\n *                 if __pyx_memoryview_thread_locks[i] is self.lock:\n *                     __pyx_memoryview_thread_locks_used -= 1\n *                     if i != __pyx_memoryview_thread_locks_used:             # <<<<<<<<<<<<<<\n *                         __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (\n *                             __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])\n */\n        __pyx_t_2 = ((__pyx_v_i != __pyx_memoryview_thread_locks_used) != 0);\n        if (__pyx_t_2) {\n\n          /* \"View.MemoryView\":388\n *                     if i != __pyx_memoryview_thread_locks_used:\n *                         __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (\n *                             __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])             # <<<<<<<<<<<<<<\n *                     break\n *             else:\n */\n          __pyx_t_6 = (__pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]);\n          __pyx_t_7 = (__pyx_memoryview_thread_locks[__pyx_v_i]);\n\n          /* \"View.MemoryView\":387\n *                     __pyx_memoryview_thread_locks_used -= 1\n *                     if i != __pyx_memoryview_thread_locks_used:\n *                         __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (             # <<<<<<<<<<<<<<\n *                             __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])\n *                     break\n */\n          (__pyx_memoryview_thread_locks[__pyx_v_i]) = __pyx_t_6;\n          (__pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]) = __pyx_t_7;\n\n          /* \"View.MemoryView\":386\n *                 if __pyx_memoryview_thread_locks[i] is self.lock:\n *                     __pyx_memoryview_thread_locks_used -= 1\n *                     if i != __pyx_memoryview_thread_locks_used:             # <<<<<<<<<<<<<<\n *                         __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (\n *                             __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])\n */\n        }\n\n        /* \"View.MemoryView\":389\n *                         __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (\n *                             __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])\n *                     break             # <<<<<<<<<<<<<<\n *             else:\n *                 PyThread_free_lock(self.lock)\n */\n        goto __pyx_L6_break;\n\n        /* \"View.MemoryView\":384\n *         if self.lock != NULL:\n *             for i in range(__pyx_memoryview_thread_locks_used):\n *                 if __pyx_memoryview_thread_locks[i] is self.lock:             # <<<<<<<<<<<<<<\n *                     __pyx_memoryview_thread_locks_used -= 1\n *                     if i != __pyx_memoryview_thread_locks_used:\n */\n      }\n    }\n    /*else*/ {\n\n      /* \"View.MemoryView\":391\n *                     break\n *             else:\n *                 PyThread_free_lock(self.lock)             # <<<<<<<<<<<<<<\n * \n *     cdef char *get_item_pointer(memoryview self, object index) except NULL:\n */\n      PyThread_free_lock(__pyx_v_self->lock);\n    }\n    __pyx_L6_break:;\n\n    /* \"View.MemoryView\":382\n *         cdef int i\n *         global __pyx_memoryview_thread_locks_used\n *         if self.lock != NULL:             # <<<<<<<<<<<<<<\n *             for i in range(__pyx_memoryview_thread_locks_used):\n *                 if __pyx_memoryview_thread_locks[i] is self.lock:\n */\n  }\n\n  /* \"View.MemoryView\":372\n *         self.typeinfo = NULL\n * \n *     def __dealloc__(memoryview self):             # <<<<<<<<<<<<<<\n *         if self.obj is not None:\n *             __Pyx_ReleaseBuffer(&self.view)\n */\n\n  /* function exit code */\n  __Pyx_RefNannyFinishContext();\n}\n\n/* \"View.MemoryView\":393\n *                 PyThread_free_lock(self.lock)\n * \n *     cdef char *get_item_pointer(memoryview self, object index) except NULL:             # <<<<<<<<<<<<<<\n *         cdef Py_ssize_t dim\n *         cdef char *itemp = <char *> self.view.buf\n */\n\nstatic char *__pyx_memoryview_get_item_pointer(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index) {\n  Py_ssize_t __pyx_v_dim;\n  char *__pyx_v_itemp;\n  PyObject *__pyx_v_idx = NULL;\n  char *__pyx_r;\n  __Pyx_RefNannyDeclarations\n  Py_ssize_t __pyx_t_1;\n  PyObject *__pyx_t_2 = NULL;\n  Py_ssize_t __pyx_t_3;\n  PyObject *(*__pyx_t_4)(PyObject *);\n  PyObject *__pyx_t_5 = NULL;\n  Py_ssize_t __pyx_t_6;\n  char *__pyx_t_7;\n  int __pyx_lineno = 0;\n  const char *__pyx_filename = NULL;\n  int __pyx_clineno = 0;\n  __Pyx_RefNannySetupContext(\"get_item_pointer\", 0);\n\n  /* \"View.MemoryView\":395\n *     cdef char *get_item_pointer(memoryview self, object index) except NULL:\n *         cdef Py_ssize_t dim\n *         cdef char *itemp = <char *> self.view.buf             # <<<<<<<<<<<<<<\n * \n *         for dim, idx in enumerate(index):\n */\n  __pyx_v_itemp = ((char *)__pyx_v_self->view.buf);\n\n  /* \"View.MemoryView\":397\n *         cdef char *itemp = <char *> self.view.buf\n * \n *         for dim, idx in enumerate(index):             # <<<<<<<<<<<<<<\n *             itemp = pybuffer_index(&self.view, itemp, idx, dim)\n * \n */\n  __pyx_t_1 = 0;\n  if (likely(PyList_CheckExact(__pyx_v_index)) || PyTuple_CheckExact(__pyx_v_index)) {\n    __pyx_t_2 = __pyx_v_index; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;\n    __pyx_t_4 = NULL;\n  } else {\n    __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 397, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_2);\n    __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 397, __pyx_L1_error)\n  }\n  for (;;) {\n    if (likely(!__pyx_t_4)) {\n      if (likely(PyList_CheckExact(__pyx_t_2))) {\n        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;\n        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS\n        __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(1, 397, __pyx_L1_error)\n        #else\n        __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 397, __pyx_L1_error)\n        __Pyx_GOTREF(__pyx_t_5);\n        #endif\n      } else {\n        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;\n        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS\n        __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(1, 397, __pyx_L1_error)\n        #else\n        __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 397, __pyx_L1_error)\n        __Pyx_GOTREF(__pyx_t_5);\n        #endif\n      }\n    } else {\n      __pyx_t_5 = __pyx_t_4(__pyx_t_2);\n      if (unlikely(!__pyx_t_5)) {\n        PyObject* exc_type = PyErr_Occurred();\n        if (exc_type) {\n          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();\n          else __PYX_ERR(1, 397, __pyx_L1_error)\n        }\n        break;\n      }\n      __Pyx_GOTREF(__pyx_t_5);\n    }\n    __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_5);\n    __pyx_t_5 = 0;\n    __pyx_v_dim = __pyx_t_1;\n    __pyx_t_1 = (__pyx_t_1 + 1);\n\n    /* \"View.MemoryView\":398\n * \n *         for dim, idx in enumerate(index):\n *             itemp = pybuffer_index(&self.view, itemp, idx, dim)             # <<<<<<<<<<<<<<\n * \n *         return itemp\n */\n    __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_v_idx); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 398, __pyx_L1_error)\n    __pyx_t_7 = __pyx_pybuffer_index((&__pyx_v_self->view), __pyx_v_itemp, __pyx_t_6, __pyx_v_dim); if (unlikely(__pyx_t_7 == ((char *)NULL))) __PYX_ERR(1, 398, __pyx_L1_error)\n    __pyx_v_itemp = __pyx_t_7;\n\n    /* \"View.MemoryView\":397\n *         cdef char *itemp = <char *> self.view.buf\n * \n *         for dim, idx in enumerate(index):             # <<<<<<<<<<<<<<\n *             itemp = pybuffer_index(&self.view, itemp, idx, dim)\n * \n */\n  }\n  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;\n\n  /* \"View.MemoryView\":400\n *             itemp = pybuffer_index(&self.view, itemp, idx, dim)\n * \n *         return itemp             # <<<<<<<<<<<<<<\n * \n * \n */\n  __pyx_r = __pyx_v_itemp;\n  goto __pyx_L0;\n\n  /* \"View.MemoryView\":393\n *                 PyThread_free_lock(self.lock)\n * \n *     cdef char *get_item_pointer(memoryview self, object index) except NULL:             # <<<<<<<<<<<<<<\n *         cdef Py_ssize_t dim\n *         cdef char *itemp = <char *> self.view.buf\n */\n\n  /* function exit code */\n  __pyx_L1_error:;\n  __Pyx_XDECREF(__pyx_t_2);\n  __Pyx_XDECREF(__pyx_t_5);\n  __Pyx_AddTraceback(\"View.MemoryView.memoryview.get_item_pointer\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n  __pyx_r = NULL;\n  __pyx_L0:;\n  __Pyx_XDECREF(__pyx_v_idx);\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\n/* \"View.MemoryView\":403\n * \n * \n *     def __getitem__(memoryview self, object index):             # <<<<<<<<<<<<<<\n *         if index is Ellipsis:\n *             return self\n */\n\n/* Python wrapper */\nstatic PyObject *__pyx_memoryview___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index); /*proto*/\nstatic PyObject *__pyx_memoryview___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index) {\n  PyObject *__pyx_r = 0;\n  __Pyx_RefNannyDeclarations\n  __Pyx_RefNannySetupContext(\"__getitem__ (wrapper)\", 0);\n  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4__getitem__(((struct __pyx_memoryview_obj *)__pyx_v_self), ((PyObject *)__pyx_v_index));\n\n  /* function exit code */\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\nstatic PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4__getitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index) {\n  PyObject *__pyx_v_have_slices = NULL;\n  PyObject *__pyx_v_indices = NULL;\n  char *__pyx_v_itemp;\n  PyObject *__pyx_r = NULL;\n  __Pyx_RefNannyDeclarations\n  int __pyx_t_1;\n  int __pyx_t_2;\n  PyObject *__pyx_t_3 = NULL;\n  PyObject *__pyx_t_4 = NULL;\n  PyObject *__pyx_t_5 = NULL;\n  char *__pyx_t_6;\n  int __pyx_lineno = 0;\n  const char *__pyx_filename = NULL;\n  int __pyx_clineno = 0;\n  __Pyx_RefNannySetupContext(\"__getitem__\", 0);\n\n  /* \"View.MemoryView\":404\n * \n *     def __getitem__(memoryview self, object index):\n *         if index is Ellipsis:             # <<<<<<<<<<<<<<\n *             return self\n * \n */\n  __pyx_t_1 = (__pyx_v_index == __pyx_builtin_Ellipsis);\n  __pyx_t_2 = (__pyx_t_1 != 0);\n  if (__pyx_t_2) {\n\n    /* \"View.MemoryView\":405\n *     def __getitem__(memoryview self, object index):\n *         if index is Ellipsis:\n *             return self             # <<<<<<<<<<<<<<\n * \n *         have_slices, indices = _unellipsify(index, self.view.ndim)\n */\n    __Pyx_XDECREF(__pyx_r);\n    __Pyx_INCREF(((PyObject *)__pyx_v_self));\n    __pyx_r = ((PyObject *)__pyx_v_self);\n    goto __pyx_L0;\n\n    /* \"View.MemoryView\":404\n * \n *     def __getitem__(memoryview self, object index):\n *         if index is Ellipsis:             # <<<<<<<<<<<<<<\n *             return self\n * \n */\n  }\n\n  /* \"View.MemoryView\":407\n *             return self\n * \n *         have_slices, indices = _unellipsify(index, self.view.ndim)             # <<<<<<<<<<<<<<\n * \n *         cdef char *itemp\n */\n  __pyx_t_3 = _unellipsify(__pyx_v_index, __pyx_v_self->view.ndim); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 407, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_3);\n  if (likely(__pyx_t_3 != Py_None)) {\n    PyObject* sequence = __pyx_t_3;\n    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);\n    if (unlikely(size != 2)) {\n      if (size > 2) __Pyx_RaiseTooManyValuesError(2);\n      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);\n      __PYX_ERR(1, 407, __pyx_L1_error)\n    }\n    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS\n    __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); \n    __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1); \n    __Pyx_INCREF(__pyx_t_4);\n    __Pyx_INCREF(__pyx_t_5);\n    #else\n    __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 407, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_4);\n    __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 407, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_5);\n    #endif\n    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;\n  } else {\n    __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(1, 407, __pyx_L1_error)\n  }\n  __pyx_v_have_slices = __pyx_t_4;\n  __pyx_t_4 = 0;\n  __pyx_v_indices = __pyx_t_5;\n  __pyx_t_5 = 0;\n\n  /* \"View.MemoryView\":410\n * \n *         cdef char *itemp\n *         if have_slices:             # <<<<<<<<<<<<<<\n *             return memview_slice(self, indices)\n *         else:\n */\n  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_have_slices); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 410, __pyx_L1_error)\n  if (__pyx_t_2) {\n\n    /* \"View.MemoryView\":411\n *         cdef char *itemp\n *         if have_slices:\n *             return memview_slice(self, indices)             # <<<<<<<<<<<<<<\n *         else:\n *             itemp = self.get_item_pointer(indices)\n */\n    __Pyx_XDECREF(__pyx_r);\n    __pyx_t_3 = ((PyObject *)__pyx_memview_slice(__pyx_v_self, __pyx_v_indices)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 411, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_3);\n    __pyx_r = __pyx_t_3;\n    __pyx_t_3 = 0;\n    goto __pyx_L0;\n\n    /* \"View.MemoryView\":410\n * \n *         cdef char *itemp\n *         if have_slices:             # <<<<<<<<<<<<<<\n *             return memview_slice(self, indices)\n *         else:\n */\n  }\n\n  /* \"View.MemoryView\":413\n *             return memview_slice(self, indices)\n *         else:\n *             itemp = self.get_item_pointer(indices)             # <<<<<<<<<<<<<<\n *             return self.convert_item_to_object(itemp)\n * \n */\n  /*else*/ {\n    __pyx_t_6 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->get_item_pointer(__pyx_v_self, __pyx_v_indices); if (unlikely(__pyx_t_6 == ((char *)NULL))) __PYX_ERR(1, 413, __pyx_L1_error)\n    __pyx_v_itemp = __pyx_t_6;\n\n    /* \"View.MemoryView\":414\n *         else:\n *             itemp = self.get_item_pointer(indices)\n *             return self.convert_item_to_object(itemp)             # <<<<<<<<<<<<<<\n * \n *     def __setitem__(memoryview self, object index, object value):\n */\n    __Pyx_XDECREF(__pyx_r);\n    __pyx_t_3 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->convert_item_to_object(__pyx_v_self, __pyx_v_itemp); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 414, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_3);\n    __pyx_r = __pyx_t_3;\n    __pyx_t_3 = 0;\n    goto __pyx_L0;\n  }\n\n  /* \"View.MemoryView\":403\n * \n * \n *     def __getitem__(memoryview self, object index):             # <<<<<<<<<<<<<<\n *         if index is Ellipsis:\n *             return self\n */\n\n  /* function exit code */\n  __pyx_L1_error:;\n  __Pyx_XDECREF(__pyx_t_3);\n  __Pyx_XDECREF(__pyx_t_4);\n  __Pyx_XDECREF(__pyx_t_5);\n  __Pyx_AddTraceback(\"View.MemoryView.memoryview.__getitem__\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n  __pyx_r = NULL;\n  __pyx_L0:;\n  __Pyx_XDECREF(__pyx_v_have_slices);\n  __Pyx_XDECREF(__pyx_v_indices);\n  __Pyx_XGIVEREF(__pyx_r);\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\n/* \"View.MemoryView\":416\n *             return self.convert_item_to_object(itemp)\n * \n *     def __setitem__(memoryview self, object index, object value):             # <<<<<<<<<<<<<<\n *         if self.view.readonly:\n *             raise TypeError(\"Cannot assign to read-only memoryview\")\n */\n\n/* Python wrapper */\nstatic int __pyx_memoryview___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /*proto*/\nstatic int __pyx_memoryview___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) {\n  int __pyx_r;\n  __Pyx_RefNannyDeclarations\n  __Pyx_RefNannySetupContext(\"__setitem__ (wrapper)\", 0);\n  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_6__setitem__(((struct __pyx_memoryview_obj *)__pyx_v_self), ((PyObject *)__pyx_v_index), ((PyObject *)__pyx_v_value));\n\n  /* function exit code */\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\nstatic int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_6__setitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) {\n  PyObject *__pyx_v_have_slices = NULL;\n  PyObject *__pyx_v_obj = NULL;\n  int __pyx_r;\n  __Pyx_RefNannyDeclarations\n  int __pyx_t_1;\n  PyObject *__pyx_t_2 = NULL;\n  PyObject *__pyx_t_3 = NULL;\n  PyObject *__pyx_t_4 = NULL;\n  int __pyx_lineno = 0;\n  const char *__pyx_filename = NULL;\n  int __pyx_clineno = 0;\n  __Pyx_RefNannySetupContext(\"__setitem__\", 0);\n  __Pyx_INCREF(__pyx_v_index);\n\n  /* \"View.MemoryView\":417\n * \n *     def __setitem__(memoryview self, object index, object value):\n *         if self.view.readonly:             # <<<<<<<<<<<<<<\n *             raise TypeError(\"Cannot assign to read-only memoryview\")\n * \n */\n  __pyx_t_1 = (__pyx_v_self->view.readonly != 0);\n  if (unlikely(__pyx_t_1)) {\n\n    /* \"View.MemoryView\":418\n *     def __setitem__(memoryview self, object index, object value):\n *         if self.view.readonly:\n *             raise TypeError(\"Cannot assign to read-only memoryview\")             # <<<<<<<<<<<<<<\n * \n *         have_slices, index = _unellipsify(index, self.view.ndim)\n */\n    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__23, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 418, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_2);\n    __Pyx_Raise(__pyx_t_2, 0, 0, 0);\n    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;\n    __PYX_ERR(1, 418, __pyx_L1_error)\n\n    /* \"View.MemoryView\":417\n * \n *     def __setitem__(memoryview self, object index, object value):\n *         if self.view.readonly:             # <<<<<<<<<<<<<<\n *             raise TypeError(\"Cannot assign to read-only memoryview\")\n * \n */\n  }\n\n  /* \"View.MemoryView\":420\n *             raise TypeError(\"Cannot assign to read-only memoryview\")\n * \n *         have_slices, index = _unellipsify(index, self.view.ndim)             # <<<<<<<<<<<<<<\n * \n *         if have_slices:\n */\n  __pyx_t_2 = _unellipsify(__pyx_v_index, __pyx_v_self->view.ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 420, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_2);\n  if (likely(__pyx_t_2 != Py_None)) {\n    PyObject* sequence = __pyx_t_2;\n    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);\n    if (unlikely(size != 2)) {\n      if (size > 2) __Pyx_RaiseTooManyValuesError(2);\n      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);\n      __PYX_ERR(1, 420, __pyx_L1_error)\n    }\n    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS\n    __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); \n    __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); \n    __Pyx_INCREF(__pyx_t_3);\n    __Pyx_INCREF(__pyx_t_4);\n    #else\n    __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 420, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_3);\n    __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 420, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_4);\n    #endif\n    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;\n  } else {\n    __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(1, 420, __pyx_L1_error)\n  }\n  __pyx_v_have_slices = __pyx_t_3;\n  __pyx_t_3 = 0;\n  __Pyx_DECREF_SET(__pyx_v_index, __pyx_t_4);\n  __pyx_t_4 = 0;\n\n  /* \"View.MemoryView\":422\n *         have_slices, index = _unellipsify(index, self.view.ndim)\n * \n *         if have_slices:             # <<<<<<<<<<<<<<\n *             obj = self.is_slice(value)\n *             if obj:\n */\n  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_have_slices); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 422, __pyx_L1_error)\n  if (__pyx_t_1) {\n\n    /* \"View.MemoryView\":423\n * \n *         if have_slices:\n *             obj = self.is_slice(value)             # <<<<<<<<<<<<<<\n *             if obj:\n *                 self.setitem_slice_assignment(self[index], obj)\n */\n    __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->is_slice(__pyx_v_self, __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 423, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_2);\n    __pyx_v_obj = __pyx_t_2;\n    __pyx_t_2 = 0;\n\n    /* \"View.MemoryView\":424\n *         if have_slices:\n *             obj = self.is_slice(value)\n *             if obj:             # <<<<<<<<<<<<<<\n *                 self.setitem_slice_assignment(self[index], obj)\n *             else:\n */\n    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_obj); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 424, __pyx_L1_error)\n    if (__pyx_t_1) {\n\n      /* \"View.MemoryView\":425\n *             obj = self.is_slice(value)\n *             if obj:\n *                 self.setitem_slice_assignment(self[index], obj)             # <<<<<<<<<<<<<<\n *             else:\n *                 self.setitem_slice_assign_scalar(self[index], value)\n */\n      __pyx_t_2 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_self), __pyx_v_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 425, __pyx_L1_error)\n      __Pyx_GOTREF(__pyx_t_2);\n      __pyx_t_4 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->setitem_slice_assignment(__pyx_v_self, __pyx_t_2, __pyx_v_obj); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 425, __pyx_L1_error)\n      __Pyx_GOTREF(__pyx_t_4);\n      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;\n      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;\n\n      /* \"View.MemoryView\":424\n *         if have_slices:\n *             obj = self.is_slice(value)\n *             if obj:             # <<<<<<<<<<<<<<\n *                 self.setitem_slice_assignment(self[index], obj)\n *             else:\n */\n      goto __pyx_L5;\n    }\n\n    /* \"View.MemoryView\":427\n *                 self.setitem_slice_assignment(self[index], obj)\n *             else:\n *                 self.setitem_slice_assign_scalar(self[index], value)             # <<<<<<<<<<<<<<\n *         else:\n *             self.setitem_indexed(index, value)\n */\n    /*else*/ {\n      __pyx_t_4 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_self), __pyx_v_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 427, __pyx_L1_error)\n      __Pyx_GOTREF(__pyx_t_4);\n      if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_memoryview_type))))) __PYX_ERR(1, 427, __pyx_L1_error)\n      __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->setitem_slice_assign_scalar(__pyx_v_self, ((struct __pyx_memoryview_obj *)__pyx_t_4), __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 427, __pyx_L1_error)\n      __Pyx_GOTREF(__pyx_t_2);\n      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;\n      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;\n    }\n    __pyx_L5:;\n\n    /* \"View.MemoryView\":422\n *         have_slices, index = _unellipsify(index, self.view.ndim)\n * \n *         if have_slices:             # <<<<<<<<<<<<<<\n *             obj = self.is_slice(value)\n *             if obj:\n */\n    goto __pyx_L4;\n  }\n\n  /* \"View.MemoryView\":429\n *                 self.setitem_slice_assign_scalar(self[index], value)\n *         else:\n *             self.setitem_indexed(index, value)             # <<<<<<<<<<<<<<\n * \n *     cdef is_slice(self, obj):\n */\n  /*else*/ {\n    __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->setitem_indexed(__pyx_v_self, __pyx_v_index, __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 429, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_2);\n    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;\n  }\n  __pyx_L4:;\n\n  /* \"View.MemoryView\":416\n *             return self.convert_item_to_object(itemp)\n * \n *     def __setitem__(memoryview self, object index, object value):             # <<<<<<<<<<<<<<\n *         if self.view.readonly:\n *             raise TypeError(\"Cannot assign to read-only memoryview\")\n */\n\n  /* function exit code */\n  __pyx_r = 0;\n  goto __pyx_L0;\n  __pyx_L1_error:;\n  __Pyx_XDECREF(__pyx_t_2);\n  __Pyx_XDECREF(__pyx_t_3);\n  __Pyx_XDECREF(__pyx_t_4);\n  __Pyx_AddTraceback(\"View.MemoryView.memoryview.__setitem__\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n  __pyx_r = -1;\n  __pyx_L0:;\n  __Pyx_XDECREF(__pyx_v_have_slices);\n  __Pyx_XDECREF(__pyx_v_obj);\n  __Pyx_XDECREF(__pyx_v_index);\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\n/* \"View.MemoryView\":431\n *             self.setitem_indexed(index, value)\n * \n *     cdef is_slice(self, obj):             # <<<<<<<<<<<<<<\n *         if not isinstance(obj, memoryview):\n *             try:\n */\n\nstatic PyObject *__pyx_memoryview_is_slice(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj) {\n  PyObject *__pyx_r = NULL;\n  __Pyx_RefNannyDeclarations\n  int __pyx_t_1;\n  int __pyx_t_2;\n  PyObject *__pyx_t_3 = NULL;\n  PyObject *__pyx_t_4 = NULL;\n  PyObject *__pyx_t_5 = NULL;\n  PyObject *__pyx_t_6 = NULL;\n  PyObject *__pyx_t_7 = NULL;\n  PyObject *__pyx_t_8 = NULL;\n  int __pyx_t_9;\n  int __pyx_lineno = 0;\n  const char *__pyx_filename = NULL;\n  int __pyx_clineno = 0;\n  __Pyx_RefNannySetupContext(\"is_slice\", 0);\n  __Pyx_INCREF(__pyx_v_obj);\n\n  /* \"View.MemoryView\":432\n * \n *     cdef is_slice(self, obj):\n *         if not isinstance(obj, memoryview):             # <<<<<<<<<<<<<<\n *             try:\n *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,\n */\n  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_obj, __pyx_memoryview_type); \n  __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);\n  if (__pyx_t_2) {\n\n    /* \"View.MemoryView\":433\n *     cdef is_slice(self, obj):\n *         if not isinstance(obj, memoryview):\n *             try:             # <<<<<<<<<<<<<<\n *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,\n *                                  self.dtype_is_object)\n */\n    {\n      __Pyx_PyThreadState_declare\n      __Pyx_PyThreadState_assign\n      __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);\n      __Pyx_XGOTREF(__pyx_t_3);\n      __Pyx_XGOTREF(__pyx_t_4);\n      __Pyx_XGOTREF(__pyx_t_5);\n      /*try:*/ {\n\n        /* \"View.MemoryView\":434\n *         if not isinstance(obj, memoryview):\n *             try:\n *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,             # <<<<<<<<<<<<<<\n *                                  self.dtype_is_object)\n *             except TypeError:\n */\n        __pyx_t_6 = __Pyx_PyInt_From_int(((__pyx_v_self->flags & (~PyBUF_WRITABLE)) | PyBUF_ANY_CONTIGUOUS)); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 434, __pyx_L4_error)\n        __Pyx_GOTREF(__pyx_t_6);\n\n        /* \"View.MemoryView\":435\n *             try:\n *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,\n *                                  self.dtype_is_object)             # <<<<<<<<<<<<<<\n *             except TypeError:\n *                 return None\n */\n        __pyx_t_7 = __Pyx_PyBool_FromLong(__pyx_v_self->dtype_is_object); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 435, __pyx_L4_error)\n        __Pyx_GOTREF(__pyx_t_7);\n\n        /* \"View.MemoryView\":434\n *         if not isinstance(obj, memoryview):\n *             try:\n *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,             # <<<<<<<<<<<<<<\n *                                  self.dtype_is_object)\n *             except TypeError:\n */\n        __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 434, __pyx_L4_error)\n        __Pyx_GOTREF(__pyx_t_8);\n        __Pyx_INCREF(__pyx_v_obj);\n        __Pyx_GIVEREF(__pyx_v_obj);\n        PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_obj);\n        __Pyx_GIVEREF(__pyx_t_6);\n        PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_6);\n        __Pyx_GIVEREF(__pyx_t_7);\n        PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_t_7);\n        __pyx_t_6 = 0;\n        __pyx_t_7 = 0;\n        __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_memoryview_type), __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 434, __pyx_L4_error)\n        __Pyx_GOTREF(__pyx_t_7);\n        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;\n        __Pyx_DECREF_SET(__pyx_v_obj, __pyx_t_7);\n        __pyx_t_7 = 0;\n\n        /* \"View.MemoryView\":433\n *     cdef is_slice(self, obj):\n *         if not isinstance(obj, memoryview):\n *             try:             # <<<<<<<<<<<<<<\n *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,\n *                                  self.dtype_is_object)\n */\n      }\n      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;\n      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;\n      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;\n      goto __pyx_L9_try_end;\n      __pyx_L4_error:;\n      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;\n      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;\n      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;\n\n      /* \"View.MemoryView\":436\n *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,\n *                                  self.dtype_is_object)\n *             except TypeError:             # <<<<<<<<<<<<<<\n *                 return None\n * \n */\n      __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError);\n      if (__pyx_t_9) {\n        __Pyx_AddTraceback(\"View.MemoryView.memoryview.is_slice\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n        if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_8, &__pyx_t_6) < 0) __PYX_ERR(1, 436, __pyx_L6_except_error)\n        __Pyx_GOTREF(__pyx_t_7);\n        __Pyx_GOTREF(__pyx_t_8);\n        __Pyx_GOTREF(__pyx_t_6);\n\n        /* \"View.MemoryView\":437\n *                                  self.dtype_is_object)\n *             except TypeError:\n *                 return None             # <<<<<<<<<<<<<<\n * \n *         return obj\n */\n        __Pyx_XDECREF(__pyx_r);\n        __pyx_r = Py_None; __Pyx_INCREF(Py_None);\n        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;\n        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;\n        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;\n        goto __pyx_L7_except_return;\n      }\n      goto __pyx_L6_except_error;\n      __pyx_L6_except_error:;\n\n      /* \"View.MemoryView\":433\n *     cdef is_slice(self, obj):\n *         if not isinstance(obj, memoryview):\n *             try:             # <<<<<<<<<<<<<<\n *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,\n *                                  self.dtype_is_object)\n */\n      __Pyx_XGIVEREF(__pyx_t_3);\n      __Pyx_XGIVEREF(__pyx_t_4);\n      __Pyx_XGIVEREF(__pyx_t_5);\n      __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);\n      goto __pyx_L1_error;\n      __pyx_L7_except_return:;\n      __Pyx_XGIVEREF(__pyx_t_3);\n      __Pyx_XGIVEREF(__pyx_t_4);\n      __Pyx_XGIVEREF(__pyx_t_5);\n      __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);\n      goto __pyx_L0;\n      __pyx_L9_try_end:;\n    }\n\n    /* \"View.MemoryView\":432\n * \n *     cdef is_slice(self, obj):\n *         if not isinstance(obj, memoryview):             # <<<<<<<<<<<<<<\n *             try:\n *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,\n */\n  }\n\n  /* \"View.MemoryView\":439\n *                 return None\n * \n *         return obj             # <<<<<<<<<<<<<<\n * \n *     cdef setitem_slice_assignment(self, dst, src):\n */\n  __Pyx_XDECREF(__pyx_r);\n  __Pyx_INCREF(__pyx_v_obj);\n  __pyx_r = __pyx_v_obj;\n  goto __pyx_L0;\n\n  /* \"View.MemoryView\":431\n *             self.setitem_indexed(index, value)\n * \n *     cdef is_slice(self, obj):             # <<<<<<<<<<<<<<\n *         if not isinstance(obj, memoryview):\n *             try:\n */\n\n  /* function exit code */\n  __pyx_L1_error:;\n  __Pyx_XDECREF(__pyx_t_6);\n  __Pyx_XDECREF(__pyx_t_7);\n  __Pyx_XDECREF(__pyx_t_8);\n  __Pyx_AddTraceback(\"View.MemoryView.memoryview.is_slice\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n  __pyx_r = 0;\n  __pyx_L0:;\n  __Pyx_XDECREF(__pyx_v_obj);\n  __Pyx_XGIVEREF(__pyx_r);\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\n/* \"View.MemoryView\":441\n *         return obj\n * \n *     cdef setitem_slice_assignment(self, dst, src):             # <<<<<<<<<<<<<<\n *         cdef __Pyx_memviewslice dst_slice\n *         cdef __Pyx_memviewslice src_slice\n */\n\nstatic PyObject *__pyx_memoryview_setitem_slice_assignment(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_dst, PyObject *__pyx_v_src) {\n  __Pyx_memviewslice __pyx_v_dst_slice;\n  __Pyx_memviewslice __pyx_v_src_slice;\n  PyObject *__pyx_r = NULL;\n  __Pyx_RefNannyDeclarations\n  __Pyx_memviewslice *__pyx_t_1;\n  __Pyx_memviewslice *__pyx_t_2;\n  PyObject *__pyx_t_3 = NULL;\n  int __pyx_t_4;\n  int __pyx_t_5;\n  int __pyx_t_6;\n  int __pyx_lineno = 0;\n  const char *__pyx_filename = NULL;\n  int __pyx_clineno = 0;\n  __Pyx_RefNannySetupContext(\"setitem_slice_assignment\", 0);\n\n  /* \"View.MemoryView\":445\n *         cdef __Pyx_memviewslice src_slice\n * \n *         memoryview_copy_contents(get_slice_from_memview(src, &src_slice)[0],             # <<<<<<<<<<<<<<\n *                                  get_slice_from_memview(dst, &dst_slice)[0],\n *                                  src.ndim, dst.ndim, self.dtype_is_object)\n */\n  if (!(likely(((__pyx_v_src) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_src, __pyx_memoryview_type))))) __PYX_ERR(1, 445, __pyx_L1_error)\n  __pyx_t_1 = __pyx_memoryview_get_slice_from_memoryview(((struct __pyx_memoryview_obj *)__pyx_v_src), (&__pyx_v_src_slice)); if (unlikely(__pyx_t_1 == ((__Pyx_memviewslice *)NULL))) __PYX_ERR(1, 445, __pyx_L1_error)\n\n  /* \"View.MemoryView\":446\n * \n *         memoryview_copy_contents(get_slice_from_memview(src, &src_slice)[0],\n *                                  get_slice_from_memview(dst, &dst_slice)[0],             # <<<<<<<<<<<<<<\n *                                  src.ndim, dst.ndim, self.dtype_is_object)\n * \n */\n  if (!(likely(((__pyx_v_dst) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_dst, __pyx_memoryview_type))))) __PYX_ERR(1, 446, __pyx_L1_error)\n  __pyx_t_2 = __pyx_memoryview_get_slice_from_memoryview(((struct __pyx_memoryview_obj *)__pyx_v_dst), (&__pyx_v_dst_slice)); if (unlikely(__pyx_t_2 == ((__Pyx_memviewslice *)NULL))) __PYX_ERR(1, 446, __pyx_L1_error)\n\n  /* \"View.MemoryView\":447\n *         memoryview_copy_contents(get_slice_from_memview(src, &src_slice)[0],\n *                                  get_slice_from_memview(dst, &dst_slice)[0],\n *                                  src.ndim, dst.ndim, self.dtype_is_object)             # <<<<<<<<<<<<<<\n * \n *     cdef setitem_slice_assign_scalar(self, memoryview dst, value):\n */\n  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_src, __pyx_n_s_ndim); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 447, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_3);\n  __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 447, __pyx_L1_error)\n  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;\n  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_dst, __pyx_n_s_ndim); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 447, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_3);\n  __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 447, __pyx_L1_error)\n  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;\n\n  /* \"View.MemoryView\":445\n *         cdef __Pyx_memviewslice src_slice\n * \n *         memoryview_copy_contents(get_slice_from_memview(src, &src_slice)[0],             # <<<<<<<<<<<<<<\n *                                  get_slice_from_memview(dst, &dst_slice)[0],\n *                                  src.ndim, dst.ndim, self.dtype_is_object)\n */\n  __pyx_t_6 = __pyx_memoryview_copy_contents((__pyx_t_1[0]), (__pyx_t_2[0]), __pyx_t_4, __pyx_t_5, __pyx_v_self->dtype_is_object); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(1, 445, __pyx_L1_error)\n\n  /* \"View.MemoryView\":441\n *         return obj\n * \n *     cdef setitem_slice_assignment(self, dst, src):             # <<<<<<<<<<<<<<\n *         cdef __Pyx_memviewslice dst_slice\n *         cdef __Pyx_memviewslice src_slice\n */\n\n  /* function exit code */\n  __pyx_r = Py_None; __Pyx_INCREF(Py_None);\n  goto __pyx_L0;\n  __pyx_L1_error:;\n  __Pyx_XDECREF(__pyx_t_3);\n  __Pyx_AddTraceback(\"View.MemoryView.memoryview.setitem_slice_assignment\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n  __pyx_r = 0;\n  __pyx_L0:;\n  __Pyx_XGIVEREF(__pyx_r);\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\n/* \"View.MemoryView\":449\n *                                  src.ndim, dst.ndim, self.dtype_is_object)\n * \n *     cdef setitem_slice_assign_scalar(self, memoryview dst, value):             # <<<<<<<<<<<<<<\n *         cdef int array[128]\n *         cdef void *tmp = NULL\n */\n\nstatic PyObject *__pyx_memoryview_setitem_slice_assign_scalar(struct __pyx_memoryview_obj *__pyx_v_self, struct __pyx_memoryview_obj *__pyx_v_dst, PyObject *__pyx_v_value) {\n  int __pyx_v_array[0x80];\n  void *__pyx_v_tmp;\n  void *__pyx_v_item;\n  __Pyx_memviewslice *__pyx_v_dst_slice;\n  __Pyx_memviewslice __pyx_v_tmp_slice;\n  PyObject *__pyx_r = NULL;\n  __Pyx_RefNannyDeclarations\n  __Pyx_memviewslice *__pyx_t_1;\n  int __pyx_t_2;\n  PyObject *__pyx_t_3 = NULL;\n  int __pyx_t_4;\n  int __pyx_t_5;\n  char const *__pyx_t_6;\n  PyObject *__pyx_t_7 = NULL;\n  PyObject *__pyx_t_8 = NULL;\n  PyObject *__pyx_t_9 = NULL;\n  PyObject *__pyx_t_10 = NULL;\n  PyObject *__pyx_t_11 = NULL;\n  PyObject *__pyx_t_12 = NULL;\n  int __pyx_lineno = 0;\n  const char *__pyx_filename = NULL;\n  int __pyx_clineno = 0;\n  __Pyx_RefNannySetupContext(\"setitem_slice_assign_scalar\", 0);\n\n  /* \"View.MemoryView\":451\n *     cdef setitem_slice_assign_scalar(self, memoryview dst, value):\n *         cdef int array[128]\n *         cdef void *tmp = NULL             # <<<<<<<<<<<<<<\n *         cdef void *item\n * \n */\n  __pyx_v_tmp = NULL;\n\n  /* \"View.MemoryView\":456\n *         cdef __Pyx_memviewslice *dst_slice\n *         cdef __Pyx_memviewslice tmp_slice\n *         dst_slice = get_slice_from_memview(dst, &tmp_slice)             # <<<<<<<<<<<<<<\n * \n *         if <size_t>self.view.itemsize > sizeof(array):\n */\n  __pyx_t_1 = __pyx_memoryview_get_slice_from_memoryview(__pyx_v_dst, (&__pyx_v_tmp_slice)); if (unlikely(__pyx_t_1 == ((__Pyx_memviewslice *)NULL))) __PYX_ERR(1, 456, __pyx_L1_error)\n  __pyx_v_dst_slice = __pyx_t_1;\n\n  /* \"View.MemoryView\":458\n *         dst_slice = get_slice_from_memview(dst, &tmp_slice)\n * \n *         if <size_t>self.view.itemsize > sizeof(array):             # <<<<<<<<<<<<<<\n *             tmp = PyMem_Malloc(self.view.itemsize)\n *             if tmp == NULL:\n */\n  __pyx_t_2 = ((((size_t)__pyx_v_self->view.itemsize) > (sizeof(__pyx_v_array))) != 0);\n  if (__pyx_t_2) {\n\n    /* \"View.MemoryView\":459\n * \n *         if <size_t>self.view.itemsize > sizeof(array):\n *             tmp = PyMem_Malloc(self.view.itemsize)             # <<<<<<<<<<<<<<\n *             if tmp == NULL:\n *                 raise MemoryError\n */\n    __pyx_v_tmp = PyMem_Malloc(__pyx_v_self->view.itemsize);\n\n    /* \"View.MemoryView\":460\n *         if <size_t>self.view.itemsize > sizeof(array):\n *             tmp = PyMem_Malloc(self.view.itemsize)\n *             if tmp == NULL:             # <<<<<<<<<<<<<<\n *                 raise MemoryError\n *             item = tmp\n */\n    __pyx_t_2 = ((__pyx_v_tmp == NULL) != 0);\n    if (unlikely(__pyx_t_2)) {\n\n      /* \"View.MemoryView\":461\n *             tmp = PyMem_Malloc(self.view.itemsize)\n *             if tmp == NULL:\n *                 raise MemoryError             # <<<<<<<<<<<<<<\n *             item = tmp\n *         else:\n */\n      PyErr_NoMemory(); __PYX_ERR(1, 461, __pyx_L1_error)\n\n      /* \"View.MemoryView\":460\n *         if <size_t>self.view.itemsize > sizeof(array):\n *             tmp = PyMem_Malloc(self.view.itemsize)\n *             if tmp == NULL:             # <<<<<<<<<<<<<<\n *                 raise MemoryError\n *             item = tmp\n */\n    }\n\n    /* \"View.MemoryView\":462\n *             if tmp == NULL:\n *                 raise MemoryError\n *             item = tmp             # <<<<<<<<<<<<<<\n *         else:\n *             item = <void *> array\n */\n    __pyx_v_item = __pyx_v_tmp;\n\n    /* \"View.MemoryView\":458\n *         dst_slice = get_slice_from_memview(dst, &tmp_slice)\n * \n *         if <size_t>self.view.itemsize > sizeof(array):             # <<<<<<<<<<<<<<\n *             tmp = PyMem_Malloc(self.view.itemsize)\n *             if tmp == NULL:\n */\n    goto __pyx_L3;\n  }\n\n  /* \"View.MemoryView\":464\n *             item = tmp\n *         else:\n *             item = <void *> array             # <<<<<<<<<<<<<<\n * \n *         try:\n */\n  /*else*/ {\n    __pyx_v_item = ((void *)__pyx_v_array);\n  }\n  __pyx_L3:;\n\n  /* \"View.MemoryView\":466\n *             item = <void *> array\n * \n *         try:             # <<<<<<<<<<<<<<\n *             if self.dtype_is_object:\n *                 (<PyObject **> item)[0] = <PyObject *> value\n */\n  /*try:*/ {\n\n    /* \"View.MemoryView\":467\n * \n *         try:\n *             if self.dtype_is_object:             # <<<<<<<<<<<<<<\n *                 (<PyObject **> item)[0] = <PyObject *> value\n *             else:\n */\n    __pyx_t_2 = (__pyx_v_self->dtype_is_object != 0);\n    if (__pyx_t_2) {\n\n      /* \"View.MemoryView\":468\n *         try:\n *             if self.dtype_is_object:\n *                 (<PyObject **> item)[0] = <PyObject *> value             # <<<<<<<<<<<<<<\n *             else:\n *                 self.assign_item_from_object(<char *> item, value)\n */\n      (((PyObject **)__pyx_v_item)[0]) = ((PyObject *)__pyx_v_value);\n\n      /* \"View.MemoryView\":467\n * \n *         try:\n *             if self.dtype_is_object:             # <<<<<<<<<<<<<<\n *                 (<PyObject **> item)[0] = <PyObject *> value\n *             else:\n */\n      goto __pyx_L8;\n    }\n\n    /* \"View.MemoryView\":470\n *                 (<PyObject **> item)[0] = <PyObject *> value\n *             else:\n *                 self.assign_item_from_object(<char *> item, value)             # <<<<<<<<<<<<<<\n * \n * \n */\n    /*else*/ {\n      __pyx_t_3 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->assign_item_from_object(__pyx_v_self, ((char *)__pyx_v_item), __pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 470, __pyx_L6_error)\n      __Pyx_GOTREF(__pyx_t_3);\n      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;\n    }\n    __pyx_L8:;\n\n    /* \"View.MemoryView\":474\n * \n * \n *             if self.view.suboffsets != NULL:             # <<<<<<<<<<<<<<\n *                 assert_direct_dimensions(self.view.suboffsets, self.view.ndim)\n *             slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize,\n */\n    __pyx_t_2 = ((__pyx_v_self->view.suboffsets != NULL) != 0);\n    if (__pyx_t_2) {\n\n      /* \"View.MemoryView\":475\n * \n *             if self.view.suboffsets != NULL:\n *                 assert_direct_dimensions(self.view.suboffsets, self.view.ndim)             # <<<<<<<<<<<<<<\n *             slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize,\n *                                 item, self.dtype_is_object)\n */\n      __pyx_t_3 = assert_direct_dimensions(__pyx_v_self->view.suboffsets, __pyx_v_self->view.ndim); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 475, __pyx_L6_error)\n      __Pyx_GOTREF(__pyx_t_3);\n      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;\n\n      /* \"View.MemoryView\":474\n * \n * \n *             if self.view.suboffsets != NULL:             # <<<<<<<<<<<<<<\n *                 assert_direct_dimensions(self.view.suboffsets, self.view.ndim)\n *             slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize,\n */\n    }\n\n    /* \"View.MemoryView\":476\n *             if self.view.suboffsets != NULL:\n *                 assert_direct_dimensions(self.view.suboffsets, self.view.ndim)\n *             slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize,             # <<<<<<<<<<<<<<\n *                                 item, self.dtype_is_object)\n *         finally:\n */\n    __pyx_memoryview_slice_assign_scalar(__pyx_v_dst_slice, __pyx_v_dst->view.ndim, __pyx_v_self->view.itemsize, __pyx_v_item, __pyx_v_self->dtype_is_object);\n  }\n\n  /* \"View.MemoryView\":479\n *                                 item, self.dtype_is_object)\n *         finally:\n *             PyMem_Free(tmp)             # <<<<<<<<<<<<<<\n * \n *     cdef setitem_indexed(self, index, value):\n */\n  /*finally:*/ {\n    /*normal exit:*/{\n      PyMem_Free(__pyx_v_tmp);\n      goto __pyx_L7;\n    }\n    __pyx_L6_error:;\n    /*exception exit:*/{\n      __Pyx_PyThreadState_declare\n      __Pyx_PyThreadState_assign\n      __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0;\n      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;\n      if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);\n      if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9) < 0)) __Pyx_ErrFetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);\n      __Pyx_XGOTREF(__pyx_t_7);\n      __Pyx_XGOTREF(__pyx_t_8);\n      __Pyx_XGOTREF(__pyx_t_9);\n      __Pyx_XGOTREF(__pyx_t_10);\n      __Pyx_XGOTREF(__pyx_t_11);\n      __Pyx_XGOTREF(__pyx_t_12);\n      __pyx_t_4 = __pyx_lineno; __pyx_t_5 = __pyx_clineno; __pyx_t_6 = __pyx_filename;\n      {\n        PyMem_Free(__pyx_v_tmp);\n      }\n      if (PY_MAJOR_VERSION >= 3) {\n        __Pyx_XGIVEREF(__pyx_t_10);\n        __Pyx_XGIVEREF(__pyx_t_11);\n        __Pyx_XGIVEREF(__pyx_t_12);\n        __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);\n      }\n      __Pyx_XGIVEREF(__pyx_t_7);\n      __Pyx_XGIVEREF(__pyx_t_8);\n      __Pyx_XGIVEREF(__pyx_t_9);\n      __Pyx_ErrRestore(__pyx_t_7, __pyx_t_8, __pyx_t_9);\n      __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0;\n      __pyx_lineno = __pyx_t_4; __pyx_clineno = __pyx_t_5; __pyx_filename = __pyx_t_6;\n      goto __pyx_L1_error;\n    }\n    __pyx_L7:;\n  }\n\n  /* \"View.MemoryView\":449\n *                                  src.ndim, dst.ndim, self.dtype_is_object)\n * \n *     cdef setitem_slice_assign_scalar(self, memoryview dst, value):             # <<<<<<<<<<<<<<\n *         cdef int array[128]\n *         cdef void *tmp = NULL\n */\n\n  /* function exit code */\n  __pyx_r = Py_None; __Pyx_INCREF(Py_None);\n  goto __pyx_L0;\n  __pyx_L1_error:;\n  __Pyx_XDECREF(__pyx_t_3);\n  __Pyx_AddTraceback(\"View.MemoryView.memoryview.setitem_slice_assign_scalar\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n  __pyx_r = 0;\n  __pyx_L0:;\n  __Pyx_XGIVEREF(__pyx_r);\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\n/* \"View.MemoryView\":481\n *             PyMem_Free(tmp)\n * \n *     cdef setitem_indexed(self, index, value):             # <<<<<<<<<<<<<<\n *         cdef char *itemp = self.get_item_pointer(index)\n *         self.assign_item_from_object(itemp, value)\n */\n\nstatic PyObject *__pyx_memoryview_setitem_indexed(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) {\n  char *__pyx_v_itemp;\n  PyObject *__pyx_r = NULL;\n  __Pyx_RefNannyDeclarations\n  char *__pyx_t_1;\n  PyObject *__pyx_t_2 = NULL;\n  int __pyx_lineno = 0;\n  const char *__pyx_filename = NULL;\n  int __pyx_clineno = 0;\n  __Pyx_RefNannySetupContext(\"setitem_indexed\", 0);\n\n  /* \"View.MemoryView\":482\n * \n *     cdef setitem_indexed(self, index, value):\n *         cdef char *itemp = self.get_item_pointer(index)             # <<<<<<<<<<<<<<\n *         self.assign_item_from_object(itemp, value)\n * \n */\n  __pyx_t_1 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->get_item_pointer(__pyx_v_self, __pyx_v_index); if (unlikely(__pyx_t_1 == ((char *)NULL))) __PYX_ERR(1, 482, __pyx_L1_error)\n  __pyx_v_itemp = __pyx_t_1;\n\n  /* \"View.MemoryView\":483\n *     cdef setitem_indexed(self, index, value):\n *         cdef char *itemp = self.get_item_pointer(index)\n *         self.assign_item_from_object(itemp, value)             # <<<<<<<<<<<<<<\n * \n *     cdef convert_item_to_object(self, char *itemp):\n */\n  __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->assign_item_from_object(__pyx_v_self, __pyx_v_itemp, __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 483, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_2);\n  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;\n\n  /* \"View.MemoryView\":481\n *             PyMem_Free(tmp)\n * \n *     cdef setitem_indexed(self, index, value):             # <<<<<<<<<<<<<<\n *         cdef char *itemp = self.get_item_pointer(index)\n *         self.assign_item_from_object(itemp, value)\n */\n\n  /* function exit code */\n  __pyx_r = Py_None; __Pyx_INCREF(Py_None);\n  goto __pyx_L0;\n  __pyx_L1_error:;\n  __Pyx_XDECREF(__pyx_t_2);\n  __Pyx_AddTraceback(\"View.MemoryView.memoryview.setitem_indexed\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n  __pyx_r = 0;\n  __pyx_L0:;\n  __Pyx_XGIVEREF(__pyx_r);\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\n/* \"View.MemoryView\":485\n *         self.assign_item_from_object(itemp, value)\n * \n *     cdef convert_item_to_object(self, char *itemp):             # <<<<<<<<<<<<<<\n *         \"\"\"Only used if instantiated manually by the user, or if Cython doesn't\n *         know how to convert the type\"\"\"\n */\n\nstatic PyObject *__pyx_memoryview_convert_item_to_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp) {\n  PyObject *__pyx_v_struct = NULL;\n  PyObject *__pyx_v_bytesitem = 0;\n  PyObject *__pyx_v_result = NULL;\n  PyObject *__pyx_r = NULL;\n  __Pyx_RefNannyDeclarations\n  PyObject *__pyx_t_1 = NULL;\n  PyObject *__pyx_t_2 = NULL;\n  PyObject *__pyx_t_3 = NULL;\n  PyObject *__pyx_t_4 = NULL;\n  PyObject *__pyx_t_5 = NULL;\n  PyObject *__pyx_t_6 = NULL;\n  PyObject *__pyx_t_7 = NULL;\n  int __pyx_t_8;\n  PyObject *__pyx_t_9 = NULL;\n  size_t __pyx_t_10;\n  int __pyx_t_11;\n  int __pyx_lineno = 0;\n  const char *__pyx_filename = NULL;\n  int __pyx_clineno = 0;\n  __Pyx_RefNannySetupContext(\"convert_item_to_object\", 0);\n\n  /* \"View.MemoryView\":488\n *         \"\"\"Only used if instantiated manually by the user, or if Cython doesn't\n *         know how to convert the type\"\"\"\n *         import struct             # <<<<<<<<<<<<<<\n *         cdef bytes bytesitem\n * \n */\n  __pyx_t_1 = __Pyx_Import(__pyx_n_s_struct, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 488, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __pyx_v_struct = __pyx_t_1;\n  __pyx_t_1 = 0;\n\n  /* \"View.MemoryView\":491\n *         cdef bytes bytesitem\n * \n *         bytesitem = itemp[:self.view.itemsize]             # <<<<<<<<<<<<<<\n *         try:\n *             result = struct.unpack(self.view.format, bytesitem)\n */\n  __pyx_t_1 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_itemp + 0, __pyx_v_self->view.itemsize - 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 491, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __pyx_v_bytesitem = ((PyObject*)__pyx_t_1);\n  __pyx_t_1 = 0;\n\n  /* \"View.MemoryView\":492\n * \n *         bytesitem = itemp[:self.view.itemsize]\n *         try:             # <<<<<<<<<<<<<<\n *             result = struct.unpack(self.view.format, bytesitem)\n *         except struct.error:\n */\n  {\n    __Pyx_PyThreadState_declare\n    __Pyx_PyThreadState_assign\n    __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4);\n    __Pyx_XGOTREF(__pyx_t_2);\n    __Pyx_XGOTREF(__pyx_t_3);\n    __Pyx_XGOTREF(__pyx_t_4);\n    /*try:*/ {\n\n      /* \"View.MemoryView\":493\n *         bytesitem = itemp[:self.view.itemsize]\n *         try:\n *             result = struct.unpack(self.view.format, bytesitem)             # <<<<<<<<<<<<<<\n *         except struct.error:\n *             raise ValueError(\"Unable to convert item to object\")\n */\n      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_unpack); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 493, __pyx_L3_error)\n      __Pyx_GOTREF(__pyx_t_5);\n      __pyx_t_6 = __Pyx_PyBytes_FromString(__pyx_v_self->view.format); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 493, __pyx_L3_error)\n      __Pyx_GOTREF(__pyx_t_6);\n      __pyx_t_7 = NULL;\n      __pyx_t_8 = 0;\n      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {\n        __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);\n        if (likely(__pyx_t_7)) {\n          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);\n          __Pyx_INCREF(__pyx_t_7);\n          __Pyx_INCREF(function);\n          __Pyx_DECREF_SET(__pyx_t_5, function);\n          __pyx_t_8 = 1;\n        }\n      }\n      #if CYTHON_FAST_PYCALL\n      if (PyFunction_Check(__pyx_t_5)) {\n        PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_6, __pyx_v_bytesitem};\n        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 493, __pyx_L3_error)\n        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;\n        __Pyx_GOTREF(__pyx_t_1);\n        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;\n      } else\n      #endif\n      #if CYTHON_FAST_PYCCALL\n      if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {\n        PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_6, __pyx_v_bytesitem};\n        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 493, __pyx_L3_error)\n        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;\n        __Pyx_GOTREF(__pyx_t_1);\n        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;\n      } else\n      #endif\n      {\n        __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 493, __pyx_L3_error)\n        __Pyx_GOTREF(__pyx_t_9);\n        if (__pyx_t_7) {\n          __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;\n        }\n        __Pyx_GIVEREF(__pyx_t_6);\n        PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_t_6);\n        __Pyx_INCREF(__pyx_v_bytesitem);\n        __Pyx_GIVEREF(__pyx_v_bytesitem);\n        PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v_bytesitem);\n        __pyx_t_6 = 0;\n        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 493, __pyx_L3_error)\n        __Pyx_GOTREF(__pyx_t_1);\n        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;\n      }\n      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;\n      __pyx_v_result = __pyx_t_1;\n      __pyx_t_1 = 0;\n\n      /* \"View.MemoryView\":492\n * \n *         bytesitem = itemp[:self.view.itemsize]\n *         try:             # <<<<<<<<<<<<<<\n *             result = struct.unpack(self.view.format, bytesitem)\n *         except struct.error:\n */\n    }\n\n    /* \"View.MemoryView\":497\n *             raise ValueError(\"Unable to convert item to object\")\n *         else:\n *             if len(self.view.format) == 1:             # <<<<<<<<<<<<<<\n *                 return result[0]\n *             return result\n */\n    /*else:*/ {\n      __pyx_t_10 = strlen(__pyx_v_self->view.format); \n      __pyx_t_11 = ((__pyx_t_10 == 1) != 0);\n      if (__pyx_t_11) {\n\n        /* \"View.MemoryView\":498\n *         else:\n *             if len(self.view.format) == 1:\n *                 return result[0]             # <<<<<<<<<<<<<<\n *             return result\n * \n */\n        __Pyx_XDECREF(__pyx_r);\n        __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_result, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 498, __pyx_L5_except_error)\n        __Pyx_GOTREF(__pyx_t_1);\n        __pyx_r = __pyx_t_1;\n        __pyx_t_1 = 0;\n        goto __pyx_L6_except_return;\n\n        /* \"View.MemoryView\":497\n *             raise ValueError(\"Unable to convert item to object\")\n *         else:\n *             if len(self.view.format) == 1:             # <<<<<<<<<<<<<<\n *                 return result[0]\n *             return result\n */\n      }\n\n      /* \"View.MemoryView\":499\n *             if len(self.view.format) == 1:\n *                 return result[0]\n *             return result             # <<<<<<<<<<<<<<\n * \n *     cdef assign_item_from_object(self, char *itemp, object value):\n */\n      __Pyx_XDECREF(__pyx_r);\n      __Pyx_INCREF(__pyx_v_result);\n      __pyx_r = __pyx_v_result;\n      goto __pyx_L6_except_return;\n    }\n    __pyx_L3_error:;\n    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;\n    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;\n    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;\n    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;\n    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;\n\n    /* \"View.MemoryView\":494\n *         try:\n *             result = struct.unpack(self.view.format, bytesitem)\n *         except struct.error:             # <<<<<<<<<<<<<<\n *             raise ValueError(\"Unable to convert item to object\")\n *         else:\n */\n    __Pyx_ErrFetch(&__pyx_t_1, &__pyx_t_5, &__pyx_t_9);\n    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_error); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 494, __pyx_L5_except_error)\n    __Pyx_GOTREF(__pyx_t_6);\n    __pyx_t_8 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_1, __pyx_t_6);\n    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;\n    __Pyx_ErrRestore(__pyx_t_1, __pyx_t_5, __pyx_t_9);\n    __pyx_t_1 = 0; __pyx_t_5 = 0; __pyx_t_9 = 0;\n    if (__pyx_t_8) {\n      __Pyx_AddTraceback(\"View.MemoryView.memoryview.convert_item_to_object\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n      if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_5, &__pyx_t_1) < 0) __PYX_ERR(1, 494, __pyx_L5_except_error)\n      __Pyx_GOTREF(__pyx_t_9);\n      __Pyx_GOTREF(__pyx_t_5);\n      __Pyx_GOTREF(__pyx_t_1);\n\n      /* \"View.MemoryView\":495\n *             result = struct.unpack(self.view.format, bytesitem)\n *         except struct.error:\n *             raise ValueError(\"Unable to convert item to object\")             # <<<<<<<<<<<<<<\n *         else:\n *             if len(self.view.format) == 1:\n */\n      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__24, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 495, __pyx_L5_except_error)\n      __Pyx_GOTREF(__pyx_t_6);\n      __Pyx_Raise(__pyx_t_6, 0, 0, 0);\n      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;\n      __PYX_ERR(1, 495, __pyx_L5_except_error)\n    }\n    goto __pyx_L5_except_error;\n    __pyx_L5_except_error:;\n\n    /* \"View.MemoryView\":492\n * \n *         bytesitem = itemp[:self.view.itemsize]\n *         try:             # <<<<<<<<<<<<<<\n *             result = struct.unpack(self.view.format, bytesitem)\n *         except struct.error:\n */\n    __Pyx_XGIVEREF(__pyx_t_2);\n    __Pyx_XGIVEREF(__pyx_t_3);\n    __Pyx_XGIVEREF(__pyx_t_4);\n    __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);\n    goto __pyx_L1_error;\n    __pyx_L6_except_return:;\n    __Pyx_XGIVEREF(__pyx_t_2);\n    __Pyx_XGIVEREF(__pyx_t_3);\n    __Pyx_XGIVEREF(__pyx_t_4);\n    __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);\n    goto __pyx_L0;\n  }\n\n  /* \"View.MemoryView\":485\n *         self.assign_item_from_object(itemp, value)\n * \n *     cdef convert_item_to_object(self, char *itemp):             # <<<<<<<<<<<<<<\n *         \"\"\"Only used if instantiated manually by the user, or if Cython doesn't\n *         know how to convert the type\"\"\"\n */\n\n  /* function exit code */\n  __pyx_L1_error:;\n  __Pyx_XDECREF(__pyx_t_1);\n  __Pyx_XDECREF(__pyx_t_5);\n  __Pyx_XDECREF(__pyx_t_6);\n  __Pyx_XDECREF(__pyx_t_7);\n  __Pyx_XDECREF(__pyx_t_9);\n  __Pyx_AddTraceback(\"View.MemoryView.memoryview.convert_item_to_object\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n  __pyx_r = 0;\n  __pyx_L0:;\n  __Pyx_XDECREF(__pyx_v_struct);\n  __Pyx_XDECREF(__pyx_v_bytesitem);\n  __Pyx_XDECREF(__pyx_v_result);\n  __Pyx_XGIVEREF(__pyx_r);\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\n/* \"View.MemoryView\":501\n *             return result\n * \n *     cdef assign_item_from_object(self, char *itemp, object value):             # <<<<<<<<<<<<<<\n *         \"\"\"Only used if instantiated manually by the user, or if Cython doesn't\n *         know how to convert the type\"\"\"\n */\n\nstatic PyObject *__pyx_memoryview_assign_item_from_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value) {\n  PyObject *__pyx_v_struct = NULL;\n  char __pyx_v_c;\n  PyObject *__pyx_v_bytesvalue = 0;\n  Py_ssize_t __pyx_v_i;\n  PyObject *__pyx_r = NULL;\n  __Pyx_RefNannyDeclarations\n  PyObject *__pyx_t_1 = NULL;\n  int __pyx_t_2;\n  int __pyx_t_3;\n  PyObject *__pyx_t_4 = NULL;\n  PyObject *__pyx_t_5 = NULL;\n  PyObject *__pyx_t_6 = NULL;\n  int __pyx_t_7;\n  PyObject *__pyx_t_8 = NULL;\n  Py_ssize_t __pyx_t_9;\n  PyObject *__pyx_t_10 = NULL;\n  char *__pyx_t_11;\n  char *__pyx_t_12;\n  char *__pyx_t_13;\n  char *__pyx_t_14;\n  int __pyx_lineno = 0;\n  const char *__pyx_filename = NULL;\n  int __pyx_clineno = 0;\n  __Pyx_RefNannySetupContext(\"assign_item_from_object\", 0);\n\n  /* \"View.MemoryView\":504\n *         \"\"\"Only used if instantiated manually by the user, or if Cython doesn't\n *         know how to convert the type\"\"\"\n *         import struct             # <<<<<<<<<<<<<<\n *         cdef char c\n *         cdef bytes bytesvalue\n */\n  __pyx_t_1 = __Pyx_Import(__pyx_n_s_struct, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 504, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __pyx_v_struct = __pyx_t_1;\n  __pyx_t_1 = 0;\n\n  /* \"View.MemoryView\":509\n *         cdef Py_ssize_t i\n * \n *         if isinstance(value, tuple):             # <<<<<<<<<<<<<<\n *             bytesvalue = struct.pack(self.view.format, *value)\n *         else:\n */\n  __pyx_t_2 = PyTuple_Check(__pyx_v_value); \n  __pyx_t_3 = (__pyx_t_2 != 0);\n  if (__pyx_t_3) {\n\n    /* \"View.MemoryView\":510\n * \n *         if isinstance(value, tuple):\n *             bytesvalue = struct.pack(self.view.format, *value)             # <<<<<<<<<<<<<<\n *         else:\n *             bytesvalue = struct.pack(self.view.format, value)\n */\n    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_pack); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 510, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_1);\n    __pyx_t_4 = __Pyx_PyBytes_FromString(__pyx_v_self->view.format); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 510, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_4);\n    __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 510, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_5);\n    __Pyx_GIVEREF(__pyx_t_4);\n    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);\n    __pyx_t_4 = 0;\n    __pyx_t_4 = __Pyx_PySequence_Tuple(__pyx_v_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 510, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_4);\n    __pyx_t_6 = PyNumber_Add(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 510, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_6);\n    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;\n    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;\n    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 510, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_4);\n    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;\n    if (!(likely(PyBytes_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, \"Expected %.16s, got %.200s\", \"bytes\", Py_TYPE(__pyx_t_4)->tp_name), 0))) __PYX_ERR(1, 510, __pyx_L1_error)\n    __pyx_v_bytesvalue = ((PyObject*)__pyx_t_4);\n    __pyx_t_4 = 0;\n\n    /* \"View.MemoryView\":509\n *         cdef Py_ssize_t i\n * \n *         if isinstance(value, tuple):             # <<<<<<<<<<<<<<\n *             bytesvalue = struct.pack(self.view.format, *value)\n *         else:\n */\n    goto __pyx_L3;\n  }\n\n  /* \"View.MemoryView\":512\n *             bytesvalue = struct.pack(self.view.format, *value)\n *         else:\n *             bytesvalue = struct.pack(self.view.format, value)             # <<<<<<<<<<<<<<\n * \n *         for i, c in enumerate(bytesvalue):\n */\n  /*else*/ {\n    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_pack); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 512, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_6);\n    __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_self->view.format); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 512, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_1);\n    __pyx_t_5 = NULL;\n    __pyx_t_7 = 0;\n    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {\n      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);\n      if (likely(__pyx_t_5)) {\n        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);\n        __Pyx_INCREF(__pyx_t_5);\n        __Pyx_INCREF(function);\n        __Pyx_DECREF_SET(__pyx_t_6, function);\n        __pyx_t_7 = 1;\n      }\n    }\n    #if CYTHON_FAST_PYCALL\n    if (PyFunction_Check(__pyx_t_6)) {\n      PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_1, __pyx_v_value};\n      __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 512, __pyx_L1_error)\n      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;\n      __Pyx_GOTREF(__pyx_t_4);\n      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n    } else\n    #endif\n    #if CYTHON_FAST_PYCCALL\n    if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {\n      PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_1, __pyx_v_value};\n      __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 512, __pyx_L1_error)\n      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;\n      __Pyx_GOTREF(__pyx_t_4);\n      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n    } else\n    #endif\n    {\n      __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 512, __pyx_L1_error)\n      __Pyx_GOTREF(__pyx_t_8);\n      if (__pyx_t_5) {\n        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5); __pyx_t_5 = NULL;\n      }\n      __Pyx_GIVEREF(__pyx_t_1);\n      PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_1);\n      __Pyx_INCREF(__pyx_v_value);\n      __Pyx_GIVEREF(__pyx_v_value);\n      PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_value);\n      __pyx_t_1 = 0;\n      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 512, __pyx_L1_error)\n      __Pyx_GOTREF(__pyx_t_4);\n      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;\n    }\n    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;\n    if (!(likely(PyBytes_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, \"Expected %.16s, got %.200s\", \"bytes\", Py_TYPE(__pyx_t_4)->tp_name), 0))) __PYX_ERR(1, 512, __pyx_L1_error)\n    __pyx_v_bytesvalue = ((PyObject*)__pyx_t_4);\n    __pyx_t_4 = 0;\n  }\n  __pyx_L3:;\n\n  /* \"View.MemoryView\":514\n *             bytesvalue = struct.pack(self.view.format, value)\n * \n *         for i, c in enumerate(bytesvalue):             # <<<<<<<<<<<<<<\n *             itemp[i] = c\n * \n */\n  __pyx_t_9 = 0;\n  if (unlikely(__pyx_v_bytesvalue == Py_None)) {\n    PyErr_SetString(PyExc_TypeError, \"'NoneType' is not iterable\");\n    __PYX_ERR(1, 514, __pyx_L1_error)\n  }\n  __Pyx_INCREF(__pyx_v_bytesvalue);\n  __pyx_t_10 = __pyx_v_bytesvalue;\n  __pyx_t_12 = PyBytes_AS_STRING(__pyx_t_10);\n  __pyx_t_13 = (__pyx_t_12 + PyBytes_GET_SIZE(__pyx_t_10));\n  for (__pyx_t_14 = __pyx_t_12; __pyx_t_14 < __pyx_t_13; __pyx_t_14++) {\n    __pyx_t_11 = __pyx_t_14;\n    __pyx_v_c = (__pyx_t_11[0]);\n\n    /* \"View.MemoryView\":515\n * \n *         for i, c in enumerate(bytesvalue):\n *             itemp[i] = c             # <<<<<<<<<<<<<<\n * \n *     @cname('getbuffer')\n */\n    __pyx_v_i = __pyx_t_9;\n\n    /* \"View.MemoryView\":514\n *             bytesvalue = struct.pack(self.view.format, value)\n * \n *         for i, c in enumerate(bytesvalue):             # <<<<<<<<<<<<<<\n *             itemp[i] = c\n * \n */\n    __pyx_t_9 = (__pyx_t_9 + 1);\n\n    /* \"View.MemoryView\":515\n * \n *         for i, c in enumerate(bytesvalue):\n *             itemp[i] = c             # <<<<<<<<<<<<<<\n * \n *     @cname('getbuffer')\n */\n    (__pyx_v_itemp[__pyx_v_i]) = __pyx_v_c;\n  }\n  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;\n\n  /* \"View.MemoryView\":501\n *             return result\n * \n *     cdef assign_item_from_object(self, char *itemp, object value):             # <<<<<<<<<<<<<<\n *         \"\"\"Only used if instantiated manually by the user, or if Cython doesn't\n *         know how to convert the type\"\"\"\n */\n\n  /* function exit code */\n  __pyx_r = Py_None; __Pyx_INCREF(Py_None);\n  goto __pyx_L0;\n  __pyx_L1_error:;\n  __Pyx_XDECREF(__pyx_t_1);\n  __Pyx_XDECREF(__pyx_t_4);\n  __Pyx_XDECREF(__pyx_t_5);\n  __Pyx_XDECREF(__pyx_t_6);\n  __Pyx_XDECREF(__pyx_t_8);\n  __Pyx_XDECREF(__pyx_t_10);\n  __Pyx_AddTraceback(\"View.MemoryView.memoryview.assign_item_from_object\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n  __pyx_r = 0;\n  __pyx_L0:;\n  __Pyx_XDECREF(__pyx_v_struct);\n  __Pyx_XDECREF(__pyx_v_bytesvalue);\n  __Pyx_XGIVEREF(__pyx_r);\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\n/* \"View.MemoryView\":518\n * \n *     @cname('getbuffer')\n *     def __getbuffer__(self, Py_buffer *info, int flags):             # <<<<<<<<<<<<<<\n *         if flags & PyBUF_WRITABLE and self.view.readonly:\n *             raise ValueError(\"Cannot create writable memory view from read-only memoryview\")\n */\n\n/* Python wrapper */\nstatic CYTHON_UNUSED int __pyx_memoryview_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/\nstatic CYTHON_UNUSED int __pyx_memoryview_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {\n  int __pyx_r;\n  __Pyx_RefNannyDeclarations\n  __Pyx_RefNannySetupContext(\"__getbuffer__ (wrapper)\", 0);\n  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_8__getbuffer__(((struct __pyx_memoryview_obj *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags));\n\n  /* function exit code */\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\nstatic int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_8__getbuffer__(struct __pyx_memoryview_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {\n  int __pyx_r;\n  __Pyx_RefNannyDeclarations\n  int __pyx_t_1;\n  int __pyx_t_2;\n  PyObject *__pyx_t_3 = NULL;\n  Py_ssize_t *__pyx_t_4;\n  char *__pyx_t_5;\n  void *__pyx_t_6;\n  int __pyx_t_7;\n  Py_ssize_t __pyx_t_8;\n  int __pyx_lineno = 0;\n  const char *__pyx_filename = NULL;\n  int __pyx_clineno = 0;\n  if (__pyx_v_info == NULL) {\n    PyErr_SetString(PyExc_BufferError, \"PyObject_GetBuffer: view==NULL argument is obsolete\");\n    return -1;\n  }\n  __Pyx_RefNannySetupContext(\"__getbuffer__\", 0);\n  __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None);\n  __Pyx_GIVEREF(__pyx_v_info->obj);\n\n  /* \"View.MemoryView\":519\n *     @cname('getbuffer')\n *     def __getbuffer__(self, Py_buffer *info, int flags):\n *         if flags & PyBUF_WRITABLE and self.view.readonly:             # <<<<<<<<<<<<<<\n *             raise ValueError(\"Cannot create writable memory view from read-only memoryview\")\n * \n */\n  __pyx_t_2 = ((__pyx_v_flags & PyBUF_WRITABLE) != 0);\n  if (__pyx_t_2) {\n  } else {\n    __pyx_t_1 = __pyx_t_2;\n    goto __pyx_L4_bool_binop_done;\n  }\n  __pyx_t_2 = (__pyx_v_self->view.readonly != 0);\n  __pyx_t_1 = __pyx_t_2;\n  __pyx_L4_bool_binop_done:;\n  if (unlikely(__pyx_t_1)) {\n\n    /* \"View.MemoryView\":520\n *     def __getbuffer__(self, Py_buffer *info, int flags):\n *         if flags & PyBUF_WRITABLE and self.view.readonly:\n *             raise ValueError(\"Cannot create writable memory view from read-only memoryview\")             # <<<<<<<<<<<<<<\n * \n *         if flags & PyBUF_ND:\n */\n    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__25, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 520, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_3);\n    __Pyx_Raise(__pyx_t_3, 0, 0, 0);\n    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;\n    __PYX_ERR(1, 520, __pyx_L1_error)\n\n    /* \"View.MemoryView\":519\n *     @cname('getbuffer')\n *     def __getbuffer__(self, Py_buffer *info, int flags):\n *         if flags & PyBUF_WRITABLE and self.view.readonly:             # <<<<<<<<<<<<<<\n *             raise ValueError(\"Cannot create writable memory view from read-only memoryview\")\n * \n */\n  }\n\n  /* \"View.MemoryView\":522\n *             raise ValueError(\"Cannot create writable memory view from read-only memoryview\")\n * \n *         if flags & PyBUF_ND:             # <<<<<<<<<<<<<<\n *             info.shape = self.view.shape\n *         else:\n */\n  __pyx_t_1 = ((__pyx_v_flags & PyBUF_ND) != 0);\n  if (__pyx_t_1) {\n\n    /* \"View.MemoryView\":523\n * \n *         if flags & PyBUF_ND:\n *             info.shape = self.view.shape             # <<<<<<<<<<<<<<\n *         else:\n *             info.shape = NULL\n */\n    __pyx_t_4 = __pyx_v_self->view.shape;\n    __pyx_v_info->shape = __pyx_t_4;\n\n    /* \"View.MemoryView\":522\n *             raise ValueError(\"Cannot create writable memory view from read-only memoryview\")\n * \n *         if flags & PyBUF_ND:             # <<<<<<<<<<<<<<\n *             info.shape = self.view.shape\n *         else:\n */\n    goto __pyx_L6;\n  }\n\n  /* \"View.MemoryView\":525\n *             info.shape = self.view.shape\n *         else:\n *             info.shape = NULL             # <<<<<<<<<<<<<<\n * \n *         if flags & PyBUF_STRIDES:\n */\n  /*else*/ {\n    __pyx_v_info->shape = NULL;\n  }\n  __pyx_L6:;\n\n  /* \"View.MemoryView\":527\n *             info.shape = NULL\n * \n *         if flags & PyBUF_STRIDES:             # <<<<<<<<<<<<<<\n *             info.strides = self.view.strides\n *         else:\n */\n  __pyx_t_1 = ((__pyx_v_flags & PyBUF_STRIDES) != 0);\n  if (__pyx_t_1) {\n\n    /* \"View.MemoryView\":528\n * \n *         if flags & PyBUF_STRIDES:\n *             info.strides = self.view.strides             # <<<<<<<<<<<<<<\n *         else:\n *             info.strides = NULL\n */\n    __pyx_t_4 = __pyx_v_self->view.strides;\n    __pyx_v_info->strides = __pyx_t_4;\n\n    /* \"View.MemoryView\":527\n *             info.shape = NULL\n * \n *         if flags & PyBUF_STRIDES:             # <<<<<<<<<<<<<<\n *             info.strides = self.view.strides\n *         else:\n */\n    goto __pyx_L7;\n  }\n\n  /* \"View.MemoryView\":530\n *             info.strides = self.view.strides\n *         else:\n *             info.strides = NULL             # <<<<<<<<<<<<<<\n * \n *         if flags & PyBUF_INDIRECT:\n */\n  /*else*/ {\n    __pyx_v_info->strides = NULL;\n  }\n  __pyx_L7:;\n\n  /* \"View.MemoryView\":532\n *             info.strides = NULL\n * \n *         if flags & PyBUF_INDIRECT:             # <<<<<<<<<<<<<<\n *             info.suboffsets = self.view.suboffsets\n *         else:\n */\n  __pyx_t_1 = ((__pyx_v_flags & PyBUF_INDIRECT) != 0);\n  if (__pyx_t_1) {\n\n    /* \"View.MemoryView\":533\n * \n *         if flags & PyBUF_INDIRECT:\n *             info.suboffsets = self.view.suboffsets             # <<<<<<<<<<<<<<\n *         else:\n *             info.suboffsets = NULL\n */\n    __pyx_t_4 = __pyx_v_self->view.suboffsets;\n    __pyx_v_info->suboffsets = __pyx_t_4;\n\n    /* \"View.MemoryView\":532\n *             info.strides = NULL\n * \n *         if flags & PyBUF_INDIRECT:             # <<<<<<<<<<<<<<\n *             info.suboffsets = self.view.suboffsets\n *         else:\n */\n    goto __pyx_L8;\n  }\n\n  /* \"View.MemoryView\":535\n *             info.suboffsets = self.view.suboffsets\n *         else:\n *             info.suboffsets = NULL             # <<<<<<<<<<<<<<\n * \n *         if flags & PyBUF_FORMAT:\n */\n  /*else*/ {\n    __pyx_v_info->suboffsets = NULL;\n  }\n  __pyx_L8:;\n\n  /* \"View.MemoryView\":537\n *             info.suboffsets = NULL\n * \n *         if flags & PyBUF_FORMAT:             # <<<<<<<<<<<<<<\n *             info.format = self.view.format\n *         else:\n */\n  __pyx_t_1 = ((__pyx_v_flags & PyBUF_FORMAT) != 0);\n  if (__pyx_t_1) {\n\n    /* \"View.MemoryView\":538\n * \n *         if flags & PyBUF_FORMAT:\n *             info.format = self.view.format             # <<<<<<<<<<<<<<\n *         else:\n *             info.format = NULL\n */\n    __pyx_t_5 = __pyx_v_self->view.format;\n    __pyx_v_info->format = __pyx_t_5;\n\n    /* \"View.MemoryView\":537\n *             info.suboffsets = NULL\n * \n *         if flags & PyBUF_FORMAT:             # <<<<<<<<<<<<<<\n *             info.format = self.view.format\n *         else:\n */\n    goto __pyx_L9;\n  }\n\n  /* \"View.MemoryView\":540\n *             info.format = self.view.format\n *         else:\n *             info.format = NULL             # <<<<<<<<<<<<<<\n * \n *         info.buf = self.view.buf\n */\n  /*else*/ {\n    __pyx_v_info->format = NULL;\n  }\n  __pyx_L9:;\n\n  /* \"View.MemoryView\":542\n *             info.format = NULL\n * \n *         info.buf = self.view.buf             # <<<<<<<<<<<<<<\n *         info.ndim = self.view.ndim\n *         info.itemsize = self.view.itemsize\n */\n  __pyx_t_6 = __pyx_v_self->view.buf;\n  __pyx_v_info->buf = __pyx_t_6;\n\n  /* \"View.MemoryView\":543\n * \n *         info.buf = self.view.buf\n *         info.ndim = self.view.ndim             # <<<<<<<<<<<<<<\n *         info.itemsize = self.view.itemsize\n *         info.len = self.view.len\n */\n  __pyx_t_7 = __pyx_v_self->view.ndim;\n  __pyx_v_info->ndim = __pyx_t_7;\n\n  /* \"View.MemoryView\":544\n *         info.buf = self.view.buf\n *         info.ndim = self.view.ndim\n *         info.itemsize = self.view.itemsize             # <<<<<<<<<<<<<<\n *         info.len = self.view.len\n *         info.readonly = self.view.readonly\n */\n  __pyx_t_8 = __pyx_v_self->view.itemsize;\n  __pyx_v_info->itemsize = __pyx_t_8;\n\n  /* \"View.MemoryView\":545\n *         info.ndim = self.view.ndim\n *         info.itemsize = self.view.itemsize\n *         info.len = self.view.len             # <<<<<<<<<<<<<<\n *         info.readonly = self.view.readonly\n *         info.obj = self\n */\n  __pyx_t_8 = __pyx_v_self->view.len;\n  __pyx_v_info->len = __pyx_t_8;\n\n  /* \"View.MemoryView\":546\n *         info.itemsize = self.view.itemsize\n *         info.len = self.view.len\n *         info.readonly = self.view.readonly             # <<<<<<<<<<<<<<\n *         info.obj = self\n * \n */\n  __pyx_t_1 = __pyx_v_self->view.readonly;\n  __pyx_v_info->readonly = __pyx_t_1;\n\n  /* \"View.MemoryView\":547\n *         info.len = self.view.len\n *         info.readonly = self.view.readonly\n *         info.obj = self             # <<<<<<<<<<<<<<\n * \n *     __pyx_getbuffer = capsule(<void *> &__pyx_memoryview_getbuffer, \"getbuffer(obj, view, flags)\")\n */\n  __Pyx_INCREF(((PyObject *)__pyx_v_self));\n  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));\n  __Pyx_GOTREF(__pyx_v_info->obj);\n  __Pyx_DECREF(__pyx_v_info->obj);\n  __pyx_v_info->obj = ((PyObject *)__pyx_v_self);\n\n  /* \"View.MemoryView\":518\n * \n *     @cname('getbuffer')\n *     def __getbuffer__(self, Py_buffer *info, int flags):             # <<<<<<<<<<<<<<\n *         if flags & PyBUF_WRITABLE and self.view.readonly:\n *             raise ValueError(\"Cannot create writable memory view from read-only memoryview\")\n */\n\n  /* function exit code */\n  __pyx_r = 0;\n  goto __pyx_L0;\n  __pyx_L1_error:;\n  __Pyx_XDECREF(__pyx_t_3);\n  __Pyx_AddTraceback(\"View.MemoryView.memoryview.__getbuffer__\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n  __pyx_r = -1;\n  if (__pyx_v_info->obj != NULL) {\n    __Pyx_GOTREF(__pyx_v_info->obj);\n    __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;\n  }\n  goto __pyx_L2;\n  __pyx_L0:;\n  if (__pyx_v_info->obj == Py_None) {\n    __Pyx_GOTREF(__pyx_v_info->obj);\n    __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;\n  }\n  __pyx_L2:;\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\n/* \"View.MemoryView\":553\n * \n *     @property\n *     def T(self):             # <<<<<<<<<<<<<<\n *         cdef _memoryviewslice result = memoryview_copy(self)\n *         transpose_memslice(&result.from_slice)\n */\n\n/* Python wrapper */\nstatic PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_1T_1__get__(PyObject *__pyx_v_self); /*proto*/\nstatic PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_1T_1__get__(PyObject *__pyx_v_self) {\n  PyObject *__pyx_r = 0;\n  __Pyx_RefNannyDeclarations\n  __Pyx_RefNannySetupContext(\"__get__ (wrapper)\", 0);\n  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));\n\n  /* function exit code */\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\nstatic PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(struct __pyx_memoryview_obj *__pyx_v_self) {\n  struct __pyx_memoryviewslice_obj *__pyx_v_result = 0;\n  PyObject *__pyx_r = NULL;\n  __Pyx_RefNannyDeclarations\n  PyObject *__pyx_t_1 = NULL;\n  int __pyx_t_2;\n  int __pyx_lineno = 0;\n  const char *__pyx_filename = NULL;\n  int __pyx_clineno = 0;\n  __Pyx_RefNannySetupContext(\"__get__\", 0);\n\n  /* \"View.MemoryView\":554\n *     @property\n *     def T(self):\n *         cdef _memoryviewslice result = memoryview_copy(self)             # <<<<<<<<<<<<<<\n *         transpose_memslice(&result.from_slice)\n *         return result\n */\n  __pyx_t_1 = __pyx_memoryview_copy_object(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 554, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_memoryviewslice_type))))) __PYX_ERR(1, 554, __pyx_L1_error)\n  __pyx_v_result = ((struct __pyx_memoryviewslice_obj *)__pyx_t_1);\n  __pyx_t_1 = 0;\n\n  /* \"View.MemoryView\":555\n *     def T(self):\n *         cdef _memoryviewslice result = memoryview_copy(self)\n *         transpose_memslice(&result.from_slice)             # <<<<<<<<<<<<<<\n *         return result\n * \n */\n  __pyx_t_2 = __pyx_memslice_transpose((&__pyx_v_result->from_slice)); if (unlikely(__pyx_t_2 == ((int)0))) __PYX_ERR(1, 555, __pyx_L1_error)\n\n  /* \"View.MemoryView\":556\n *         cdef _memoryviewslice result = memoryview_copy(self)\n *         transpose_memslice(&result.from_slice)\n *         return result             # <<<<<<<<<<<<<<\n * \n *     @property\n */\n  __Pyx_XDECREF(__pyx_r);\n  __Pyx_INCREF(((PyObject *)__pyx_v_result));\n  __pyx_r = ((PyObject *)__pyx_v_result);\n  goto __pyx_L0;\n\n  /* \"View.MemoryView\":553\n * \n *     @property\n *     def T(self):             # <<<<<<<<<<<<<<\n *         cdef _memoryviewslice result = memoryview_copy(self)\n *         transpose_memslice(&result.from_slice)\n */\n\n  /* function exit code */\n  __pyx_L1_error:;\n  __Pyx_XDECREF(__pyx_t_1);\n  __Pyx_AddTraceback(\"View.MemoryView.memoryview.T.__get__\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n  __pyx_r = NULL;\n  __pyx_L0:;\n  __Pyx_XDECREF((PyObject *)__pyx_v_result);\n  __Pyx_XGIVEREF(__pyx_r);\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\n/* \"View.MemoryView\":559\n * \n *     @property\n *     def base(self):             # <<<<<<<<<<<<<<\n *         return self.obj\n * \n */\n\n/* Python wrapper */\nstatic PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4base_1__get__(PyObject *__pyx_v_self); /*proto*/\nstatic PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4base_1__get__(PyObject *__pyx_v_self) {\n  PyObject *__pyx_r = 0;\n  __Pyx_RefNannyDeclarations\n  __Pyx_RefNannySetupContext(\"__get__ (wrapper)\", 0);\n  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_4base___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));\n\n  /* function exit code */\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\nstatic PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4base___get__(struct __pyx_memoryview_obj *__pyx_v_self) {\n  PyObject *__pyx_r = NULL;\n  __Pyx_RefNannyDeclarations\n  __Pyx_RefNannySetupContext(\"__get__\", 0);\n\n  /* \"View.MemoryView\":560\n *     @property\n *     def base(self):\n *         return self.obj             # <<<<<<<<<<<<<<\n * \n *     @property\n */\n  __Pyx_XDECREF(__pyx_r);\n  __Pyx_INCREF(__pyx_v_self->obj);\n  __pyx_r = __pyx_v_self->obj;\n  goto __pyx_L0;\n\n  /* \"View.MemoryView\":559\n * \n *     @property\n *     def base(self):             # <<<<<<<<<<<<<<\n *         return self.obj\n * \n */\n\n  /* function exit code */\n  __pyx_L0:;\n  __Pyx_XGIVEREF(__pyx_r);\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\n/* \"View.MemoryView\":563\n * \n *     @property\n *     def shape(self):             # <<<<<<<<<<<<<<\n *         return tuple([length for length in self.view.shape[:self.view.ndim]])\n * \n */\n\n/* Python wrapper */\nstatic PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_5shape_1__get__(PyObject *__pyx_v_self); /*proto*/\nstatic PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_5shape_1__get__(PyObject *__pyx_v_self) {\n  PyObject *__pyx_r = 0;\n  __Pyx_RefNannyDeclarations\n  __Pyx_RefNannySetupContext(\"__get__ (wrapper)\", 0);\n  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_5shape___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));\n\n  /* function exit code */\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\nstatic PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_5shape___get__(struct __pyx_memoryview_obj *__pyx_v_self) {\n  Py_ssize_t __pyx_v_length;\n  PyObject *__pyx_r = NULL;\n  __Pyx_RefNannyDeclarations\n  PyObject *__pyx_t_1 = NULL;\n  Py_ssize_t *__pyx_t_2;\n  Py_ssize_t *__pyx_t_3;\n  Py_ssize_t *__pyx_t_4;\n  PyObject *__pyx_t_5 = NULL;\n  int __pyx_lineno = 0;\n  const char *__pyx_filename = NULL;\n  int __pyx_clineno = 0;\n  __Pyx_RefNannySetupContext(\"__get__\", 0);\n\n  /* \"View.MemoryView\":564\n *     @property\n *     def shape(self):\n *         return tuple([length for length in self.view.shape[:self.view.ndim]])             # <<<<<<<<<<<<<<\n * \n *     @property\n */\n  __Pyx_XDECREF(__pyx_r);\n  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 564, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __pyx_t_3 = (__pyx_v_self->view.shape + __pyx_v_self->view.ndim);\n  for (__pyx_t_4 = __pyx_v_self->view.shape; __pyx_t_4 < __pyx_t_3; __pyx_t_4++) {\n    __pyx_t_2 = __pyx_t_4;\n    __pyx_v_length = (__pyx_t_2[0]);\n    __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_length); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 564, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_5);\n    if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(1, 564, __pyx_L1_error)\n    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;\n  }\n  __pyx_t_5 = PyList_AsTuple(((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 564, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_5);\n  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n  __pyx_r = __pyx_t_5;\n  __pyx_t_5 = 0;\n  goto __pyx_L0;\n\n  /* \"View.MemoryView\":563\n * \n *     @property\n *     def shape(self):             # <<<<<<<<<<<<<<\n *         return tuple([length for length in self.view.shape[:self.view.ndim]])\n * \n */\n\n  /* function exit code */\n  __pyx_L1_error:;\n  __Pyx_XDECREF(__pyx_t_1);\n  __Pyx_XDECREF(__pyx_t_5);\n  __Pyx_AddTraceback(\"View.MemoryView.memoryview.shape.__get__\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n  __pyx_r = NULL;\n  __pyx_L0:;\n  __Pyx_XGIVEREF(__pyx_r);\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\n/* \"View.MemoryView\":567\n * \n *     @property\n *     def strides(self):             # <<<<<<<<<<<<<<\n *         if self.view.strides == NULL:\n * \n */\n\n/* Python wrapper */\nstatic PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_7strides_1__get__(PyObject *__pyx_v_self); /*proto*/\nstatic PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_7strides_1__get__(PyObject *__pyx_v_self) {\n  PyObject *__pyx_r = 0;\n  __Pyx_RefNannyDeclarations\n  __Pyx_RefNannySetupContext(\"__get__ (wrapper)\", 0);\n  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));\n\n  /* function exit code */\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\nstatic PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(struct __pyx_memoryview_obj *__pyx_v_self) {\n  Py_ssize_t __pyx_v_stride;\n  PyObject *__pyx_r = NULL;\n  __Pyx_RefNannyDeclarations\n  int __pyx_t_1;\n  PyObject *__pyx_t_2 = NULL;\n  Py_ssize_t *__pyx_t_3;\n  Py_ssize_t *__pyx_t_4;\n  Py_ssize_t *__pyx_t_5;\n  PyObject *__pyx_t_6 = NULL;\n  int __pyx_lineno = 0;\n  const char *__pyx_filename = NULL;\n  int __pyx_clineno = 0;\n  __Pyx_RefNannySetupContext(\"__get__\", 0);\n\n  /* \"View.MemoryView\":568\n *     @property\n *     def strides(self):\n *         if self.view.strides == NULL:             # <<<<<<<<<<<<<<\n * \n *             raise ValueError(\"Buffer view does not expose strides\")\n */\n  __pyx_t_1 = ((__pyx_v_self->view.strides == NULL) != 0);\n  if (unlikely(__pyx_t_1)) {\n\n    /* \"View.MemoryView\":570\n *         if self.view.strides == NULL:\n * \n *             raise ValueError(\"Buffer view does not expose strides\")             # <<<<<<<<<<<<<<\n * \n *         return tuple([stride for stride in self.view.strides[:self.view.ndim]])\n */\n    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__26, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 570, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_2);\n    __Pyx_Raise(__pyx_t_2, 0, 0, 0);\n    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;\n    __PYX_ERR(1, 570, __pyx_L1_error)\n\n    /* \"View.MemoryView\":568\n *     @property\n *     def strides(self):\n *         if self.view.strides == NULL:             # <<<<<<<<<<<<<<\n * \n *             raise ValueError(\"Buffer view does not expose strides\")\n */\n  }\n\n  /* \"View.MemoryView\":572\n *             raise ValueError(\"Buffer view does not expose strides\")\n * \n *         return tuple([stride for stride in self.view.strides[:self.view.ndim]])             # <<<<<<<<<<<<<<\n * \n *     @property\n */\n  __Pyx_XDECREF(__pyx_r);\n  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 572, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_2);\n  __pyx_t_4 = (__pyx_v_self->view.strides + __pyx_v_self->view.ndim);\n  for (__pyx_t_5 = __pyx_v_self->view.strides; __pyx_t_5 < __pyx_t_4; __pyx_t_5++) {\n    __pyx_t_3 = __pyx_t_5;\n    __pyx_v_stride = (__pyx_t_3[0]);\n    __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_stride); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 572, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_6);\n    if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_6))) __PYX_ERR(1, 572, __pyx_L1_error)\n    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;\n  }\n  __pyx_t_6 = PyList_AsTuple(((PyObject*)__pyx_t_2)); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 572, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_6);\n  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;\n  __pyx_r = __pyx_t_6;\n  __pyx_t_6 = 0;\n  goto __pyx_L0;\n\n  /* \"View.MemoryView\":567\n * \n *     @property\n *     def strides(self):             # <<<<<<<<<<<<<<\n *         if self.view.strides == NULL:\n * \n */\n\n  /* function exit code */\n  __pyx_L1_error:;\n  __Pyx_XDECREF(__pyx_t_2);\n  __Pyx_XDECREF(__pyx_t_6);\n  __Pyx_AddTraceback(\"View.MemoryView.memoryview.strides.__get__\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n  __pyx_r = NULL;\n  __pyx_L0:;\n  __Pyx_XGIVEREF(__pyx_r);\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\n/* \"View.MemoryView\":575\n * \n *     @property\n *     def suboffsets(self):             # <<<<<<<<<<<<<<\n *         if self.view.suboffsets == NULL:\n *             return (-1,) * self.view.ndim\n */\n\n/* Python wrapper */\nstatic PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_10suboffsets_1__get__(PyObject *__pyx_v_self); /*proto*/\nstatic PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_10suboffsets_1__get__(PyObject *__pyx_v_self) {\n  PyObject *__pyx_r = 0;\n  __Pyx_RefNannyDeclarations\n  __Pyx_RefNannySetupContext(\"__get__ (wrapper)\", 0);\n  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));\n\n  /* function exit code */\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\nstatic PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get__(struct __pyx_memoryview_obj *__pyx_v_self) {\n  Py_ssize_t __pyx_v_suboffset;\n  PyObject *__pyx_r = NULL;\n  __Pyx_RefNannyDeclarations\n  int __pyx_t_1;\n  PyObject *__pyx_t_2 = NULL;\n  PyObject *__pyx_t_3 = NULL;\n  Py_ssize_t *__pyx_t_4;\n  Py_ssize_t *__pyx_t_5;\n  Py_ssize_t *__pyx_t_6;\n  int __pyx_lineno = 0;\n  const char *__pyx_filename = NULL;\n  int __pyx_clineno = 0;\n  __Pyx_RefNannySetupContext(\"__get__\", 0);\n\n  /* \"View.MemoryView\":576\n *     @property\n *     def suboffsets(self):\n *         if self.view.suboffsets == NULL:             # <<<<<<<<<<<<<<\n *             return (-1,) * self.view.ndim\n * \n */\n  __pyx_t_1 = ((__pyx_v_self->view.suboffsets == NULL) != 0);\n  if (__pyx_t_1) {\n\n    /* \"View.MemoryView\":577\n *     def suboffsets(self):\n *         if self.view.suboffsets == NULL:\n *             return (-1,) * self.view.ndim             # <<<<<<<<<<<<<<\n * \n *         return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]])\n */\n    __Pyx_XDECREF(__pyx_r);\n    __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->view.ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 577, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_2);\n    __pyx_t_3 = PyNumber_Multiply(__pyx_tuple__27, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 577, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_3);\n    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;\n    __pyx_r = __pyx_t_3;\n    __pyx_t_3 = 0;\n    goto __pyx_L0;\n\n    /* \"View.MemoryView\":576\n *     @property\n *     def suboffsets(self):\n *         if self.view.suboffsets == NULL:             # <<<<<<<<<<<<<<\n *             return (-1,) * self.view.ndim\n * \n */\n  }\n\n  /* \"View.MemoryView\":579\n *             return (-1,) * self.view.ndim\n * \n *         return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]])             # <<<<<<<<<<<<<<\n * \n *     @property\n */\n  __Pyx_XDECREF(__pyx_r);\n  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 579, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_3);\n  __pyx_t_5 = (__pyx_v_self->view.suboffsets + __pyx_v_self->view.ndim);\n  for (__pyx_t_6 = __pyx_v_self->view.suboffsets; __pyx_t_6 < __pyx_t_5; __pyx_t_6++) {\n    __pyx_t_4 = __pyx_t_6;\n    __pyx_v_suboffset = (__pyx_t_4[0]);\n    __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_suboffset); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 579, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_2);\n    if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_2))) __PYX_ERR(1, 579, __pyx_L1_error)\n    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;\n  }\n  __pyx_t_2 = PyList_AsTuple(((PyObject*)__pyx_t_3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 579, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_2);\n  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;\n  __pyx_r = __pyx_t_2;\n  __pyx_t_2 = 0;\n  goto __pyx_L0;\n\n  /* \"View.MemoryView\":575\n * \n *     @property\n *     def suboffsets(self):             # <<<<<<<<<<<<<<\n *         if self.view.suboffsets == NULL:\n *             return (-1,) * self.view.ndim\n */\n\n  /* function exit code */\n  __pyx_L1_error:;\n  __Pyx_XDECREF(__pyx_t_2);\n  __Pyx_XDECREF(__pyx_t_3);\n  __Pyx_AddTraceback(\"View.MemoryView.memoryview.suboffsets.__get__\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n  __pyx_r = NULL;\n  __pyx_L0:;\n  __Pyx_XGIVEREF(__pyx_r);\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\n/* \"View.MemoryView\":582\n * \n *     @property\n *     def ndim(self):             # <<<<<<<<<<<<<<\n *         return self.view.ndim\n * \n */\n\n/* Python wrapper */\nstatic PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4ndim_1__get__(PyObject *__pyx_v_self); /*proto*/\nstatic PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4ndim_1__get__(PyObject *__pyx_v_self) {\n  PyObject *__pyx_r = 0;\n  __Pyx_RefNannyDeclarations\n  __Pyx_RefNannySetupContext(\"__get__ (wrapper)\", 0);\n  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));\n\n  /* function exit code */\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\nstatic PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get__(struct __pyx_memoryview_obj *__pyx_v_self) {\n  PyObject *__pyx_r = NULL;\n  __Pyx_RefNannyDeclarations\n  PyObject *__pyx_t_1 = NULL;\n  int __pyx_lineno = 0;\n  const char *__pyx_filename = NULL;\n  int __pyx_clineno = 0;\n  __Pyx_RefNannySetupContext(\"__get__\", 0);\n\n  /* \"View.MemoryView\":583\n *     @property\n *     def ndim(self):\n *         return self.view.ndim             # <<<<<<<<<<<<<<\n * \n *     @property\n */\n  __Pyx_XDECREF(__pyx_r);\n  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->view.ndim); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 583, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __pyx_r = __pyx_t_1;\n  __pyx_t_1 = 0;\n  goto __pyx_L0;\n\n  /* \"View.MemoryView\":582\n * \n *     @property\n *     def ndim(self):             # <<<<<<<<<<<<<<\n *         return self.view.ndim\n * \n */\n\n  /* function exit code */\n  __pyx_L1_error:;\n  __Pyx_XDECREF(__pyx_t_1);\n  __Pyx_AddTraceback(\"View.MemoryView.memoryview.ndim.__get__\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n  __pyx_r = NULL;\n  __pyx_L0:;\n  __Pyx_XGIVEREF(__pyx_r);\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\n/* \"View.MemoryView\":586\n * \n *     @property\n *     def itemsize(self):             # <<<<<<<<<<<<<<\n *         return self.view.itemsize\n * \n */\n\n/* Python wrapper */\nstatic PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_8itemsize_1__get__(PyObject *__pyx_v_self); /*proto*/\nstatic PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_8itemsize_1__get__(PyObject *__pyx_v_self) {\n  PyObject *__pyx_r = 0;\n  __Pyx_RefNannyDeclarations\n  __Pyx_RefNannySetupContext(\"__get__ (wrapper)\", 0);\n  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));\n\n  /* function exit code */\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\nstatic PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize___get__(struct __pyx_memoryview_obj *__pyx_v_self) {\n  PyObject *__pyx_r = NULL;\n  __Pyx_RefNannyDeclarations\n  PyObject *__pyx_t_1 = NULL;\n  int __pyx_lineno = 0;\n  const char *__pyx_filename = NULL;\n  int __pyx_clineno = 0;\n  __Pyx_RefNannySetupContext(\"__get__\", 0);\n\n  /* \"View.MemoryView\":587\n *     @property\n *     def itemsize(self):\n *         return self.view.itemsize             # <<<<<<<<<<<<<<\n * \n *     @property\n */\n  __Pyx_XDECREF(__pyx_r);\n  __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_self->view.itemsize); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 587, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __pyx_r = __pyx_t_1;\n  __pyx_t_1 = 0;\n  goto __pyx_L0;\n\n  /* \"View.MemoryView\":586\n * \n *     @property\n *     def itemsize(self):             # <<<<<<<<<<<<<<\n *         return self.view.itemsize\n * \n */\n\n  /* function exit code */\n  __pyx_L1_error:;\n  __Pyx_XDECREF(__pyx_t_1);\n  __Pyx_AddTraceback(\"View.MemoryView.memoryview.itemsize.__get__\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n  __pyx_r = NULL;\n  __pyx_L0:;\n  __Pyx_XGIVEREF(__pyx_r);\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\n/* \"View.MemoryView\":590\n * \n *     @property\n *     def nbytes(self):             # <<<<<<<<<<<<<<\n *         return self.size * self.view.itemsize\n * \n */\n\n/* Python wrapper */\nstatic PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_6nbytes_1__get__(PyObject *__pyx_v_self); /*proto*/\nstatic PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_6nbytes_1__get__(PyObject *__pyx_v_self) {\n  PyObject *__pyx_r = 0;\n  __Pyx_RefNannyDeclarations\n  __Pyx_RefNannySetupContext(\"__get__ (wrapper)\", 0);\n  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));\n\n  /* function exit code */\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\nstatic PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(struct __pyx_memoryview_obj *__pyx_v_self) {\n  PyObject *__pyx_r = NULL;\n  __Pyx_RefNannyDeclarations\n  PyObject *__pyx_t_1 = NULL;\n  PyObject *__pyx_t_2 = NULL;\n  PyObject *__pyx_t_3 = NULL;\n  int __pyx_lineno = 0;\n  const char *__pyx_filename = NULL;\n  int __pyx_clineno = 0;\n  __Pyx_RefNannySetupContext(\"__get__\", 0);\n\n  /* \"View.MemoryView\":591\n *     @property\n *     def nbytes(self):\n *         return self.size * self.view.itemsize             # <<<<<<<<<<<<<<\n * \n *     @property\n */\n  __Pyx_XDECREF(__pyx_r);\n  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 591, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_self->view.itemsize); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 591, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_2);\n  __pyx_t_3 = PyNumber_Multiply(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 591, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_3);\n  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;\n  __pyx_r = __pyx_t_3;\n  __pyx_t_3 = 0;\n  goto __pyx_L0;\n\n  /* \"View.MemoryView\":590\n * \n *     @property\n *     def nbytes(self):             # <<<<<<<<<<<<<<\n *         return self.size * self.view.itemsize\n * \n */\n\n  /* function exit code */\n  __pyx_L1_error:;\n  __Pyx_XDECREF(__pyx_t_1);\n  __Pyx_XDECREF(__pyx_t_2);\n  __Pyx_XDECREF(__pyx_t_3);\n  __Pyx_AddTraceback(\"View.MemoryView.memoryview.nbytes.__get__\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n  __pyx_r = NULL;\n  __pyx_L0:;\n  __Pyx_XGIVEREF(__pyx_r);\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\n/* \"View.MemoryView\":594\n * \n *     @property\n *     def size(self):             # <<<<<<<<<<<<<<\n *         if self._size is None:\n *             result = 1\n */\n\n/* Python wrapper */\nstatic PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4size_1__get__(PyObject *__pyx_v_self); /*proto*/\nstatic PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4size_1__get__(PyObject *__pyx_v_self) {\n  PyObject *__pyx_r = 0;\n  __Pyx_RefNannyDeclarations\n  __Pyx_RefNannySetupContext(\"__get__ (wrapper)\", 0);\n  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));\n\n  /* function exit code */\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\nstatic PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(struct __pyx_memoryview_obj *__pyx_v_self) {\n  PyObject *__pyx_v_result = NULL;\n  PyObject *__pyx_v_length = NULL;\n  PyObject *__pyx_r = NULL;\n  __Pyx_RefNannyDeclarations\n  int __pyx_t_1;\n  int __pyx_t_2;\n  Py_ssize_t *__pyx_t_3;\n  Py_ssize_t *__pyx_t_4;\n  Py_ssize_t *__pyx_t_5;\n  PyObject *__pyx_t_6 = NULL;\n  int __pyx_lineno = 0;\n  const char *__pyx_filename = NULL;\n  int __pyx_clineno = 0;\n  __Pyx_RefNannySetupContext(\"__get__\", 0);\n\n  /* \"View.MemoryView\":595\n *     @property\n *     def size(self):\n *         if self._size is None:             # <<<<<<<<<<<<<<\n *             result = 1\n * \n */\n  __pyx_t_1 = (__pyx_v_self->_size == Py_None);\n  __pyx_t_2 = (__pyx_t_1 != 0);\n  if (__pyx_t_2) {\n\n    /* \"View.MemoryView\":596\n *     def size(self):\n *         if self._size is None:\n *             result = 1             # <<<<<<<<<<<<<<\n * \n *             for length in self.view.shape[:self.view.ndim]:\n */\n    __Pyx_INCREF(__pyx_int_1);\n    __pyx_v_result = __pyx_int_1;\n\n    /* \"View.MemoryView\":598\n *             result = 1\n * \n *             for length in self.view.shape[:self.view.ndim]:             # <<<<<<<<<<<<<<\n *                 result *= length\n * \n */\n    __pyx_t_4 = (__pyx_v_self->view.shape + __pyx_v_self->view.ndim);\n    for (__pyx_t_5 = __pyx_v_self->view.shape; __pyx_t_5 < __pyx_t_4; __pyx_t_5++) {\n      __pyx_t_3 = __pyx_t_5;\n      __pyx_t_6 = PyInt_FromSsize_t((__pyx_t_3[0])); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 598, __pyx_L1_error)\n      __Pyx_GOTREF(__pyx_t_6);\n      __Pyx_XDECREF_SET(__pyx_v_length, __pyx_t_6);\n      __pyx_t_6 = 0;\n\n      /* \"View.MemoryView\":599\n * \n *             for length in self.view.shape[:self.view.ndim]:\n *                 result *= length             # <<<<<<<<<<<<<<\n * \n *             self._size = result\n */\n      __pyx_t_6 = PyNumber_InPlaceMultiply(__pyx_v_result, __pyx_v_length); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 599, __pyx_L1_error)\n      __Pyx_GOTREF(__pyx_t_6);\n      __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_6);\n      __pyx_t_6 = 0;\n    }\n\n    /* \"View.MemoryView\":601\n *                 result *= length\n * \n *             self._size = result             # <<<<<<<<<<<<<<\n * \n *         return self._size\n */\n    __Pyx_INCREF(__pyx_v_result);\n    __Pyx_GIVEREF(__pyx_v_result);\n    __Pyx_GOTREF(__pyx_v_self->_size);\n    __Pyx_DECREF(__pyx_v_self->_size);\n    __pyx_v_self->_size = __pyx_v_result;\n\n    /* \"View.MemoryView\":595\n *     @property\n *     def size(self):\n *         if self._size is None:             # <<<<<<<<<<<<<<\n *             result = 1\n * \n */\n  }\n\n  /* \"View.MemoryView\":603\n *             self._size = result\n * \n *         return self._size             # <<<<<<<<<<<<<<\n * \n *     def __len__(self):\n */\n  __Pyx_XDECREF(__pyx_r);\n  __Pyx_INCREF(__pyx_v_self->_size);\n  __pyx_r = __pyx_v_self->_size;\n  goto __pyx_L0;\n\n  /* \"View.MemoryView\":594\n * \n *     @property\n *     def size(self):             # <<<<<<<<<<<<<<\n *         if self._size is None:\n *             result = 1\n */\n\n  /* function exit code */\n  __pyx_L1_error:;\n  __Pyx_XDECREF(__pyx_t_6);\n  __Pyx_AddTraceback(\"View.MemoryView.memoryview.size.__get__\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n  __pyx_r = NULL;\n  __pyx_L0:;\n  __Pyx_XDECREF(__pyx_v_result);\n  __Pyx_XDECREF(__pyx_v_length);\n  __Pyx_XGIVEREF(__pyx_r);\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\n/* \"View.MemoryView\":605\n *         return self._size\n * \n *     def __len__(self):             # <<<<<<<<<<<<<<\n *         if self.view.ndim >= 1:\n *             return self.view.shape[0]\n */\n\n/* Python wrapper */\nstatic Py_ssize_t __pyx_memoryview___len__(PyObject *__pyx_v_self); /*proto*/\nstatic Py_ssize_t __pyx_memoryview___len__(PyObject *__pyx_v_self) {\n  Py_ssize_t __pyx_r;\n  __Pyx_RefNannyDeclarations\n  __Pyx_RefNannySetupContext(\"__len__ (wrapper)\", 0);\n  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_10__len__(((struct __pyx_memoryview_obj *)__pyx_v_self));\n\n  /* function exit code */\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\nstatic Py_ssize_t __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_10__len__(struct __pyx_memoryview_obj *__pyx_v_self) {\n  Py_ssize_t __pyx_r;\n  __Pyx_RefNannyDeclarations\n  int __pyx_t_1;\n  __Pyx_RefNannySetupContext(\"__len__\", 0);\n\n  /* \"View.MemoryView\":606\n * \n *     def __len__(self):\n *         if self.view.ndim >= 1:             # <<<<<<<<<<<<<<\n *             return self.view.shape[0]\n * \n */\n  __pyx_t_1 = ((__pyx_v_self->view.ndim >= 1) != 0);\n  if (__pyx_t_1) {\n\n    /* \"View.MemoryView\":607\n *     def __len__(self):\n *         if self.view.ndim >= 1:\n *             return self.view.shape[0]             # <<<<<<<<<<<<<<\n * \n *         return 0\n */\n    __pyx_r = (__pyx_v_self->view.shape[0]);\n    goto __pyx_L0;\n\n    /* \"View.MemoryView\":606\n * \n *     def __len__(self):\n *         if self.view.ndim >= 1:             # <<<<<<<<<<<<<<\n *             return self.view.shape[0]\n * \n */\n  }\n\n  /* \"View.MemoryView\":609\n *             return self.view.shape[0]\n * \n *         return 0             # <<<<<<<<<<<<<<\n * \n *     def __repr__(self):\n */\n  __pyx_r = 0;\n  goto __pyx_L0;\n\n  /* \"View.MemoryView\":605\n *         return self._size\n * \n *     def __len__(self):             # <<<<<<<<<<<<<<\n *         if self.view.ndim >= 1:\n *             return self.view.shape[0]\n */\n\n  /* function exit code */\n  __pyx_L0:;\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\n/* \"View.MemoryView\":611\n *         return 0\n * \n *     def __repr__(self):             # <<<<<<<<<<<<<<\n *         return \"<MemoryView of %r at 0x%x>\" % (self.base.__class__.__name__,\n *                                                id(self))\n */\n\n/* Python wrapper */\nstatic PyObject *__pyx_memoryview___repr__(PyObject *__pyx_v_self); /*proto*/\nstatic PyObject *__pyx_memoryview___repr__(PyObject *__pyx_v_self) {\n  PyObject *__pyx_r = 0;\n  __Pyx_RefNannyDeclarations\n  __Pyx_RefNannySetupContext(\"__repr__ (wrapper)\", 0);\n  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_12__repr__(((struct __pyx_memoryview_obj *)__pyx_v_self));\n\n  /* function exit code */\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\nstatic PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_12__repr__(struct __pyx_memoryview_obj *__pyx_v_self) {\n  PyObject *__pyx_r = NULL;\n  __Pyx_RefNannyDeclarations\n  PyObject *__pyx_t_1 = NULL;\n  PyObject *__pyx_t_2 = NULL;\n  PyObject *__pyx_t_3 = NULL;\n  int __pyx_lineno = 0;\n  const char *__pyx_filename = NULL;\n  int __pyx_clineno = 0;\n  __Pyx_RefNannySetupContext(\"__repr__\", 0);\n\n  /* \"View.MemoryView\":612\n * \n *     def __repr__(self):\n *         return \"<MemoryView of %r at 0x%x>\" % (self.base.__class__.__name__,             # <<<<<<<<<<<<<<\n *                                                id(self))\n * \n */\n  __Pyx_XDECREF(__pyx_r);\n  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_base); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 612, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 612, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_2);\n  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 612, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;\n\n  /* \"View.MemoryView\":613\n *     def __repr__(self):\n *         return \"<MemoryView of %r at 0x%x>\" % (self.base.__class__.__name__,\n *                                                id(self))             # <<<<<<<<<<<<<<\n * \n *     def __str__(self):\n */\n  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 613, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_2);\n\n  /* \"View.MemoryView\":612\n * \n *     def __repr__(self):\n *         return \"<MemoryView of %r at 0x%x>\" % (self.base.__class__.__name__,             # <<<<<<<<<<<<<<\n *                                                id(self))\n * \n */\n  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 612, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_3);\n  __Pyx_GIVEREF(__pyx_t_1);\n  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_2);\n  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);\n  __pyx_t_1 = 0;\n  __pyx_t_2 = 0;\n  __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_MemoryView_of_r_at_0x_x, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 612, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_2);\n  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;\n  __pyx_r = __pyx_t_2;\n  __pyx_t_2 = 0;\n  goto __pyx_L0;\n\n  /* \"View.MemoryView\":611\n *         return 0\n * \n *     def __repr__(self):             # <<<<<<<<<<<<<<\n *         return \"<MemoryView of %r at 0x%x>\" % (self.base.__class__.__name__,\n *                                                id(self))\n */\n\n  /* function exit code */\n  __pyx_L1_error:;\n  __Pyx_XDECREF(__pyx_t_1);\n  __Pyx_XDECREF(__pyx_t_2);\n  __Pyx_XDECREF(__pyx_t_3);\n  __Pyx_AddTraceback(\"View.MemoryView.memoryview.__repr__\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n  __pyx_r = NULL;\n  __pyx_L0:;\n  __Pyx_XGIVEREF(__pyx_r);\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\n/* \"View.MemoryView\":615\n *                                                id(self))\n * \n *     def __str__(self):             # <<<<<<<<<<<<<<\n *         return \"<MemoryView of %r object>\" % (self.base.__class__.__name__,)\n * \n */\n\n/* Python wrapper */\nstatic PyObject *__pyx_memoryview___str__(PyObject *__pyx_v_self); /*proto*/\nstatic PyObject *__pyx_memoryview___str__(PyObject *__pyx_v_self) {\n  PyObject *__pyx_r = 0;\n  __Pyx_RefNannyDeclarations\n  __Pyx_RefNannySetupContext(\"__str__ (wrapper)\", 0);\n  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_14__str__(((struct __pyx_memoryview_obj *)__pyx_v_self));\n\n  /* function exit code */\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\nstatic PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_14__str__(struct __pyx_memoryview_obj *__pyx_v_self) {\n  PyObject *__pyx_r = NULL;\n  __Pyx_RefNannyDeclarations\n  PyObject *__pyx_t_1 = NULL;\n  PyObject *__pyx_t_2 = NULL;\n  int __pyx_lineno = 0;\n  const char *__pyx_filename = NULL;\n  int __pyx_clineno = 0;\n  __Pyx_RefNannySetupContext(\"__str__\", 0);\n\n  /* \"View.MemoryView\":616\n * \n *     def __str__(self):\n *         return \"<MemoryView of %r object>\" % (self.base.__class__.__name__,)             # <<<<<<<<<<<<<<\n * \n * \n */\n  __Pyx_XDECREF(__pyx_r);\n  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_base); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 616, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 616, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_2);\n  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 616, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;\n  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 616, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_2);\n  __Pyx_GIVEREF(__pyx_t_1);\n  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);\n  __pyx_t_1 = 0;\n  __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_MemoryView_of_r_object, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 616, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;\n  __pyx_r = __pyx_t_1;\n  __pyx_t_1 = 0;\n  goto __pyx_L0;\n\n  /* \"View.MemoryView\":615\n *                                                id(self))\n * \n *     def __str__(self):             # <<<<<<<<<<<<<<\n *         return \"<MemoryView of %r object>\" % (self.base.__class__.__name__,)\n * \n */\n\n  /* function exit code */\n  __pyx_L1_error:;\n  __Pyx_XDECREF(__pyx_t_1);\n  __Pyx_XDECREF(__pyx_t_2);\n  __Pyx_AddTraceback(\"View.MemoryView.memoryview.__str__\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n  __pyx_r = NULL;\n  __pyx_L0:;\n  __Pyx_XGIVEREF(__pyx_r);\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\n/* \"View.MemoryView\":619\n * \n * \n *     def is_c_contig(self):             # <<<<<<<<<<<<<<\n *         cdef __Pyx_memviewslice *mslice\n *         cdef __Pyx_memviewslice tmp\n */\n\n/* Python wrapper */\nstatic PyObject *__pyx_memoryview_is_c_contig(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/\nstatic PyObject *__pyx_memoryview_is_c_contig(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {\n  PyObject *__pyx_r = 0;\n  __Pyx_RefNannyDeclarations\n  __Pyx_RefNannySetupContext(\"is_c_contig (wrapper)\", 0);\n  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_16is_c_contig(((struct __pyx_memoryview_obj *)__pyx_v_self));\n\n  /* function exit code */\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\nstatic PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_16is_c_contig(struct __pyx_memoryview_obj *__pyx_v_self) {\n  __Pyx_memviewslice *__pyx_v_mslice;\n  __Pyx_memviewslice __pyx_v_tmp;\n  PyObject *__pyx_r = NULL;\n  __Pyx_RefNannyDeclarations\n  __Pyx_memviewslice *__pyx_t_1;\n  PyObject *__pyx_t_2 = NULL;\n  int __pyx_lineno = 0;\n  const char *__pyx_filename = NULL;\n  int __pyx_clineno = 0;\n  __Pyx_RefNannySetupContext(\"is_c_contig\", 0);\n\n  /* \"View.MemoryView\":622\n *         cdef __Pyx_memviewslice *mslice\n *         cdef __Pyx_memviewslice tmp\n *         mslice = get_slice_from_memview(self, &tmp)             # <<<<<<<<<<<<<<\n *         return slice_is_contig(mslice[0], 'C', self.view.ndim)\n * \n */\n  __pyx_t_1 = __pyx_memoryview_get_slice_from_memoryview(__pyx_v_self, (&__pyx_v_tmp)); if (unlikely(__pyx_t_1 == ((__Pyx_memviewslice *)NULL))) __PYX_ERR(1, 622, __pyx_L1_error)\n  __pyx_v_mslice = __pyx_t_1;\n\n  /* \"View.MemoryView\":623\n *         cdef __Pyx_memviewslice tmp\n *         mslice = get_slice_from_memview(self, &tmp)\n *         return slice_is_contig(mslice[0], 'C', self.view.ndim)             # <<<<<<<<<<<<<<\n * \n *     def is_f_contig(self):\n */\n  __Pyx_XDECREF(__pyx_r);\n  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_memviewslice_is_contig((__pyx_v_mslice[0]), 'C', __pyx_v_self->view.ndim)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 623, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_2);\n  __pyx_r = __pyx_t_2;\n  __pyx_t_2 = 0;\n  goto __pyx_L0;\n\n  /* \"View.MemoryView\":619\n * \n * \n *     def is_c_contig(self):             # <<<<<<<<<<<<<<\n *         cdef __Pyx_memviewslice *mslice\n *         cdef __Pyx_memviewslice tmp\n */\n\n  /* function exit code */\n  __pyx_L1_error:;\n  __Pyx_XDECREF(__pyx_t_2);\n  __Pyx_AddTraceback(\"View.MemoryView.memoryview.is_c_contig\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n  __pyx_r = NULL;\n  __pyx_L0:;\n  __Pyx_XGIVEREF(__pyx_r);\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\n/* \"View.MemoryView\":625\n *         return slice_is_contig(mslice[0], 'C', self.view.ndim)\n * \n *     def is_f_contig(self):             # <<<<<<<<<<<<<<\n *         cdef __Pyx_memviewslice *mslice\n *         cdef __Pyx_memviewslice tmp\n */\n\n/* Python wrapper */\nstatic PyObject *__pyx_memoryview_is_f_contig(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/\nstatic PyObject *__pyx_memoryview_is_f_contig(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {\n  PyObject *__pyx_r = 0;\n  __Pyx_RefNannyDeclarations\n  __Pyx_RefNannySetupContext(\"is_f_contig (wrapper)\", 0);\n  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_18is_f_contig(((struct __pyx_memoryview_obj *)__pyx_v_self));\n\n  /* function exit code */\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\nstatic PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_18is_f_contig(struct __pyx_memoryview_obj *__pyx_v_self) {\n  __Pyx_memviewslice *__pyx_v_mslice;\n  __Pyx_memviewslice __pyx_v_tmp;\n  PyObject *__pyx_r = NULL;\n  __Pyx_RefNannyDeclarations\n  __Pyx_memviewslice *__pyx_t_1;\n  PyObject *__pyx_t_2 = NULL;\n  int __pyx_lineno = 0;\n  const char *__pyx_filename = NULL;\n  int __pyx_clineno = 0;\n  __Pyx_RefNannySetupContext(\"is_f_contig\", 0);\n\n  /* \"View.MemoryView\":628\n *         cdef __Pyx_memviewslice *mslice\n *         cdef __Pyx_memviewslice tmp\n *         mslice = get_slice_from_memview(self, &tmp)             # <<<<<<<<<<<<<<\n *         return slice_is_contig(mslice[0], 'F', self.view.ndim)\n * \n */\n  __pyx_t_1 = __pyx_memoryview_get_slice_from_memoryview(__pyx_v_self, (&__pyx_v_tmp)); if (unlikely(__pyx_t_1 == ((__Pyx_memviewslice *)NULL))) __PYX_ERR(1, 628, __pyx_L1_error)\n  __pyx_v_mslice = __pyx_t_1;\n\n  /* \"View.MemoryView\":629\n *         cdef __Pyx_memviewslice tmp\n *         mslice = get_slice_from_memview(self, &tmp)\n *         return slice_is_contig(mslice[0], 'F', self.view.ndim)             # <<<<<<<<<<<<<<\n * \n *     def copy(self):\n */\n  __Pyx_XDECREF(__pyx_r);\n  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_memviewslice_is_contig((__pyx_v_mslice[0]), 'F', __pyx_v_self->view.ndim)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 629, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_2);\n  __pyx_r = __pyx_t_2;\n  __pyx_t_2 = 0;\n  goto __pyx_L0;\n\n  /* \"View.MemoryView\":625\n *         return slice_is_contig(mslice[0], 'C', self.view.ndim)\n * \n *     def is_f_contig(self):             # <<<<<<<<<<<<<<\n *         cdef __Pyx_memviewslice *mslice\n *         cdef __Pyx_memviewslice tmp\n */\n\n  /* function exit code */\n  __pyx_L1_error:;\n  __Pyx_XDECREF(__pyx_t_2);\n  __Pyx_AddTraceback(\"View.MemoryView.memoryview.is_f_contig\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n  __pyx_r = NULL;\n  __pyx_L0:;\n  __Pyx_XGIVEREF(__pyx_r);\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\n/* \"View.MemoryView\":631\n *         return slice_is_contig(mslice[0], 'F', self.view.ndim)\n * \n *     def copy(self):             # <<<<<<<<<<<<<<\n *         cdef __Pyx_memviewslice mslice\n *         cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS\n */\n\n/* Python wrapper */\nstatic PyObject *__pyx_memoryview_copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/\nstatic PyObject *__pyx_memoryview_copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {\n  PyObject *__pyx_r = 0;\n  __Pyx_RefNannyDeclarations\n  __Pyx_RefNannySetupContext(\"copy (wrapper)\", 0);\n  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20copy(((struct __pyx_memoryview_obj *)__pyx_v_self));\n\n  /* function exit code */\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\nstatic PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20copy(struct __pyx_memoryview_obj *__pyx_v_self) {\n  __Pyx_memviewslice __pyx_v_mslice;\n  int __pyx_v_flags;\n  PyObject *__pyx_r = NULL;\n  __Pyx_RefNannyDeclarations\n  __Pyx_memviewslice __pyx_t_1;\n  PyObject *__pyx_t_2 = NULL;\n  int __pyx_lineno = 0;\n  const char *__pyx_filename = NULL;\n  int __pyx_clineno = 0;\n  __Pyx_RefNannySetupContext(\"copy\", 0);\n\n  /* \"View.MemoryView\":633\n *     def copy(self):\n *         cdef __Pyx_memviewslice mslice\n *         cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS             # <<<<<<<<<<<<<<\n * \n *         slice_copy(self, &mslice)\n */\n  __pyx_v_flags = (__pyx_v_self->flags & (~PyBUF_F_CONTIGUOUS));\n\n  /* \"View.MemoryView\":635\n *         cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS\n * \n *         slice_copy(self, &mslice)             # <<<<<<<<<<<<<<\n *         mslice = slice_copy_contig(&mslice, \"c\", self.view.ndim,\n *                                    self.view.itemsize,\n */\n  __pyx_memoryview_slice_copy(__pyx_v_self, (&__pyx_v_mslice));\n\n  /* \"View.MemoryView\":636\n * \n *         slice_copy(self, &mslice)\n *         mslice = slice_copy_contig(&mslice, \"c\", self.view.ndim,             # <<<<<<<<<<<<<<\n *                                    self.view.itemsize,\n *                                    flags|PyBUF_C_CONTIGUOUS,\n */\n  __pyx_t_1 = __pyx_memoryview_copy_new_contig((&__pyx_v_mslice), ((char *)\"c\"), __pyx_v_self->view.ndim, __pyx_v_self->view.itemsize, (__pyx_v_flags | PyBUF_C_CONTIGUOUS), __pyx_v_self->dtype_is_object); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 636, __pyx_L1_error)\n  __pyx_v_mslice = __pyx_t_1;\n\n  /* \"View.MemoryView\":641\n *                                    self.dtype_is_object)\n * \n *         return memoryview_copy_from_slice(self, &mslice)             # <<<<<<<<<<<<<<\n * \n *     def copy_fortran(self):\n */\n  __Pyx_XDECREF(__pyx_r);\n  __pyx_t_2 = __pyx_memoryview_copy_object_from_slice(__pyx_v_self, (&__pyx_v_mslice)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 641, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_2);\n  __pyx_r = __pyx_t_2;\n  __pyx_t_2 = 0;\n  goto __pyx_L0;\n\n  /* \"View.MemoryView\":631\n *         return slice_is_contig(mslice[0], 'F', self.view.ndim)\n * \n *     def copy(self):             # <<<<<<<<<<<<<<\n *         cdef __Pyx_memviewslice mslice\n *         cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS\n */\n\n  /* function exit code */\n  __pyx_L1_error:;\n  __Pyx_XDECREF(__pyx_t_2);\n  __Pyx_AddTraceback(\"View.MemoryView.memoryview.copy\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n  __pyx_r = NULL;\n  __pyx_L0:;\n  __Pyx_XGIVEREF(__pyx_r);\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\n/* \"View.MemoryView\":643\n *         return memoryview_copy_from_slice(self, &mslice)\n * \n *     def copy_fortran(self):             # <<<<<<<<<<<<<<\n *         cdef __Pyx_memviewslice src, dst\n *         cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS\n */\n\n/* Python wrapper */\nstatic PyObject *__pyx_memoryview_copy_fortran(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/\nstatic PyObject *__pyx_memoryview_copy_fortran(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {\n  PyObject *__pyx_r = 0;\n  __Pyx_RefNannyDeclarations\n  __Pyx_RefNannySetupContext(\"copy_fortran (wrapper)\", 0);\n  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_22copy_fortran(((struct __pyx_memoryview_obj *)__pyx_v_self));\n\n  /* function exit code */\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\nstatic PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_22copy_fortran(struct __pyx_memoryview_obj *__pyx_v_self) {\n  __Pyx_memviewslice __pyx_v_src;\n  __Pyx_memviewslice __pyx_v_dst;\n  int __pyx_v_flags;\n  PyObject *__pyx_r = NULL;\n  __Pyx_RefNannyDeclarations\n  __Pyx_memviewslice __pyx_t_1;\n  PyObject *__pyx_t_2 = NULL;\n  int __pyx_lineno = 0;\n  const char *__pyx_filename = NULL;\n  int __pyx_clineno = 0;\n  __Pyx_RefNannySetupContext(\"copy_fortran\", 0);\n\n  /* \"View.MemoryView\":645\n *     def copy_fortran(self):\n *         cdef __Pyx_memviewslice src, dst\n *         cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS             # <<<<<<<<<<<<<<\n * \n *         slice_copy(self, &src)\n */\n  __pyx_v_flags = (__pyx_v_self->flags & (~PyBUF_C_CONTIGUOUS));\n\n  /* \"View.MemoryView\":647\n *         cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS\n * \n *         slice_copy(self, &src)             # <<<<<<<<<<<<<<\n *         dst = slice_copy_contig(&src, \"fortran\", self.view.ndim,\n *                                 self.view.itemsize,\n */\n  __pyx_memoryview_slice_copy(__pyx_v_self, (&__pyx_v_src));\n\n  /* \"View.MemoryView\":648\n * \n *         slice_copy(self, &src)\n *         dst = slice_copy_contig(&src, \"fortran\", self.view.ndim,             # <<<<<<<<<<<<<<\n *                                 self.view.itemsize,\n *                                 flags|PyBUF_F_CONTIGUOUS,\n */\n  __pyx_t_1 = __pyx_memoryview_copy_new_contig((&__pyx_v_src), ((char *)\"fortran\"), __pyx_v_self->view.ndim, __pyx_v_self->view.itemsize, (__pyx_v_flags | PyBUF_F_CONTIGUOUS), __pyx_v_self->dtype_is_object); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 648, __pyx_L1_error)\n  __pyx_v_dst = __pyx_t_1;\n\n  /* \"View.MemoryView\":653\n *                                 self.dtype_is_object)\n * \n *         return memoryview_copy_from_slice(self, &dst)             # <<<<<<<<<<<<<<\n * \n * \n */\n  __Pyx_XDECREF(__pyx_r);\n  __pyx_t_2 = __pyx_memoryview_copy_object_from_slice(__pyx_v_self, (&__pyx_v_dst)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 653, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_2);\n  __pyx_r = __pyx_t_2;\n  __pyx_t_2 = 0;\n  goto __pyx_L0;\n\n  /* \"View.MemoryView\":643\n *         return memoryview_copy_from_slice(self, &mslice)\n * \n *     def copy_fortran(self):             # <<<<<<<<<<<<<<\n *         cdef __Pyx_memviewslice src, dst\n *         cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS\n */\n\n  /* function exit code */\n  __pyx_L1_error:;\n  __Pyx_XDECREF(__pyx_t_2);\n  __Pyx_AddTraceback(\"View.MemoryView.memoryview.copy_fortran\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n  __pyx_r = NULL;\n  __pyx_L0:;\n  __Pyx_XGIVEREF(__pyx_r);\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\n/* \"(tree fragment)\":1\n * def __reduce_cython__(self):             # <<<<<<<<<<<<<<\n *     raise TypeError(\"no default __reduce__ due to non-trivial __cinit__\")\n * def __setstate_cython__(self, __pyx_state):\n */\n\n/* Python wrapper */\nstatic PyObject *__pyx_pw___pyx_memoryview_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/\nstatic PyObject *__pyx_pw___pyx_memoryview_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {\n  PyObject *__pyx_r = 0;\n  __Pyx_RefNannyDeclarations\n  __Pyx_RefNannySetupContext(\"__reduce_cython__ (wrapper)\", 0);\n  __pyx_r = __pyx_pf___pyx_memoryview___reduce_cython__(((struct __pyx_memoryview_obj *)__pyx_v_self));\n\n  /* function exit code */\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\nstatic PyObject *__pyx_pf___pyx_memoryview___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self) {\n  PyObject *__pyx_r = NULL;\n  __Pyx_RefNannyDeclarations\n  PyObject *__pyx_t_1 = NULL;\n  int __pyx_lineno = 0;\n  const char *__pyx_filename = NULL;\n  int __pyx_clineno = 0;\n  __Pyx_RefNannySetupContext(\"__reduce_cython__\", 0);\n\n  /* \"(tree fragment)\":2\n * def __reduce_cython__(self):\n *     raise TypeError(\"no default __reduce__ due to non-trivial __cinit__\")             # <<<<<<<<<<<<<<\n * def __setstate_cython__(self, __pyx_state):\n *     raise TypeError(\"no default __reduce__ due to non-trivial __cinit__\")\n */\n  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__28, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __Pyx_Raise(__pyx_t_1, 0, 0, 0);\n  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n  __PYX_ERR(1, 2, __pyx_L1_error)\n\n  /* \"(tree fragment)\":1\n * def __reduce_cython__(self):             # <<<<<<<<<<<<<<\n *     raise TypeError(\"no default __reduce__ due to non-trivial __cinit__\")\n * def __setstate_cython__(self, __pyx_state):\n */\n\n  /* function exit code */\n  __pyx_L1_error:;\n  __Pyx_XDECREF(__pyx_t_1);\n  __Pyx_AddTraceback(\"View.MemoryView.memoryview.__reduce_cython__\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n  __pyx_r = NULL;\n  __Pyx_XGIVEREF(__pyx_r);\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\n/* \"(tree fragment)\":3\n * def __reduce_cython__(self):\n *     raise TypeError(\"no default __reduce__ due to non-trivial __cinit__\")\n * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<\n *     raise TypeError(\"no default __reduce__ due to non-trivial __cinit__\")\n */\n\n/* Python wrapper */\nstatic PyObject *__pyx_pw___pyx_memoryview_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/\nstatic PyObject *__pyx_pw___pyx_memoryview_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {\n  PyObject *__pyx_r = 0;\n  __Pyx_RefNannyDeclarations\n  __Pyx_RefNannySetupContext(\"__setstate_cython__ (wrapper)\", 0);\n  __pyx_r = __pyx_pf___pyx_memoryview_2__setstate_cython__(((struct __pyx_memoryview_obj *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));\n\n  /* function exit code */\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\nstatic PyObject *__pyx_pf___pyx_memoryview_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {\n  PyObject *__pyx_r = NULL;\n  __Pyx_RefNannyDeclarations\n  PyObject *__pyx_t_1 = NULL;\n  int __pyx_lineno = 0;\n  const char *__pyx_filename = NULL;\n  int __pyx_clineno = 0;\n  __Pyx_RefNannySetupContext(\"__setstate_cython__\", 0);\n\n  /* \"(tree fragment)\":4\n *     raise TypeError(\"no default __reduce__ due to non-trivial __cinit__\")\n * def __setstate_cython__(self, __pyx_state):\n *     raise TypeError(\"no default __reduce__ due to non-trivial __cinit__\")             # <<<<<<<<<<<<<<\n */\n  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__29, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __Pyx_Raise(__pyx_t_1, 0, 0, 0);\n  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n  __PYX_ERR(1, 4, __pyx_L1_error)\n\n  /* \"(tree fragment)\":3\n * def __reduce_cython__(self):\n *     raise TypeError(\"no default __reduce__ due to non-trivial __cinit__\")\n * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<\n *     raise TypeError(\"no default __reduce__ due to non-trivial __cinit__\")\n */\n\n  /* function exit code */\n  __pyx_L1_error:;\n  __Pyx_XDECREF(__pyx_t_1);\n  __Pyx_AddTraceback(\"View.MemoryView.memoryview.__setstate_cython__\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n  __pyx_r = NULL;\n  __Pyx_XGIVEREF(__pyx_r);\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\n/* \"View.MemoryView\":657\n * \n * @cname('__pyx_memoryview_new')\n * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo):             # <<<<<<<<<<<<<<\n *     cdef memoryview result = memoryview(o, flags, dtype_is_object)\n *     result.typeinfo = typeinfo\n */\n\nstatic PyObject *__pyx_memoryview_new(PyObject *__pyx_v_o, int __pyx_v_flags, int __pyx_v_dtype_is_object, __Pyx_TypeInfo *__pyx_v_typeinfo) {\n  struct __pyx_memoryview_obj *__pyx_v_result = 0;\n  PyObject *__pyx_r = NULL;\n  __Pyx_RefNannyDeclarations\n  PyObject *__pyx_t_1 = NULL;\n  PyObject *__pyx_t_2 = NULL;\n  PyObject *__pyx_t_3 = NULL;\n  int __pyx_lineno = 0;\n  const char *__pyx_filename = NULL;\n  int __pyx_clineno = 0;\n  __Pyx_RefNannySetupContext(\"memoryview_cwrapper\", 0);\n\n  /* \"View.MemoryView\":658\n * @cname('__pyx_memoryview_new')\n * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo):\n *     cdef memoryview result = memoryview(o, flags, dtype_is_object)             # <<<<<<<<<<<<<<\n *     result.typeinfo = typeinfo\n *     return result\n */\n  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 658, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 658, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_2);\n  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 658, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_3);\n  __Pyx_INCREF(__pyx_v_o);\n  __Pyx_GIVEREF(__pyx_v_o);\n  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_o);\n  __Pyx_GIVEREF(__pyx_t_1);\n  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_2);\n  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2);\n  __pyx_t_1 = 0;\n  __pyx_t_2 = 0;\n  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_memoryview_type), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 658, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_2);\n  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;\n  __pyx_v_result = ((struct __pyx_memoryview_obj *)__pyx_t_2);\n  __pyx_t_2 = 0;\n\n  /* \"View.MemoryView\":659\n * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo):\n *     cdef memoryview result = memoryview(o, flags, dtype_is_object)\n *     result.typeinfo = typeinfo             # <<<<<<<<<<<<<<\n *     return result\n * \n */\n  __pyx_v_result->typeinfo = __pyx_v_typeinfo;\n\n  /* \"View.MemoryView\":660\n *     cdef memoryview result = memoryview(o, flags, dtype_is_object)\n *     result.typeinfo = typeinfo\n *     return result             # <<<<<<<<<<<<<<\n * \n * @cname('__pyx_memoryview_check')\n */\n  __Pyx_XDECREF(__pyx_r);\n  __Pyx_INCREF(((PyObject *)__pyx_v_result));\n  __pyx_r = ((PyObject *)__pyx_v_result);\n  goto __pyx_L0;\n\n  /* \"View.MemoryView\":657\n * \n * @cname('__pyx_memoryview_new')\n * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo):             # <<<<<<<<<<<<<<\n *     cdef memoryview result = memoryview(o, flags, dtype_is_object)\n *     result.typeinfo = typeinfo\n */\n\n  /* function exit code */\n  __pyx_L1_error:;\n  __Pyx_XDECREF(__pyx_t_1);\n  __Pyx_XDECREF(__pyx_t_2);\n  __Pyx_XDECREF(__pyx_t_3);\n  __Pyx_AddTraceback(\"View.MemoryView.memoryview_cwrapper\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n  __pyx_r = 0;\n  __pyx_L0:;\n  __Pyx_XDECREF((PyObject *)__pyx_v_result);\n  __Pyx_XGIVEREF(__pyx_r);\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\n/* \"View.MemoryView\":663\n * \n * @cname('__pyx_memoryview_check')\n * cdef inline bint memoryview_check(object o):             # <<<<<<<<<<<<<<\n *     return isinstance(o, memoryview)\n * \n */\n\nstatic CYTHON_INLINE int __pyx_memoryview_check(PyObject *__pyx_v_o) {\n  int __pyx_r;\n  __Pyx_RefNannyDeclarations\n  int __pyx_t_1;\n  __Pyx_RefNannySetupContext(\"memoryview_check\", 0);\n\n  /* \"View.MemoryView\":664\n * @cname('__pyx_memoryview_check')\n * cdef inline bint memoryview_check(object o):\n *     return isinstance(o, memoryview)             # <<<<<<<<<<<<<<\n * \n * cdef tuple _unellipsify(object index, int ndim):\n */\n  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_o, __pyx_memoryview_type); \n  __pyx_r = __pyx_t_1;\n  goto __pyx_L0;\n\n  /* \"View.MemoryView\":663\n * \n * @cname('__pyx_memoryview_check')\n * cdef inline bint memoryview_check(object o):             # <<<<<<<<<<<<<<\n *     return isinstance(o, memoryview)\n * \n */\n\n  /* function exit code */\n  __pyx_L0:;\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\n/* \"View.MemoryView\":666\n *     return isinstance(o, memoryview)\n * \n * cdef tuple _unellipsify(object index, int ndim):             # <<<<<<<<<<<<<<\n *     \"\"\"\n *     Replace all ellipses with full slices and fill incomplete indices with\n */\n\nstatic PyObject *_unellipsify(PyObject *__pyx_v_index, int __pyx_v_ndim) {\n  PyObject *__pyx_v_tup = NULL;\n  PyObject *__pyx_v_result = NULL;\n  int __pyx_v_have_slices;\n  int __pyx_v_seen_ellipsis;\n  CYTHON_UNUSED PyObject *__pyx_v_idx = NULL;\n  PyObject *__pyx_v_item = NULL;\n  Py_ssize_t __pyx_v_nslices;\n  PyObject *__pyx_r = NULL;\n  __Pyx_RefNannyDeclarations\n  int __pyx_t_1;\n  int __pyx_t_2;\n  PyObject *__pyx_t_3 = NULL;\n  PyObject *__pyx_t_4 = NULL;\n  Py_ssize_t __pyx_t_5;\n  PyObject *(*__pyx_t_6)(PyObject *);\n  PyObject *__pyx_t_7 = NULL;\n  Py_ssize_t __pyx_t_8;\n  int __pyx_t_9;\n  int __pyx_t_10;\n  PyObject *__pyx_t_11 = NULL;\n  int __pyx_lineno = 0;\n  const char *__pyx_filename = NULL;\n  int __pyx_clineno = 0;\n  __Pyx_RefNannySetupContext(\"_unellipsify\", 0);\n\n  /* \"View.MemoryView\":671\n *     full slices.\n *     \"\"\"\n *     if not isinstance(index, tuple):             # <<<<<<<<<<<<<<\n *         tup = (index,)\n *     else:\n */\n  __pyx_t_1 = PyTuple_Check(__pyx_v_index); \n  __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);\n  if (__pyx_t_2) {\n\n    /* \"View.MemoryView\":672\n *     \"\"\"\n *     if not isinstance(index, tuple):\n *         tup = (index,)             # <<<<<<<<<<<<<<\n *     else:\n *         tup = index\n */\n    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 672, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_3);\n    __Pyx_INCREF(__pyx_v_index);\n    __Pyx_GIVEREF(__pyx_v_index);\n    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_index);\n    __pyx_v_tup = __pyx_t_3;\n    __pyx_t_3 = 0;\n\n    /* \"View.MemoryView\":671\n *     full slices.\n *     \"\"\"\n *     if not isinstance(index, tuple):             # <<<<<<<<<<<<<<\n *         tup = (index,)\n *     else:\n */\n    goto __pyx_L3;\n  }\n\n  /* \"View.MemoryView\":674\n *         tup = (index,)\n *     else:\n *         tup = index             # <<<<<<<<<<<<<<\n * \n *     result = []\n */\n  /*else*/ {\n    __Pyx_INCREF(__pyx_v_index);\n    __pyx_v_tup = __pyx_v_index;\n  }\n  __pyx_L3:;\n\n  /* \"View.MemoryView\":676\n *         tup = index\n * \n *     result = []             # <<<<<<<<<<<<<<\n *     have_slices = False\n *     seen_ellipsis = False\n */\n  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 676, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_3);\n  __pyx_v_result = ((PyObject*)__pyx_t_3);\n  __pyx_t_3 = 0;\n\n  /* \"View.MemoryView\":677\n * \n *     result = []\n *     have_slices = False             # <<<<<<<<<<<<<<\n *     seen_ellipsis = False\n *     for idx, item in enumerate(tup):\n */\n  __pyx_v_have_slices = 0;\n\n  /* \"View.MemoryView\":678\n *     result = []\n *     have_slices = False\n *     seen_ellipsis = False             # <<<<<<<<<<<<<<\n *     for idx, item in enumerate(tup):\n *         if item is Ellipsis:\n */\n  __pyx_v_seen_ellipsis = 0;\n\n  /* \"View.MemoryView\":679\n *     have_slices = False\n *     seen_ellipsis = False\n *     for idx, item in enumerate(tup):             # <<<<<<<<<<<<<<\n *         if item is Ellipsis:\n *             if not seen_ellipsis:\n */\n  __Pyx_INCREF(__pyx_int_0);\n  __pyx_t_3 = __pyx_int_0;\n  if (likely(PyList_CheckExact(__pyx_v_tup)) || PyTuple_CheckExact(__pyx_v_tup)) {\n    __pyx_t_4 = __pyx_v_tup; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0;\n    __pyx_t_6 = NULL;\n  } else {\n    __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_tup); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 679, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_4);\n    __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 679, __pyx_L1_error)\n  }\n  for (;;) {\n    if (likely(!__pyx_t_6)) {\n      if (likely(PyList_CheckExact(__pyx_t_4))) {\n        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break;\n        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS\n        __pyx_t_7 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(1, 679, __pyx_L1_error)\n        #else\n        __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 679, __pyx_L1_error)\n        __Pyx_GOTREF(__pyx_t_7);\n        #endif\n      } else {\n        if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_4)) break;\n        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS\n        __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(1, 679, __pyx_L1_error)\n        #else\n        __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 679, __pyx_L1_error)\n        __Pyx_GOTREF(__pyx_t_7);\n        #endif\n      }\n    } else {\n      __pyx_t_7 = __pyx_t_6(__pyx_t_4);\n      if (unlikely(!__pyx_t_7)) {\n        PyObject* exc_type = PyErr_Occurred();\n        if (exc_type) {\n          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();\n          else __PYX_ERR(1, 679, __pyx_L1_error)\n        }\n        break;\n      }\n      __Pyx_GOTREF(__pyx_t_7);\n    }\n    __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_7);\n    __pyx_t_7 = 0;\n    __Pyx_INCREF(__pyx_t_3);\n    __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_3);\n    __pyx_t_7 = __Pyx_PyInt_AddObjC(__pyx_t_3, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 679, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_7);\n    __Pyx_DECREF(__pyx_t_3);\n    __pyx_t_3 = __pyx_t_7;\n    __pyx_t_7 = 0;\n\n    /* \"View.MemoryView\":680\n *     seen_ellipsis = False\n *     for idx, item in enumerate(tup):\n *         if item is Ellipsis:             # <<<<<<<<<<<<<<\n *             if not seen_ellipsis:\n *                 result.extend([slice(None)] * (ndim - len(tup) + 1))\n */\n    __pyx_t_2 = (__pyx_v_item == __pyx_builtin_Ellipsis);\n    __pyx_t_1 = (__pyx_t_2 != 0);\n    if (__pyx_t_1) {\n\n      /* \"View.MemoryView\":681\n *     for idx, item in enumerate(tup):\n *         if item is Ellipsis:\n *             if not seen_ellipsis:             # <<<<<<<<<<<<<<\n *                 result.extend([slice(None)] * (ndim - len(tup) + 1))\n *                 seen_ellipsis = True\n */\n      __pyx_t_1 = ((!(__pyx_v_seen_ellipsis != 0)) != 0);\n      if (__pyx_t_1) {\n\n        /* \"View.MemoryView\":682\n *         if item is Ellipsis:\n *             if not seen_ellipsis:\n *                 result.extend([slice(None)] * (ndim - len(tup) + 1))             # <<<<<<<<<<<<<<\n *                 seen_ellipsis = True\n *             else:\n */\n        __pyx_t_8 = PyObject_Length(__pyx_v_tup); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(1, 682, __pyx_L1_error)\n        __pyx_t_7 = PyList_New(1 * ((((__pyx_v_ndim - __pyx_t_8) + 1)<0) ? 0:((__pyx_v_ndim - __pyx_t_8) + 1))); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 682, __pyx_L1_error)\n        __Pyx_GOTREF(__pyx_t_7);\n        { Py_ssize_t __pyx_temp;\n          for (__pyx_temp=0; __pyx_temp < ((__pyx_v_ndim - __pyx_t_8) + 1); __pyx_temp++) {\n            __Pyx_INCREF(__pyx_slice__30);\n            __Pyx_GIVEREF(__pyx_slice__30);\n            PyList_SET_ITEM(__pyx_t_7, __pyx_temp, __pyx_slice__30);\n          }\n        }\n        __pyx_t_9 = __Pyx_PyList_Extend(__pyx_v_result, __pyx_t_7); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(1, 682, __pyx_L1_error)\n        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;\n\n        /* \"View.MemoryView\":683\n *             if not seen_ellipsis:\n *                 result.extend([slice(None)] * (ndim - len(tup) + 1))\n *                 seen_ellipsis = True             # <<<<<<<<<<<<<<\n *             else:\n *                 result.append(slice(None))\n */\n        __pyx_v_seen_ellipsis = 1;\n\n        /* \"View.MemoryView\":681\n *     for idx, item in enumerate(tup):\n *         if item is Ellipsis:\n *             if not seen_ellipsis:             # <<<<<<<<<<<<<<\n *                 result.extend([slice(None)] * (ndim - len(tup) + 1))\n *                 seen_ellipsis = True\n */\n        goto __pyx_L7;\n      }\n\n      /* \"View.MemoryView\":685\n *                 seen_ellipsis = True\n *             else:\n *                 result.append(slice(None))             # <<<<<<<<<<<<<<\n *             have_slices = True\n *         else:\n */\n      /*else*/ {\n        __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_result, __pyx_slice__30); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(1, 685, __pyx_L1_error)\n      }\n      __pyx_L7:;\n\n      /* \"View.MemoryView\":686\n *             else:\n *                 result.append(slice(None))\n *             have_slices = True             # <<<<<<<<<<<<<<\n *         else:\n *             if not isinstance(item, slice) and not PyIndex_Check(item):\n */\n      __pyx_v_have_slices = 1;\n\n      /* \"View.MemoryView\":680\n *     seen_ellipsis = False\n *     for idx, item in enumerate(tup):\n *         if item is Ellipsis:             # <<<<<<<<<<<<<<\n *             if not seen_ellipsis:\n *                 result.extend([slice(None)] * (ndim - len(tup) + 1))\n */\n      goto __pyx_L6;\n    }\n\n    /* \"View.MemoryView\":688\n *             have_slices = True\n *         else:\n *             if not isinstance(item, slice) and not PyIndex_Check(item):             # <<<<<<<<<<<<<<\n *                 raise TypeError(\"Cannot index with type '%s'\" % type(item))\n * \n */\n    /*else*/ {\n      __pyx_t_2 = PySlice_Check(__pyx_v_item); \n      __pyx_t_10 = ((!(__pyx_t_2 != 0)) != 0);\n      if (__pyx_t_10) {\n      } else {\n        __pyx_t_1 = __pyx_t_10;\n        goto __pyx_L9_bool_binop_done;\n      }\n      __pyx_t_10 = ((!(PyIndex_Check(__pyx_v_item) != 0)) != 0);\n      __pyx_t_1 = __pyx_t_10;\n      __pyx_L9_bool_binop_done:;\n      if (unlikely(__pyx_t_1)) {\n\n        /* \"View.MemoryView\":689\n *         else:\n *             if not isinstance(item, slice) and not PyIndex_Check(item):\n *                 raise TypeError(\"Cannot index with type '%s'\" % type(item))             # <<<<<<<<<<<<<<\n * \n *             have_slices = have_slices or isinstance(item, slice)\n */\n        __pyx_t_7 = __Pyx_PyString_FormatSafe(__pyx_kp_s_Cannot_index_with_type_s, ((PyObject *)Py_TYPE(__pyx_v_item))); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 689, __pyx_L1_error)\n        __Pyx_GOTREF(__pyx_t_7);\n        __pyx_t_11 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_7); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 689, __pyx_L1_error)\n        __Pyx_GOTREF(__pyx_t_11);\n        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;\n        __Pyx_Raise(__pyx_t_11, 0, 0, 0);\n        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;\n        __PYX_ERR(1, 689, __pyx_L1_error)\n\n        /* \"View.MemoryView\":688\n *             have_slices = True\n *         else:\n *             if not isinstance(item, slice) and not PyIndex_Check(item):             # <<<<<<<<<<<<<<\n *                 raise TypeError(\"Cannot index with type '%s'\" % type(item))\n * \n */\n      }\n\n      /* \"View.MemoryView\":691\n *                 raise TypeError(\"Cannot index with type '%s'\" % type(item))\n * \n *             have_slices = have_slices or isinstance(item, slice)             # <<<<<<<<<<<<<<\n *             result.append(item)\n * \n */\n      __pyx_t_10 = (__pyx_v_have_slices != 0);\n      if (!__pyx_t_10) {\n      } else {\n        __pyx_t_1 = __pyx_t_10;\n        goto __pyx_L11_bool_binop_done;\n      }\n      __pyx_t_10 = PySlice_Check(__pyx_v_item); \n      __pyx_t_2 = (__pyx_t_10 != 0);\n      __pyx_t_1 = __pyx_t_2;\n      __pyx_L11_bool_binop_done:;\n      __pyx_v_have_slices = __pyx_t_1;\n\n      /* \"View.MemoryView\":692\n * \n *             have_slices = have_slices or isinstance(item, slice)\n *             result.append(item)             # <<<<<<<<<<<<<<\n * \n *     nslices = ndim - len(result)\n */\n      __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_result, __pyx_v_item); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(1, 692, __pyx_L1_error)\n    }\n    __pyx_L6:;\n\n    /* \"View.MemoryView\":679\n *     have_slices = False\n *     seen_ellipsis = False\n *     for idx, item in enumerate(tup):             # <<<<<<<<<<<<<<\n *         if item is Ellipsis:\n *             if not seen_ellipsis:\n */\n  }\n  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;\n  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;\n\n  /* \"View.MemoryView\":694\n *             result.append(item)\n * \n *     nslices = ndim - len(result)             # <<<<<<<<<<<<<<\n *     if nslices:\n *         result.extend([slice(None)] * nslices)\n */\n  __pyx_t_5 = PyList_GET_SIZE(__pyx_v_result); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(1, 694, __pyx_L1_error)\n  __pyx_v_nslices = (__pyx_v_ndim - __pyx_t_5);\n\n  /* \"View.MemoryView\":695\n * \n *     nslices = ndim - len(result)\n *     if nslices:             # <<<<<<<<<<<<<<\n *         result.extend([slice(None)] * nslices)\n * \n */\n  __pyx_t_1 = (__pyx_v_nslices != 0);\n  if (__pyx_t_1) {\n\n    /* \"View.MemoryView\":696\n *     nslices = ndim - len(result)\n *     if nslices:\n *         result.extend([slice(None)] * nslices)             # <<<<<<<<<<<<<<\n * \n *     return have_slices or nslices, tuple(result)\n */\n    __pyx_t_3 = PyList_New(1 * ((__pyx_v_nslices<0) ? 0:__pyx_v_nslices)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 696, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_3);\n    { Py_ssize_t __pyx_temp;\n      for (__pyx_temp=0; __pyx_temp < __pyx_v_nslices; __pyx_temp++) {\n        __Pyx_INCREF(__pyx_slice__30);\n        __Pyx_GIVEREF(__pyx_slice__30);\n        PyList_SET_ITEM(__pyx_t_3, __pyx_temp, __pyx_slice__30);\n      }\n    }\n    __pyx_t_9 = __Pyx_PyList_Extend(__pyx_v_result, __pyx_t_3); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(1, 696, __pyx_L1_error)\n    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;\n\n    /* \"View.MemoryView\":695\n * \n *     nslices = ndim - len(result)\n *     if nslices:             # <<<<<<<<<<<<<<\n *         result.extend([slice(None)] * nslices)\n * \n */\n  }\n\n  /* \"View.MemoryView\":698\n *         result.extend([slice(None)] * nslices)\n * \n *     return have_slices or nslices, tuple(result)             # <<<<<<<<<<<<<<\n * \n * cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim):\n */\n  __Pyx_XDECREF(__pyx_r);\n  if (!__pyx_v_have_slices) {\n  } else {\n    __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_have_slices); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 698, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_4);\n    __pyx_t_3 = __pyx_t_4;\n    __pyx_t_4 = 0;\n    goto __pyx_L14_bool_binop_done;\n  }\n  __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_nslices); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 698, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_4);\n  __pyx_t_3 = __pyx_t_4;\n  __pyx_t_4 = 0;\n  __pyx_L14_bool_binop_done:;\n  __pyx_t_4 = PyList_AsTuple(__pyx_v_result); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 698, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_4);\n  __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 698, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_11);\n  __Pyx_GIVEREF(__pyx_t_3);\n  PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_3);\n  __Pyx_GIVEREF(__pyx_t_4);\n  PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_4);\n  __pyx_t_3 = 0;\n  __pyx_t_4 = 0;\n  __pyx_r = ((PyObject*)__pyx_t_11);\n  __pyx_t_11 = 0;\n  goto __pyx_L0;\n\n  /* \"View.MemoryView\":666\n *     return isinstance(o, memoryview)\n * \n * cdef tuple _unellipsify(object index, int ndim):             # <<<<<<<<<<<<<<\n *     \"\"\"\n *     Replace all ellipses with full slices and fill incomplete indices with\n */\n\n  /* function exit code */\n  __pyx_L1_error:;\n  __Pyx_XDECREF(__pyx_t_3);\n  __Pyx_XDECREF(__pyx_t_4);\n  __Pyx_XDECREF(__pyx_t_7);\n  __Pyx_XDECREF(__pyx_t_11);\n  __Pyx_AddTraceback(\"View.MemoryView._unellipsify\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n  __pyx_r = 0;\n  __pyx_L0:;\n  __Pyx_XDECREF(__pyx_v_tup);\n  __Pyx_XDECREF(__pyx_v_result);\n  __Pyx_XDECREF(__pyx_v_idx);\n  __Pyx_XDECREF(__pyx_v_item);\n  __Pyx_XGIVEREF(__pyx_r);\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\n/* \"View.MemoryView\":700\n *     return have_slices or nslices, tuple(result)\n * \n * cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim):             # <<<<<<<<<<<<<<\n *     for suboffset in suboffsets[:ndim]:\n *         if suboffset >= 0:\n */\n\nstatic PyObject *assert_direct_dimensions(Py_ssize_t *__pyx_v_suboffsets, int __pyx_v_ndim) {\n  Py_ssize_t __pyx_v_suboffset;\n  PyObject *__pyx_r = NULL;\n  __Pyx_RefNannyDeclarations\n  Py_ssize_t *__pyx_t_1;\n  Py_ssize_t *__pyx_t_2;\n  Py_ssize_t *__pyx_t_3;\n  int __pyx_t_4;\n  PyObject *__pyx_t_5 = NULL;\n  int __pyx_lineno = 0;\n  const char *__pyx_filename = NULL;\n  int __pyx_clineno = 0;\n  __Pyx_RefNannySetupContext(\"assert_direct_dimensions\", 0);\n\n  /* \"View.MemoryView\":701\n * \n * cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim):\n *     for suboffset in suboffsets[:ndim]:             # <<<<<<<<<<<<<<\n *         if suboffset >= 0:\n *             raise ValueError(\"Indirect dimensions not supported\")\n */\n  __pyx_t_2 = (__pyx_v_suboffsets + __pyx_v_ndim);\n  for (__pyx_t_3 = __pyx_v_suboffsets; __pyx_t_3 < __pyx_t_2; __pyx_t_3++) {\n    __pyx_t_1 = __pyx_t_3;\n    __pyx_v_suboffset = (__pyx_t_1[0]);\n\n    /* \"View.MemoryView\":702\n * cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim):\n *     for suboffset in suboffsets[:ndim]:\n *         if suboffset >= 0:             # <<<<<<<<<<<<<<\n *             raise ValueError(\"Indirect dimensions not supported\")\n * \n */\n    __pyx_t_4 = ((__pyx_v_suboffset >= 0) != 0);\n    if (unlikely(__pyx_t_4)) {\n\n      /* \"View.MemoryView\":703\n *     for suboffset in suboffsets[:ndim]:\n *         if suboffset >= 0:\n *             raise ValueError(\"Indirect dimensions not supported\")             # <<<<<<<<<<<<<<\n * \n * \n */\n      __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__31, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 703, __pyx_L1_error)\n      __Pyx_GOTREF(__pyx_t_5);\n      __Pyx_Raise(__pyx_t_5, 0, 0, 0);\n      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;\n      __PYX_ERR(1, 703, __pyx_L1_error)\n\n      /* \"View.MemoryView\":702\n * cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim):\n *     for suboffset in suboffsets[:ndim]:\n *         if suboffset >= 0:             # <<<<<<<<<<<<<<\n *             raise ValueError(\"Indirect dimensions not supported\")\n * \n */\n    }\n  }\n\n  /* \"View.MemoryView\":700\n *     return have_slices or nslices, tuple(result)\n * \n * cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim):             # <<<<<<<<<<<<<<\n *     for suboffset in suboffsets[:ndim]:\n *         if suboffset >= 0:\n */\n\n  /* function exit code */\n  __pyx_r = Py_None; __Pyx_INCREF(Py_None);\n  goto __pyx_L0;\n  __pyx_L1_error:;\n  __Pyx_XDECREF(__pyx_t_5);\n  __Pyx_AddTraceback(\"View.MemoryView.assert_direct_dimensions\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n  __pyx_r = 0;\n  __pyx_L0:;\n  __Pyx_XGIVEREF(__pyx_r);\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\n/* \"View.MemoryView\":710\n * \n * @cname('__pyx_memview_slice')\n * cdef memoryview memview_slice(memoryview memview, object indices):             # <<<<<<<<<<<<<<\n *     cdef int new_ndim = 0, suboffset_dim = -1, dim\n *     cdef bint negative_step\n */\n\nstatic struct __pyx_memoryview_obj *__pyx_memview_slice(struct __pyx_memoryview_obj *__pyx_v_memview, PyObject *__pyx_v_indices) {\n  int __pyx_v_new_ndim;\n  int __pyx_v_suboffset_dim;\n  int __pyx_v_dim;\n  __Pyx_memviewslice __pyx_v_src;\n  __Pyx_memviewslice __pyx_v_dst;\n  __Pyx_memviewslice *__pyx_v_p_src;\n  struct __pyx_memoryviewslice_obj *__pyx_v_memviewsliceobj = 0;\n  __Pyx_memviewslice *__pyx_v_p_dst;\n  int *__pyx_v_p_suboffset_dim;\n  Py_ssize_t __pyx_v_start;\n  Py_ssize_t __pyx_v_stop;\n  Py_ssize_t __pyx_v_step;\n  int __pyx_v_have_start;\n  int __pyx_v_have_stop;\n  int __pyx_v_have_step;\n  PyObject *__pyx_v_index = NULL;\n  struct __pyx_memoryview_obj *__pyx_r = NULL;\n  __Pyx_RefNannyDeclarations\n  int __pyx_t_1;\n  int __pyx_t_2;\n  PyObject *__pyx_t_3 = NULL;\n  struct __pyx_memoryview_obj *__pyx_t_4;\n  char *__pyx_t_5;\n  int __pyx_t_6;\n  Py_ssize_t __pyx_t_7;\n  PyObject *(*__pyx_t_8)(PyObject *);\n  PyObject *__pyx_t_9 = NULL;\n  Py_ssize_t __pyx_t_10;\n  int __pyx_t_11;\n  Py_ssize_t __pyx_t_12;\n  int __pyx_lineno = 0;\n  const char *__pyx_filename = NULL;\n  int __pyx_clineno = 0;\n  __Pyx_RefNannySetupContext(\"memview_slice\", 0);\n\n  /* \"View.MemoryView\":711\n * @cname('__pyx_memview_slice')\n * cdef memoryview memview_slice(memoryview memview, object indices):\n *     cdef int new_ndim = 0, suboffset_dim = -1, dim             # <<<<<<<<<<<<<<\n *     cdef bint negative_step\n *     cdef __Pyx_memviewslice src, dst\n */\n  __pyx_v_new_ndim = 0;\n  __pyx_v_suboffset_dim = -1;\n\n  /* \"View.MemoryView\":718\n * \n * \n *     memset(&dst, 0, sizeof(dst))             # <<<<<<<<<<<<<<\n * \n *     cdef _memoryviewslice memviewsliceobj\n */\n  (void)(memset((&__pyx_v_dst), 0, (sizeof(__pyx_v_dst))));\n\n  /* \"View.MemoryView\":722\n *     cdef _memoryviewslice memviewsliceobj\n * \n *     assert memview.view.ndim > 0             # <<<<<<<<<<<<<<\n * \n *     if isinstance(memview, _memoryviewslice):\n */\n  #ifndef CYTHON_WITHOUT_ASSERTIONS\n  if (unlikely(!Py_OptimizeFlag)) {\n    if (unlikely(!((__pyx_v_memview->view.ndim > 0) != 0))) {\n      PyErr_SetNone(PyExc_AssertionError);\n      __PYX_ERR(1, 722, __pyx_L1_error)\n    }\n  }\n  #endif\n\n  /* \"View.MemoryView\":724\n *     assert memview.view.ndim > 0\n * \n *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<\n *         memviewsliceobj = memview\n *         p_src = &memviewsliceobj.from_slice\n */\n  __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type); \n  __pyx_t_2 = (__pyx_t_1 != 0);\n  if (__pyx_t_2) {\n\n    /* \"View.MemoryView\":725\n * \n *     if isinstance(memview, _memoryviewslice):\n *         memviewsliceobj = memview             # <<<<<<<<<<<<<<\n *         p_src = &memviewsliceobj.from_slice\n *     else:\n */\n    if (!(likely(((((PyObject *)__pyx_v_memview)) == Py_None) || likely(__Pyx_TypeTest(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type))))) __PYX_ERR(1, 725, __pyx_L1_error)\n    __pyx_t_3 = ((PyObject *)__pyx_v_memview);\n    __Pyx_INCREF(__pyx_t_3);\n    __pyx_v_memviewsliceobj = ((struct __pyx_memoryviewslice_obj *)__pyx_t_3);\n    __pyx_t_3 = 0;\n\n    /* \"View.MemoryView\":726\n *     if isinstance(memview, _memoryviewslice):\n *         memviewsliceobj = memview\n *         p_src = &memviewsliceobj.from_slice             # <<<<<<<<<<<<<<\n *     else:\n *         slice_copy(memview, &src)\n */\n    __pyx_v_p_src = (&__pyx_v_memviewsliceobj->from_slice);\n\n    /* \"View.MemoryView\":724\n *     assert memview.view.ndim > 0\n * \n *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<\n *         memviewsliceobj = memview\n *         p_src = &memviewsliceobj.from_slice\n */\n    goto __pyx_L3;\n  }\n\n  /* \"View.MemoryView\":728\n *         p_src = &memviewsliceobj.from_slice\n *     else:\n *         slice_copy(memview, &src)             # <<<<<<<<<<<<<<\n *         p_src = &src\n * \n */\n  /*else*/ {\n    __pyx_memoryview_slice_copy(__pyx_v_memview, (&__pyx_v_src));\n\n    /* \"View.MemoryView\":729\n *     else:\n *         slice_copy(memview, &src)\n *         p_src = &src             # <<<<<<<<<<<<<<\n * \n * \n */\n    __pyx_v_p_src = (&__pyx_v_src);\n  }\n  __pyx_L3:;\n\n  /* \"View.MemoryView\":735\n * \n * \n *     dst.memview = p_src.memview             # <<<<<<<<<<<<<<\n *     dst.data = p_src.data\n * \n */\n  __pyx_t_4 = __pyx_v_p_src->memview;\n  __pyx_v_dst.memview = __pyx_t_4;\n\n  /* \"View.MemoryView\":736\n * \n *     dst.memview = p_src.memview\n *     dst.data = p_src.data             # <<<<<<<<<<<<<<\n * \n * \n */\n  __pyx_t_5 = __pyx_v_p_src->data;\n  __pyx_v_dst.data = __pyx_t_5;\n\n  /* \"View.MemoryView\":741\n * \n * \n *     cdef __Pyx_memviewslice *p_dst = &dst             # <<<<<<<<<<<<<<\n *     cdef int *p_suboffset_dim = &suboffset_dim\n *     cdef Py_ssize_t start, stop, step\n */\n  __pyx_v_p_dst = (&__pyx_v_dst);\n\n  /* \"View.MemoryView\":742\n * \n *     cdef __Pyx_memviewslice *p_dst = &dst\n *     cdef int *p_suboffset_dim = &suboffset_dim             # <<<<<<<<<<<<<<\n *     cdef Py_ssize_t start, stop, step\n *     cdef bint have_start, have_stop, have_step\n */\n  __pyx_v_p_suboffset_dim = (&__pyx_v_suboffset_dim);\n\n  /* \"View.MemoryView\":746\n *     cdef bint have_start, have_stop, have_step\n * \n *     for dim, index in enumerate(indices):             # <<<<<<<<<<<<<<\n *         if PyIndex_Check(index):\n *             slice_memviewslice(\n */\n  __pyx_t_6 = 0;\n  if (likely(PyList_CheckExact(__pyx_v_indices)) || PyTuple_CheckExact(__pyx_v_indices)) {\n    __pyx_t_3 = __pyx_v_indices; __Pyx_INCREF(__pyx_t_3); __pyx_t_7 = 0;\n    __pyx_t_8 = NULL;\n  } else {\n    __pyx_t_7 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_indices); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 746, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_3);\n    __pyx_t_8 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 746, __pyx_L1_error)\n  }\n  for (;;) {\n    if (likely(!__pyx_t_8)) {\n      if (likely(PyList_CheckExact(__pyx_t_3))) {\n        if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_3)) break;\n        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS\n        __pyx_t_9 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_9); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(1, 746, __pyx_L1_error)\n        #else\n        __pyx_t_9 = PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 746, __pyx_L1_error)\n        __Pyx_GOTREF(__pyx_t_9);\n        #endif\n      } else {\n        if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_3)) break;\n        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS\n        __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_9); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(1, 746, __pyx_L1_error)\n        #else\n        __pyx_t_9 = PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 746, __pyx_L1_error)\n        __Pyx_GOTREF(__pyx_t_9);\n        #endif\n      }\n    } else {\n      __pyx_t_9 = __pyx_t_8(__pyx_t_3);\n      if (unlikely(!__pyx_t_9)) {\n        PyObject* exc_type = PyErr_Occurred();\n        if (exc_type) {\n          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();\n          else __PYX_ERR(1, 746, __pyx_L1_error)\n        }\n        break;\n      }\n      __Pyx_GOTREF(__pyx_t_9);\n    }\n    __Pyx_XDECREF_SET(__pyx_v_index, __pyx_t_9);\n    __pyx_t_9 = 0;\n    __pyx_v_dim = __pyx_t_6;\n    __pyx_t_6 = (__pyx_t_6 + 1);\n\n    /* \"View.MemoryView\":747\n * \n *     for dim, index in enumerate(indices):\n *         if PyIndex_Check(index):             # <<<<<<<<<<<<<<\n *             slice_memviewslice(\n *                 p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim],\n */\n    __pyx_t_2 = (PyIndex_Check(__pyx_v_index) != 0);\n    if (__pyx_t_2) {\n\n      /* \"View.MemoryView\":751\n *                 p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim],\n *                 dim, new_ndim, p_suboffset_dim,\n *                 index, 0, 0, # start, stop, step             # <<<<<<<<<<<<<<\n *                 0, 0, 0, # have_{start,stop,step}\n *                 False)\n */\n      __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_v_index); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 751, __pyx_L1_error)\n\n      /* \"View.MemoryView\":748\n *     for dim, index in enumerate(indices):\n *         if PyIndex_Check(index):\n *             slice_memviewslice(             # <<<<<<<<<<<<<<\n *                 p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim],\n *                 dim, new_ndim, p_suboffset_dim,\n */\n      __pyx_t_11 = __pyx_memoryview_slice_memviewslice(__pyx_v_p_dst, (__pyx_v_p_src->shape[__pyx_v_dim]), (__pyx_v_p_src->strides[__pyx_v_dim]), (__pyx_v_p_src->suboffsets[__pyx_v_dim]), __pyx_v_dim, __pyx_v_new_ndim, __pyx_v_p_suboffset_dim, __pyx_t_10, 0, 0, 0, 0, 0, 0); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(1, 748, __pyx_L1_error)\n\n      /* \"View.MemoryView\":747\n * \n *     for dim, index in enumerate(indices):\n *         if PyIndex_Check(index):             # <<<<<<<<<<<<<<\n *             slice_memviewslice(\n *                 p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim],\n */\n      goto __pyx_L6;\n    }\n\n    /* \"View.MemoryView\":754\n *                 0, 0, 0, # have_{start,stop,step}\n *                 False)\n *         elif index is None:             # <<<<<<<<<<<<<<\n *             p_dst.shape[new_ndim] = 1\n *             p_dst.strides[new_ndim] = 0\n */\n    __pyx_t_2 = (__pyx_v_index == Py_None);\n    __pyx_t_1 = (__pyx_t_2 != 0);\n    if (__pyx_t_1) {\n\n      /* \"View.MemoryView\":755\n *                 False)\n *         elif index is None:\n *             p_dst.shape[new_ndim] = 1             # <<<<<<<<<<<<<<\n *             p_dst.strides[new_ndim] = 0\n *             p_dst.suboffsets[new_ndim] = -1\n */\n      (__pyx_v_p_dst->shape[__pyx_v_new_ndim]) = 1;\n\n      /* \"View.MemoryView\":756\n *         elif index is None:\n *             p_dst.shape[new_ndim] = 1\n *             p_dst.strides[new_ndim] = 0             # <<<<<<<<<<<<<<\n *             p_dst.suboffsets[new_ndim] = -1\n *             new_ndim += 1\n */\n      (__pyx_v_p_dst->strides[__pyx_v_new_ndim]) = 0;\n\n      /* \"View.MemoryView\":757\n *             p_dst.shape[new_ndim] = 1\n *             p_dst.strides[new_ndim] = 0\n *             p_dst.suboffsets[new_ndim] = -1             # <<<<<<<<<<<<<<\n *             new_ndim += 1\n *         else:\n */\n      (__pyx_v_p_dst->suboffsets[__pyx_v_new_ndim]) = -1L;\n\n      /* \"View.MemoryView\":758\n *             p_dst.strides[new_ndim] = 0\n *             p_dst.suboffsets[new_ndim] = -1\n *             new_ndim += 1             # <<<<<<<<<<<<<<\n *         else:\n *             start = index.start or 0\n */\n      __pyx_v_new_ndim = (__pyx_v_new_ndim + 1);\n\n      /* \"View.MemoryView\":754\n *                 0, 0, 0, # have_{start,stop,step}\n *                 False)\n *         elif index is None:             # <<<<<<<<<<<<<<\n *             p_dst.shape[new_ndim] = 1\n *             p_dst.strides[new_ndim] = 0\n */\n      goto __pyx_L6;\n    }\n\n    /* \"View.MemoryView\":760\n *             new_ndim += 1\n *         else:\n *             start = index.start or 0             # <<<<<<<<<<<<<<\n *             stop = index.stop or 0\n *             step = index.step or 0\n */\n    /*else*/ {\n      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_start); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 760, __pyx_L1_error)\n      __Pyx_GOTREF(__pyx_t_9);\n      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 760, __pyx_L1_error)\n      if (!__pyx_t_1) {\n        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;\n      } else {\n        __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_t_9); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 760, __pyx_L1_error)\n        __pyx_t_10 = __pyx_t_12;\n        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;\n        goto __pyx_L7_bool_binop_done;\n      }\n      __pyx_t_10 = 0;\n      __pyx_L7_bool_binop_done:;\n      __pyx_v_start = __pyx_t_10;\n\n      /* \"View.MemoryView\":761\n *         else:\n *             start = index.start or 0\n *             stop = index.stop or 0             # <<<<<<<<<<<<<<\n *             step = index.step or 0\n * \n */\n      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_stop); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 761, __pyx_L1_error)\n      __Pyx_GOTREF(__pyx_t_9);\n      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 761, __pyx_L1_error)\n      if (!__pyx_t_1) {\n        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;\n      } else {\n        __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_t_9); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 761, __pyx_L1_error)\n        __pyx_t_10 = __pyx_t_12;\n        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;\n        goto __pyx_L9_bool_binop_done;\n      }\n      __pyx_t_10 = 0;\n      __pyx_L9_bool_binop_done:;\n      __pyx_v_stop = __pyx_t_10;\n\n      /* \"View.MemoryView\":762\n *             start = index.start or 0\n *             stop = index.stop or 0\n *             step = index.step or 0             # <<<<<<<<<<<<<<\n * \n *             have_start = index.start is not None\n */\n      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_step); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 762, __pyx_L1_error)\n      __Pyx_GOTREF(__pyx_t_9);\n      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 762, __pyx_L1_error)\n      if (!__pyx_t_1) {\n        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;\n      } else {\n        __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_t_9); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 762, __pyx_L1_error)\n        __pyx_t_10 = __pyx_t_12;\n        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;\n        goto __pyx_L11_bool_binop_done;\n      }\n      __pyx_t_10 = 0;\n      __pyx_L11_bool_binop_done:;\n      __pyx_v_step = __pyx_t_10;\n\n      /* \"View.MemoryView\":764\n *             step = index.step or 0\n * \n *             have_start = index.start is not None             # <<<<<<<<<<<<<<\n *             have_stop = index.stop is not None\n *             have_step = index.step is not None\n */\n      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_start); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 764, __pyx_L1_error)\n      __Pyx_GOTREF(__pyx_t_9);\n      __pyx_t_1 = (__pyx_t_9 != Py_None);\n      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;\n      __pyx_v_have_start = __pyx_t_1;\n\n      /* \"View.MemoryView\":765\n * \n *             have_start = index.start is not None\n *             have_stop = index.stop is not None             # <<<<<<<<<<<<<<\n *             have_step = index.step is not None\n * \n */\n      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_stop); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 765, __pyx_L1_error)\n      __Pyx_GOTREF(__pyx_t_9);\n      __pyx_t_1 = (__pyx_t_9 != Py_None);\n      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;\n      __pyx_v_have_stop = __pyx_t_1;\n\n      /* \"View.MemoryView\":766\n *             have_start = index.start is not None\n *             have_stop = index.stop is not None\n *             have_step = index.step is not None             # <<<<<<<<<<<<<<\n * \n *             slice_memviewslice(\n */\n      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_step); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 766, __pyx_L1_error)\n      __Pyx_GOTREF(__pyx_t_9);\n      __pyx_t_1 = (__pyx_t_9 != Py_None);\n      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;\n      __pyx_v_have_step = __pyx_t_1;\n\n      /* \"View.MemoryView\":768\n *             have_step = index.step is not None\n * \n *             slice_memviewslice(             # <<<<<<<<<<<<<<\n *                 p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim],\n *                 dim, new_ndim, p_suboffset_dim,\n */\n      __pyx_t_11 = __pyx_memoryview_slice_memviewslice(__pyx_v_p_dst, (__pyx_v_p_src->shape[__pyx_v_dim]), (__pyx_v_p_src->strides[__pyx_v_dim]), (__pyx_v_p_src->suboffsets[__pyx_v_dim]), __pyx_v_dim, __pyx_v_new_ndim, __pyx_v_p_suboffset_dim, __pyx_v_start, __pyx_v_stop, __pyx_v_step, __pyx_v_have_start, __pyx_v_have_stop, __pyx_v_have_step, 1); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(1, 768, __pyx_L1_error)\n\n      /* \"View.MemoryView\":774\n *                 have_start, have_stop, have_step,\n *                 True)\n *             new_ndim += 1             # <<<<<<<<<<<<<<\n * \n *     if isinstance(memview, _memoryviewslice):\n */\n      __pyx_v_new_ndim = (__pyx_v_new_ndim + 1);\n    }\n    __pyx_L6:;\n\n    /* \"View.MemoryView\":746\n *     cdef bint have_start, have_stop, have_step\n * \n *     for dim, index in enumerate(indices):             # <<<<<<<<<<<<<<\n *         if PyIndex_Check(index):\n *             slice_memviewslice(\n */\n  }\n  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;\n\n  /* \"View.MemoryView\":776\n *             new_ndim += 1\n * \n *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<\n *         return memoryview_fromslice(dst, new_ndim,\n *                                     memviewsliceobj.to_object_func,\n */\n  __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type); \n  __pyx_t_2 = (__pyx_t_1 != 0);\n  if (__pyx_t_2) {\n\n    /* \"View.MemoryView\":777\n * \n *     if isinstance(memview, _memoryviewslice):\n *         return memoryview_fromslice(dst, new_ndim,             # <<<<<<<<<<<<<<\n *                                     memviewsliceobj.to_object_func,\n *                                     memviewsliceobj.to_dtype_func,\n */\n    __Pyx_XDECREF(((PyObject *)__pyx_r));\n\n    /* \"View.MemoryView\":778\n *     if isinstance(memview, _memoryviewslice):\n *         return memoryview_fromslice(dst, new_ndim,\n *                                     memviewsliceobj.to_object_func,             # <<<<<<<<<<<<<<\n *                                     memviewsliceobj.to_dtype_func,\n *                                     memview.dtype_is_object)\n */\n    if (unlikely(!__pyx_v_memviewsliceobj)) { __Pyx_RaiseUnboundLocalError(\"memviewsliceobj\"); __PYX_ERR(1, 778, __pyx_L1_error) }\n\n    /* \"View.MemoryView\":779\n *         return memoryview_fromslice(dst, new_ndim,\n *                                     memviewsliceobj.to_object_func,\n *                                     memviewsliceobj.to_dtype_func,             # <<<<<<<<<<<<<<\n *                                     memview.dtype_is_object)\n *     else:\n */\n    if (unlikely(!__pyx_v_memviewsliceobj)) { __Pyx_RaiseUnboundLocalError(\"memviewsliceobj\"); __PYX_ERR(1, 779, __pyx_L1_error) }\n\n    /* \"View.MemoryView\":777\n * \n *     if isinstance(memview, _memoryviewslice):\n *         return memoryview_fromslice(dst, new_ndim,             # <<<<<<<<<<<<<<\n *                                     memviewsliceobj.to_object_func,\n *                                     memviewsliceobj.to_dtype_func,\n */\n    __pyx_t_3 = __pyx_memoryview_fromslice(__pyx_v_dst, __pyx_v_new_ndim, __pyx_v_memviewsliceobj->to_object_func, __pyx_v_memviewsliceobj->to_dtype_func, __pyx_v_memview->dtype_is_object); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 777, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_3);\n    if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_memoryview_type))))) __PYX_ERR(1, 777, __pyx_L1_error)\n    __pyx_r = ((struct __pyx_memoryview_obj *)__pyx_t_3);\n    __pyx_t_3 = 0;\n    goto __pyx_L0;\n\n    /* \"View.MemoryView\":776\n *             new_ndim += 1\n * \n *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<\n *         return memoryview_fromslice(dst, new_ndim,\n *                                     memviewsliceobj.to_object_func,\n */\n  }\n\n  /* \"View.MemoryView\":782\n *                                     memview.dtype_is_object)\n *     else:\n *         return memoryview_fromslice(dst, new_ndim, NULL, NULL,             # <<<<<<<<<<<<<<\n *                                     memview.dtype_is_object)\n * \n */\n  /*else*/ {\n    __Pyx_XDECREF(((PyObject *)__pyx_r));\n\n    /* \"View.MemoryView\":783\n *     else:\n *         return memoryview_fromslice(dst, new_ndim, NULL, NULL,\n *                                     memview.dtype_is_object)             # <<<<<<<<<<<<<<\n * \n * \n */\n    __pyx_t_3 = __pyx_memoryview_fromslice(__pyx_v_dst, __pyx_v_new_ndim, NULL, NULL, __pyx_v_memview->dtype_is_object); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 782, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_3);\n\n    /* \"View.MemoryView\":782\n *                                     memview.dtype_is_object)\n *     else:\n *         return memoryview_fromslice(dst, new_ndim, NULL, NULL,             # <<<<<<<<<<<<<<\n *                                     memview.dtype_is_object)\n * \n */\n    if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_memoryview_type))))) __PYX_ERR(1, 782, __pyx_L1_error)\n    __pyx_r = ((struct __pyx_memoryview_obj *)__pyx_t_3);\n    __pyx_t_3 = 0;\n    goto __pyx_L0;\n  }\n\n  /* \"View.MemoryView\":710\n * \n * @cname('__pyx_memview_slice')\n * cdef memoryview memview_slice(memoryview memview, object indices):             # <<<<<<<<<<<<<<\n *     cdef int new_ndim = 0, suboffset_dim = -1, dim\n *     cdef bint negative_step\n */\n\n  /* function exit code */\n  __pyx_L1_error:;\n  __Pyx_XDECREF(__pyx_t_3);\n  __Pyx_XDECREF(__pyx_t_9);\n  __Pyx_AddTraceback(\"View.MemoryView.memview_slice\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n  __pyx_r = 0;\n  __pyx_L0:;\n  __Pyx_XDECREF((PyObject *)__pyx_v_memviewsliceobj);\n  __Pyx_XDECREF(__pyx_v_index);\n  __Pyx_XGIVEREF((PyObject *)__pyx_r);\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\n/* \"View.MemoryView\":807\n * \n * @cname('__pyx_memoryview_slice_memviewslice')\n * cdef int slice_memviewslice(             # <<<<<<<<<<<<<<\n *         __Pyx_memviewslice *dst,\n *         Py_ssize_t shape, Py_ssize_t stride, Py_ssize_t suboffset,\n */\n\nstatic int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *__pyx_v_dst, Py_ssize_t __pyx_v_shape, Py_ssize_t __pyx_v_stride, Py_ssize_t __pyx_v_suboffset, int __pyx_v_dim, int __pyx_v_new_ndim, int *__pyx_v_suboffset_dim, Py_ssize_t __pyx_v_start, Py_ssize_t __pyx_v_stop, Py_ssize_t __pyx_v_step, int __pyx_v_have_start, int __pyx_v_have_stop, int __pyx_v_have_step, int __pyx_v_is_slice) {\n  Py_ssize_t __pyx_v_new_shape;\n  int __pyx_v_negative_step;\n  int __pyx_r;\n  int __pyx_t_1;\n  int __pyx_t_2;\n  int __pyx_t_3;\n  int __pyx_lineno = 0;\n  const char *__pyx_filename = NULL;\n  int __pyx_clineno = 0;\n\n  /* \"View.MemoryView\":827\n *     cdef bint negative_step\n * \n *     if not is_slice:             # <<<<<<<<<<<<<<\n * \n *         if start < 0:\n */\n  __pyx_t_1 = ((!(__pyx_v_is_slice != 0)) != 0);\n  if (__pyx_t_1) {\n\n    /* \"View.MemoryView\":829\n *     if not is_slice:\n * \n *         if start < 0:             # <<<<<<<<<<<<<<\n *             start += shape\n *         if not 0 <= start < shape:\n */\n    __pyx_t_1 = ((__pyx_v_start < 0) != 0);\n    if (__pyx_t_1) {\n\n      /* \"View.MemoryView\":830\n * \n *         if start < 0:\n *             start += shape             # <<<<<<<<<<<<<<\n *         if not 0 <= start < shape:\n *             _err_dim(IndexError, \"Index out of bounds (axis %d)\", dim)\n */\n      __pyx_v_start = (__pyx_v_start + __pyx_v_shape);\n\n      /* \"View.MemoryView\":829\n *     if not is_slice:\n * \n *         if start < 0:             # <<<<<<<<<<<<<<\n *             start += shape\n *         if not 0 <= start < shape:\n */\n    }\n\n    /* \"View.MemoryView\":831\n *         if start < 0:\n *             start += shape\n *         if not 0 <= start < shape:             # <<<<<<<<<<<<<<\n *             _err_dim(IndexError, \"Index out of bounds (axis %d)\", dim)\n *     else:\n */\n    __pyx_t_1 = (0 <= __pyx_v_start);\n    if (__pyx_t_1) {\n      __pyx_t_1 = (__pyx_v_start < __pyx_v_shape);\n    }\n    __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);\n    if (__pyx_t_2) {\n\n      /* \"View.MemoryView\":832\n *             start += shape\n *         if not 0 <= start < shape:\n *             _err_dim(IndexError, \"Index out of bounds (axis %d)\", dim)             # <<<<<<<<<<<<<<\n *     else:\n * \n */\n      __pyx_t_3 = __pyx_memoryview_err_dim(__pyx_builtin_IndexError, ((char *)\"Index out of bounds (axis %d)\"), __pyx_v_dim); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 832, __pyx_L1_error)\n\n      /* \"View.MemoryView\":831\n *         if start < 0:\n *             start += shape\n *         if not 0 <= start < shape:             # <<<<<<<<<<<<<<\n *             _err_dim(IndexError, \"Index out of bounds (axis %d)\", dim)\n *     else:\n */\n    }\n\n    /* \"View.MemoryView\":827\n *     cdef bint negative_step\n * \n *     if not is_slice:             # <<<<<<<<<<<<<<\n * \n *         if start < 0:\n */\n    goto __pyx_L3;\n  }\n\n  /* \"View.MemoryView\":835\n *     else:\n * \n *         negative_step = have_step != 0 and step < 0             # <<<<<<<<<<<<<<\n * \n *         if have_step and step == 0:\n */\n  /*else*/ {\n    __pyx_t_1 = ((__pyx_v_have_step != 0) != 0);\n    if (__pyx_t_1) {\n    } else {\n      __pyx_t_2 = __pyx_t_1;\n      goto __pyx_L6_bool_binop_done;\n    }\n    __pyx_t_1 = ((__pyx_v_step < 0) != 0);\n    __pyx_t_2 = __pyx_t_1;\n    __pyx_L6_bool_binop_done:;\n    __pyx_v_negative_step = __pyx_t_2;\n\n    /* \"View.MemoryView\":837\n *         negative_step = have_step != 0 and step < 0\n * \n *         if have_step and step == 0:             # <<<<<<<<<<<<<<\n *             _err_dim(ValueError, \"Step may not be zero (axis %d)\", dim)\n * \n */\n    __pyx_t_1 = (__pyx_v_have_step != 0);\n    if (__pyx_t_1) {\n    } else {\n      __pyx_t_2 = __pyx_t_1;\n      goto __pyx_L9_bool_binop_done;\n    }\n    __pyx_t_1 = ((__pyx_v_step == 0) != 0);\n    __pyx_t_2 = __pyx_t_1;\n    __pyx_L9_bool_binop_done:;\n    if (__pyx_t_2) {\n\n      /* \"View.MemoryView\":838\n * \n *         if have_step and step == 0:\n *             _err_dim(ValueError, \"Step may not be zero (axis %d)\", dim)             # <<<<<<<<<<<<<<\n * \n * \n */\n      __pyx_t_3 = __pyx_memoryview_err_dim(__pyx_builtin_ValueError, ((char *)\"Step may not be zero (axis %d)\"), __pyx_v_dim); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 838, __pyx_L1_error)\n\n      /* \"View.MemoryView\":837\n *         negative_step = have_step != 0 and step < 0\n * \n *         if have_step and step == 0:             # <<<<<<<<<<<<<<\n *             _err_dim(ValueError, \"Step may not be zero (axis %d)\", dim)\n * \n */\n    }\n\n    /* \"View.MemoryView\":841\n * \n * \n *         if have_start:             # <<<<<<<<<<<<<<\n *             if start < 0:\n *                 start += shape\n */\n    __pyx_t_2 = (__pyx_v_have_start != 0);\n    if (__pyx_t_2) {\n\n      /* \"View.MemoryView\":842\n * \n *         if have_start:\n *             if start < 0:             # <<<<<<<<<<<<<<\n *                 start += shape\n *                 if start < 0:\n */\n      __pyx_t_2 = ((__pyx_v_start < 0) != 0);\n      if (__pyx_t_2) {\n\n        /* \"View.MemoryView\":843\n *         if have_start:\n *             if start < 0:\n *                 start += shape             # <<<<<<<<<<<<<<\n *                 if start < 0:\n *                     start = 0\n */\n        __pyx_v_start = (__pyx_v_start + __pyx_v_shape);\n\n        /* \"View.MemoryView\":844\n *             if start < 0:\n *                 start += shape\n *                 if start < 0:             # <<<<<<<<<<<<<<\n *                     start = 0\n *             elif start >= shape:\n */\n        __pyx_t_2 = ((__pyx_v_start < 0) != 0);\n        if (__pyx_t_2) {\n\n          /* \"View.MemoryView\":845\n *                 start += shape\n *                 if start < 0:\n *                     start = 0             # <<<<<<<<<<<<<<\n *             elif start >= shape:\n *                 if negative_step:\n */\n          __pyx_v_start = 0;\n\n          /* \"View.MemoryView\":844\n *             if start < 0:\n *                 start += shape\n *                 if start < 0:             # <<<<<<<<<<<<<<\n *                     start = 0\n *             elif start >= shape:\n */\n        }\n\n        /* \"View.MemoryView\":842\n * \n *         if have_start:\n *             if start < 0:             # <<<<<<<<<<<<<<\n *                 start += shape\n *                 if start < 0:\n */\n        goto __pyx_L12;\n      }\n\n      /* \"View.MemoryView\":846\n *                 if start < 0:\n *                     start = 0\n *             elif start >= shape:             # <<<<<<<<<<<<<<\n *                 if negative_step:\n *                     start = shape - 1\n */\n      __pyx_t_2 = ((__pyx_v_start >= __pyx_v_shape) != 0);\n      if (__pyx_t_2) {\n\n        /* \"View.MemoryView\":847\n *                     start = 0\n *             elif start >= shape:\n *                 if negative_step:             # <<<<<<<<<<<<<<\n *                     start = shape - 1\n *                 else:\n */\n        __pyx_t_2 = (__pyx_v_negative_step != 0);\n        if (__pyx_t_2) {\n\n          /* \"View.MemoryView\":848\n *             elif start >= shape:\n *                 if negative_step:\n *                     start = shape - 1             # <<<<<<<<<<<<<<\n *                 else:\n *                     start = shape\n */\n          __pyx_v_start = (__pyx_v_shape - 1);\n\n          /* \"View.MemoryView\":847\n *                     start = 0\n *             elif start >= shape:\n *                 if negative_step:             # <<<<<<<<<<<<<<\n *                     start = shape - 1\n *                 else:\n */\n          goto __pyx_L14;\n        }\n\n        /* \"View.MemoryView\":850\n *                     start = shape - 1\n *                 else:\n *                     start = shape             # <<<<<<<<<<<<<<\n *         else:\n *             if negative_step:\n */\n        /*else*/ {\n          __pyx_v_start = __pyx_v_shape;\n        }\n        __pyx_L14:;\n\n        /* \"View.MemoryView\":846\n *                 if start < 0:\n *                     start = 0\n *             elif start >= shape:             # <<<<<<<<<<<<<<\n *                 if negative_step:\n *                     start = shape - 1\n */\n      }\n      __pyx_L12:;\n\n      /* \"View.MemoryView\":841\n * \n * \n *         if have_start:             # <<<<<<<<<<<<<<\n *             if start < 0:\n *                 start += shape\n */\n      goto __pyx_L11;\n    }\n\n    /* \"View.MemoryView\":852\n *                     start = shape\n *         else:\n *             if negative_step:             # <<<<<<<<<<<<<<\n *                 start = shape - 1\n *             else:\n */\n    /*else*/ {\n      __pyx_t_2 = (__pyx_v_negative_step != 0);\n      if (__pyx_t_2) {\n\n        /* \"View.MemoryView\":853\n *         else:\n *             if negative_step:\n *                 start = shape - 1             # <<<<<<<<<<<<<<\n *             else:\n *                 start = 0\n */\n        __pyx_v_start = (__pyx_v_shape - 1);\n\n        /* \"View.MemoryView\":852\n *                     start = shape\n *         else:\n *             if negative_step:             # <<<<<<<<<<<<<<\n *                 start = shape - 1\n *             else:\n */\n        goto __pyx_L15;\n      }\n\n      /* \"View.MemoryView\":855\n *                 start = shape - 1\n *             else:\n *                 start = 0             # <<<<<<<<<<<<<<\n * \n *         if have_stop:\n */\n      /*else*/ {\n        __pyx_v_start = 0;\n      }\n      __pyx_L15:;\n    }\n    __pyx_L11:;\n\n    /* \"View.MemoryView\":857\n *                 start = 0\n * \n *         if have_stop:             # <<<<<<<<<<<<<<\n *             if stop < 0:\n *                 stop += shape\n */\n    __pyx_t_2 = (__pyx_v_have_stop != 0);\n    if (__pyx_t_2) {\n\n      /* \"View.MemoryView\":858\n * \n *         if have_stop:\n *             if stop < 0:             # <<<<<<<<<<<<<<\n *                 stop += shape\n *                 if stop < 0:\n */\n      __pyx_t_2 = ((__pyx_v_stop < 0) != 0);\n      if (__pyx_t_2) {\n\n        /* \"View.MemoryView\":859\n *         if have_stop:\n *             if stop < 0:\n *                 stop += shape             # <<<<<<<<<<<<<<\n *                 if stop < 0:\n *                     stop = 0\n */\n        __pyx_v_stop = (__pyx_v_stop + __pyx_v_shape);\n\n        /* \"View.MemoryView\":860\n *             if stop < 0:\n *                 stop += shape\n *                 if stop < 0:             # <<<<<<<<<<<<<<\n *                     stop = 0\n *             elif stop > shape:\n */\n        __pyx_t_2 = ((__pyx_v_stop < 0) != 0);\n        if (__pyx_t_2) {\n\n          /* \"View.MemoryView\":861\n *                 stop += shape\n *                 if stop < 0:\n *                     stop = 0             # <<<<<<<<<<<<<<\n *             elif stop > shape:\n *                 stop = shape\n */\n          __pyx_v_stop = 0;\n\n          /* \"View.MemoryView\":860\n *             if stop < 0:\n *                 stop += shape\n *                 if stop < 0:             # <<<<<<<<<<<<<<\n *                     stop = 0\n *             elif stop > shape:\n */\n        }\n\n        /* \"View.MemoryView\":858\n * \n *         if have_stop:\n *             if stop < 0:             # <<<<<<<<<<<<<<\n *                 stop += shape\n *                 if stop < 0:\n */\n        goto __pyx_L17;\n      }\n\n      /* \"View.MemoryView\":862\n *                 if stop < 0:\n *                     stop = 0\n *             elif stop > shape:             # <<<<<<<<<<<<<<\n *                 stop = shape\n *         else:\n */\n      __pyx_t_2 = ((__pyx_v_stop > __pyx_v_shape) != 0);\n      if (__pyx_t_2) {\n\n        /* \"View.MemoryView\":863\n *                     stop = 0\n *             elif stop > shape:\n *                 stop = shape             # <<<<<<<<<<<<<<\n *         else:\n *             if negative_step:\n */\n        __pyx_v_stop = __pyx_v_shape;\n\n        /* \"View.MemoryView\":862\n *                 if stop < 0:\n *                     stop = 0\n *             elif stop > shape:             # <<<<<<<<<<<<<<\n *                 stop = shape\n *         else:\n */\n      }\n      __pyx_L17:;\n\n      /* \"View.MemoryView\":857\n *                 start = 0\n * \n *         if have_stop:             # <<<<<<<<<<<<<<\n *             if stop < 0:\n *                 stop += shape\n */\n      goto __pyx_L16;\n    }\n\n    /* \"View.MemoryView\":865\n *                 stop = shape\n *         else:\n *             if negative_step:             # <<<<<<<<<<<<<<\n *                 stop = -1\n *             else:\n */\n    /*else*/ {\n      __pyx_t_2 = (__pyx_v_negative_step != 0);\n      if (__pyx_t_2) {\n\n        /* \"View.MemoryView\":866\n *         else:\n *             if negative_step:\n *                 stop = -1             # <<<<<<<<<<<<<<\n *             else:\n *                 stop = shape\n */\n        __pyx_v_stop = -1L;\n\n        /* \"View.MemoryView\":865\n *                 stop = shape\n *         else:\n *             if negative_step:             # <<<<<<<<<<<<<<\n *                 stop = -1\n *             else:\n */\n        goto __pyx_L19;\n      }\n\n      /* \"View.MemoryView\":868\n *                 stop = -1\n *             else:\n *                 stop = shape             # <<<<<<<<<<<<<<\n * \n *         if not have_step:\n */\n      /*else*/ {\n        __pyx_v_stop = __pyx_v_shape;\n      }\n      __pyx_L19:;\n    }\n    __pyx_L16:;\n\n    /* \"View.MemoryView\":870\n *                 stop = shape\n * \n *         if not have_step:             # <<<<<<<<<<<<<<\n *             step = 1\n * \n */\n    __pyx_t_2 = ((!(__pyx_v_have_step != 0)) != 0);\n    if (__pyx_t_2) {\n\n      /* \"View.MemoryView\":871\n * \n *         if not have_step:\n *             step = 1             # <<<<<<<<<<<<<<\n * \n * \n */\n      __pyx_v_step = 1;\n\n      /* \"View.MemoryView\":870\n *                 stop = shape\n * \n *         if not have_step:             # <<<<<<<<<<<<<<\n *             step = 1\n * \n */\n    }\n\n    /* \"View.MemoryView\":875\n * \n *         with cython.cdivision(True):\n *             new_shape = (stop - start) // step             # <<<<<<<<<<<<<<\n * \n *             if (stop - start) - step * new_shape:\n */\n    __pyx_v_new_shape = ((__pyx_v_stop - __pyx_v_start) / __pyx_v_step);\n\n    /* \"View.MemoryView\":877\n *             new_shape = (stop - start) // step\n * \n *             if (stop - start) - step * new_shape:             # <<<<<<<<<<<<<<\n *                 new_shape += 1\n * \n */\n    __pyx_t_2 = (((__pyx_v_stop - __pyx_v_start) - (__pyx_v_step * __pyx_v_new_shape)) != 0);\n    if (__pyx_t_2) {\n\n      /* \"View.MemoryView\":878\n * \n *             if (stop - start) - step * new_shape:\n *                 new_shape += 1             # <<<<<<<<<<<<<<\n * \n *         if new_shape < 0:\n */\n      __pyx_v_new_shape = (__pyx_v_new_shape + 1);\n\n      /* \"View.MemoryView\":877\n *             new_shape = (stop - start) // step\n * \n *             if (stop - start) - step * new_shape:             # <<<<<<<<<<<<<<\n *                 new_shape += 1\n * \n */\n    }\n\n    /* \"View.MemoryView\":880\n *                 new_shape += 1\n * \n *         if new_shape < 0:             # <<<<<<<<<<<<<<\n *             new_shape = 0\n * \n */\n    __pyx_t_2 = ((__pyx_v_new_shape < 0) != 0);\n    if (__pyx_t_2) {\n\n      /* \"View.MemoryView\":881\n * \n *         if new_shape < 0:\n *             new_shape = 0             # <<<<<<<<<<<<<<\n * \n * \n */\n      __pyx_v_new_shape = 0;\n\n      /* \"View.MemoryView\":880\n *                 new_shape += 1\n * \n *         if new_shape < 0:             # <<<<<<<<<<<<<<\n *             new_shape = 0\n * \n */\n    }\n\n    /* \"View.MemoryView\":884\n * \n * \n *         dst.strides[new_ndim] = stride * step             # <<<<<<<<<<<<<<\n *         dst.shape[new_ndim] = new_shape\n *         dst.suboffsets[new_ndim] = suboffset\n */\n    (__pyx_v_dst->strides[__pyx_v_new_ndim]) = (__pyx_v_stride * __pyx_v_step);\n\n    /* \"View.MemoryView\":885\n * \n *         dst.strides[new_ndim] = stride * step\n *         dst.shape[new_ndim] = new_shape             # <<<<<<<<<<<<<<\n *         dst.suboffsets[new_ndim] = suboffset\n * \n */\n    (__pyx_v_dst->shape[__pyx_v_new_ndim]) = __pyx_v_new_shape;\n\n    /* \"View.MemoryView\":886\n *         dst.strides[new_ndim] = stride * step\n *         dst.shape[new_ndim] = new_shape\n *         dst.suboffsets[new_ndim] = suboffset             # <<<<<<<<<<<<<<\n * \n * \n */\n    (__pyx_v_dst->suboffsets[__pyx_v_new_ndim]) = __pyx_v_suboffset;\n  }\n  __pyx_L3:;\n\n  /* \"View.MemoryView\":889\n * \n * \n *     if suboffset_dim[0] < 0:             # <<<<<<<<<<<<<<\n *         dst.data += start * stride\n *     else:\n */\n  __pyx_t_2 = (((__pyx_v_suboffset_dim[0]) < 0) != 0);\n  if (__pyx_t_2) {\n\n    /* \"View.MemoryView\":890\n * \n *     if suboffset_dim[0] < 0:\n *         dst.data += start * stride             # <<<<<<<<<<<<<<\n *     else:\n *         dst.suboffsets[suboffset_dim[0]] += start * stride\n */\n    __pyx_v_dst->data = (__pyx_v_dst->data + (__pyx_v_start * __pyx_v_stride));\n\n    /* \"View.MemoryView\":889\n * \n * \n *     if suboffset_dim[0] < 0:             # <<<<<<<<<<<<<<\n *         dst.data += start * stride\n *     else:\n */\n    goto __pyx_L23;\n  }\n\n  /* \"View.MemoryView\":892\n *         dst.data += start * stride\n *     else:\n *         dst.suboffsets[suboffset_dim[0]] += start * stride             # <<<<<<<<<<<<<<\n * \n *     if suboffset >= 0:\n */\n  /*else*/ {\n    __pyx_t_3 = (__pyx_v_suboffset_dim[0]);\n    (__pyx_v_dst->suboffsets[__pyx_t_3]) = ((__pyx_v_dst->suboffsets[__pyx_t_3]) + (__pyx_v_start * __pyx_v_stride));\n  }\n  __pyx_L23:;\n\n  /* \"View.MemoryView\":894\n *         dst.suboffsets[suboffset_dim[0]] += start * stride\n * \n *     if suboffset >= 0:             # <<<<<<<<<<<<<<\n *         if not is_slice:\n *             if new_ndim == 0:\n */\n  __pyx_t_2 = ((__pyx_v_suboffset >= 0) != 0);\n  if (__pyx_t_2) {\n\n    /* \"View.MemoryView\":895\n * \n *     if suboffset >= 0:\n *         if not is_slice:             # <<<<<<<<<<<<<<\n *             if new_ndim == 0:\n *                 dst.data = (<char **> dst.data)[0] + suboffset\n */\n    __pyx_t_2 = ((!(__pyx_v_is_slice != 0)) != 0);\n    if (__pyx_t_2) {\n\n      /* \"View.MemoryView\":896\n *     if suboffset >= 0:\n *         if not is_slice:\n *             if new_ndim == 0:             # <<<<<<<<<<<<<<\n *                 dst.data = (<char **> dst.data)[0] + suboffset\n *             else:\n */\n      __pyx_t_2 = ((__pyx_v_new_ndim == 0) != 0);\n      if (__pyx_t_2) {\n\n        /* \"View.MemoryView\":897\n *         if not is_slice:\n *             if new_ndim == 0:\n *                 dst.data = (<char **> dst.data)[0] + suboffset             # <<<<<<<<<<<<<<\n *             else:\n *                 _err_dim(IndexError, \"All dimensions preceding dimension %d \"\n */\n        __pyx_v_dst->data = ((((char **)__pyx_v_dst->data)[0]) + __pyx_v_suboffset);\n\n        /* \"View.MemoryView\":896\n *     if suboffset >= 0:\n *         if not is_slice:\n *             if new_ndim == 0:             # <<<<<<<<<<<<<<\n *                 dst.data = (<char **> dst.data)[0] + suboffset\n *             else:\n */\n        goto __pyx_L26;\n      }\n\n      /* \"View.MemoryView\":899\n *                 dst.data = (<char **> dst.data)[0] + suboffset\n *             else:\n *                 _err_dim(IndexError, \"All dimensions preceding dimension %d \"             # <<<<<<<<<<<<<<\n *                                      \"must be indexed and not sliced\", dim)\n *         else:\n */\n      /*else*/ {\n\n        /* \"View.MemoryView\":900\n *             else:\n *                 _err_dim(IndexError, \"All dimensions preceding dimension %d \"\n *                                      \"must be indexed and not sliced\", dim)             # <<<<<<<<<<<<<<\n *         else:\n *             suboffset_dim[0] = new_ndim\n */\n        __pyx_t_3 = __pyx_memoryview_err_dim(__pyx_builtin_IndexError, ((char *)\"All dimensions preceding dimension %d must be indexed and not sliced\"), __pyx_v_dim); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 899, __pyx_L1_error)\n      }\n      __pyx_L26:;\n\n      /* \"View.MemoryView\":895\n * \n *     if suboffset >= 0:\n *         if not is_slice:             # <<<<<<<<<<<<<<\n *             if new_ndim == 0:\n *                 dst.data = (<char **> dst.data)[0] + suboffset\n */\n      goto __pyx_L25;\n    }\n\n    /* \"View.MemoryView\":902\n *                                      \"must be indexed and not sliced\", dim)\n *         else:\n *             suboffset_dim[0] = new_ndim             # <<<<<<<<<<<<<<\n * \n *     return 0\n */\n    /*else*/ {\n      (__pyx_v_suboffset_dim[0]) = __pyx_v_new_ndim;\n    }\n    __pyx_L25:;\n\n    /* \"View.MemoryView\":894\n *         dst.suboffsets[suboffset_dim[0]] += start * stride\n * \n *     if suboffset >= 0:             # <<<<<<<<<<<<<<\n *         if not is_slice:\n *             if new_ndim == 0:\n */\n  }\n\n  /* \"View.MemoryView\":904\n *             suboffset_dim[0] = new_ndim\n * \n *     return 0             # <<<<<<<<<<<<<<\n * \n * \n */\n  __pyx_r = 0;\n  goto __pyx_L0;\n\n  /* \"View.MemoryView\":807\n * \n * @cname('__pyx_memoryview_slice_memviewslice')\n * cdef int slice_memviewslice(             # <<<<<<<<<<<<<<\n *         __Pyx_memviewslice *dst,\n *         Py_ssize_t shape, Py_ssize_t stride, Py_ssize_t suboffset,\n */\n\n  /* function exit code */\n  __pyx_L1_error:;\n  {\n    #ifdef WITH_THREAD\n    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();\n    #endif\n    __Pyx_AddTraceback(\"View.MemoryView.slice_memviewslice\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n    #ifdef WITH_THREAD\n    __Pyx_PyGILState_Release(__pyx_gilstate_save);\n    #endif\n  }\n  __pyx_r = -1;\n  __pyx_L0:;\n  return __pyx_r;\n}\n\n/* \"View.MemoryView\":910\n * \n * @cname('__pyx_pybuffer_index')\n * cdef char *pybuffer_index(Py_buffer *view, char *bufp, Py_ssize_t index,             # <<<<<<<<<<<<<<\n *                           Py_ssize_t dim) except NULL:\n *     cdef Py_ssize_t shape, stride, suboffset = -1\n */\n\nstatic char *__pyx_pybuffer_index(Py_buffer *__pyx_v_view, char *__pyx_v_bufp, Py_ssize_t __pyx_v_index, Py_ssize_t __pyx_v_dim) {\n  Py_ssize_t __pyx_v_shape;\n  Py_ssize_t __pyx_v_stride;\n  Py_ssize_t __pyx_v_suboffset;\n  Py_ssize_t __pyx_v_itemsize;\n  char *__pyx_v_resultp;\n  char *__pyx_r;\n  __Pyx_RefNannyDeclarations\n  Py_ssize_t __pyx_t_1;\n  int __pyx_t_2;\n  PyObject *__pyx_t_3 = NULL;\n  PyObject *__pyx_t_4 = NULL;\n  int __pyx_lineno = 0;\n  const char *__pyx_filename = NULL;\n  int __pyx_clineno = 0;\n  __Pyx_RefNannySetupContext(\"pybuffer_index\", 0);\n\n  /* \"View.MemoryView\":912\n * cdef char *pybuffer_index(Py_buffer *view, char *bufp, Py_ssize_t index,\n *                           Py_ssize_t dim) except NULL:\n *     cdef Py_ssize_t shape, stride, suboffset = -1             # <<<<<<<<<<<<<<\n *     cdef Py_ssize_t itemsize = view.itemsize\n *     cdef char *resultp\n */\n  __pyx_v_suboffset = -1L;\n\n  /* \"View.MemoryView\":913\n *                           Py_ssize_t dim) except NULL:\n *     cdef Py_ssize_t shape, stride, suboffset = -1\n *     cdef Py_ssize_t itemsize = view.itemsize             # <<<<<<<<<<<<<<\n *     cdef char *resultp\n * \n */\n  __pyx_t_1 = __pyx_v_view->itemsize;\n  __pyx_v_itemsize = __pyx_t_1;\n\n  /* \"View.MemoryView\":916\n *     cdef char *resultp\n * \n *     if view.ndim == 0:             # <<<<<<<<<<<<<<\n *         shape = view.len / itemsize\n *         stride = itemsize\n */\n  __pyx_t_2 = ((__pyx_v_view->ndim == 0) != 0);\n  if (__pyx_t_2) {\n\n    /* \"View.MemoryView\":917\n * \n *     if view.ndim == 0:\n *         shape = view.len / itemsize             # <<<<<<<<<<<<<<\n *         stride = itemsize\n *     else:\n */\n    if (unlikely(__pyx_v_itemsize == 0)) {\n      PyErr_SetString(PyExc_ZeroDivisionError, \"integer division or modulo by zero\");\n      __PYX_ERR(1, 917, __pyx_L1_error)\n    }\n    else if (sizeof(Py_ssize_t) == sizeof(long) && (!(((Py_ssize_t)-1) > 0)) && unlikely(__pyx_v_itemsize == (Py_ssize_t)-1)  && unlikely(UNARY_NEG_WOULD_OVERFLOW(__pyx_v_view->len))) {\n      PyErr_SetString(PyExc_OverflowError, \"value too large to perform division\");\n      __PYX_ERR(1, 917, __pyx_L1_error)\n    }\n    __pyx_v_shape = (__pyx_v_view->len / __pyx_v_itemsize);\n\n    /* \"View.MemoryView\":918\n *     if view.ndim == 0:\n *         shape = view.len / itemsize\n *         stride = itemsize             # <<<<<<<<<<<<<<\n *     else:\n *         shape = view.shape[dim]\n */\n    __pyx_v_stride = __pyx_v_itemsize;\n\n    /* \"View.MemoryView\":916\n *     cdef char *resultp\n * \n *     if view.ndim == 0:             # <<<<<<<<<<<<<<\n *         shape = view.len / itemsize\n *         stride = itemsize\n */\n    goto __pyx_L3;\n  }\n\n  /* \"View.MemoryView\":920\n *         stride = itemsize\n *     else:\n *         shape = view.shape[dim]             # <<<<<<<<<<<<<<\n *         stride = view.strides[dim]\n *         if view.suboffsets != NULL:\n */\n  /*else*/ {\n    __pyx_v_shape = (__pyx_v_view->shape[__pyx_v_dim]);\n\n    /* \"View.MemoryView\":921\n *     else:\n *         shape = view.shape[dim]\n *         stride = view.strides[dim]             # <<<<<<<<<<<<<<\n *         if view.suboffsets != NULL:\n *             suboffset = view.suboffsets[dim]\n */\n    __pyx_v_stride = (__pyx_v_view->strides[__pyx_v_dim]);\n\n    /* \"View.MemoryView\":922\n *         shape = view.shape[dim]\n *         stride = view.strides[dim]\n *         if view.suboffsets != NULL:             # <<<<<<<<<<<<<<\n *             suboffset = view.suboffsets[dim]\n * \n */\n    __pyx_t_2 = ((__pyx_v_view->suboffsets != NULL) != 0);\n    if (__pyx_t_2) {\n\n      /* \"View.MemoryView\":923\n *         stride = view.strides[dim]\n *         if view.suboffsets != NULL:\n *             suboffset = view.suboffsets[dim]             # <<<<<<<<<<<<<<\n * \n *     if index < 0:\n */\n      __pyx_v_suboffset = (__pyx_v_view->suboffsets[__pyx_v_dim]);\n\n      /* \"View.MemoryView\":922\n *         shape = view.shape[dim]\n *         stride = view.strides[dim]\n *         if view.suboffsets != NULL:             # <<<<<<<<<<<<<<\n *             suboffset = view.suboffsets[dim]\n * \n */\n    }\n  }\n  __pyx_L3:;\n\n  /* \"View.MemoryView\":925\n *             suboffset = view.suboffsets[dim]\n * \n *     if index < 0:             # <<<<<<<<<<<<<<\n *         index += view.shape[dim]\n *         if index < 0:\n */\n  __pyx_t_2 = ((__pyx_v_index < 0) != 0);\n  if (__pyx_t_2) {\n\n    /* \"View.MemoryView\":926\n * \n *     if index < 0:\n *         index += view.shape[dim]             # <<<<<<<<<<<<<<\n *         if index < 0:\n *             raise IndexError(\"Out of bounds on buffer access (axis %d)\" % dim)\n */\n    __pyx_v_index = (__pyx_v_index + (__pyx_v_view->shape[__pyx_v_dim]));\n\n    /* \"View.MemoryView\":927\n *     if index < 0:\n *         index += view.shape[dim]\n *         if index < 0:             # <<<<<<<<<<<<<<\n *             raise IndexError(\"Out of bounds on buffer access (axis %d)\" % dim)\n * \n */\n    __pyx_t_2 = ((__pyx_v_index < 0) != 0);\n    if (unlikely(__pyx_t_2)) {\n\n      /* \"View.MemoryView\":928\n *         index += view.shape[dim]\n *         if index < 0:\n *             raise IndexError(\"Out of bounds on buffer access (axis %d)\" % dim)             # <<<<<<<<<<<<<<\n * \n *     if index >= shape:\n */\n      __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_dim); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 928, __pyx_L1_error)\n      __Pyx_GOTREF(__pyx_t_3);\n      __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Out_of_bounds_on_buffer_access_a, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 928, __pyx_L1_error)\n      __Pyx_GOTREF(__pyx_t_4);\n      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;\n      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_IndexError, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 928, __pyx_L1_error)\n      __Pyx_GOTREF(__pyx_t_3);\n      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;\n      __Pyx_Raise(__pyx_t_3, 0, 0, 0);\n      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;\n      __PYX_ERR(1, 928, __pyx_L1_error)\n\n      /* \"View.MemoryView\":927\n *     if index < 0:\n *         index += view.shape[dim]\n *         if index < 0:             # <<<<<<<<<<<<<<\n *             raise IndexError(\"Out of bounds on buffer access (axis %d)\" % dim)\n * \n */\n    }\n\n    /* \"View.MemoryView\":925\n *             suboffset = view.suboffsets[dim]\n * \n *     if index < 0:             # <<<<<<<<<<<<<<\n *         index += view.shape[dim]\n *         if index < 0:\n */\n  }\n\n  /* \"View.MemoryView\":930\n *             raise IndexError(\"Out of bounds on buffer access (axis %d)\" % dim)\n * \n *     if index >= shape:             # <<<<<<<<<<<<<<\n *         raise IndexError(\"Out of bounds on buffer access (axis %d)\" % dim)\n * \n */\n  __pyx_t_2 = ((__pyx_v_index >= __pyx_v_shape) != 0);\n  if (unlikely(__pyx_t_2)) {\n\n    /* \"View.MemoryView\":931\n * \n *     if index >= shape:\n *         raise IndexError(\"Out of bounds on buffer access (axis %d)\" % dim)             # <<<<<<<<<<<<<<\n * \n *     resultp = bufp + index * stride\n */\n    __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_dim); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 931, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_3);\n    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Out_of_bounds_on_buffer_access_a, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 931, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_4);\n    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;\n    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_IndexError, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 931, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_3);\n    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;\n    __Pyx_Raise(__pyx_t_3, 0, 0, 0);\n    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;\n    __PYX_ERR(1, 931, __pyx_L1_error)\n\n    /* \"View.MemoryView\":930\n *             raise IndexError(\"Out of bounds on buffer access (axis %d)\" % dim)\n * \n *     if index >= shape:             # <<<<<<<<<<<<<<\n *         raise IndexError(\"Out of bounds on buffer access (axis %d)\" % dim)\n * \n */\n  }\n\n  /* \"View.MemoryView\":933\n *         raise IndexError(\"Out of bounds on buffer access (axis %d)\" % dim)\n * \n *     resultp = bufp + index * stride             # <<<<<<<<<<<<<<\n *     if suboffset >= 0:\n *         resultp = (<char **> resultp)[0] + suboffset\n */\n  __pyx_v_resultp = (__pyx_v_bufp + (__pyx_v_index * __pyx_v_stride));\n\n  /* \"View.MemoryView\":934\n * \n *     resultp = bufp + index * stride\n *     if suboffset >= 0:             # <<<<<<<<<<<<<<\n *         resultp = (<char **> resultp)[0] + suboffset\n * \n */\n  __pyx_t_2 = ((__pyx_v_suboffset >= 0) != 0);\n  if (__pyx_t_2) {\n\n    /* \"View.MemoryView\":935\n *     resultp = bufp + index * stride\n *     if suboffset >= 0:\n *         resultp = (<char **> resultp)[0] + suboffset             # <<<<<<<<<<<<<<\n * \n *     return resultp\n */\n    __pyx_v_resultp = ((((char **)__pyx_v_resultp)[0]) + __pyx_v_suboffset);\n\n    /* \"View.MemoryView\":934\n * \n *     resultp = bufp + index * stride\n *     if suboffset >= 0:             # <<<<<<<<<<<<<<\n *         resultp = (<char **> resultp)[0] + suboffset\n * \n */\n  }\n\n  /* \"View.MemoryView\":937\n *         resultp = (<char **> resultp)[0] + suboffset\n * \n *     return resultp             # <<<<<<<<<<<<<<\n * \n * \n */\n  __pyx_r = __pyx_v_resultp;\n  goto __pyx_L0;\n\n  /* \"View.MemoryView\":910\n * \n * @cname('__pyx_pybuffer_index')\n * cdef char *pybuffer_index(Py_buffer *view, char *bufp, Py_ssize_t index,             # <<<<<<<<<<<<<<\n *                           Py_ssize_t dim) except NULL:\n *     cdef Py_ssize_t shape, stride, suboffset = -1\n */\n\n  /* function exit code */\n  __pyx_L1_error:;\n  __Pyx_XDECREF(__pyx_t_3);\n  __Pyx_XDECREF(__pyx_t_4);\n  __Pyx_AddTraceback(\"View.MemoryView.pybuffer_index\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n  __pyx_r = NULL;\n  __pyx_L0:;\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\n/* \"View.MemoryView\":943\n * \n * @cname('__pyx_memslice_transpose')\n * cdef int transpose_memslice(__Pyx_memviewslice *memslice) nogil except 0:             # <<<<<<<<<<<<<<\n *     cdef int ndim = memslice.memview.view.ndim\n * \n */\n\nstatic int __pyx_memslice_transpose(__Pyx_memviewslice *__pyx_v_memslice) {\n  int __pyx_v_ndim;\n  Py_ssize_t *__pyx_v_shape;\n  Py_ssize_t *__pyx_v_strides;\n  int __pyx_v_i;\n  int __pyx_v_j;\n  int __pyx_r;\n  int __pyx_t_1;\n  Py_ssize_t *__pyx_t_2;\n  long __pyx_t_3;\n  long __pyx_t_4;\n  Py_ssize_t __pyx_t_5;\n  Py_ssize_t __pyx_t_6;\n  int __pyx_t_7;\n  int __pyx_t_8;\n  int __pyx_t_9;\n  int __pyx_lineno = 0;\n  const char *__pyx_filename = NULL;\n  int __pyx_clineno = 0;\n\n  /* \"View.MemoryView\":944\n * @cname('__pyx_memslice_transpose')\n * cdef int transpose_memslice(__Pyx_memviewslice *memslice) nogil except 0:\n *     cdef int ndim = memslice.memview.view.ndim             # <<<<<<<<<<<<<<\n * \n *     cdef Py_ssize_t *shape = memslice.shape\n */\n  __pyx_t_1 = __pyx_v_memslice->memview->view.ndim;\n  __pyx_v_ndim = __pyx_t_1;\n\n  /* \"View.MemoryView\":946\n *     cdef int ndim = memslice.memview.view.ndim\n * \n *     cdef Py_ssize_t *shape = memslice.shape             # <<<<<<<<<<<<<<\n *     cdef Py_ssize_t *strides = memslice.strides\n * \n */\n  __pyx_t_2 = __pyx_v_memslice->shape;\n  __pyx_v_shape = __pyx_t_2;\n\n  /* \"View.MemoryView\":947\n * \n *     cdef Py_ssize_t *shape = memslice.shape\n *     cdef Py_ssize_t *strides = memslice.strides             # <<<<<<<<<<<<<<\n * \n * \n */\n  __pyx_t_2 = __pyx_v_memslice->strides;\n  __pyx_v_strides = __pyx_t_2;\n\n  /* \"View.MemoryView\":951\n * \n *     cdef int i, j\n *     for i in range(ndim / 2):             # <<<<<<<<<<<<<<\n *         j = ndim - 1 - i\n *         strides[i], strides[j] = strides[j], strides[i]\n */\n  __pyx_t_3 = (__pyx_v_ndim / 2);\n  __pyx_t_4 = __pyx_t_3;\n  for (__pyx_t_1 = 0; __pyx_t_1 < __pyx_t_4; __pyx_t_1+=1) {\n    __pyx_v_i = __pyx_t_1;\n\n    /* \"View.MemoryView\":952\n *     cdef int i, j\n *     for i in range(ndim / 2):\n *         j = ndim - 1 - i             # <<<<<<<<<<<<<<\n *         strides[i], strides[j] = strides[j], strides[i]\n *         shape[i], shape[j] = shape[j], shape[i]\n */\n    __pyx_v_j = ((__pyx_v_ndim - 1) - __pyx_v_i);\n\n    /* \"View.MemoryView\":953\n *     for i in range(ndim / 2):\n *         j = ndim - 1 - i\n *         strides[i], strides[j] = strides[j], strides[i]             # <<<<<<<<<<<<<<\n *         shape[i], shape[j] = shape[j], shape[i]\n * \n */\n    __pyx_t_5 = (__pyx_v_strides[__pyx_v_j]);\n    __pyx_t_6 = (__pyx_v_strides[__pyx_v_i]);\n    (__pyx_v_strides[__pyx_v_i]) = __pyx_t_5;\n    (__pyx_v_strides[__pyx_v_j]) = __pyx_t_6;\n\n    /* \"View.MemoryView\":954\n *         j = ndim - 1 - i\n *         strides[i], strides[j] = strides[j], strides[i]\n *         shape[i], shape[j] = shape[j], shape[i]             # <<<<<<<<<<<<<<\n * \n *         if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0:\n */\n    __pyx_t_6 = (__pyx_v_shape[__pyx_v_j]);\n    __pyx_t_5 = (__pyx_v_shape[__pyx_v_i]);\n    (__pyx_v_shape[__pyx_v_i]) = __pyx_t_6;\n    (__pyx_v_shape[__pyx_v_j]) = __pyx_t_5;\n\n    /* \"View.MemoryView\":956\n *         shape[i], shape[j] = shape[j], shape[i]\n * \n *         if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0:             # <<<<<<<<<<<<<<\n *             _err(ValueError, \"Cannot transpose memoryview with indirect dimensions\")\n * \n */\n    __pyx_t_8 = (((__pyx_v_memslice->suboffsets[__pyx_v_i]) >= 0) != 0);\n    if (!__pyx_t_8) {\n    } else {\n      __pyx_t_7 = __pyx_t_8;\n      goto __pyx_L6_bool_binop_done;\n    }\n    __pyx_t_8 = (((__pyx_v_memslice->suboffsets[__pyx_v_j]) >= 0) != 0);\n    __pyx_t_7 = __pyx_t_8;\n    __pyx_L6_bool_binop_done:;\n    if (__pyx_t_7) {\n\n      /* \"View.MemoryView\":957\n * \n *         if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0:\n *             _err(ValueError, \"Cannot transpose memoryview with indirect dimensions\")             # <<<<<<<<<<<<<<\n * \n *     return 1\n */\n      __pyx_t_9 = __pyx_memoryview_err(__pyx_builtin_ValueError, ((char *)\"Cannot transpose memoryview with indirect dimensions\")); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(1, 957, __pyx_L1_error)\n\n      /* \"View.MemoryView\":956\n *         shape[i], shape[j] = shape[j], shape[i]\n * \n *         if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0:             # <<<<<<<<<<<<<<\n *             _err(ValueError, \"Cannot transpose memoryview with indirect dimensions\")\n * \n */\n    }\n  }\n\n  /* \"View.MemoryView\":959\n *             _err(ValueError, \"Cannot transpose memoryview with indirect dimensions\")\n * \n *     return 1             # <<<<<<<<<<<<<<\n * \n * \n */\n  __pyx_r = 1;\n  goto __pyx_L0;\n\n  /* \"View.MemoryView\":943\n * \n * @cname('__pyx_memslice_transpose')\n * cdef int transpose_memslice(__Pyx_memviewslice *memslice) nogil except 0:             # <<<<<<<<<<<<<<\n *     cdef int ndim = memslice.memview.view.ndim\n * \n */\n\n  /* function exit code */\n  __pyx_L1_error:;\n  {\n    #ifdef WITH_THREAD\n    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();\n    #endif\n    __Pyx_AddTraceback(\"View.MemoryView.transpose_memslice\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n    #ifdef WITH_THREAD\n    __Pyx_PyGILState_Release(__pyx_gilstate_save);\n    #endif\n  }\n  __pyx_r = 0;\n  __pyx_L0:;\n  return __pyx_r;\n}\n\n/* \"View.MemoryView\":976\n *     cdef int (*to_dtype_func)(char *, object) except 0\n * \n *     def __dealloc__(self):             # <<<<<<<<<<<<<<\n *         __PYX_XDEC_MEMVIEW(&self.from_slice, 1)\n * \n */\n\n/* Python wrapper */\nstatic void __pyx_memoryviewslice___dealloc__(PyObject *__pyx_v_self); /*proto*/\nstatic void __pyx_memoryviewslice___dealloc__(PyObject *__pyx_v_self) {\n  __Pyx_RefNannyDeclarations\n  __Pyx_RefNannySetupContext(\"__dealloc__ (wrapper)\", 0);\n  __pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memoryviewslice___dealloc__(((struct __pyx_memoryviewslice_obj *)__pyx_v_self));\n\n  /* function exit code */\n  __Pyx_RefNannyFinishContext();\n}\n\nstatic void __pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memoryviewslice___dealloc__(struct __pyx_memoryviewslice_obj *__pyx_v_self) {\n  __Pyx_RefNannyDeclarations\n  __Pyx_RefNannySetupContext(\"__dealloc__\", 0);\n\n  /* \"View.MemoryView\":977\n * \n *     def __dealloc__(self):\n *         __PYX_XDEC_MEMVIEW(&self.from_slice, 1)             # <<<<<<<<<<<<<<\n * \n *     cdef convert_item_to_object(self, char *itemp):\n */\n  __PYX_XDEC_MEMVIEW((&__pyx_v_self->from_slice), 1);\n\n  /* \"View.MemoryView\":976\n *     cdef int (*to_dtype_func)(char *, object) except 0\n * \n *     def __dealloc__(self):             # <<<<<<<<<<<<<<\n *         __PYX_XDEC_MEMVIEW(&self.from_slice, 1)\n * \n */\n\n  /* function exit code */\n  __Pyx_RefNannyFinishContext();\n}\n\n/* \"View.MemoryView\":979\n *         __PYX_XDEC_MEMVIEW(&self.from_slice, 1)\n * \n *     cdef convert_item_to_object(self, char *itemp):             # <<<<<<<<<<<<<<\n *         if self.to_object_func != NULL:\n *             return self.to_object_func(itemp)\n */\n\nstatic PyObject *__pyx_memoryviewslice_convert_item_to_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp) {\n  PyObject *__pyx_r = NULL;\n  __Pyx_RefNannyDeclarations\n  int __pyx_t_1;\n  PyObject *__pyx_t_2 = NULL;\n  int __pyx_lineno = 0;\n  const char *__pyx_filename = NULL;\n  int __pyx_clineno = 0;\n  __Pyx_RefNannySetupContext(\"convert_item_to_object\", 0);\n\n  /* \"View.MemoryView\":980\n * \n *     cdef convert_item_to_object(self, char *itemp):\n *         if self.to_object_func != NULL:             # <<<<<<<<<<<<<<\n *             return self.to_object_func(itemp)\n *         else:\n */\n  __pyx_t_1 = ((__pyx_v_self->to_object_func != NULL) != 0);\n  if (__pyx_t_1) {\n\n    /* \"View.MemoryView\":981\n *     cdef convert_item_to_object(self, char *itemp):\n *         if self.to_object_func != NULL:\n *             return self.to_object_func(itemp)             # <<<<<<<<<<<<<<\n *         else:\n *             return memoryview.convert_item_to_object(self, itemp)\n */\n    __Pyx_XDECREF(__pyx_r);\n    __pyx_t_2 = __pyx_v_self->to_object_func(__pyx_v_itemp); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 981, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_2);\n    __pyx_r = __pyx_t_2;\n    __pyx_t_2 = 0;\n    goto __pyx_L0;\n\n    /* \"View.MemoryView\":980\n * \n *     cdef convert_item_to_object(self, char *itemp):\n *         if self.to_object_func != NULL:             # <<<<<<<<<<<<<<\n *             return self.to_object_func(itemp)\n *         else:\n */\n  }\n\n  /* \"View.MemoryView\":983\n *             return self.to_object_func(itemp)\n *         else:\n *             return memoryview.convert_item_to_object(self, itemp)             # <<<<<<<<<<<<<<\n * \n *     cdef assign_item_from_object(self, char *itemp, object value):\n */\n  /*else*/ {\n    __Pyx_XDECREF(__pyx_r);\n    __pyx_t_2 = __pyx_memoryview_convert_item_to_object(((struct __pyx_memoryview_obj *)__pyx_v_self), __pyx_v_itemp); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 983, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_2);\n    __pyx_r = __pyx_t_2;\n    __pyx_t_2 = 0;\n    goto __pyx_L0;\n  }\n\n  /* \"View.MemoryView\":979\n *         __PYX_XDEC_MEMVIEW(&self.from_slice, 1)\n * \n *     cdef convert_item_to_object(self, char *itemp):             # <<<<<<<<<<<<<<\n *         if self.to_object_func != NULL:\n *             return self.to_object_func(itemp)\n */\n\n  /* function exit code */\n  __pyx_L1_error:;\n  __Pyx_XDECREF(__pyx_t_2);\n  __Pyx_AddTraceback(\"View.MemoryView._memoryviewslice.convert_item_to_object\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n  __pyx_r = 0;\n  __pyx_L0:;\n  __Pyx_XGIVEREF(__pyx_r);\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\n/* \"View.MemoryView\":985\n *             return memoryview.convert_item_to_object(self, itemp)\n * \n *     cdef assign_item_from_object(self, char *itemp, object value):             # <<<<<<<<<<<<<<\n *         if self.to_dtype_func != NULL:\n *             self.to_dtype_func(itemp, value)\n */\n\nstatic PyObject *__pyx_memoryviewslice_assign_item_from_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value) {\n  PyObject *__pyx_r = NULL;\n  __Pyx_RefNannyDeclarations\n  int __pyx_t_1;\n  int __pyx_t_2;\n  PyObject *__pyx_t_3 = NULL;\n  int __pyx_lineno = 0;\n  const char *__pyx_filename = NULL;\n  int __pyx_clineno = 0;\n  __Pyx_RefNannySetupContext(\"assign_item_from_object\", 0);\n\n  /* \"View.MemoryView\":986\n * \n *     cdef assign_item_from_object(self, char *itemp, object value):\n *         if self.to_dtype_func != NULL:             # <<<<<<<<<<<<<<\n *             self.to_dtype_func(itemp, value)\n *         else:\n */\n  __pyx_t_1 = ((__pyx_v_self->to_dtype_func != NULL) != 0);\n  if (__pyx_t_1) {\n\n    /* \"View.MemoryView\":987\n *     cdef assign_item_from_object(self, char *itemp, object value):\n *         if self.to_dtype_func != NULL:\n *             self.to_dtype_func(itemp, value)             # <<<<<<<<<<<<<<\n *         else:\n *             memoryview.assign_item_from_object(self, itemp, value)\n */\n    __pyx_t_2 = __pyx_v_self->to_dtype_func(__pyx_v_itemp, __pyx_v_value); if (unlikely(__pyx_t_2 == ((int)0))) __PYX_ERR(1, 987, __pyx_L1_error)\n\n    /* \"View.MemoryView\":986\n * \n *     cdef assign_item_from_object(self, char *itemp, object value):\n *         if self.to_dtype_func != NULL:             # <<<<<<<<<<<<<<\n *             self.to_dtype_func(itemp, value)\n *         else:\n */\n    goto __pyx_L3;\n  }\n\n  /* \"View.MemoryView\":989\n *             self.to_dtype_func(itemp, value)\n *         else:\n *             memoryview.assign_item_from_object(self, itemp, value)             # <<<<<<<<<<<<<<\n * \n *     @property\n */\n  /*else*/ {\n    __pyx_t_3 = __pyx_memoryview_assign_item_from_object(((struct __pyx_memoryview_obj *)__pyx_v_self), __pyx_v_itemp, __pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 989, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_3);\n    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;\n  }\n  __pyx_L3:;\n\n  /* \"View.MemoryView\":985\n *             return memoryview.convert_item_to_object(self, itemp)\n * \n *     cdef assign_item_from_object(self, char *itemp, object value):             # <<<<<<<<<<<<<<\n *         if self.to_dtype_func != NULL:\n *             self.to_dtype_func(itemp, value)\n */\n\n  /* function exit code */\n  __pyx_r = Py_None; __Pyx_INCREF(Py_None);\n  goto __pyx_L0;\n  __pyx_L1_error:;\n  __Pyx_XDECREF(__pyx_t_3);\n  __Pyx_AddTraceback(\"View.MemoryView._memoryviewslice.assign_item_from_object\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n  __pyx_r = 0;\n  __pyx_L0:;\n  __Pyx_XGIVEREF(__pyx_r);\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\n/* \"View.MemoryView\":992\n * \n *     @property\n *     def base(self):             # <<<<<<<<<<<<<<\n *         return self.from_object\n * \n */\n\n/* Python wrapper */\nstatic PyObject *__pyx_pw_15View_dot_MemoryView_16_memoryviewslice_4base_1__get__(PyObject *__pyx_v_self); /*proto*/\nstatic PyObject *__pyx_pw_15View_dot_MemoryView_16_memoryviewslice_4base_1__get__(PyObject *__pyx_v_self) {\n  PyObject *__pyx_r = 0;\n  __Pyx_RefNannyDeclarations\n  __Pyx_RefNannySetupContext(\"__get__ (wrapper)\", 0);\n  __pyx_r = __pyx_pf_15View_dot_MemoryView_16_memoryviewslice_4base___get__(((struct __pyx_memoryviewslice_obj *)__pyx_v_self));\n\n  /* function exit code */\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\nstatic PyObject *__pyx_pf_15View_dot_MemoryView_16_memoryviewslice_4base___get__(struct __pyx_memoryviewslice_obj *__pyx_v_self) {\n  PyObject *__pyx_r = NULL;\n  __Pyx_RefNannyDeclarations\n  __Pyx_RefNannySetupContext(\"__get__\", 0);\n\n  /* \"View.MemoryView\":993\n *     @property\n *     def base(self):\n *         return self.from_object             # <<<<<<<<<<<<<<\n * \n *     __pyx_getbuffer = capsule(<void *> &__pyx_memoryview_getbuffer, \"getbuffer(obj, view, flags)\")\n */\n  __Pyx_XDECREF(__pyx_r);\n  __Pyx_INCREF(__pyx_v_self->from_object);\n  __pyx_r = __pyx_v_self->from_object;\n  goto __pyx_L0;\n\n  /* \"View.MemoryView\":992\n * \n *     @property\n *     def base(self):             # <<<<<<<<<<<<<<\n *         return self.from_object\n * \n */\n\n  /* function exit code */\n  __pyx_L0:;\n  __Pyx_XGIVEREF(__pyx_r);\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\n/* \"(tree fragment)\":1\n * def __reduce_cython__(self):             # <<<<<<<<<<<<<<\n *     raise TypeError(\"no default __reduce__ due to non-trivial __cinit__\")\n * def __setstate_cython__(self, __pyx_state):\n */\n\n/* Python wrapper */\nstatic PyObject *__pyx_pw___pyx_memoryviewslice_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/\nstatic PyObject *__pyx_pw___pyx_memoryviewslice_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {\n  PyObject *__pyx_r = 0;\n  __Pyx_RefNannyDeclarations\n  __Pyx_RefNannySetupContext(\"__reduce_cython__ (wrapper)\", 0);\n  __pyx_r = __pyx_pf___pyx_memoryviewslice___reduce_cython__(((struct __pyx_memoryviewslice_obj *)__pyx_v_self));\n\n  /* function exit code */\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\nstatic PyObject *__pyx_pf___pyx_memoryviewslice___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self) {\n  PyObject *__pyx_r = NULL;\n  __Pyx_RefNannyDeclarations\n  PyObject *__pyx_t_1 = NULL;\n  int __pyx_lineno = 0;\n  const char *__pyx_filename = NULL;\n  int __pyx_clineno = 0;\n  __Pyx_RefNannySetupContext(\"__reduce_cython__\", 0);\n\n  /* \"(tree fragment)\":2\n * def __reduce_cython__(self):\n *     raise TypeError(\"no default __reduce__ due to non-trivial __cinit__\")             # <<<<<<<<<<<<<<\n * def __setstate_cython__(self, __pyx_state):\n *     raise TypeError(\"no default __reduce__ due to non-trivial __cinit__\")\n */\n  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__32, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __Pyx_Raise(__pyx_t_1, 0, 0, 0);\n  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n  __PYX_ERR(1, 2, __pyx_L1_error)\n\n  /* \"(tree fragment)\":1\n * def __reduce_cython__(self):             # <<<<<<<<<<<<<<\n *     raise TypeError(\"no default __reduce__ due to non-trivial __cinit__\")\n * def __setstate_cython__(self, __pyx_state):\n */\n\n  /* function exit code */\n  __pyx_L1_error:;\n  __Pyx_XDECREF(__pyx_t_1);\n  __Pyx_AddTraceback(\"View.MemoryView._memoryviewslice.__reduce_cython__\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n  __pyx_r = NULL;\n  __Pyx_XGIVEREF(__pyx_r);\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\n/* \"(tree fragment)\":3\n * def __reduce_cython__(self):\n *     raise TypeError(\"no default __reduce__ due to non-trivial __cinit__\")\n * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<\n *     raise TypeError(\"no default __reduce__ due to non-trivial __cinit__\")\n */\n\n/* Python wrapper */\nstatic PyObject *__pyx_pw___pyx_memoryviewslice_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/\nstatic PyObject *__pyx_pw___pyx_memoryviewslice_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {\n  PyObject *__pyx_r = 0;\n  __Pyx_RefNannyDeclarations\n  __Pyx_RefNannySetupContext(\"__setstate_cython__ (wrapper)\", 0);\n  __pyx_r = __pyx_pf___pyx_memoryviewslice_2__setstate_cython__(((struct __pyx_memoryviewslice_obj *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));\n\n  /* function exit code */\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\nstatic PyObject *__pyx_pf___pyx_memoryviewslice_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {\n  PyObject *__pyx_r = NULL;\n  __Pyx_RefNannyDeclarations\n  PyObject *__pyx_t_1 = NULL;\n  int __pyx_lineno = 0;\n  const char *__pyx_filename = NULL;\n  int __pyx_clineno = 0;\n  __Pyx_RefNannySetupContext(\"__setstate_cython__\", 0);\n\n  /* \"(tree fragment)\":4\n *     raise TypeError(\"no default __reduce__ due to non-trivial __cinit__\")\n * def __setstate_cython__(self, __pyx_state):\n *     raise TypeError(\"no default __reduce__ due to non-trivial __cinit__\")             # <<<<<<<<<<<<<<\n */\n  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__33, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __Pyx_Raise(__pyx_t_1, 0, 0, 0);\n  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n  __PYX_ERR(1, 4, __pyx_L1_error)\n\n  /* \"(tree fragment)\":3\n * def __reduce_cython__(self):\n *     raise TypeError(\"no default __reduce__ due to non-trivial __cinit__\")\n * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<\n *     raise TypeError(\"no default __reduce__ due to non-trivial __cinit__\")\n */\n\n  /* function exit code */\n  __pyx_L1_error:;\n  __Pyx_XDECREF(__pyx_t_1);\n  __Pyx_AddTraceback(\"View.MemoryView._memoryviewslice.__setstate_cython__\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n  __pyx_r = NULL;\n  __Pyx_XGIVEREF(__pyx_r);\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\n/* \"View.MemoryView\":999\n * \n * @cname('__pyx_memoryview_fromslice')\n * cdef memoryview_fromslice(__Pyx_memviewslice memviewslice,             # <<<<<<<<<<<<<<\n *                           int ndim,\n *                           object (*to_object_func)(char *),\n */\n\nstatic PyObject *__pyx_memoryview_fromslice(__Pyx_memviewslice __pyx_v_memviewslice, int __pyx_v_ndim, PyObject *(*__pyx_v_to_object_func)(char *), int (*__pyx_v_to_dtype_func)(char *, PyObject *), int __pyx_v_dtype_is_object) {\n  struct __pyx_memoryviewslice_obj *__pyx_v_result = 0;\n  Py_ssize_t __pyx_v_suboffset;\n  PyObject *__pyx_v_length = NULL;\n  PyObject *__pyx_r = NULL;\n  __Pyx_RefNannyDeclarations\n  int __pyx_t_1;\n  PyObject *__pyx_t_2 = NULL;\n  PyObject *__pyx_t_3 = NULL;\n  __Pyx_TypeInfo *__pyx_t_4;\n  Py_buffer __pyx_t_5;\n  Py_ssize_t *__pyx_t_6;\n  Py_ssize_t *__pyx_t_7;\n  Py_ssize_t *__pyx_t_8;\n  Py_ssize_t __pyx_t_9;\n  int __pyx_lineno = 0;\n  const char *__pyx_filename = NULL;\n  int __pyx_clineno = 0;\n  __Pyx_RefNannySetupContext(\"memoryview_fromslice\", 0);\n\n  /* \"View.MemoryView\":1007\n *     cdef _memoryviewslice result\n * \n *     if <PyObject *> memviewslice.memview == Py_None:             # <<<<<<<<<<<<<<\n *         return None\n * \n */\n  __pyx_t_1 = ((((PyObject *)__pyx_v_memviewslice.memview) == Py_None) != 0);\n  if (__pyx_t_1) {\n\n    /* \"View.MemoryView\":1008\n * \n *     if <PyObject *> memviewslice.memview == Py_None:\n *         return None             # <<<<<<<<<<<<<<\n * \n * \n */\n    __Pyx_XDECREF(__pyx_r);\n    __pyx_r = Py_None; __Pyx_INCREF(Py_None);\n    goto __pyx_L0;\n\n    /* \"View.MemoryView\":1007\n *     cdef _memoryviewslice result\n * \n *     if <PyObject *> memviewslice.memview == Py_None:             # <<<<<<<<<<<<<<\n *         return None\n * \n */\n  }\n\n  /* \"View.MemoryView\":1013\n * \n * \n *     result = _memoryviewslice(None, 0, dtype_is_object)             # <<<<<<<<<<<<<<\n * \n *     result.from_slice = memviewslice\n */\n  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1013, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_2);\n  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1013, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_3);\n  __Pyx_INCREF(Py_None);\n  __Pyx_GIVEREF(Py_None);\n  PyTuple_SET_ITEM(__pyx_t_3, 0, Py_None);\n  __Pyx_INCREF(__pyx_int_0);\n  __Pyx_GIVEREF(__pyx_int_0);\n  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_0);\n  __Pyx_GIVEREF(__pyx_t_2);\n  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2);\n  __pyx_t_2 = 0;\n  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_memoryviewslice_type), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1013, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_2);\n  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;\n  __pyx_v_result = ((struct __pyx_memoryviewslice_obj *)__pyx_t_2);\n  __pyx_t_2 = 0;\n\n  /* \"View.MemoryView\":1015\n *     result = _memoryviewslice(None, 0, dtype_is_object)\n * \n *     result.from_slice = memviewslice             # <<<<<<<<<<<<<<\n *     __PYX_INC_MEMVIEW(&memviewslice, 1)\n * \n */\n  __pyx_v_result->from_slice = __pyx_v_memviewslice;\n\n  /* \"View.MemoryView\":1016\n * \n *     result.from_slice = memviewslice\n *     __PYX_INC_MEMVIEW(&memviewslice, 1)             # <<<<<<<<<<<<<<\n * \n *     result.from_object = (<memoryview> memviewslice.memview).base\n */\n  __PYX_INC_MEMVIEW((&__pyx_v_memviewslice), 1);\n\n  /* \"View.MemoryView\":1018\n *     __PYX_INC_MEMVIEW(&memviewslice, 1)\n * \n *     result.from_object = (<memoryview> memviewslice.memview).base             # <<<<<<<<<<<<<<\n *     result.typeinfo = memviewslice.memview.typeinfo\n * \n */\n  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_memviewslice.memview), __pyx_n_s_base); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1018, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_2);\n  __Pyx_GIVEREF(__pyx_t_2);\n  __Pyx_GOTREF(__pyx_v_result->from_object);\n  __Pyx_DECREF(__pyx_v_result->from_object);\n  __pyx_v_result->from_object = __pyx_t_2;\n  __pyx_t_2 = 0;\n\n  /* \"View.MemoryView\":1019\n * \n *     result.from_object = (<memoryview> memviewslice.memview).base\n *     result.typeinfo = memviewslice.memview.typeinfo             # <<<<<<<<<<<<<<\n * \n *     result.view = memviewslice.memview.view\n */\n  __pyx_t_4 = __pyx_v_memviewslice.memview->typeinfo;\n  __pyx_v_result->__pyx_base.typeinfo = __pyx_t_4;\n\n  /* \"View.MemoryView\":1021\n *     result.typeinfo = memviewslice.memview.typeinfo\n * \n *     result.view = memviewslice.memview.view             # <<<<<<<<<<<<<<\n *     result.view.buf = <void *> memviewslice.data\n *     result.view.ndim = ndim\n */\n  __pyx_t_5 = __pyx_v_memviewslice.memview->view;\n  __pyx_v_result->__pyx_base.view = __pyx_t_5;\n\n  /* \"View.MemoryView\":1022\n * \n *     result.view = memviewslice.memview.view\n *     result.view.buf = <void *> memviewslice.data             # <<<<<<<<<<<<<<\n *     result.view.ndim = ndim\n *     (<__pyx_buffer *> &result.view).obj = Py_None\n */\n  __pyx_v_result->__pyx_base.view.buf = ((void *)__pyx_v_memviewslice.data);\n\n  /* \"View.MemoryView\":1023\n *     result.view = memviewslice.memview.view\n *     result.view.buf = <void *> memviewslice.data\n *     result.view.ndim = ndim             # <<<<<<<<<<<<<<\n *     (<__pyx_buffer *> &result.view).obj = Py_None\n *     Py_INCREF(Py_None)\n */\n  __pyx_v_result->__pyx_base.view.ndim = __pyx_v_ndim;\n\n  /* \"View.MemoryView\":1024\n *     result.view.buf = <void *> memviewslice.data\n *     result.view.ndim = ndim\n *     (<__pyx_buffer *> &result.view).obj = Py_None             # <<<<<<<<<<<<<<\n *     Py_INCREF(Py_None)\n * \n */\n  ((Py_buffer *)(&__pyx_v_result->__pyx_base.view))->obj = Py_None;\n\n  /* \"View.MemoryView\":1025\n *     result.view.ndim = ndim\n *     (<__pyx_buffer *> &result.view).obj = Py_None\n *     Py_INCREF(Py_None)             # <<<<<<<<<<<<<<\n * \n *     if (<memoryview>memviewslice.memview).flags & PyBUF_WRITABLE:\n */\n  Py_INCREF(Py_None);\n\n  /* \"View.MemoryView\":1027\n *     Py_INCREF(Py_None)\n * \n *     if (<memoryview>memviewslice.memview).flags & PyBUF_WRITABLE:             # <<<<<<<<<<<<<<\n *         result.flags = PyBUF_RECORDS\n *     else:\n */\n  __pyx_t_1 = ((((struct __pyx_memoryview_obj *)__pyx_v_memviewslice.memview)->flags & PyBUF_WRITABLE) != 0);\n  if (__pyx_t_1) {\n\n    /* \"View.MemoryView\":1028\n * \n *     if (<memoryview>memviewslice.memview).flags & PyBUF_WRITABLE:\n *         result.flags = PyBUF_RECORDS             # <<<<<<<<<<<<<<\n *     else:\n *         result.flags = PyBUF_RECORDS_RO\n */\n    __pyx_v_result->__pyx_base.flags = PyBUF_RECORDS;\n\n    /* \"View.MemoryView\":1027\n *     Py_INCREF(Py_None)\n * \n *     if (<memoryview>memviewslice.memview).flags & PyBUF_WRITABLE:             # <<<<<<<<<<<<<<\n *         result.flags = PyBUF_RECORDS\n *     else:\n */\n    goto __pyx_L4;\n  }\n\n  /* \"View.MemoryView\":1030\n *         result.flags = PyBUF_RECORDS\n *     else:\n *         result.flags = PyBUF_RECORDS_RO             # <<<<<<<<<<<<<<\n * \n *     result.view.shape = <Py_ssize_t *> result.from_slice.shape\n */\n  /*else*/ {\n    __pyx_v_result->__pyx_base.flags = PyBUF_RECORDS_RO;\n  }\n  __pyx_L4:;\n\n  /* \"View.MemoryView\":1032\n *         result.flags = PyBUF_RECORDS_RO\n * \n *     result.view.shape = <Py_ssize_t *> result.from_slice.shape             # <<<<<<<<<<<<<<\n *     result.view.strides = <Py_ssize_t *> result.from_slice.strides\n * \n */\n  __pyx_v_result->__pyx_base.view.shape = ((Py_ssize_t *)__pyx_v_result->from_slice.shape);\n\n  /* \"View.MemoryView\":1033\n * \n *     result.view.shape = <Py_ssize_t *> result.from_slice.shape\n *     result.view.strides = <Py_ssize_t *> result.from_slice.strides             # <<<<<<<<<<<<<<\n * \n * \n */\n  __pyx_v_result->__pyx_base.view.strides = ((Py_ssize_t *)__pyx_v_result->from_slice.strides);\n\n  /* \"View.MemoryView\":1036\n * \n * \n *     result.view.suboffsets = NULL             # <<<<<<<<<<<<<<\n *     for suboffset in result.from_slice.suboffsets[:ndim]:\n *         if suboffset >= 0:\n */\n  __pyx_v_result->__pyx_base.view.suboffsets = NULL;\n\n  /* \"View.MemoryView\":1037\n * \n *     result.view.suboffsets = NULL\n *     for suboffset in result.from_slice.suboffsets[:ndim]:             # <<<<<<<<<<<<<<\n *         if suboffset >= 0:\n *             result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets\n */\n  __pyx_t_7 = (__pyx_v_result->from_slice.suboffsets + __pyx_v_ndim);\n  for (__pyx_t_8 = __pyx_v_result->from_slice.suboffsets; __pyx_t_8 < __pyx_t_7; __pyx_t_8++) {\n    __pyx_t_6 = __pyx_t_8;\n    __pyx_v_suboffset = (__pyx_t_6[0]);\n\n    /* \"View.MemoryView\":1038\n *     result.view.suboffsets = NULL\n *     for suboffset in result.from_slice.suboffsets[:ndim]:\n *         if suboffset >= 0:             # <<<<<<<<<<<<<<\n *             result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets\n *             break\n */\n    __pyx_t_1 = ((__pyx_v_suboffset >= 0) != 0);\n    if (__pyx_t_1) {\n\n      /* \"View.MemoryView\":1039\n *     for suboffset in result.from_slice.suboffsets[:ndim]:\n *         if suboffset >= 0:\n *             result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets             # <<<<<<<<<<<<<<\n *             break\n * \n */\n      __pyx_v_result->__pyx_base.view.suboffsets = ((Py_ssize_t *)__pyx_v_result->from_slice.suboffsets);\n\n      /* \"View.MemoryView\":1040\n *         if suboffset >= 0:\n *             result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets\n *             break             # <<<<<<<<<<<<<<\n * \n *     result.view.len = result.view.itemsize\n */\n      goto __pyx_L6_break;\n\n      /* \"View.MemoryView\":1038\n *     result.view.suboffsets = NULL\n *     for suboffset in result.from_slice.suboffsets[:ndim]:\n *         if suboffset >= 0:             # <<<<<<<<<<<<<<\n *             result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets\n *             break\n */\n    }\n  }\n  __pyx_L6_break:;\n\n  /* \"View.MemoryView\":1042\n *             break\n * \n *     result.view.len = result.view.itemsize             # <<<<<<<<<<<<<<\n *     for length in result.view.shape[:ndim]:\n *         result.view.len *= length\n */\n  __pyx_t_9 = __pyx_v_result->__pyx_base.view.itemsize;\n  __pyx_v_result->__pyx_base.view.len = __pyx_t_9;\n\n  /* \"View.MemoryView\":1043\n * \n *     result.view.len = result.view.itemsize\n *     for length in result.view.shape[:ndim]:             # <<<<<<<<<<<<<<\n *         result.view.len *= length\n * \n */\n  __pyx_t_7 = (__pyx_v_result->__pyx_base.view.shape + __pyx_v_ndim);\n  for (__pyx_t_8 = __pyx_v_result->__pyx_base.view.shape; __pyx_t_8 < __pyx_t_7; __pyx_t_8++) {\n    __pyx_t_6 = __pyx_t_8;\n    __pyx_t_2 = PyInt_FromSsize_t((__pyx_t_6[0])); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1043, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_2);\n    __Pyx_XDECREF_SET(__pyx_v_length, __pyx_t_2);\n    __pyx_t_2 = 0;\n\n    /* \"View.MemoryView\":1044\n *     result.view.len = result.view.itemsize\n *     for length in result.view.shape[:ndim]:\n *         result.view.len *= length             # <<<<<<<<<<<<<<\n * \n *     result.to_object_func = to_object_func\n */\n    __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_result->__pyx_base.view.len); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1044, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_2);\n    __pyx_t_3 = PyNumber_InPlaceMultiply(__pyx_t_2, __pyx_v_length); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1044, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_3);\n    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;\n    __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 1044, __pyx_L1_error)\n    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;\n    __pyx_v_result->__pyx_base.view.len = __pyx_t_9;\n  }\n\n  /* \"View.MemoryView\":1046\n *         result.view.len *= length\n * \n *     result.to_object_func = to_object_func             # <<<<<<<<<<<<<<\n *     result.to_dtype_func = to_dtype_func\n * \n */\n  __pyx_v_result->to_object_func = __pyx_v_to_object_func;\n\n  /* \"View.MemoryView\":1047\n * \n *     result.to_object_func = to_object_func\n *     result.to_dtype_func = to_dtype_func             # <<<<<<<<<<<<<<\n * \n *     return result\n */\n  __pyx_v_result->to_dtype_func = __pyx_v_to_dtype_func;\n\n  /* \"View.MemoryView\":1049\n *     result.to_dtype_func = to_dtype_func\n * \n *     return result             # <<<<<<<<<<<<<<\n * \n * @cname('__pyx_memoryview_get_slice_from_memoryview')\n */\n  __Pyx_XDECREF(__pyx_r);\n  __Pyx_INCREF(((PyObject *)__pyx_v_result));\n  __pyx_r = ((PyObject *)__pyx_v_result);\n  goto __pyx_L0;\n\n  /* \"View.MemoryView\":999\n * \n * @cname('__pyx_memoryview_fromslice')\n * cdef memoryview_fromslice(__Pyx_memviewslice memviewslice,             # <<<<<<<<<<<<<<\n *                           int ndim,\n *                           object (*to_object_func)(char *),\n */\n\n  /* function exit code */\n  __pyx_L1_error:;\n  __Pyx_XDECREF(__pyx_t_2);\n  __Pyx_XDECREF(__pyx_t_3);\n  __Pyx_AddTraceback(\"View.MemoryView.memoryview_fromslice\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n  __pyx_r = 0;\n  __pyx_L0:;\n  __Pyx_XDECREF((PyObject *)__pyx_v_result);\n  __Pyx_XDECREF(__pyx_v_length);\n  __Pyx_XGIVEREF(__pyx_r);\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\n/* \"View.MemoryView\":1052\n * \n * @cname('__pyx_memoryview_get_slice_from_memoryview')\n * cdef __Pyx_memviewslice *get_slice_from_memview(memoryview memview,             # <<<<<<<<<<<<<<\n *                                                    __Pyx_memviewslice *mslice) except NULL:\n *     cdef _memoryviewslice obj\n */\n\nstatic __Pyx_memviewslice *__pyx_memoryview_get_slice_from_memoryview(struct __pyx_memoryview_obj *__pyx_v_memview, __Pyx_memviewslice *__pyx_v_mslice) {\n  struct __pyx_memoryviewslice_obj *__pyx_v_obj = 0;\n  __Pyx_memviewslice *__pyx_r;\n  __Pyx_RefNannyDeclarations\n  int __pyx_t_1;\n  int __pyx_t_2;\n  PyObject *__pyx_t_3 = NULL;\n  int __pyx_lineno = 0;\n  const char *__pyx_filename = NULL;\n  int __pyx_clineno = 0;\n  __Pyx_RefNannySetupContext(\"get_slice_from_memview\", 0);\n\n  /* \"View.MemoryView\":1055\n *                                                    __Pyx_memviewslice *mslice) except NULL:\n *     cdef _memoryviewslice obj\n *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<\n *         obj = memview\n *         return &obj.from_slice\n */\n  __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type); \n  __pyx_t_2 = (__pyx_t_1 != 0);\n  if (__pyx_t_2) {\n\n    /* \"View.MemoryView\":1056\n *     cdef _memoryviewslice obj\n *     if isinstance(memview, _memoryviewslice):\n *         obj = memview             # <<<<<<<<<<<<<<\n *         return &obj.from_slice\n *     else:\n */\n    if (!(likely(((((PyObject *)__pyx_v_memview)) == Py_None) || likely(__Pyx_TypeTest(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type))))) __PYX_ERR(1, 1056, __pyx_L1_error)\n    __pyx_t_3 = ((PyObject *)__pyx_v_memview);\n    __Pyx_INCREF(__pyx_t_3);\n    __pyx_v_obj = ((struct __pyx_memoryviewslice_obj *)__pyx_t_3);\n    __pyx_t_3 = 0;\n\n    /* \"View.MemoryView\":1057\n *     if isinstance(memview, _memoryviewslice):\n *         obj = memview\n *         return &obj.from_slice             # <<<<<<<<<<<<<<\n *     else:\n *         slice_copy(memview, mslice)\n */\n    __pyx_r = (&__pyx_v_obj->from_slice);\n    goto __pyx_L0;\n\n    /* \"View.MemoryView\":1055\n *                                                    __Pyx_memviewslice *mslice) except NULL:\n *     cdef _memoryviewslice obj\n *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<\n *         obj = memview\n *         return &obj.from_slice\n */\n  }\n\n  /* \"View.MemoryView\":1059\n *         return &obj.from_slice\n *     else:\n *         slice_copy(memview, mslice)             # <<<<<<<<<<<<<<\n *         return mslice\n * \n */\n  /*else*/ {\n    __pyx_memoryview_slice_copy(__pyx_v_memview, __pyx_v_mslice);\n\n    /* \"View.MemoryView\":1060\n *     else:\n *         slice_copy(memview, mslice)\n *         return mslice             # <<<<<<<<<<<<<<\n * \n * @cname('__pyx_memoryview_slice_copy')\n */\n    __pyx_r = __pyx_v_mslice;\n    goto __pyx_L0;\n  }\n\n  /* \"View.MemoryView\":1052\n * \n * @cname('__pyx_memoryview_get_slice_from_memoryview')\n * cdef __Pyx_memviewslice *get_slice_from_memview(memoryview memview,             # <<<<<<<<<<<<<<\n *                                                    __Pyx_memviewslice *mslice) except NULL:\n *     cdef _memoryviewslice obj\n */\n\n  /* function exit code */\n  __pyx_L1_error:;\n  __Pyx_XDECREF(__pyx_t_3);\n  __Pyx_AddTraceback(\"View.MemoryView.get_slice_from_memview\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n  __pyx_r = NULL;\n  __pyx_L0:;\n  __Pyx_XDECREF((PyObject *)__pyx_v_obj);\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\n/* \"View.MemoryView\":1063\n * \n * @cname('__pyx_memoryview_slice_copy')\n * cdef void slice_copy(memoryview memview, __Pyx_memviewslice *dst):             # <<<<<<<<<<<<<<\n *     cdef int dim\n *     cdef (Py_ssize_t*) shape, strides, suboffsets\n */\n\nstatic void __pyx_memoryview_slice_copy(struct __pyx_memoryview_obj *__pyx_v_memview, __Pyx_memviewslice *__pyx_v_dst) {\n  int __pyx_v_dim;\n  Py_ssize_t *__pyx_v_shape;\n  Py_ssize_t *__pyx_v_strides;\n  Py_ssize_t *__pyx_v_suboffsets;\n  __Pyx_RefNannyDeclarations\n  Py_ssize_t *__pyx_t_1;\n  int __pyx_t_2;\n  int __pyx_t_3;\n  int __pyx_t_4;\n  Py_ssize_t __pyx_t_5;\n  __Pyx_RefNannySetupContext(\"slice_copy\", 0);\n\n  /* \"View.MemoryView\":1067\n *     cdef (Py_ssize_t*) shape, strides, suboffsets\n * \n *     shape = memview.view.shape             # <<<<<<<<<<<<<<\n *     strides = memview.view.strides\n *     suboffsets = memview.view.suboffsets\n */\n  __pyx_t_1 = __pyx_v_memview->view.shape;\n  __pyx_v_shape = __pyx_t_1;\n\n  /* \"View.MemoryView\":1068\n * \n *     shape = memview.view.shape\n *     strides = memview.view.strides             # <<<<<<<<<<<<<<\n *     suboffsets = memview.view.suboffsets\n * \n */\n  __pyx_t_1 = __pyx_v_memview->view.strides;\n  __pyx_v_strides = __pyx_t_1;\n\n  /* \"View.MemoryView\":1069\n *     shape = memview.view.shape\n *     strides = memview.view.strides\n *     suboffsets = memview.view.suboffsets             # <<<<<<<<<<<<<<\n * \n *     dst.memview = <__pyx_memoryview *> memview\n */\n  __pyx_t_1 = __pyx_v_memview->view.suboffsets;\n  __pyx_v_suboffsets = __pyx_t_1;\n\n  /* \"View.MemoryView\":1071\n *     suboffsets = memview.view.suboffsets\n * \n *     dst.memview = <__pyx_memoryview *> memview             # <<<<<<<<<<<<<<\n *     dst.data = <char *> memview.view.buf\n * \n */\n  __pyx_v_dst->memview = ((struct __pyx_memoryview_obj *)__pyx_v_memview);\n\n  /* \"View.MemoryView\":1072\n * \n *     dst.memview = <__pyx_memoryview *> memview\n *     dst.data = <char *> memview.view.buf             # <<<<<<<<<<<<<<\n * \n *     for dim in range(memview.view.ndim):\n */\n  __pyx_v_dst->data = ((char *)__pyx_v_memview->view.buf);\n\n  /* \"View.MemoryView\":1074\n *     dst.data = <char *> memview.view.buf\n * \n *     for dim in range(memview.view.ndim):             # <<<<<<<<<<<<<<\n *         dst.shape[dim] = shape[dim]\n *         dst.strides[dim] = strides[dim]\n */\n  __pyx_t_2 = __pyx_v_memview->view.ndim;\n  __pyx_t_3 = __pyx_t_2;\n  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {\n    __pyx_v_dim = __pyx_t_4;\n\n    /* \"View.MemoryView\":1075\n * \n *     for dim in range(memview.view.ndim):\n *         dst.shape[dim] = shape[dim]             # <<<<<<<<<<<<<<\n *         dst.strides[dim] = strides[dim]\n *         dst.suboffsets[dim] = suboffsets[dim] if suboffsets else -1\n */\n    (__pyx_v_dst->shape[__pyx_v_dim]) = (__pyx_v_shape[__pyx_v_dim]);\n\n    /* \"View.MemoryView\":1076\n *     for dim in range(memview.view.ndim):\n *         dst.shape[dim] = shape[dim]\n *         dst.strides[dim] = strides[dim]             # <<<<<<<<<<<<<<\n *         dst.suboffsets[dim] = suboffsets[dim] if suboffsets else -1\n * \n */\n    (__pyx_v_dst->strides[__pyx_v_dim]) = (__pyx_v_strides[__pyx_v_dim]);\n\n    /* \"View.MemoryView\":1077\n *         dst.shape[dim] = shape[dim]\n *         dst.strides[dim] = strides[dim]\n *         dst.suboffsets[dim] = suboffsets[dim] if suboffsets else -1             # <<<<<<<<<<<<<<\n * \n * @cname('__pyx_memoryview_copy_object')\n */\n    if ((__pyx_v_suboffsets != 0)) {\n      __pyx_t_5 = (__pyx_v_suboffsets[__pyx_v_dim]);\n    } else {\n      __pyx_t_5 = -1L;\n    }\n    (__pyx_v_dst->suboffsets[__pyx_v_dim]) = __pyx_t_5;\n  }\n\n  /* \"View.MemoryView\":1063\n * \n * @cname('__pyx_memoryview_slice_copy')\n * cdef void slice_copy(memoryview memview, __Pyx_memviewslice *dst):             # <<<<<<<<<<<<<<\n *     cdef int dim\n *     cdef (Py_ssize_t*) shape, strides, suboffsets\n */\n\n  /* function exit code */\n  __Pyx_RefNannyFinishContext();\n}\n\n/* \"View.MemoryView\":1080\n * \n * @cname('__pyx_memoryview_copy_object')\n * cdef memoryview_copy(memoryview memview):             # <<<<<<<<<<<<<<\n *     \"Create a new memoryview object\"\n *     cdef __Pyx_memviewslice memviewslice\n */\n\nstatic PyObject *__pyx_memoryview_copy_object(struct __pyx_memoryview_obj *__pyx_v_memview) {\n  __Pyx_memviewslice __pyx_v_memviewslice;\n  PyObject *__pyx_r = NULL;\n  __Pyx_RefNannyDeclarations\n  PyObject *__pyx_t_1 = NULL;\n  int __pyx_lineno = 0;\n  const char *__pyx_filename = NULL;\n  int __pyx_clineno = 0;\n  __Pyx_RefNannySetupContext(\"memoryview_copy\", 0);\n\n  /* \"View.MemoryView\":1083\n *     \"Create a new memoryview object\"\n *     cdef __Pyx_memviewslice memviewslice\n *     slice_copy(memview, &memviewslice)             # <<<<<<<<<<<<<<\n *     return memoryview_copy_from_slice(memview, &memviewslice)\n * \n */\n  __pyx_memoryview_slice_copy(__pyx_v_memview, (&__pyx_v_memviewslice));\n\n  /* \"View.MemoryView\":1084\n *     cdef __Pyx_memviewslice memviewslice\n *     slice_copy(memview, &memviewslice)\n *     return memoryview_copy_from_slice(memview, &memviewslice)             # <<<<<<<<<<<<<<\n * \n * @cname('__pyx_memoryview_copy_object_from_slice')\n */\n  __Pyx_XDECREF(__pyx_r);\n  __pyx_t_1 = __pyx_memoryview_copy_object_from_slice(__pyx_v_memview, (&__pyx_v_memviewslice)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1084, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __pyx_r = __pyx_t_1;\n  __pyx_t_1 = 0;\n  goto __pyx_L0;\n\n  /* \"View.MemoryView\":1080\n * \n * @cname('__pyx_memoryview_copy_object')\n * cdef memoryview_copy(memoryview memview):             # <<<<<<<<<<<<<<\n *     \"Create a new memoryview object\"\n *     cdef __Pyx_memviewslice memviewslice\n */\n\n  /* function exit code */\n  __pyx_L1_error:;\n  __Pyx_XDECREF(__pyx_t_1);\n  __Pyx_AddTraceback(\"View.MemoryView.memoryview_copy\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n  __pyx_r = 0;\n  __pyx_L0:;\n  __Pyx_XGIVEREF(__pyx_r);\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\n/* \"View.MemoryView\":1087\n * \n * @cname('__pyx_memoryview_copy_object_from_slice')\n * cdef memoryview_copy_from_slice(memoryview memview, __Pyx_memviewslice *memviewslice):             # <<<<<<<<<<<<<<\n *     \"\"\"\n *     Create a new memoryview object from a given memoryview object and slice.\n */\n\nstatic PyObject *__pyx_memoryview_copy_object_from_slice(struct __pyx_memoryview_obj *__pyx_v_memview, __Pyx_memviewslice *__pyx_v_memviewslice) {\n  PyObject *(*__pyx_v_to_object_func)(char *);\n  int (*__pyx_v_to_dtype_func)(char *, PyObject *);\n  PyObject *__pyx_r = NULL;\n  __Pyx_RefNannyDeclarations\n  int __pyx_t_1;\n  int __pyx_t_2;\n  PyObject *(*__pyx_t_3)(char *);\n  int (*__pyx_t_4)(char *, PyObject *);\n  PyObject *__pyx_t_5 = NULL;\n  int __pyx_lineno = 0;\n  const char *__pyx_filename = NULL;\n  int __pyx_clineno = 0;\n  __Pyx_RefNannySetupContext(\"memoryview_copy_from_slice\", 0);\n\n  /* \"View.MemoryView\":1094\n *     cdef int (*to_dtype_func)(char *, object) except 0\n * \n *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<\n *         to_object_func = (<_memoryviewslice> memview).to_object_func\n *         to_dtype_func = (<_memoryviewslice> memview).to_dtype_func\n */\n  __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type); \n  __pyx_t_2 = (__pyx_t_1 != 0);\n  if (__pyx_t_2) {\n\n    /* \"View.MemoryView\":1095\n * \n *     if isinstance(memview, _memoryviewslice):\n *         to_object_func = (<_memoryviewslice> memview).to_object_func             # <<<<<<<<<<<<<<\n *         to_dtype_func = (<_memoryviewslice> memview).to_dtype_func\n *     else:\n */\n    __pyx_t_3 = ((struct __pyx_memoryviewslice_obj *)__pyx_v_memview)->to_object_func;\n    __pyx_v_to_object_func = __pyx_t_3;\n\n    /* \"View.MemoryView\":1096\n *     if isinstance(memview, _memoryviewslice):\n *         to_object_func = (<_memoryviewslice> memview).to_object_func\n *         to_dtype_func = (<_memoryviewslice> memview).to_dtype_func             # <<<<<<<<<<<<<<\n *     else:\n *         to_object_func = NULL\n */\n    __pyx_t_4 = ((struct __pyx_memoryviewslice_obj *)__pyx_v_memview)->to_dtype_func;\n    __pyx_v_to_dtype_func = __pyx_t_4;\n\n    /* \"View.MemoryView\":1094\n *     cdef int (*to_dtype_func)(char *, object) except 0\n * \n *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<\n *         to_object_func = (<_memoryviewslice> memview).to_object_func\n *         to_dtype_func = (<_memoryviewslice> memview).to_dtype_func\n */\n    goto __pyx_L3;\n  }\n\n  /* \"View.MemoryView\":1098\n *         to_dtype_func = (<_memoryviewslice> memview).to_dtype_func\n *     else:\n *         to_object_func = NULL             # <<<<<<<<<<<<<<\n *         to_dtype_func = NULL\n * \n */\n  /*else*/ {\n    __pyx_v_to_object_func = NULL;\n\n    /* \"View.MemoryView\":1099\n *     else:\n *         to_object_func = NULL\n *         to_dtype_func = NULL             # <<<<<<<<<<<<<<\n * \n *     return memoryview_fromslice(memviewslice[0], memview.view.ndim,\n */\n    __pyx_v_to_dtype_func = NULL;\n  }\n  __pyx_L3:;\n\n  /* \"View.MemoryView\":1101\n *         to_dtype_func = NULL\n * \n *     return memoryview_fromslice(memviewslice[0], memview.view.ndim,             # <<<<<<<<<<<<<<\n *                                 to_object_func, to_dtype_func,\n *                                 memview.dtype_is_object)\n */\n  __Pyx_XDECREF(__pyx_r);\n\n  /* \"View.MemoryView\":1103\n *     return memoryview_fromslice(memviewslice[0], memview.view.ndim,\n *                                 to_object_func, to_dtype_func,\n *                                 memview.dtype_is_object)             # <<<<<<<<<<<<<<\n * \n * \n */\n  __pyx_t_5 = __pyx_memoryview_fromslice((__pyx_v_memviewslice[0]), __pyx_v_memview->view.ndim, __pyx_v_to_object_func, __pyx_v_to_dtype_func, __pyx_v_memview->dtype_is_object); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1101, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_5);\n  __pyx_r = __pyx_t_5;\n  __pyx_t_5 = 0;\n  goto __pyx_L0;\n\n  /* \"View.MemoryView\":1087\n * \n * @cname('__pyx_memoryview_copy_object_from_slice')\n * cdef memoryview_copy_from_slice(memoryview memview, __Pyx_memviewslice *memviewslice):             # <<<<<<<<<<<<<<\n *     \"\"\"\n *     Create a new memoryview object from a given memoryview object and slice.\n */\n\n  /* function exit code */\n  __pyx_L1_error:;\n  __Pyx_XDECREF(__pyx_t_5);\n  __Pyx_AddTraceback(\"View.MemoryView.memoryview_copy_from_slice\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n  __pyx_r = 0;\n  __pyx_L0:;\n  __Pyx_XGIVEREF(__pyx_r);\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\n/* \"View.MemoryView\":1109\n * \n * \n * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) nogil:             # <<<<<<<<<<<<<<\n *     if arg < 0:\n *         return -arg\n */\n\nstatic Py_ssize_t abs_py_ssize_t(Py_ssize_t __pyx_v_arg) {\n  Py_ssize_t __pyx_r;\n  int __pyx_t_1;\n\n  /* \"View.MemoryView\":1110\n * \n * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) nogil:\n *     if arg < 0:             # <<<<<<<<<<<<<<\n *         return -arg\n *     else:\n */\n  __pyx_t_1 = ((__pyx_v_arg < 0) != 0);\n  if (__pyx_t_1) {\n\n    /* \"View.MemoryView\":1111\n * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) nogil:\n *     if arg < 0:\n *         return -arg             # <<<<<<<<<<<<<<\n *     else:\n *         return arg\n */\n    __pyx_r = (-__pyx_v_arg);\n    goto __pyx_L0;\n\n    /* \"View.MemoryView\":1110\n * \n * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) nogil:\n *     if arg < 0:             # <<<<<<<<<<<<<<\n *         return -arg\n *     else:\n */\n  }\n\n  /* \"View.MemoryView\":1113\n *         return -arg\n *     else:\n *         return arg             # <<<<<<<<<<<<<<\n * \n * @cname('__pyx_get_best_slice_order')\n */\n  /*else*/ {\n    __pyx_r = __pyx_v_arg;\n    goto __pyx_L0;\n  }\n\n  /* \"View.MemoryView\":1109\n * \n * \n * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) nogil:             # <<<<<<<<<<<<<<\n *     if arg < 0:\n *         return -arg\n */\n\n  /* function exit code */\n  __pyx_L0:;\n  return __pyx_r;\n}\n\n/* \"View.MemoryView\":1116\n * \n * @cname('__pyx_get_best_slice_order')\n * cdef char get_best_order(__Pyx_memviewslice *mslice, int ndim) nogil:             # <<<<<<<<<<<<<<\n *     \"\"\"\n *     Figure out the best memory access order for a given slice.\n */\n\nstatic char __pyx_get_best_slice_order(__Pyx_memviewslice *__pyx_v_mslice, int __pyx_v_ndim) {\n  int __pyx_v_i;\n  Py_ssize_t __pyx_v_c_stride;\n  Py_ssize_t __pyx_v_f_stride;\n  char __pyx_r;\n  int __pyx_t_1;\n  int __pyx_t_2;\n  int __pyx_t_3;\n  int __pyx_t_4;\n\n  /* \"View.MemoryView\":1121\n *     \"\"\"\n *     cdef int i\n *     cdef Py_ssize_t c_stride = 0             # <<<<<<<<<<<<<<\n *     cdef Py_ssize_t f_stride = 0\n * \n */\n  __pyx_v_c_stride = 0;\n\n  /* \"View.MemoryView\":1122\n *     cdef int i\n *     cdef Py_ssize_t c_stride = 0\n *     cdef Py_ssize_t f_stride = 0             # <<<<<<<<<<<<<<\n * \n *     for i in range(ndim - 1, -1, -1):\n */\n  __pyx_v_f_stride = 0;\n\n  /* \"View.MemoryView\":1124\n *     cdef Py_ssize_t f_stride = 0\n * \n *     for i in range(ndim - 1, -1, -1):             # <<<<<<<<<<<<<<\n *         if mslice.shape[i] > 1:\n *             c_stride = mslice.strides[i]\n */\n  for (__pyx_t_1 = (__pyx_v_ndim - 1); __pyx_t_1 > -1; __pyx_t_1-=1) {\n    __pyx_v_i = __pyx_t_1;\n\n    /* \"View.MemoryView\":1125\n * \n *     for i in range(ndim - 1, -1, -1):\n *         if mslice.shape[i] > 1:             # <<<<<<<<<<<<<<\n *             c_stride = mslice.strides[i]\n *             break\n */\n    __pyx_t_2 = (((__pyx_v_mslice->shape[__pyx_v_i]) > 1) != 0);\n    if (__pyx_t_2) {\n\n      /* \"View.MemoryView\":1126\n *     for i in range(ndim - 1, -1, -1):\n *         if mslice.shape[i] > 1:\n *             c_stride = mslice.strides[i]             # <<<<<<<<<<<<<<\n *             break\n * \n */\n      __pyx_v_c_stride = (__pyx_v_mslice->strides[__pyx_v_i]);\n\n      /* \"View.MemoryView\":1127\n *         if mslice.shape[i] > 1:\n *             c_stride = mslice.strides[i]\n *             break             # <<<<<<<<<<<<<<\n * \n *     for i in range(ndim):\n */\n      goto __pyx_L4_break;\n\n      /* \"View.MemoryView\":1125\n * \n *     for i in range(ndim - 1, -1, -1):\n *         if mslice.shape[i] > 1:             # <<<<<<<<<<<<<<\n *             c_stride = mslice.strides[i]\n *             break\n */\n    }\n  }\n  __pyx_L4_break:;\n\n  /* \"View.MemoryView\":1129\n *             break\n * \n *     for i in range(ndim):             # <<<<<<<<<<<<<<\n *         if mslice.shape[i] > 1:\n *             f_stride = mslice.strides[i]\n */\n  __pyx_t_1 = __pyx_v_ndim;\n  __pyx_t_3 = __pyx_t_1;\n  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {\n    __pyx_v_i = __pyx_t_4;\n\n    /* \"View.MemoryView\":1130\n * \n *     for i in range(ndim):\n *         if mslice.shape[i] > 1:             # <<<<<<<<<<<<<<\n *             f_stride = mslice.strides[i]\n *             break\n */\n    __pyx_t_2 = (((__pyx_v_mslice->shape[__pyx_v_i]) > 1) != 0);\n    if (__pyx_t_2) {\n\n      /* \"View.MemoryView\":1131\n *     for i in range(ndim):\n *         if mslice.shape[i] > 1:\n *             f_stride = mslice.strides[i]             # <<<<<<<<<<<<<<\n *             break\n * \n */\n      __pyx_v_f_stride = (__pyx_v_mslice->strides[__pyx_v_i]);\n\n      /* \"View.MemoryView\":1132\n *         if mslice.shape[i] > 1:\n *             f_stride = mslice.strides[i]\n *             break             # <<<<<<<<<<<<<<\n * \n *     if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride):\n */\n      goto __pyx_L7_break;\n\n      /* \"View.MemoryView\":1130\n * \n *     for i in range(ndim):\n *         if mslice.shape[i] > 1:             # <<<<<<<<<<<<<<\n *             f_stride = mslice.strides[i]\n *             break\n */\n    }\n  }\n  __pyx_L7_break:;\n\n  /* \"View.MemoryView\":1134\n *             break\n * \n *     if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride):             # <<<<<<<<<<<<<<\n *         return 'C'\n *     else:\n */\n  __pyx_t_2 = ((abs_py_ssize_t(__pyx_v_c_stride) <= abs_py_ssize_t(__pyx_v_f_stride)) != 0);\n  if (__pyx_t_2) {\n\n    /* \"View.MemoryView\":1135\n * \n *     if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride):\n *         return 'C'             # <<<<<<<<<<<<<<\n *     else:\n *         return 'F'\n */\n    __pyx_r = 'C';\n    goto __pyx_L0;\n\n    /* \"View.MemoryView\":1134\n *             break\n * \n *     if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride):             # <<<<<<<<<<<<<<\n *         return 'C'\n *     else:\n */\n  }\n\n  /* \"View.MemoryView\":1137\n *         return 'C'\n *     else:\n *         return 'F'             # <<<<<<<<<<<<<<\n * \n * @cython.cdivision(True)\n */\n  /*else*/ {\n    __pyx_r = 'F';\n    goto __pyx_L0;\n  }\n\n  /* \"View.MemoryView\":1116\n * \n * @cname('__pyx_get_best_slice_order')\n * cdef char get_best_order(__Pyx_memviewslice *mslice, int ndim) nogil:             # <<<<<<<<<<<<<<\n *     \"\"\"\n *     Figure out the best memory access order for a given slice.\n */\n\n  /* function exit code */\n  __pyx_L0:;\n  return __pyx_r;\n}\n\n/* \"View.MemoryView\":1140\n * \n * @cython.cdivision(True)\n * cdef void _copy_strided_to_strided(char *src_data, Py_ssize_t *src_strides,             # <<<<<<<<<<<<<<\n *                                    char *dst_data, Py_ssize_t *dst_strides,\n *                                    Py_ssize_t *src_shape, Py_ssize_t *dst_shape,\n */\n\nstatic void _copy_strided_to_strided(char *__pyx_v_src_data, Py_ssize_t *__pyx_v_src_strides, char *__pyx_v_dst_data, Py_ssize_t *__pyx_v_dst_strides, Py_ssize_t *__pyx_v_src_shape, Py_ssize_t *__pyx_v_dst_shape, int __pyx_v_ndim, size_t __pyx_v_itemsize) {\n  CYTHON_UNUSED Py_ssize_t __pyx_v_i;\n  CYTHON_UNUSED Py_ssize_t __pyx_v_src_extent;\n  Py_ssize_t __pyx_v_dst_extent;\n  Py_ssize_t __pyx_v_src_stride;\n  Py_ssize_t __pyx_v_dst_stride;\n  int __pyx_t_1;\n  int __pyx_t_2;\n  int __pyx_t_3;\n  Py_ssize_t __pyx_t_4;\n  Py_ssize_t __pyx_t_5;\n  Py_ssize_t __pyx_t_6;\n\n  /* \"View.MemoryView\":1147\n * \n *     cdef Py_ssize_t i\n *     cdef Py_ssize_t src_extent = src_shape[0]             # <<<<<<<<<<<<<<\n *     cdef Py_ssize_t dst_extent = dst_shape[0]\n *     cdef Py_ssize_t src_stride = src_strides[0]\n */\n  __pyx_v_src_extent = (__pyx_v_src_shape[0]);\n\n  /* \"View.MemoryView\":1148\n *     cdef Py_ssize_t i\n *     cdef Py_ssize_t src_extent = src_shape[0]\n *     cdef Py_ssize_t dst_extent = dst_shape[0]             # <<<<<<<<<<<<<<\n *     cdef Py_ssize_t src_stride = src_strides[0]\n *     cdef Py_ssize_t dst_stride = dst_strides[0]\n */\n  __pyx_v_dst_extent = (__pyx_v_dst_shape[0]);\n\n  /* \"View.MemoryView\":1149\n *     cdef Py_ssize_t src_extent = src_shape[0]\n *     cdef Py_ssize_t dst_extent = dst_shape[0]\n *     cdef Py_ssize_t src_stride = src_strides[0]             # <<<<<<<<<<<<<<\n *     cdef Py_ssize_t dst_stride = dst_strides[0]\n * \n */\n  __pyx_v_src_stride = (__pyx_v_src_strides[0]);\n\n  /* \"View.MemoryView\":1150\n *     cdef Py_ssize_t dst_extent = dst_shape[0]\n *     cdef Py_ssize_t src_stride = src_strides[0]\n *     cdef Py_ssize_t dst_stride = dst_strides[0]             # <<<<<<<<<<<<<<\n * \n *     if ndim == 1:\n */\n  __pyx_v_dst_stride = (__pyx_v_dst_strides[0]);\n\n  /* \"View.MemoryView\":1152\n *     cdef Py_ssize_t dst_stride = dst_strides[0]\n * \n *     if ndim == 1:             # <<<<<<<<<<<<<<\n *        if (src_stride > 0 and dst_stride > 0 and\n *            <size_t> src_stride == itemsize == <size_t> dst_stride):\n */\n  __pyx_t_1 = ((__pyx_v_ndim == 1) != 0);\n  if (__pyx_t_1) {\n\n    /* \"View.MemoryView\":1153\n * \n *     if ndim == 1:\n *        if (src_stride > 0 and dst_stride > 0 and             # <<<<<<<<<<<<<<\n *            <size_t> src_stride == itemsize == <size_t> dst_stride):\n *            memcpy(dst_data, src_data, itemsize * dst_extent)\n */\n    __pyx_t_2 = ((__pyx_v_src_stride > 0) != 0);\n    if (__pyx_t_2) {\n    } else {\n      __pyx_t_1 = __pyx_t_2;\n      goto __pyx_L5_bool_binop_done;\n    }\n    __pyx_t_2 = ((__pyx_v_dst_stride > 0) != 0);\n    if (__pyx_t_2) {\n    } else {\n      __pyx_t_1 = __pyx_t_2;\n      goto __pyx_L5_bool_binop_done;\n    }\n\n    /* \"View.MemoryView\":1154\n *     if ndim == 1:\n *        if (src_stride > 0 and dst_stride > 0 and\n *            <size_t> src_stride == itemsize == <size_t> dst_stride):             # <<<<<<<<<<<<<<\n *            memcpy(dst_data, src_data, itemsize * dst_extent)\n *        else:\n */\n    __pyx_t_2 = (((size_t)__pyx_v_src_stride) == __pyx_v_itemsize);\n    if (__pyx_t_2) {\n      __pyx_t_2 = (__pyx_v_itemsize == ((size_t)__pyx_v_dst_stride));\n    }\n    __pyx_t_3 = (__pyx_t_2 != 0);\n    __pyx_t_1 = __pyx_t_3;\n    __pyx_L5_bool_binop_done:;\n\n    /* \"View.MemoryView\":1153\n * \n *     if ndim == 1:\n *        if (src_stride > 0 and dst_stride > 0 and             # <<<<<<<<<<<<<<\n *            <size_t> src_stride == itemsize == <size_t> dst_stride):\n *            memcpy(dst_data, src_data, itemsize * dst_extent)\n */\n    if (__pyx_t_1) {\n\n      /* \"View.MemoryView\":1155\n *        if (src_stride > 0 and dst_stride > 0 and\n *            <size_t> src_stride == itemsize == <size_t> dst_stride):\n *            memcpy(dst_data, src_data, itemsize * dst_extent)             # <<<<<<<<<<<<<<\n *        else:\n *            for i in range(dst_extent):\n */\n      (void)(memcpy(__pyx_v_dst_data, __pyx_v_src_data, (__pyx_v_itemsize * __pyx_v_dst_extent)));\n\n      /* \"View.MemoryView\":1153\n * \n *     if ndim == 1:\n *        if (src_stride > 0 and dst_stride > 0 and             # <<<<<<<<<<<<<<\n *            <size_t> src_stride == itemsize == <size_t> dst_stride):\n *            memcpy(dst_data, src_data, itemsize * dst_extent)\n */\n      goto __pyx_L4;\n    }\n\n    /* \"View.MemoryView\":1157\n *            memcpy(dst_data, src_data, itemsize * dst_extent)\n *        else:\n *            for i in range(dst_extent):             # <<<<<<<<<<<<<<\n *                memcpy(dst_data, src_data, itemsize)\n *                src_data += src_stride\n */\n    /*else*/ {\n      __pyx_t_4 = __pyx_v_dst_extent;\n      __pyx_t_5 = __pyx_t_4;\n      for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {\n        __pyx_v_i = __pyx_t_6;\n\n        /* \"View.MemoryView\":1158\n *        else:\n *            for i in range(dst_extent):\n *                memcpy(dst_data, src_data, itemsize)             # <<<<<<<<<<<<<<\n *                src_data += src_stride\n *                dst_data += dst_stride\n */\n        (void)(memcpy(__pyx_v_dst_data, __pyx_v_src_data, __pyx_v_itemsize));\n\n        /* \"View.MemoryView\":1159\n *            for i in range(dst_extent):\n *                memcpy(dst_data, src_data, itemsize)\n *                src_data += src_stride             # <<<<<<<<<<<<<<\n *                dst_data += dst_stride\n *     else:\n */\n        __pyx_v_src_data = (__pyx_v_src_data + __pyx_v_src_stride);\n\n        /* \"View.MemoryView\":1160\n *                memcpy(dst_data, src_data, itemsize)\n *                src_data += src_stride\n *                dst_data += dst_stride             # <<<<<<<<<<<<<<\n *     else:\n *         for i in range(dst_extent):\n */\n        __pyx_v_dst_data = (__pyx_v_dst_data + __pyx_v_dst_stride);\n      }\n    }\n    __pyx_L4:;\n\n    /* \"View.MemoryView\":1152\n *     cdef Py_ssize_t dst_stride = dst_strides[0]\n * \n *     if ndim == 1:             # <<<<<<<<<<<<<<\n *        if (src_stride > 0 and dst_stride > 0 and\n *            <size_t> src_stride == itemsize == <size_t> dst_stride):\n */\n    goto __pyx_L3;\n  }\n\n  /* \"View.MemoryView\":1162\n *                dst_data += dst_stride\n *     else:\n *         for i in range(dst_extent):             # <<<<<<<<<<<<<<\n *             _copy_strided_to_strided(src_data, src_strides + 1,\n *                                      dst_data, dst_strides + 1,\n */\n  /*else*/ {\n    __pyx_t_4 = __pyx_v_dst_extent;\n    __pyx_t_5 = __pyx_t_4;\n    for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {\n      __pyx_v_i = __pyx_t_6;\n\n      /* \"View.MemoryView\":1163\n *     else:\n *         for i in range(dst_extent):\n *             _copy_strided_to_strided(src_data, src_strides + 1,             # <<<<<<<<<<<<<<\n *                                      dst_data, dst_strides + 1,\n *                                      src_shape + 1, dst_shape + 1,\n */\n      _copy_strided_to_strided(__pyx_v_src_data, (__pyx_v_src_strides + 1), __pyx_v_dst_data, (__pyx_v_dst_strides + 1), (__pyx_v_src_shape + 1), (__pyx_v_dst_shape + 1), (__pyx_v_ndim - 1), __pyx_v_itemsize);\n\n      /* \"View.MemoryView\":1167\n *                                      src_shape + 1, dst_shape + 1,\n *                                      ndim - 1, itemsize)\n *             src_data += src_stride             # <<<<<<<<<<<<<<\n *             dst_data += dst_stride\n * \n */\n      __pyx_v_src_data = (__pyx_v_src_data + __pyx_v_src_stride);\n\n      /* \"View.MemoryView\":1168\n *                                      ndim - 1, itemsize)\n *             src_data += src_stride\n *             dst_data += dst_stride             # <<<<<<<<<<<<<<\n * \n * cdef void copy_strided_to_strided(__Pyx_memviewslice *src,\n */\n      __pyx_v_dst_data = (__pyx_v_dst_data + __pyx_v_dst_stride);\n    }\n  }\n  __pyx_L3:;\n\n  /* \"View.MemoryView\":1140\n * \n * @cython.cdivision(True)\n * cdef void _copy_strided_to_strided(char *src_data, Py_ssize_t *src_strides,             # <<<<<<<<<<<<<<\n *                                    char *dst_data, Py_ssize_t *dst_strides,\n *                                    Py_ssize_t *src_shape, Py_ssize_t *dst_shape,\n */\n\n  /* function exit code */\n}\n\n/* \"View.MemoryView\":1170\n *             dst_data += dst_stride\n * \n * cdef void copy_strided_to_strided(__Pyx_memviewslice *src,             # <<<<<<<<<<<<<<\n *                                   __Pyx_memviewslice *dst,\n *                                   int ndim, size_t itemsize) nogil:\n */\n\nstatic void copy_strided_to_strided(__Pyx_memviewslice *__pyx_v_src, __Pyx_memviewslice *__pyx_v_dst, int __pyx_v_ndim, size_t __pyx_v_itemsize) {\n\n  /* \"View.MemoryView\":1173\n *                                   __Pyx_memviewslice *dst,\n *                                   int ndim, size_t itemsize) nogil:\n *     _copy_strided_to_strided(src.data, src.strides, dst.data, dst.strides,             # <<<<<<<<<<<<<<\n *                              src.shape, dst.shape, ndim, itemsize)\n * \n */\n  _copy_strided_to_strided(__pyx_v_src->data, __pyx_v_src->strides, __pyx_v_dst->data, __pyx_v_dst->strides, __pyx_v_src->shape, __pyx_v_dst->shape, __pyx_v_ndim, __pyx_v_itemsize);\n\n  /* \"View.MemoryView\":1170\n *             dst_data += dst_stride\n * \n * cdef void copy_strided_to_strided(__Pyx_memviewslice *src,             # <<<<<<<<<<<<<<\n *                                   __Pyx_memviewslice *dst,\n *                                   int ndim, size_t itemsize) nogil:\n */\n\n  /* function exit code */\n}\n\n/* \"View.MemoryView\":1177\n * \n * @cname('__pyx_memoryview_slice_get_size')\n * cdef Py_ssize_t slice_get_size(__Pyx_memviewslice *src, int ndim) nogil:             # <<<<<<<<<<<<<<\n *     \"Return the size of the memory occupied by the slice in number of bytes\"\n *     cdef Py_ssize_t shape, size = src.memview.view.itemsize\n */\n\nstatic Py_ssize_t __pyx_memoryview_slice_get_size(__Pyx_memviewslice *__pyx_v_src, int __pyx_v_ndim) {\n  Py_ssize_t __pyx_v_shape;\n  Py_ssize_t __pyx_v_size;\n  Py_ssize_t __pyx_r;\n  Py_ssize_t __pyx_t_1;\n  Py_ssize_t *__pyx_t_2;\n  Py_ssize_t *__pyx_t_3;\n  Py_ssize_t *__pyx_t_4;\n\n  /* \"View.MemoryView\":1179\n * cdef Py_ssize_t slice_get_size(__Pyx_memviewslice *src, int ndim) nogil:\n *     \"Return the size of the memory occupied by the slice in number of bytes\"\n *     cdef Py_ssize_t shape, size = src.memview.view.itemsize             # <<<<<<<<<<<<<<\n * \n *     for shape in src.shape[:ndim]:\n */\n  __pyx_t_1 = __pyx_v_src->memview->view.itemsize;\n  __pyx_v_size = __pyx_t_1;\n\n  /* \"View.MemoryView\":1181\n *     cdef Py_ssize_t shape, size = src.memview.view.itemsize\n * \n *     for shape in src.shape[:ndim]:             # <<<<<<<<<<<<<<\n *         size *= shape\n * \n */\n  __pyx_t_3 = (__pyx_v_src->shape + __pyx_v_ndim);\n  for (__pyx_t_4 = __pyx_v_src->shape; __pyx_t_4 < __pyx_t_3; __pyx_t_4++) {\n    __pyx_t_2 = __pyx_t_4;\n    __pyx_v_shape = (__pyx_t_2[0]);\n\n    /* \"View.MemoryView\":1182\n * \n *     for shape in src.shape[:ndim]:\n *         size *= shape             # <<<<<<<<<<<<<<\n * \n *     return size\n */\n    __pyx_v_size = (__pyx_v_size * __pyx_v_shape);\n  }\n\n  /* \"View.MemoryView\":1184\n *         size *= shape\n * \n *     return size             # <<<<<<<<<<<<<<\n * \n * @cname('__pyx_fill_contig_strides_array')\n */\n  __pyx_r = __pyx_v_size;\n  goto __pyx_L0;\n\n  /* \"View.MemoryView\":1177\n * \n * @cname('__pyx_memoryview_slice_get_size')\n * cdef Py_ssize_t slice_get_size(__Pyx_memviewslice *src, int ndim) nogil:             # <<<<<<<<<<<<<<\n *     \"Return the size of the memory occupied by the slice in number of bytes\"\n *     cdef Py_ssize_t shape, size = src.memview.view.itemsize\n */\n\n  /* function exit code */\n  __pyx_L0:;\n  return __pyx_r;\n}\n\n/* \"View.MemoryView\":1187\n * \n * @cname('__pyx_fill_contig_strides_array')\n * cdef Py_ssize_t fill_contig_strides_array(             # <<<<<<<<<<<<<<\n *                 Py_ssize_t *shape, Py_ssize_t *strides, Py_ssize_t stride,\n *                 int ndim, char order) nogil:\n */\n\nstatic Py_ssize_t __pyx_fill_contig_strides_array(Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, Py_ssize_t __pyx_v_stride, int __pyx_v_ndim, char __pyx_v_order) {\n  int __pyx_v_idx;\n  Py_ssize_t __pyx_r;\n  int __pyx_t_1;\n  int __pyx_t_2;\n  int __pyx_t_3;\n  int __pyx_t_4;\n\n  /* \"View.MemoryView\":1196\n *     cdef int idx\n * \n *     if order == 'F':             # <<<<<<<<<<<<<<\n *         for idx in range(ndim):\n *             strides[idx] = stride\n */\n  __pyx_t_1 = ((__pyx_v_order == 'F') != 0);\n  if (__pyx_t_1) {\n\n    /* \"View.MemoryView\":1197\n * \n *     if order == 'F':\n *         for idx in range(ndim):             # <<<<<<<<<<<<<<\n *             strides[idx] = stride\n *             stride *= shape[idx]\n */\n    __pyx_t_2 = __pyx_v_ndim;\n    __pyx_t_3 = __pyx_t_2;\n    for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {\n      __pyx_v_idx = __pyx_t_4;\n\n      /* \"View.MemoryView\":1198\n *     if order == 'F':\n *         for idx in range(ndim):\n *             strides[idx] = stride             # <<<<<<<<<<<<<<\n *             stride *= shape[idx]\n *     else:\n */\n      (__pyx_v_strides[__pyx_v_idx]) = __pyx_v_stride;\n\n      /* \"View.MemoryView\":1199\n *         for idx in range(ndim):\n *             strides[idx] = stride\n *             stride *= shape[idx]             # <<<<<<<<<<<<<<\n *     else:\n *         for idx in range(ndim - 1, -1, -1):\n */\n      __pyx_v_stride = (__pyx_v_stride * (__pyx_v_shape[__pyx_v_idx]));\n    }\n\n    /* \"View.MemoryView\":1196\n *     cdef int idx\n * \n *     if order == 'F':             # <<<<<<<<<<<<<<\n *         for idx in range(ndim):\n *             strides[idx] = stride\n */\n    goto __pyx_L3;\n  }\n\n  /* \"View.MemoryView\":1201\n *             stride *= shape[idx]\n *     else:\n *         for idx in range(ndim - 1, -1, -1):             # <<<<<<<<<<<<<<\n *             strides[idx] = stride\n *             stride *= shape[idx]\n */\n  /*else*/ {\n    for (__pyx_t_2 = (__pyx_v_ndim - 1); __pyx_t_2 > -1; __pyx_t_2-=1) {\n      __pyx_v_idx = __pyx_t_2;\n\n      /* \"View.MemoryView\":1202\n *     else:\n *         for idx in range(ndim - 1, -1, -1):\n *             strides[idx] = stride             # <<<<<<<<<<<<<<\n *             stride *= shape[idx]\n * \n */\n      (__pyx_v_strides[__pyx_v_idx]) = __pyx_v_stride;\n\n      /* \"View.MemoryView\":1203\n *         for idx in range(ndim - 1, -1, -1):\n *             strides[idx] = stride\n *             stride *= shape[idx]             # <<<<<<<<<<<<<<\n * \n *     return stride\n */\n      __pyx_v_stride = (__pyx_v_stride * (__pyx_v_shape[__pyx_v_idx]));\n    }\n  }\n  __pyx_L3:;\n\n  /* \"View.MemoryView\":1205\n *             stride *= shape[idx]\n * \n *     return stride             # <<<<<<<<<<<<<<\n * \n * @cname('__pyx_memoryview_copy_data_to_temp')\n */\n  __pyx_r = __pyx_v_stride;\n  goto __pyx_L0;\n\n  /* \"View.MemoryView\":1187\n * \n * @cname('__pyx_fill_contig_strides_array')\n * cdef Py_ssize_t fill_contig_strides_array(             # <<<<<<<<<<<<<<\n *                 Py_ssize_t *shape, Py_ssize_t *strides, Py_ssize_t stride,\n *                 int ndim, char order) nogil:\n */\n\n  /* function exit code */\n  __pyx_L0:;\n  return __pyx_r;\n}\n\n/* \"View.MemoryView\":1208\n * \n * @cname('__pyx_memoryview_copy_data_to_temp')\n * cdef void *copy_data_to_temp(__Pyx_memviewslice *src,             # <<<<<<<<<<<<<<\n *                              __Pyx_memviewslice *tmpslice,\n *                              char order,\n */\n\nstatic void *__pyx_memoryview_copy_data_to_temp(__Pyx_memviewslice *__pyx_v_src, __Pyx_memviewslice *__pyx_v_tmpslice, char __pyx_v_order, int __pyx_v_ndim) {\n  int __pyx_v_i;\n  void *__pyx_v_result;\n  size_t __pyx_v_itemsize;\n  size_t __pyx_v_size;\n  void *__pyx_r;\n  Py_ssize_t __pyx_t_1;\n  int __pyx_t_2;\n  int __pyx_t_3;\n  struct __pyx_memoryview_obj *__pyx_t_4;\n  int __pyx_t_5;\n  int __pyx_t_6;\n  int __pyx_lineno = 0;\n  const char *__pyx_filename = NULL;\n  int __pyx_clineno = 0;\n\n  /* \"View.MemoryView\":1219\n *     cdef void *result\n * \n *     cdef size_t itemsize = src.memview.view.itemsize             # <<<<<<<<<<<<<<\n *     cdef size_t size = slice_get_size(src, ndim)\n * \n */\n  __pyx_t_1 = __pyx_v_src->memview->view.itemsize;\n  __pyx_v_itemsize = __pyx_t_1;\n\n  /* \"View.MemoryView\":1220\n * \n *     cdef size_t itemsize = src.memview.view.itemsize\n *     cdef size_t size = slice_get_size(src, ndim)             # <<<<<<<<<<<<<<\n * \n *     result = malloc(size)\n */\n  __pyx_v_size = __pyx_memoryview_slice_get_size(__pyx_v_src, __pyx_v_ndim);\n\n  /* \"View.MemoryView\":1222\n *     cdef size_t size = slice_get_size(src, ndim)\n * \n *     result = malloc(size)             # <<<<<<<<<<<<<<\n *     if not result:\n *         _err(MemoryError, NULL)\n */\n  __pyx_v_result = malloc(__pyx_v_size);\n\n  /* \"View.MemoryView\":1223\n * \n *     result = malloc(size)\n *     if not result:             # <<<<<<<<<<<<<<\n *         _err(MemoryError, NULL)\n * \n */\n  __pyx_t_2 = ((!(__pyx_v_result != 0)) != 0);\n  if (__pyx_t_2) {\n\n    /* \"View.MemoryView\":1224\n *     result = malloc(size)\n *     if not result:\n *         _err(MemoryError, NULL)             # <<<<<<<<<<<<<<\n * \n * \n */\n    __pyx_t_3 = __pyx_memoryview_err(__pyx_builtin_MemoryError, NULL); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 1224, __pyx_L1_error)\n\n    /* \"View.MemoryView\":1223\n * \n *     result = malloc(size)\n *     if not result:             # <<<<<<<<<<<<<<\n *         _err(MemoryError, NULL)\n * \n */\n  }\n\n  /* \"View.MemoryView\":1227\n * \n * \n *     tmpslice.data = <char *> result             # <<<<<<<<<<<<<<\n *     tmpslice.memview = src.memview\n *     for i in range(ndim):\n */\n  __pyx_v_tmpslice->data = ((char *)__pyx_v_result);\n\n  /* \"View.MemoryView\":1228\n * \n *     tmpslice.data = <char *> result\n *     tmpslice.memview = src.memview             # <<<<<<<<<<<<<<\n *     for i in range(ndim):\n *         tmpslice.shape[i] = src.shape[i]\n */\n  __pyx_t_4 = __pyx_v_src->memview;\n  __pyx_v_tmpslice->memview = __pyx_t_4;\n\n  /* \"View.MemoryView\":1229\n *     tmpslice.data = <char *> result\n *     tmpslice.memview = src.memview\n *     for i in range(ndim):             # <<<<<<<<<<<<<<\n *         tmpslice.shape[i] = src.shape[i]\n *         tmpslice.suboffsets[i] = -1\n */\n  __pyx_t_3 = __pyx_v_ndim;\n  __pyx_t_5 = __pyx_t_3;\n  for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {\n    __pyx_v_i = __pyx_t_6;\n\n    /* \"View.MemoryView\":1230\n *     tmpslice.memview = src.memview\n *     for i in range(ndim):\n *         tmpslice.shape[i] = src.shape[i]             # <<<<<<<<<<<<<<\n *         tmpslice.suboffsets[i] = -1\n * \n */\n    (__pyx_v_tmpslice->shape[__pyx_v_i]) = (__pyx_v_src->shape[__pyx_v_i]);\n\n    /* \"View.MemoryView\":1231\n *     for i in range(ndim):\n *         tmpslice.shape[i] = src.shape[i]\n *         tmpslice.suboffsets[i] = -1             # <<<<<<<<<<<<<<\n * \n *     fill_contig_strides_array(&tmpslice.shape[0], &tmpslice.strides[0], itemsize,\n */\n    (__pyx_v_tmpslice->suboffsets[__pyx_v_i]) = -1L;\n  }\n\n  /* \"View.MemoryView\":1233\n *         tmpslice.suboffsets[i] = -1\n * \n *     fill_contig_strides_array(&tmpslice.shape[0], &tmpslice.strides[0], itemsize,             # <<<<<<<<<<<<<<\n *                               ndim, order)\n * \n */\n  (void)(__pyx_fill_contig_strides_array((&(__pyx_v_tmpslice->shape[0])), (&(__pyx_v_tmpslice->strides[0])), __pyx_v_itemsize, __pyx_v_ndim, __pyx_v_order));\n\n  /* \"View.MemoryView\":1237\n * \n * \n *     for i in range(ndim):             # <<<<<<<<<<<<<<\n *         if tmpslice.shape[i] == 1:\n *             tmpslice.strides[i] = 0\n */\n  __pyx_t_3 = __pyx_v_ndim;\n  __pyx_t_5 = __pyx_t_3;\n  for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {\n    __pyx_v_i = __pyx_t_6;\n\n    /* \"View.MemoryView\":1238\n * \n *     for i in range(ndim):\n *         if tmpslice.shape[i] == 1:             # <<<<<<<<<<<<<<\n *             tmpslice.strides[i] = 0\n * \n */\n    __pyx_t_2 = (((__pyx_v_tmpslice->shape[__pyx_v_i]) == 1) != 0);\n    if (__pyx_t_2) {\n\n      /* \"View.MemoryView\":1239\n *     for i in range(ndim):\n *         if tmpslice.shape[i] == 1:\n *             tmpslice.strides[i] = 0             # <<<<<<<<<<<<<<\n * \n *     if slice_is_contig(src[0], order, ndim):\n */\n      (__pyx_v_tmpslice->strides[__pyx_v_i]) = 0;\n\n      /* \"View.MemoryView\":1238\n * \n *     for i in range(ndim):\n *         if tmpslice.shape[i] == 1:             # <<<<<<<<<<<<<<\n *             tmpslice.strides[i] = 0\n * \n */\n    }\n  }\n\n  /* \"View.MemoryView\":1241\n *             tmpslice.strides[i] = 0\n * \n *     if slice_is_contig(src[0], order, ndim):             # <<<<<<<<<<<<<<\n *         memcpy(result, src.data, size)\n *     else:\n */\n  __pyx_t_2 = (__pyx_memviewslice_is_contig((__pyx_v_src[0]), __pyx_v_order, __pyx_v_ndim) != 0);\n  if (__pyx_t_2) {\n\n    /* \"View.MemoryView\":1242\n * \n *     if slice_is_contig(src[0], order, ndim):\n *         memcpy(result, src.data, size)             # <<<<<<<<<<<<<<\n *     else:\n *         copy_strided_to_strided(src, tmpslice, ndim, itemsize)\n */\n    (void)(memcpy(__pyx_v_result, __pyx_v_src->data, __pyx_v_size));\n\n    /* \"View.MemoryView\":1241\n *             tmpslice.strides[i] = 0\n * \n *     if slice_is_contig(src[0], order, ndim):             # <<<<<<<<<<<<<<\n *         memcpy(result, src.data, size)\n *     else:\n */\n    goto __pyx_L9;\n  }\n\n  /* \"View.MemoryView\":1244\n *         memcpy(result, src.data, size)\n *     else:\n *         copy_strided_to_strided(src, tmpslice, ndim, itemsize)             # <<<<<<<<<<<<<<\n * \n *     return result\n */\n  /*else*/ {\n    copy_strided_to_strided(__pyx_v_src, __pyx_v_tmpslice, __pyx_v_ndim, __pyx_v_itemsize);\n  }\n  __pyx_L9:;\n\n  /* \"View.MemoryView\":1246\n *         copy_strided_to_strided(src, tmpslice, ndim, itemsize)\n * \n *     return result             # <<<<<<<<<<<<<<\n * \n * \n */\n  __pyx_r = __pyx_v_result;\n  goto __pyx_L0;\n\n  /* \"View.MemoryView\":1208\n * \n * @cname('__pyx_memoryview_copy_data_to_temp')\n * cdef void *copy_data_to_temp(__Pyx_memviewslice *src,             # <<<<<<<<<<<<<<\n *                              __Pyx_memviewslice *tmpslice,\n *                              char order,\n */\n\n  /* function exit code */\n  __pyx_L1_error:;\n  {\n    #ifdef WITH_THREAD\n    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();\n    #endif\n    __Pyx_AddTraceback(\"View.MemoryView.copy_data_to_temp\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n    #ifdef WITH_THREAD\n    __Pyx_PyGILState_Release(__pyx_gilstate_save);\n    #endif\n  }\n  __pyx_r = NULL;\n  __pyx_L0:;\n  return __pyx_r;\n}\n\n/* \"View.MemoryView\":1251\n * \n * @cname('__pyx_memoryview_err_extents')\n * cdef int _err_extents(int i, Py_ssize_t extent1,             # <<<<<<<<<<<<<<\n *                              Py_ssize_t extent2) except -1 with gil:\n *     raise ValueError(\"got differing extents in dimension %d (got %d and %d)\" %\n */\n\nstatic int __pyx_memoryview_err_extents(int __pyx_v_i, Py_ssize_t __pyx_v_extent1, Py_ssize_t __pyx_v_extent2) {\n  int __pyx_r;\n  __Pyx_RefNannyDeclarations\n  PyObject *__pyx_t_1 = NULL;\n  PyObject *__pyx_t_2 = NULL;\n  PyObject *__pyx_t_3 = NULL;\n  PyObject *__pyx_t_4 = NULL;\n  int __pyx_lineno = 0;\n  const char *__pyx_filename = NULL;\n  int __pyx_clineno = 0;\n  #ifdef WITH_THREAD\n  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();\n  #endif\n  __Pyx_RefNannySetupContext(\"_err_extents\", 0);\n\n  /* \"View.MemoryView\":1254\n *                              Py_ssize_t extent2) except -1 with gil:\n *     raise ValueError(\"got differing extents in dimension %d (got %d and %d)\" %\n *                                                         (i, extent1, extent2))             # <<<<<<<<<<<<<<\n * \n * @cname('__pyx_memoryview_err_dim')\n */\n  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_i); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1254, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_extent1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1254, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_2);\n  __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_extent2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1254, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_3);\n  __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1254, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_4);\n  __Pyx_GIVEREF(__pyx_t_1);\n  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_2);\n  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2);\n  __Pyx_GIVEREF(__pyx_t_3);\n  PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3);\n  __pyx_t_1 = 0;\n  __pyx_t_2 = 0;\n  __pyx_t_3 = 0;\n\n  /* \"View.MemoryView\":1253\n * cdef int _err_extents(int i, Py_ssize_t extent1,\n *                              Py_ssize_t extent2) except -1 with gil:\n *     raise ValueError(\"got differing extents in dimension %d (got %d and %d)\" %             # <<<<<<<<<<<<<<\n *                                                         (i, extent1, extent2))\n * \n */\n  __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_got_differing_extents_in_dimensi, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1253, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_3);\n  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;\n  __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1253, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_4);\n  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;\n  __Pyx_Raise(__pyx_t_4, 0, 0, 0);\n  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;\n  __PYX_ERR(1, 1253, __pyx_L1_error)\n\n  /* \"View.MemoryView\":1251\n * \n * @cname('__pyx_memoryview_err_extents')\n * cdef int _err_extents(int i, Py_ssize_t extent1,             # <<<<<<<<<<<<<<\n *                              Py_ssize_t extent2) except -1 with gil:\n *     raise ValueError(\"got differing extents in dimension %d (got %d and %d)\" %\n */\n\n  /* function exit code */\n  __pyx_L1_error:;\n  __Pyx_XDECREF(__pyx_t_1);\n  __Pyx_XDECREF(__pyx_t_2);\n  __Pyx_XDECREF(__pyx_t_3);\n  __Pyx_XDECREF(__pyx_t_4);\n  __Pyx_AddTraceback(\"View.MemoryView._err_extents\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n  __pyx_r = -1;\n  __Pyx_RefNannyFinishContext();\n  #ifdef WITH_THREAD\n  __Pyx_PyGILState_Release(__pyx_gilstate_save);\n  #endif\n  return __pyx_r;\n}\n\n/* \"View.MemoryView\":1257\n * \n * @cname('__pyx_memoryview_err_dim')\n * cdef int _err_dim(object error, char *msg, int dim) except -1 with gil:             # <<<<<<<<<<<<<<\n *     raise error(msg.decode('ascii') % dim)\n * \n */\n\nstatic int __pyx_memoryview_err_dim(PyObject *__pyx_v_error, char *__pyx_v_msg, int __pyx_v_dim) {\n  int __pyx_r;\n  __Pyx_RefNannyDeclarations\n  PyObject *__pyx_t_1 = NULL;\n  PyObject *__pyx_t_2 = NULL;\n  PyObject *__pyx_t_3 = NULL;\n  PyObject *__pyx_t_4 = NULL;\n  int __pyx_lineno = 0;\n  const char *__pyx_filename = NULL;\n  int __pyx_clineno = 0;\n  #ifdef WITH_THREAD\n  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();\n  #endif\n  __Pyx_RefNannySetupContext(\"_err_dim\", 0);\n  __Pyx_INCREF(__pyx_v_error);\n\n  /* \"View.MemoryView\":1258\n * @cname('__pyx_memoryview_err_dim')\n * cdef int _err_dim(object error, char *msg, int dim) except -1 with gil:\n *     raise error(msg.decode('ascii') % dim)             # <<<<<<<<<<<<<<\n * \n * @cname('__pyx_memoryview_err')\n */\n  __pyx_t_2 = __Pyx_decode_c_string(__pyx_v_msg, 0, strlen(__pyx_v_msg), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1258, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_2);\n  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_dim); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1258, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_3);\n  __pyx_t_4 = PyUnicode_Format(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1258, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_4);\n  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;\n  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;\n  __Pyx_INCREF(__pyx_v_error);\n  __pyx_t_3 = __pyx_v_error; __pyx_t_2 = NULL;\n  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {\n    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);\n    if (likely(__pyx_t_2)) {\n      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);\n      __Pyx_INCREF(__pyx_t_2);\n      __Pyx_INCREF(function);\n      __Pyx_DECREF_SET(__pyx_t_3, function);\n    }\n  }\n  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4);\n  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;\n  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;\n  if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1258, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;\n  __Pyx_Raise(__pyx_t_1, 0, 0, 0);\n  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n  __PYX_ERR(1, 1258, __pyx_L1_error)\n\n  /* \"View.MemoryView\":1257\n * \n * @cname('__pyx_memoryview_err_dim')\n * cdef int _err_dim(object error, char *msg, int dim) except -1 with gil:             # <<<<<<<<<<<<<<\n *     raise error(msg.decode('ascii') % dim)\n * \n */\n\n  /* function exit code */\n  __pyx_L1_error:;\n  __Pyx_XDECREF(__pyx_t_1);\n  __Pyx_XDECREF(__pyx_t_2);\n  __Pyx_XDECREF(__pyx_t_3);\n  __Pyx_XDECREF(__pyx_t_4);\n  __Pyx_AddTraceback(\"View.MemoryView._err_dim\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n  __pyx_r = -1;\n  __Pyx_XDECREF(__pyx_v_error);\n  __Pyx_RefNannyFinishContext();\n  #ifdef WITH_THREAD\n  __Pyx_PyGILState_Release(__pyx_gilstate_save);\n  #endif\n  return __pyx_r;\n}\n\n/* \"View.MemoryView\":1261\n * \n * @cname('__pyx_memoryview_err')\n * cdef int _err(object error, char *msg) except -1 with gil:             # <<<<<<<<<<<<<<\n *     if msg != NULL:\n *         raise error(msg.decode('ascii'))\n */\n\nstatic int __pyx_memoryview_err(PyObject *__pyx_v_error, char *__pyx_v_msg) {\n  int __pyx_r;\n  __Pyx_RefNannyDeclarations\n  int __pyx_t_1;\n  PyObject *__pyx_t_2 = NULL;\n  PyObject *__pyx_t_3 = NULL;\n  PyObject *__pyx_t_4 = NULL;\n  PyObject *__pyx_t_5 = NULL;\n  int __pyx_lineno = 0;\n  const char *__pyx_filename = NULL;\n  int __pyx_clineno = 0;\n  #ifdef WITH_THREAD\n  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();\n  #endif\n  __Pyx_RefNannySetupContext(\"_err\", 0);\n  __Pyx_INCREF(__pyx_v_error);\n\n  /* \"View.MemoryView\":1262\n * @cname('__pyx_memoryview_err')\n * cdef int _err(object error, char *msg) except -1 with gil:\n *     if msg != NULL:             # <<<<<<<<<<<<<<\n *         raise error(msg.decode('ascii'))\n *     else:\n */\n  __pyx_t_1 = ((__pyx_v_msg != NULL) != 0);\n  if (unlikely(__pyx_t_1)) {\n\n    /* \"View.MemoryView\":1263\n * cdef int _err(object error, char *msg) except -1 with gil:\n *     if msg != NULL:\n *         raise error(msg.decode('ascii'))             # <<<<<<<<<<<<<<\n *     else:\n *         raise error\n */\n    __pyx_t_3 = __Pyx_decode_c_string(__pyx_v_msg, 0, strlen(__pyx_v_msg), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1263, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_3);\n    __Pyx_INCREF(__pyx_v_error);\n    __pyx_t_4 = __pyx_v_error; __pyx_t_5 = NULL;\n    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {\n      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);\n      if (likely(__pyx_t_5)) {\n        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);\n        __Pyx_INCREF(__pyx_t_5);\n        __Pyx_INCREF(function);\n        __Pyx_DECREF_SET(__pyx_t_4, function);\n      }\n    }\n    __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3);\n    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;\n    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;\n    if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1263, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_2);\n    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;\n    __Pyx_Raise(__pyx_t_2, 0, 0, 0);\n    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;\n    __PYX_ERR(1, 1263, __pyx_L1_error)\n\n    /* \"View.MemoryView\":1262\n * @cname('__pyx_memoryview_err')\n * cdef int _err(object error, char *msg) except -1 with gil:\n *     if msg != NULL:             # <<<<<<<<<<<<<<\n *         raise error(msg.decode('ascii'))\n *     else:\n */\n  }\n\n  /* \"View.MemoryView\":1265\n *         raise error(msg.decode('ascii'))\n *     else:\n *         raise error             # <<<<<<<<<<<<<<\n * \n * @cname('__pyx_memoryview_copy_contents')\n */\n  /*else*/ {\n    __Pyx_Raise(__pyx_v_error, 0, 0, 0);\n    __PYX_ERR(1, 1265, __pyx_L1_error)\n  }\n\n  /* \"View.MemoryView\":1261\n * \n * @cname('__pyx_memoryview_err')\n * cdef int _err(object error, char *msg) except -1 with gil:             # <<<<<<<<<<<<<<\n *     if msg != NULL:\n *         raise error(msg.decode('ascii'))\n */\n\n  /* function exit code */\n  __pyx_L1_error:;\n  __Pyx_XDECREF(__pyx_t_2);\n  __Pyx_XDECREF(__pyx_t_3);\n  __Pyx_XDECREF(__pyx_t_4);\n  __Pyx_XDECREF(__pyx_t_5);\n  __Pyx_AddTraceback(\"View.MemoryView._err\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n  __pyx_r = -1;\n  __Pyx_XDECREF(__pyx_v_error);\n  __Pyx_RefNannyFinishContext();\n  #ifdef WITH_THREAD\n  __Pyx_PyGILState_Release(__pyx_gilstate_save);\n  #endif\n  return __pyx_r;\n}\n\n/* \"View.MemoryView\":1268\n * \n * @cname('__pyx_memoryview_copy_contents')\n * cdef int memoryview_copy_contents(__Pyx_memviewslice src,             # <<<<<<<<<<<<<<\n *                                   __Pyx_memviewslice dst,\n *                                   int src_ndim, int dst_ndim,\n */\n\nstatic int __pyx_memoryview_copy_contents(__Pyx_memviewslice __pyx_v_src, __Pyx_memviewslice __pyx_v_dst, int __pyx_v_src_ndim, int __pyx_v_dst_ndim, int __pyx_v_dtype_is_object) {\n  void *__pyx_v_tmpdata;\n  size_t __pyx_v_itemsize;\n  int __pyx_v_i;\n  char __pyx_v_order;\n  int __pyx_v_broadcasting;\n  int __pyx_v_direct_copy;\n  __Pyx_memviewslice __pyx_v_tmp;\n  int __pyx_v_ndim;\n  int __pyx_r;\n  Py_ssize_t __pyx_t_1;\n  int __pyx_t_2;\n  int __pyx_t_3;\n  int __pyx_t_4;\n  int __pyx_t_5;\n  int __pyx_t_6;\n  void *__pyx_t_7;\n  int __pyx_t_8;\n  int __pyx_lineno = 0;\n  const char *__pyx_filename = NULL;\n  int __pyx_clineno = 0;\n\n  /* \"View.MemoryView\":1276\n *     Check for overlapping memory and verify the shapes.\n *     \"\"\"\n *     cdef void *tmpdata = NULL             # <<<<<<<<<<<<<<\n *     cdef size_t itemsize = src.memview.view.itemsize\n *     cdef int i\n */\n  __pyx_v_tmpdata = NULL;\n\n  /* \"View.MemoryView\":1277\n *     \"\"\"\n *     cdef void *tmpdata = NULL\n *     cdef size_t itemsize = src.memview.view.itemsize             # <<<<<<<<<<<<<<\n *     cdef int i\n *     cdef char order = get_best_order(&src, src_ndim)\n */\n  __pyx_t_1 = __pyx_v_src.memview->view.itemsize;\n  __pyx_v_itemsize = __pyx_t_1;\n\n  /* \"View.MemoryView\":1279\n *     cdef size_t itemsize = src.memview.view.itemsize\n *     cdef int i\n *     cdef char order = get_best_order(&src, src_ndim)             # <<<<<<<<<<<<<<\n *     cdef bint broadcasting = False\n *     cdef bint direct_copy = False\n */\n  __pyx_v_order = __pyx_get_best_slice_order((&__pyx_v_src), __pyx_v_src_ndim);\n\n  /* \"View.MemoryView\":1280\n *     cdef int i\n *     cdef char order = get_best_order(&src, src_ndim)\n *     cdef bint broadcasting = False             # <<<<<<<<<<<<<<\n *     cdef bint direct_copy = False\n *     cdef __Pyx_memviewslice tmp\n */\n  __pyx_v_broadcasting = 0;\n\n  /* \"View.MemoryView\":1281\n *     cdef char order = get_best_order(&src, src_ndim)\n *     cdef bint broadcasting = False\n *     cdef bint direct_copy = False             # <<<<<<<<<<<<<<\n *     cdef __Pyx_memviewslice tmp\n * \n */\n  __pyx_v_direct_copy = 0;\n\n  /* \"View.MemoryView\":1284\n *     cdef __Pyx_memviewslice tmp\n * \n *     if src_ndim < dst_ndim:             # <<<<<<<<<<<<<<\n *         broadcast_leading(&src, src_ndim, dst_ndim)\n *     elif dst_ndim < src_ndim:\n */\n  __pyx_t_2 = ((__pyx_v_src_ndim < __pyx_v_dst_ndim) != 0);\n  if (__pyx_t_2) {\n\n    /* \"View.MemoryView\":1285\n * \n *     if src_ndim < dst_ndim:\n *         broadcast_leading(&src, src_ndim, dst_ndim)             # <<<<<<<<<<<<<<\n *     elif dst_ndim < src_ndim:\n *         broadcast_leading(&dst, dst_ndim, src_ndim)\n */\n    __pyx_memoryview_broadcast_leading((&__pyx_v_src), __pyx_v_src_ndim, __pyx_v_dst_ndim);\n\n    /* \"View.MemoryView\":1284\n *     cdef __Pyx_memviewslice tmp\n * \n *     if src_ndim < dst_ndim:             # <<<<<<<<<<<<<<\n *         broadcast_leading(&src, src_ndim, dst_ndim)\n *     elif dst_ndim < src_ndim:\n */\n    goto __pyx_L3;\n  }\n\n  /* \"View.MemoryView\":1286\n *     if src_ndim < dst_ndim:\n *         broadcast_leading(&src, src_ndim, dst_ndim)\n *     elif dst_ndim < src_ndim:             # <<<<<<<<<<<<<<\n *         broadcast_leading(&dst, dst_ndim, src_ndim)\n * \n */\n  __pyx_t_2 = ((__pyx_v_dst_ndim < __pyx_v_src_ndim) != 0);\n  if (__pyx_t_2) {\n\n    /* \"View.MemoryView\":1287\n *         broadcast_leading(&src, src_ndim, dst_ndim)\n *     elif dst_ndim < src_ndim:\n *         broadcast_leading(&dst, dst_ndim, src_ndim)             # <<<<<<<<<<<<<<\n * \n *     cdef int ndim = max(src_ndim, dst_ndim)\n */\n    __pyx_memoryview_broadcast_leading((&__pyx_v_dst), __pyx_v_dst_ndim, __pyx_v_src_ndim);\n\n    /* \"View.MemoryView\":1286\n *     if src_ndim < dst_ndim:\n *         broadcast_leading(&src, src_ndim, dst_ndim)\n *     elif dst_ndim < src_ndim:             # <<<<<<<<<<<<<<\n *         broadcast_leading(&dst, dst_ndim, src_ndim)\n * \n */\n  }\n  __pyx_L3:;\n\n  /* \"View.MemoryView\":1289\n *         broadcast_leading(&dst, dst_ndim, src_ndim)\n * \n *     cdef int ndim = max(src_ndim, dst_ndim)             # <<<<<<<<<<<<<<\n * \n *     for i in range(ndim):\n */\n  __pyx_t_3 = __pyx_v_dst_ndim;\n  __pyx_t_4 = __pyx_v_src_ndim;\n  if (((__pyx_t_3 > __pyx_t_4) != 0)) {\n    __pyx_t_5 = __pyx_t_3;\n  } else {\n    __pyx_t_5 = __pyx_t_4;\n  }\n  __pyx_v_ndim = __pyx_t_5;\n\n  /* \"View.MemoryView\":1291\n *     cdef int ndim = max(src_ndim, dst_ndim)\n * \n *     for i in range(ndim):             # <<<<<<<<<<<<<<\n *         if src.shape[i] != dst.shape[i]:\n *             if src.shape[i] == 1:\n */\n  __pyx_t_5 = __pyx_v_ndim;\n  __pyx_t_3 = __pyx_t_5;\n  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {\n    __pyx_v_i = __pyx_t_4;\n\n    /* \"View.MemoryView\":1292\n * \n *     for i in range(ndim):\n *         if src.shape[i] != dst.shape[i]:             # <<<<<<<<<<<<<<\n *             if src.shape[i] == 1:\n *                 broadcasting = True\n */\n    __pyx_t_2 = (((__pyx_v_src.shape[__pyx_v_i]) != (__pyx_v_dst.shape[__pyx_v_i])) != 0);\n    if (__pyx_t_2) {\n\n      /* \"View.MemoryView\":1293\n *     for i in range(ndim):\n *         if src.shape[i] != dst.shape[i]:\n *             if src.shape[i] == 1:             # <<<<<<<<<<<<<<\n *                 broadcasting = True\n *                 src.strides[i] = 0\n */\n      __pyx_t_2 = (((__pyx_v_src.shape[__pyx_v_i]) == 1) != 0);\n      if (__pyx_t_2) {\n\n        /* \"View.MemoryView\":1294\n *         if src.shape[i] != dst.shape[i]:\n *             if src.shape[i] == 1:\n *                 broadcasting = True             # <<<<<<<<<<<<<<\n *                 src.strides[i] = 0\n *             else:\n */\n        __pyx_v_broadcasting = 1;\n\n        /* \"View.MemoryView\":1295\n *             if src.shape[i] == 1:\n *                 broadcasting = True\n *                 src.strides[i] = 0             # <<<<<<<<<<<<<<\n *             else:\n *                 _err_extents(i, dst.shape[i], src.shape[i])\n */\n        (__pyx_v_src.strides[__pyx_v_i]) = 0;\n\n        /* \"View.MemoryView\":1293\n *     for i in range(ndim):\n *         if src.shape[i] != dst.shape[i]:\n *             if src.shape[i] == 1:             # <<<<<<<<<<<<<<\n *                 broadcasting = True\n *                 src.strides[i] = 0\n */\n        goto __pyx_L7;\n      }\n\n      /* \"View.MemoryView\":1297\n *                 src.strides[i] = 0\n *             else:\n *                 _err_extents(i, dst.shape[i], src.shape[i])             # <<<<<<<<<<<<<<\n * \n *         if src.suboffsets[i] >= 0:\n */\n      /*else*/ {\n        __pyx_t_6 = __pyx_memoryview_err_extents(__pyx_v_i, (__pyx_v_dst.shape[__pyx_v_i]), (__pyx_v_src.shape[__pyx_v_i])); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(1, 1297, __pyx_L1_error)\n      }\n      __pyx_L7:;\n\n      /* \"View.MemoryView\":1292\n * \n *     for i in range(ndim):\n *         if src.shape[i] != dst.shape[i]:             # <<<<<<<<<<<<<<\n *             if src.shape[i] == 1:\n *                 broadcasting = True\n */\n    }\n\n    /* \"View.MemoryView\":1299\n *                 _err_extents(i, dst.shape[i], src.shape[i])\n * \n *         if src.suboffsets[i] >= 0:             # <<<<<<<<<<<<<<\n *             _err_dim(ValueError, \"Dimension %d is not direct\", i)\n * \n */\n    __pyx_t_2 = (((__pyx_v_src.suboffsets[__pyx_v_i]) >= 0) != 0);\n    if (__pyx_t_2) {\n\n      /* \"View.MemoryView\":1300\n * \n *         if src.suboffsets[i] >= 0:\n *             _err_dim(ValueError, \"Dimension %d is not direct\", i)             # <<<<<<<<<<<<<<\n * \n *     if slices_overlap(&src, &dst, ndim, itemsize):\n */\n      __pyx_t_6 = __pyx_memoryview_err_dim(__pyx_builtin_ValueError, ((char *)\"Dimension %d is not direct\"), __pyx_v_i); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(1, 1300, __pyx_L1_error)\n\n      /* \"View.MemoryView\":1299\n *                 _err_extents(i, dst.shape[i], src.shape[i])\n * \n *         if src.suboffsets[i] >= 0:             # <<<<<<<<<<<<<<\n *             _err_dim(ValueError, \"Dimension %d is not direct\", i)\n * \n */\n    }\n  }\n\n  /* \"View.MemoryView\":1302\n *             _err_dim(ValueError, \"Dimension %d is not direct\", i)\n * \n *     if slices_overlap(&src, &dst, ndim, itemsize):             # <<<<<<<<<<<<<<\n * \n *         if not slice_is_contig(src, order, ndim):\n */\n  __pyx_t_2 = (__pyx_slices_overlap((&__pyx_v_src), (&__pyx_v_dst), __pyx_v_ndim, __pyx_v_itemsize) != 0);\n  if (__pyx_t_2) {\n\n    /* \"View.MemoryView\":1304\n *     if slices_overlap(&src, &dst, ndim, itemsize):\n * \n *         if not slice_is_contig(src, order, ndim):             # <<<<<<<<<<<<<<\n *             order = get_best_order(&dst, ndim)\n * \n */\n    __pyx_t_2 = ((!(__pyx_memviewslice_is_contig(__pyx_v_src, __pyx_v_order, __pyx_v_ndim) != 0)) != 0);\n    if (__pyx_t_2) {\n\n      /* \"View.MemoryView\":1305\n * \n *         if not slice_is_contig(src, order, ndim):\n *             order = get_best_order(&dst, ndim)             # <<<<<<<<<<<<<<\n * \n *         tmpdata = copy_data_to_temp(&src, &tmp, order, ndim)\n */\n      __pyx_v_order = __pyx_get_best_slice_order((&__pyx_v_dst), __pyx_v_ndim);\n\n      /* \"View.MemoryView\":1304\n *     if slices_overlap(&src, &dst, ndim, itemsize):\n * \n *         if not slice_is_contig(src, order, ndim):             # <<<<<<<<<<<<<<\n *             order = get_best_order(&dst, ndim)\n * \n */\n    }\n\n    /* \"View.MemoryView\":1307\n *             order = get_best_order(&dst, ndim)\n * \n *         tmpdata = copy_data_to_temp(&src, &tmp, order, ndim)             # <<<<<<<<<<<<<<\n *         src = tmp\n * \n */\n    __pyx_t_7 = __pyx_memoryview_copy_data_to_temp((&__pyx_v_src), (&__pyx_v_tmp), __pyx_v_order, __pyx_v_ndim); if (unlikely(__pyx_t_7 == ((void *)NULL))) __PYX_ERR(1, 1307, __pyx_L1_error)\n    __pyx_v_tmpdata = __pyx_t_7;\n\n    /* \"View.MemoryView\":1308\n * \n *         tmpdata = copy_data_to_temp(&src, &tmp, order, ndim)\n *         src = tmp             # <<<<<<<<<<<<<<\n * \n *     if not broadcasting:\n */\n    __pyx_v_src = __pyx_v_tmp;\n\n    /* \"View.MemoryView\":1302\n *             _err_dim(ValueError, \"Dimension %d is not direct\", i)\n * \n *     if slices_overlap(&src, &dst, ndim, itemsize):             # <<<<<<<<<<<<<<\n * \n *         if not slice_is_contig(src, order, ndim):\n */\n  }\n\n  /* \"View.MemoryView\":1310\n *         src = tmp\n * \n *     if not broadcasting:             # <<<<<<<<<<<<<<\n * \n * \n */\n  __pyx_t_2 = ((!(__pyx_v_broadcasting != 0)) != 0);\n  if (__pyx_t_2) {\n\n    /* \"View.MemoryView\":1313\n * \n * \n *         if slice_is_contig(src, 'C', ndim):             # <<<<<<<<<<<<<<\n *             direct_copy = slice_is_contig(dst, 'C', ndim)\n *         elif slice_is_contig(src, 'F', ndim):\n */\n    __pyx_t_2 = (__pyx_memviewslice_is_contig(__pyx_v_src, 'C', __pyx_v_ndim) != 0);\n    if (__pyx_t_2) {\n\n      /* \"View.MemoryView\":1314\n * \n *         if slice_is_contig(src, 'C', ndim):\n *             direct_copy = slice_is_contig(dst, 'C', ndim)             # <<<<<<<<<<<<<<\n *         elif slice_is_contig(src, 'F', ndim):\n *             direct_copy = slice_is_contig(dst, 'F', ndim)\n */\n      __pyx_v_direct_copy = __pyx_memviewslice_is_contig(__pyx_v_dst, 'C', __pyx_v_ndim);\n\n      /* \"View.MemoryView\":1313\n * \n * \n *         if slice_is_contig(src, 'C', ndim):             # <<<<<<<<<<<<<<\n *             direct_copy = slice_is_contig(dst, 'C', ndim)\n *         elif slice_is_contig(src, 'F', ndim):\n */\n      goto __pyx_L12;\n    }\n\n    /* \"View.MemoryView\":1315\n *         if slice_is_contig(src, 'C', ndim):\n *             direct_copy = slice_is_contig(dst, 'C', ndim)\n *         elif slice_is_contig(src, 'F', ndim):             # <<<<<<<<<<<<<<\n *             direct_copy = slice_is_contig(dst, 'F', ndim)\n * \n */\n    __pyx_t_2 = (__pyx_memviewslice_is_contig(__pyx_v_src, 'F', __pyx_v_ndim) != 0);\n    if (__pyx_t_2) {\n\n      /* \"View.MemoryView\":1316\n *             direct_copy = slice_is_contig(dst, 'C', ndim)\n *         elif slice_is_contig(src, 'F', ndim):\n *             direct_copy = slice_is_contig(dst, 'F', ndim)             # <<<<<<<<<<<<<<\n * \n *         if direct_copy:\n */\n      __pyx_v_direct_copy = __pyx_memviewslice_is_contig(__pyx_v_dst, 'F', __pyx_v_ndim);\n\n      /* \"View.MemoryView\":1315\n *         if slice_is_contig(src, 'C', ndim):\n *             direct_copy = slice_is_contig(dst, 'C', ndim)\n *         elif slice_is_contig(src, 'F', ndim):             # <<<<<<<<<<<<<<\n *             direct_copy = slice_is_contig(dst, 'F', ndim)\n * \n */\n    }\n    __pyx_L12:;\n\n    /* \"View.MemoryView\":1318\n *             direct_copy = slice_is_contig(dst, 'F', ndim)\n * \n *         if direct_copy:             # <<<<<<<<<<<<<<\n * \n *             refcount_copying(&dst, dtype_is_object, ndim, False)\n */\n    __pyx_t_2 = (__pyx_v_direct_copy != 0);\n    if (__pyx_t_2) {\n\n      /* \"View.MemoryView\":1320\n *         if direct_copy:\n * \n *             refcount_copying(&dst, dtype_is_object, ndim, False)             # <<<<<<<<<<<<<<\n *             memcpy(dst.data, src.data, slice_get_size(&src, ndim))\n *             refcount_copying(&dst, dtype_is_object, ndim, True)\n */\n      __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 0);\n\n      /* \"View.MemoryView\":1321\n * \n *             refcount_copying(&dst, dtype_is_object, ndim, False)\n *             memcpy(dst.data, src.data, slice_get_size(&src, ndim))             # <<<<<<<<<<<<<<\n *             refcount_copying(&dst, dtype_is_object, ndim, True)\n *             free(tmpdata)\n */\n      (void)(memcpy(__pyx_v_dst.data, __pyx_v_src.data, __pyx_memoryview_slice_get_size((&__pyx_v_src), __pyx_v_ndim)));\n\n      /* \"View.MemoryView\":1322\n *             refcount_copying(&dst, dtype_is_object, ndim, False)\n *             memcpy(dst.data, src.data, slice_get_size(&src, ndim))\n *             refcount_copying(&dst, dtype_is_object, ndim, True)             # <<<<<<<<<<<<<<\n *             free(tmpdata)\n *             return 0\n */\n      __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 1);\n\n      /* \"View.MemoryView\":1323\n *             memcpy(dst.data, src.data, slice_get_size(&src, ndim))\n *             refcount_copying(&dst, dtype_is_object, ndim, True)\n *             free(tmpdata)             # <<<<<<<<<<<<<<\n *             return 0\n * \n */\n      free(__pyx_v_tmpdata);\n\n      /* \"View.MemoryView\":1324\n *             refcount_copying(&dst, dtype_is_object, ndim, True)\n *             free(tmpdata)\n *             return 0             # <<<<<<<<<<<<<<\n * \n *     if order == 'F' == get_best_order(&dst, ndim):\n */\n      __pyx_r = 0;\n      goto __pyx_L0;\n\n      /* \"View.MemoryView\":1318\n *             direct_copy = slice_is_contig(dst, 'F', ndim)\n * \n *         if direct_copy:             # <<<<<<<<<<<<<<\n * \n *             refcount_copying(&dst, dtype_is_object, ndim, False)\n */\n    }\n\n    /* \"View.MemoryView\":1310\n *         src = tmp\n * \n *     if not broadcasting:             # <<<<<<<<<<<<<<\n * \n * \n */\n  }\n\n  /* \"View.MemoryView\":1326\n *             return 0\n * \n *     if order == 'F' == get_best_order(&dst, ndim):             # <<<<<<<<<<<<<<\n * \n * \n */\n  __pyx_t_2 = (__pyx_v_order == 'F');\n  if (__pyx_t_2) {\n    __pyx_t_2 = ('F' == __pyx_get_best_slice_order((&__pyx_v_dst), __pyx_v_ndim));\n  }\n  __pyx_t_8 = (__pyx_t_2 != 0);\n  if (__pyx_t_8) {\n\n    /* \"View.MemoryView\":1329\n * \n * \n *         transpose_memslice(&src)             # <<<<<<<<<<<<<<\n *         transpose_memslice(&dst)\n * \n */\n    __pyx_t_5 = __pyx_memslice_transpose((&__pyx_v_src)); if (unlikely(__pyx_t_5 == ((int)0))) __PYX_ERR(1, 1329, __pyx_L1_error)\n\n    /* \"View.MemoryView\":1330\n * \n *         transpose_memslice(&src)\n *         transpose_memslice(&dst)             # <<<<<<<<<<<<<<\n * \n *     refcount_copying(&dst, dtype_is_object, ndim, False)\n */\n    __pyx_t_5 = __pyx_memslice_transpose((&__pyx_v_dst)); if (unlikely(__pyx_t_5 == ((int)0))) __PYX_ERR(1, 1330, __pyx_L1_error)\n\n    /* \"View.MemoryView\":1326\n *             return 0\n * \n *     if order == 'F' == get_best_order(&dst, ndim):             # <<<<<<<<<<<<<<\n * \n * \n */\n  }\n\n  /* \"View.MemoryView\":1332\n *         transpose_memslice(&dst)\n * \n *     refcount_copying(&dst, dtype_is_object, ndim, False)             # <<<<<<<<<<<<<<\n *     copy_strided_to_strided(&src, &dst, ndim, itemsize)\n *     refcount_copying(&dst, dtype_is_object, ndim, True)\n */\n  __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 0);\n\n  /* \"View.MemoryView\":1333\n * \n *     refcount_copying(&dst, dtype_is_object, ndim, False)\n *     copy_strided_to_strided(&src, &dst, ndim, itemsize)             # <<<<<<<<<<<<<<\n *     refcount_copying(&dst, dtype_is_object, ndim, True)\n * \n */\n  copy_strided_to_strided((&__pyx_v_src), (&__pyx_v_dst), __pyx_v_ndim, __pyx_v_itemsize);\n\n  /* \"View.MemoryView\":1334\n *     refcount_copying(&dst, dtype_is_object, ndim, False)\n *     copy_strided_to_strided(&src, &dst, ndim, itemsize)\n *     refcount_copying(&dst, dtype_is_object, ndim, True)             # <<<<<<<<<<<<<<\n * \n *     free(tmpdata)\n */\n  __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 1);\n\n  /* \"View.MemoryView\":1336\n *     refcount_copying(&dst, dtype_is_object, ndim, True)\n * \n *     free(tmpdata)             # <<<<<<<<<<<<<<\n *     return 0\n * \n */\n  free(__pyx_v_tmpdata);\n\n  /* \"View.MemoryView\":1337\n * \n *     free(tmpdata)\n *     return 0             # <<<<<<<<<<<<<<\n * \n * @cname('__pyx_memoryview_broadcast_leading')\n */\n  __pyx_r = 0;\n  goto __pyx_L0;\n\n  /* \"View.MemoryView\":1268\n * \n * @cname('__pyx_memoryview_copy_contents')\n * cdef int memoryview_copy_contents(__Pyx_memviewslice src,             # <<<<<<<<<<<<<<\n *                                   __Pyx_memviewslice dst,\n *                                   int src_ndim, int dst_ndim,\n */\n\n  /* function exit code */\n  __pyx_L1_error:;\n  {\n    #ifdef WITH_THREAD\n    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();\n    #endif\n    __Pyx_AddTraceback(\"View.MemoryView.memoryview_copy_contents\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n    #ifdef WITH_THREAD\n    __Pyx_PyGILState_Release(__pyx_gilstate_save);\n    #endif\n  }\n  __pyx_r = -1;\n  __pyx_L0:;\n  return __pyx_r;\n}\n\n/* \"View.MemoryView\":1340\n * \n * @cname('__pyx_memoryview_broadcast_leading')\n * cdef void broadcast_leading(__Pyx_memviewslice *mslice,             # <<<<<<<<<<<<<<\n *                             int ndim,\n *                             int ndim_other) nogil:\n */\n\nstatic void __pyx_memoryview_broadcast_leading(__Pyx_memviewslice *__pyx_v_mslice, int __pyx_v_ndim, int __pyx_v_ndim_other) {\n  int __pyx_v_i;\n  int __pyx_v_offset;\n  int __pyx_t_1;\n  int __pyx_t_2;\n  int __pyx_t_3;\n\n  /* \"View.MemoryView\":1344\n *                             int ndim_other) nogil:\n *     cdef int i\n *     cdef int offset = ndim_other - ndim             # <<<<<<<<<<<<<<\n * \n *     for i in range(ndim - 1, -1, -1):\n */\n  __pyx_v_offset = (__pyx_v_ndim_other - __pyx_v_ndim);\n\n  /* \"View.MemoryView\":1346\n *     cdef int offset = ndim_other - ndim\n * \n *     for i in range(ndim - 1, -1, -1):             # <<<<<<<<<<<<<<\n *         mslice.shape[i + offset] = mslice.shape[i]\n *         mslice.strides[i + offset] = mslice.strides[i]\n */\n  for (__pyx_t_1 = (__pyx_v_ndim - 1); __pyx_t_1 > -1; __pyx_t_1-=1) {\n    __pyx_v_i = __pyx_t_1;\n\n    /* \"View.MemoryView\":1347\n * \n *     for i in range(ndim - 1, -1, -1):\n *         mslice.shape[i + offset] = mslice.shape[i]             # <<<<<<<<<<<<<<\n *         mslice.strides[i + offset] = mslice.strides[i]\n *         mslice.suboffsets[i + offset] = mslice.suboffsets[i]\n */\n    (__pyx_v_mslice->shape[(__pyx_v_i + __pyx_v_offset)]) = (__pyx_v_mslice->shape[__pyx_v_i]);\n\n    /* \"View.MemoryView\":1348\n *     for i in range(ndim - 1, -1, -1):\n *         mslice.shape[i + offset] = mslice.shape[i]\n *         mslice.strides[i + offset] = mslice.strides[i]             # <<<<<<<<<<<<<<\n *         mslice.suboffsets[i + offset] = mslice.suboffsets[i]\n * \n */\n    (__pyx_v_mslice->strides[(__pyx_v_i + __pyx_v_offset)]) = (__pyx_v_mslice->strides[__pyx_v_i]);\n\n    /* \"View.MemoryView\":1349\n *         mslice.shape[i + offset] = mslice.shape[i]\n *         mslice.strides[i + offset] = mslice.strides[i]\n *         mslice.suboffsets[i + offset] = mslice.suboffsets[i]             # <<<<<<<<<<<<<<\n * \n *     for i in range(offset):\n */\n    (__pyx_v_mslice->suboffsets[(__pyx_v_i + __pyx_v_offset)]) = (__pyx_v_mslice->suboffsets[__pyx_v_i]);\n  }\n\n  /* \"View.MemoryView\":1351\n *         mslice.suboffsets[i + offset] = mslice.suboffsets[i]\n * \n *     for i in range(offset):             # <<<<<<<<<<<<<<\n *         mslice.shape[i] = 1\n *         mslice.strides[i] = mslice.strides[0]\n */\n  __pyx_t_1 = __pyx_v_offset;\n  __pyx_t_2 = __pyx_t_1;\n  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {\n    __pyx_v_i = __pyx_t_3;\n\n    /* \"View.MemoryView\":1352\n * \n *     for i in range(offset):\n *         mslice.shape[i] = 1             # <<<<<<<<<<<<<<\n *         mslice.strides[i] = mslice.strides[0]\n *         mslice.suboffsets[i] = -1\n */\n    (__pyx_v_mslice->shape[__pyx_v_i]) = 1;\n\n    /* \"View.MemoryView\":1353\n *     for i in range(offset):\n *         mslice.shape[i] = 1\n *         mslice.strides[i] = mslice.strides[0]             # <<<<<<<<<<<<<<\n *         mslice.suboffsets[i] = -1\n * \n */\n    (__pyx_v_mslice->strides[__pyx_v_i]) = (__pyx_v_mslice->strides[0]);\n\n    /* \"View.MemoryView\":1354\n *         mslice.shape[i] = 1\n *         mslice.strides[i] = mslice.strides[0]\n *         mslice.suboffsets[i] = -1             # <<<<<<<<<<<<<<\n * \n * \n */\n    (__pyx_v_mslice->suboffsets[__pyx_v_i]) = -1L;\n  }\n\n  /* \"View.MemoryView\":1340\n * \n * @cname('__pyx_memoryview_broadcast_leading')\n * cdef void broadcast_leading(__Pyx_memviewslice *mslice,             # <<<<<<<<<<<<<<\n *                             int ndim,\n *                             int ndim_other) nogil:\n */\n\n  /* function exit code */\n}\n\n/* \"View.MemoryView\":1362\n * \n * @cname('__pyx_memoryview_refcount_copying')\n * cdef void refcount_copying(__Pyx_memviewslice *dst, bint dtype_is_object,             # <<<<<<<<<<<<<<\n *                            int ndim, bint inc) nogil:\n * \n */\n\nstatic void __pyx_memoryview_refcount_copying(__Pyx_memviewslice *__pyx_v_dst, int __pyx_v_dtype_is_object, int __pyx_v_ndim, int __pyx_v_inc) {\n  int __pyx_t_1;\n\n  /* \"View.MemoryView\":1366\n * \n * \n *     if dtype_is_object:             # <<<<<<<<<<<<<<\n *         refcount_objects_in_slice_with_gil(dst.data, dst.shape,\n *                                            dst.strides, ndim, inc)\n */\n  __pyx_t_1 = (__pyx_v_dtype_is_object != 0);\n  if (__pyx_t_1) {\n\n    /* \"View.MemoryView\":1367\n * \n *     if dtype_is_object:\n *         refcount_objects_in_slice_with_gil(dst.data, dst.shape,             # <<<<<<<<<<<<<<\n *                                            dst.strides, ndim, inc)\n * \n */\n    __pyx_memoryview_refcount_objects_in_slice_with_gil(__pyx_v_dst->data, __pyx_v_dst->shape, __pyx_v_dst->strides, __pyx_v_ndim, __pyx_v_inc);\n\n    /* \"View.MemoryView\":1366\n * \n * \n *     if dtype_is_object:             # <<<<<<<<<<<<<<\n *         refcount_objects_in_slice_with_gil(dst.data, dst.shape,\n *                                            dst.strides, ndim, inc)\n */\n  }\n\n  /* \"View.MemoryView\":1362\n * \n * @cname('__pyx_memoryview_refcount_copying')\n * cdef void refcount_copying(__Pyx_memviewslice *dst, bint dtype_is_object,             # <<<<<<<<<<<<<<\n *                            int ndim, bint inc) nogil:\n * \n */\n\n  /* function exit code */\n}\n\n/* \"View.MemoryView\":1371\n * \n * @cname('__pyx_memoryview_refcount_objects_in_slice_with_gil')\n * cdef void refcount_objects_in_slice_with_gil(char *data, Py_ssize_t *shape,             # <<<<<<<<<<<<<<\n *                                              Py_ssize_t *strides, int ndim,\n *                                              bint inc) with gil:\n */\n\nstatic void __pyx_memoryview_refcount_objects_in_slice_with_gil(char *__pyx_v_data, Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, int __pyx_v_ndim, int __pyx_v_inc) {\n  __Pyx_RefNannyDeclarations\n  #ifdef WITH_THREAD\n  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();\n  #endif\n  __Pyx_RefNannySetupContext(\"refcount_objects_in_slice_with_gil\", 0);\n\n  /* \"View.MemoryView\":1374\n *                                              Py_ssize_t *strides, int ndim,\n *                                              bint inc) with gil:\n *     refcount_objects_in_slice(data, shape, strides, ndim, inc)             # <<<<<<<<<<<<<<\n * \n * @cname('__pyx_memoryview_refcount_objects_in_slice')\n */\n  __pyx_memoryview_refcount_objects_in_slice(__pyx_v_data, __pyx_v_shape, __pyx_v_strides, __pyx_v_ndim, __pyx_v_inc);\n\n  /* \"View.MemoryView\":1371\n * \n * @cname('__pyx_memoryview_refcount_objects_in_slice_with_gil')\n * cdef void refcount_objects_in_slice_with_gil(char *data, Py_ssize_t *shape,             # <<<<<<<<<<<<<<\n *                                              Py_ssize_t *strides, int ndim,\n *                                              bint inc) with gil:\n */\n\n  /* function exit code */\n  __Pyx_RefNannyFinishContext();\n  #ifdef WITH_THREAD\n  __Pyx_PyGILState_Release(__pyx_gilstate_save);\n  #endif\n}\n\n/* \"View.MemoryView\":1377\n * \n * @cname('__pyx_memoryview_refcount_objects_in_slice')\n * cdef void refcount_objects_in_slice(char *data, Py_ssize_t *shape,             # <<<<<<<<<<<<<<\n *                                     Py_ssize_t *strides, int ndim, bint inc):\n *     cdef Py_ssize_t i\n */\n\nstatic void __pyx_memoryview_refcount_objects_in_slice(char *__pyx_v_data, Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, int __pyx_v_ndim, int __pyx_v_inc) {\n  CYTHON_UNUSED Py_ssize_t __pyx_v_i;\n  __Pyx_RefNannyDeclarations\n  Py_ssize_t __pyx_t_1;\n  Py_ssize_t __pyx_t_2;\n  Py_ssize_t __pyx_t_3;\n  int __pyx_t_4;\n  __Pyx_RefNannySetupContext(\"refcount_objects_in_slice\", 0);\n\n  /* \"View.MemoryView\":1381\n *     cdef Py_ssize_t i\n * \n *     for i in range(shape[0]):             # <<<<<<<<<<<<<<\n *         if ndim == 1:\n *             if inc:\n */\n  __pyx_t_1 = (__pyx_v_shape[0]);\n  __pyx_t_2 = __pyx_t_1;\n  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {\n    __pyx_v_i = __pyx_t_3;\n\n    /* \"View.MemoryView\":1382\n * \n *     for i in range(shape[0]):\n *         if ndim == 1:             # <<<<<<<<<<<<<<\n *             if inc:\n *                 Py_INCREF((<PyObject **> data)[0])\n */\n    __pyx_t_4 = ((__pyx_v_ndim == 1) != 0);\n    if (__pyx_t_4) {\n\n      /* \"View.MemoryView\":1383\n *     for i in range(shape[0]):\n *         if ndim == 1:\n *             if inc:             # <<<<<<<<<<<<<<\n *                 Py_INCREF((<PyObject **> data)[0])\n *             else:\n */\n      __pyx_t_4 = (__pyx_v_inc != 0);\n      if (__pyx_t_4) {\n\n        /* \"View.MemoryView\":1384\n *         if ndim == 1:\n *             if inc:\n *                 Py_INCREF((<PyObject **> data)[0])             # <<<<<<<<<<<<<<\n *             else:\n *                 Py_DECREF((<PyObject **> data)[0])\n */\n        Py_INCREF((((PyObject **)__pyx_v_data)[0]));\n\n        /* \"View.MemoryView\":1383\n *     for i in range(shape[0]):\n *         if ndim == 1:\n *             if inc:             # <<<<<<<<<<<<<<\n *                 Py_INCREF((<PyObject **> data)[0])\n *             else:\n */\n        goto __pyx_L6;\n      }\n\n      /* \"View.MemoryView\":1386\n *                 Py_INCREF((<PyObject **> data)[0])\n *             else:\n *                 Py_DECREF((<PyObject **> data)[0])             # <<<<<<<<<<<<<<\n *         else:\n *             refcount_objects_in_slice(data, shape + 1, strides + 1,\n */\n      /*else*/ {\n        Py_DECREF((((PyObject **)__pyx_v_data)[0]));\n      }\n      __pyx_L6:;\n\n      /* \"View.MemoryView\":1382\n * \n *     for i in range(shape[0]):\n *         if ndim == 1:             # <<<<<<<<<<<<<<\n *             if inc:\n *                 Py_INCREF((<PyObject **> data)[0])\n */\n      goto __pyx_L5;\n    }\n\n    /* \"View.MemoryView\":1388\n *                 Py_DECREF((<PyObject **> data)[0])\n *         else:\n *             refcount_objects_in_slice(data, shape + 1, strides + 1,             # <<<<<<<<<<<<<<\n *                                       ndim - 1, inc)\n * \n */\n    /*else*/ {\n\n      /* \"View.MemoryView\":1389\n *         else:\n *             refcount_objects_in_slice(data, shape + 1, strides + 1,\n *                                       ndim - 1, inc)             # <<<<<<<<<<<<<<\n * \n *         data += strides[0]\n */\n      __pyx_memoryview_refcount_objects_in_slice(__pyx_v_data, (__pyx_v_shape + 1), (__pyx_v_strides + 1), (__pyx_v_ndim - 1), __pyx_v_inc);\n    }\n    __pyx_L5:;\n\n    /* \"View.MemoryView\":1391\n *                                       ndim - 1, inc)\n * \n *         data += strides[0]             # <<<<<<<<<<<<<<\n * \n * \n */\n    __pyx_v_data = (__pyx_v_data + (__pyx_v_strides[0]));\n  }\n\n  /* \"View.MemoryView\":1377\n * \n * @cname('__pyx_memoryview_refcount_objects_in_slice')\n * cdef void refcount_objects_in_slice(char *data, Py_ssize_t *shape,             # <<<<<<<<<<<<<<\n *                                     Py_ssize_t *strides, int ndim, bint inc):\n *     cdef Py_ssize_t i\n */\n\n  /* function exit code */\n  __Pyx_RefNannyFinishContext();\n}\n\n/* \"View.MemoryView\":1397\n * \n * @cname('__pyx_memoryview_slice_assign_scalar')\n * cdef void slice_assign_scalar(__Pyx_memviewslice *dst, int ndim,             # <<<<<<<<<<<<<<\n *                               size_t itemsize, void *item,\n *                               bint dtype_is_object) nogil:\n */\n\nstatic void __pyx_memoryview_slice_assign_scalar(__Pyx_memviewslice *__pyx_v_dst, int __pyx_v_ndim, size_t __pyx_v_itemsize, void *__pyx_v_item, int __pyx_v_dtype_is_object) {\n\n  /* \"View.MemoryView\":1400\n *                               size_t itemsize, void *item,\n *                               bint dtype_is_object) nogil:\n *     refcount_copying(dst, dtype_is_object, ndim, False)             # <<<<<<<<<<<<<<\n *     _slice_assign_scalar(dst.data, dst.shape, dst.strides, ndim,\n *                          itemsize, item)\n */\n  __pyx_memoryview_refcount_copying(__pyx_v_dst, __pyx_v_dtype_is_object, __pyx_v_ndim, 0);\n\n  /* \"View.MemoryView\":1401\n *                               bint dtype_is_object) nogil:\n *     refcount_copying(dst, dtype_is_object, ndim, False)\n *     _slice_assign_scalar(dst.data, dst.shape, dst.strides, ndim,             # <<<<<<<<<<<<<<\n *                          itemsize, item)\n *     refcount_copying(dst, dtype_is_object, ndim, True)\n */\n  __pyx_memoryview__slice_assign_scalar(__pyx_v_dst->data, __pyx_v_dst->shape, __pyx_v_dst->strides, __pyx_v_ndim, __pyx_v_itemsize, __pyx_v_item);\n\n  /* \"View.MemoryView\":1403\n *     _slice_assign_scalar(dst.data, dst.shape, dst.strides, ndim,\n *                          itemsize, item)\n *     refcount_copying(dst, dtype_is_object, ndim, True)             # <<<<<<<<<<<<<<\n * \n * \n */\n  __pyx_memoryview_refcount_copying(__pyx_v_dst, __pyx_v_dtype_is_object, __pyx_v_ndim, 1);\n\n  /* \"View.MemoryView\":1397\n * \n * @cname('__pyx_memoryview_slice_assign_scalar')\n * cdef void slice_assign_scalar(__Pyx_memviewslice *dst, int ndim,             # <<<<<<<<<<<<<<\n *                               size_t itemsize, void *item,\n *                               bint dtype_is_object) nogil:\n */\n\n  /* function exit code */\n}\n\n/* \"View.MemoryView\":1407\n * \n * @cname('__pyx_memoryview__slice_assign_scalar')\n * cdef void _slice_assign_scalar(char *data, Py_ssize_t *shape,             # <<<<<<<<<<<<<<\n *                               Py_ssize_t *strides, int ndim,\n *                               size_t itemsize, void *item) nogil:\n */\n\nstatic void __pyx_memoryview__slice_assign_scalar(char *__pyx_v_data, Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, int __pyx_v_ndim, size_t __pyx_v_itemsize, void *__pyx_v_item) {\n  CYTHON_UNUSED Py_ssize_t __pyx_v_i;\n  Py_ssize_t __pyx_v_stride;\n  Py_ssize_t __pyx_v_extent;\n  int __pyx_t_1;\n  Py_ssize_t __pyx_t_2;\n  Py_ssize_t __pyx_t_3;\n  Py_ssize_t __pyx_t_4;\n\n  /* \"View.MemoryView\":1411\n *                               size_t itemsize, void *item) nogil:\n *     cdef Py_ssize_t i\n *     cdef Py_ssize_t stride = strides[0]             # <<<<<<<<<<<<<<\n *     cdef Py_ssize_t extent = shape[0]\n * \n */\n  __pyx_v_stride = (__pyx_v_strides[0]);\n\n  /* \"View.MemoryView\":1412\n *     cdef Py_ssize_t i\n *     cdef Py_ssize_t stride = strides[0]\n *     cdef Py_ssize_t extent = shape[0]             # <<<<<<<<<<<<<<\n * \n *     if ndim == 1:\n */\n  __pyx_v_extent = (__pyx_v_shape[0]);\n\n  /* \"View.MemoryView\":1414\n *     cdef Py_ssize_t extent = shape[0]\n * \n *     if ndim == 1:             # <<<<<<<<<<<<<<\n *         for i in range(extent):\n *             memcpy(data, item, itemsize)\n */\n  __pyx_t_1 = ((__pyx_v_ndim == 1) != 0);\n  if (__pyx_t_1) {\n\n    /* \"View.MemoryView\":1415\n * \n *     if ndim == 1:\n *         for i in range(extent):             # <<<<<<<<<<<<<<\n *             memcpy(data, item, itemsize)\n *             data += stride\n */\n    __pyx_t_2 = __pyx_v_extent;\n    __pyx_t_3 = __pyx_t_2;\n    for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {\n      __pyx_v_i = __pyx_t_4;\n\n      /* \"View.MemoryView\":1416\n *     if ndim == 1:\n *         for i in range(extent):\n *             memcpy(data, item, itemsize)             # <<<<<<<<<<<<<<\n *             data += stride\n *     else:\n */\n      (void)(memcpy(__pyx_v_data, __pyx_v_item, __pyx_v_itemsize));\n\n      /* \"View.MemoryView\":1417\n *         for i in range(extent):\n *             memcpy(data, item, itemsize)\n *             data += stride             # <<<<<<<<<<<<<<\n *     else:\n *         for i in range(extent):\n */\n      __pyx_v_data = (__pyx_v_data + __pyx_v_stride);\n    }\n\n    /* \"View.MemoryView\":1414\n *     cdef Py_ssize_t extent = shape[0]\n * \n *     if ndim == 1:             # <<<<<<<<<<<<<<\n *         for i in range(extent):\n *             memcpy(data, item, itemsize)\n */\n    goto __pyx_L3;\n  }\n\n  /* \"View.MemoryView\":1419\n *             data += stride\n *     else:\n *         for i in range(extent):             # <<<<<<<<<<<<<<\n *             _slice_assign_scalar(data, shape + 1, strides + 1,\n *                                 ndim - 1, itemsize, item)\n */\n  /*else*/ {\n    __pyx_t_2 = __pyx_v_extent;\n    __pyx_t_3 = __pyx_t_2;\n    for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {\n      __pyx_v_i = __pyx_t_4;\n\n      /* \"View.MemoryView\":1420\n *     else:\n *         for i in range(extent):\n *             _slice_assign_scalar(data, shape + 1, strides + 1,             # <<<<<<<<<<<<<<\n *                                 ndim - 1, itemsize, item)\n *             data += stride\n */\n      __pyx_memoryview__slice_assign_scalar(__pyx_v_data, (__pyx_v_shape + 1), (__pyx_v_strides + 1), (__pyx_v_ndim - 1), __pyx_v_itemsize, __pyx_v_item);\n\n      /* \"View.MemoryView\":1422\n *             _slice_assign_scalar(data, shape + 1, strides + 1,\n *                                 ndim - 1, itemsize, item)\n *             data += stride             # <<<<<<<<<<<<<<\n * \n * \n */\n      __pyx_v_data = (__pyx_v_data + __pyx_v_stride);\n    }\n  }\n  __pyx_L3:;\n\n  /* \"View.MemoryView\":1407\n * \n * @cname('__pyx_memoryview__slice_assign_scalar')\n * cdef void _slice_assign_scalar(char *data, Py_ssize_t *shape,             # <<<<<<<<<<<<<<\n *                               Py_ssize_t *strides, int ndim,\n *                               size_t itemsize, void *item) nogil:\n */\n\n  /* function exit code */\n}\n\n/* \"(tree fragment)\":1\n * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<\n *     cdef object __pyx_PickleError\n *     cdef object __pyx_result\n */\n\n/* Python wrapper */\nstatic PyObject *__pyx_pw_15View_dot_MemoryView_1__pyx_unpickle_Enum(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/\nstatic PyMethodDef __pyx_mdef_15View_dot_MemoryView_1__pyx_unpickle_Enum = {\"__pyx_unpickle_Enum\", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_15View_dot_MemoryView_1__pyx_unpickle_Enum, METH_VARARGS|METH_KEYWORDS, 0};\nstatic PyObject *__pyx_pw_15View_dot_MemoryView_1__pyx_unpickle_Enum(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {\n  PyObject *__pyx_v___pyx_type = 0;\n  long __pyx_v___pyx_checksum;\n  PyObject *__pyx_v___pyx_state = 0;\n  int __pyx_lineno = 0;\n  const char *__pyx_filename = NULL;\n  int __pyx_clineno = 0;\n  PyObject *__pyx_r = 0;\n  __Pyx_RefNannyDeclarations\n  __Pyx_RefNannySetupContext(\"__pyx_unpickle_Enum (wrapper)\", 0);\n  {\n    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};\n    PyObject* values[3] = {0,0,0};\n    if (unlikely(__pyx_kwds)) {\n      Py_ssize_t kw_args;\n      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);\n      switch (pos_args) {\n        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);\n        CYTHON_FALLTHROUGH;\n        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);\n        CYTHON_FALLTHROUGH;\n        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);\n        CYTHON_FALLTHROUGH;\n        case  0: break;\n        default: goto __pyx_L5_argtuple_error;\n      }\n      kw_args = PyDict_Size(__pyx_kwds);\n      switch (pos_args) {\n        case  0:\n        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;\n        else goto __pyx_L5_argtuple_error;\n        CYTHON_FALLTHROUGH;\n        case  1:\n        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;\n        else {\n          __Pyx_RaiseArgtupleInvalid(\"__pyx_unpickle_Enum\", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)\n        }\n        CYTHON_FALLTHROUGH;\n        case  2:\n        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;\n        else {\n          __Pyx_RaiseArgtupleInvalid(\"__pyx_unpickle_Enum\", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)\n        }\n      }\n      if (unlikely(kw_args > 0)) {\n        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, \"__pyx_unpickle_Enum\") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)\n      }\n    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {\n      goto __pyx_L5_argtuple_error;\n    } else {\n      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);\n      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);\n      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);\n    }\n    __pyx_v___pyx_type = values[0];\n    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)\n    __pyx_v___pyx_state = values[2];\n  }\n  goto __pyx_L4_argument_unpacking_done;\n  __pyx_L5_argtuple_error:;\n  __Pyx_RaiseArgtupleInvalid(\"__pyx_unpickle_Enum\", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)\n  __pyx_L3_error:;\n  __Pyx_AddTraceback(\"View.MemoryView.__pyx_unpickle_Enum\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n  __Pyx_RefNannyFinishContext();\n  return NULL;\n  __pyx_L4_argument_unpacking_done:;\n  __pyx_r = __pyx_pf_15View_dot_MemoryView___pyx_unpickle_Enum(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);\n\n  /* function exit code */\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\nstatic PyObject *__pyx_pf_15View_dot_MemoryView___pyx_unpickle_Enum(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {\n  PyObject *__pyx_v___pyx_PickleError = 0;\n  PyObject *__pyx_v___pyx_result = 0;\n  PyObject *__pyx_r = NULL;\n  __Pyx_RefNannyDeclarations\n  PyObject *__pyx_t_1 = NULL;\n  int __pyx_t_2;\n  int __pyx_t_3;\n  PyObject *__pyx_t_4 = NULL;\n  PyObject *__pyx_t_5 = NULL;\n  PyObject *__pyx_t_6 = NULL;\n  int __pyx_lineno = 0;\n  const char *__pyx_filename = NULL;\n  int __pyx_clineno = 0;\n  __Pyx_RefNannySetupContext(\"__pyx_unpickle_Enum\", 0);\n\n  /* \"(tree fragment)\":4\n *     cdef object __pyx_PickleError\n *     cdef object __pyx_result\n *     if __pyx_checksum not in (0xb068931, 0x82a3537, 0x6ae9995):             # <<<<<<<<<<<<<<\n *         from pickle import PickleError as __pyx_PickleError\n *         raise __pyx_PickleError(\"Incompatible checksums (0x%x vs (0xb068931, 0x82a3537, 0x6ae9995) = (name))\" % __pyx_checksum)\n */\n  __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__34, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 4, __pyx_L1_error)\n  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n  __pyx_t_3 = (__pyx_t_2 != 0);\n  if (__pyx_t_3) {\n\n    /* \"(tree fragment)\":5\n *     cdef object __pyx_result\n *     if __pyx_checksum not in (0xb068931, 0x82a3537, 0x6ae9995):\n *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<\n *         raise __pyx_PickleError(\"Incompatible checksums (0x%x vs (0xb068931, 0x82a3537, 0x6ae9995) = (name))\" % __pyx_checksum)\n *     __pyx_result = Enum.__new__(__pyx_type)\n */\n    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_1);\n    __Pyx_INCREF(__pyx_n_s_PickleError);\n    __Pyx_GIVEREF(__pyx_n_s_PickleError);\n    PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError);\n    __pyx_t_4 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 5, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_4);\n    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n    __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_1);\n    __Pyx_INCREF(__pyx_t_1);\n    __pyx_v___pyx_PickleError = __pyx_t_1;\n    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;\n\n    /* \"(tree fragment)\":6\n *     if __pyx_checksum not in (0xb068931, 0x82a3537, 0x6ae9995):\n *         from pickle import PickleError as __pyx_PickleError\n *         raise __pyx_PickleError(\"Incompatible checksums (0x%x vs (0xb068931, 0x82a3537, 0x6ae9995) = (name))\" % __pyx_checksum)             # <<<<<<<<<<<<<<\n *     __pyx_result = Enum.__new__(__pyx_type)\n *     if __pyx_state is not None:\n */\n    __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_1);\n    __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_2, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 6, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_5);\n    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n    __Pyx_INCREF(__pyx_v___pyx_PickleError);\n    __pyx_t_1 = __pyx_v___pyx_PickleError; __pyx_t_6 = NULL;\n    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {\n      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);\n      if (likely(__pyx_t_6)) {\n        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);\n        __Pyx_INCREF(__pyx_t_6);\n        __Pyx_INCREF(function);\n        __Pyx_DECREF_SET(__pyx_t_1, function);\n      }\n    }\n    __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5);\n    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;\n    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;\n    if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_4);\n    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n    __Pyx_Raise(__pyx_t_4, 0, 0, 0);\n    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;\n    __PYX_ERR(1, 6, __pyx_L1_error)\n\n    /* \"(tree fragment)\":4\n *     cdef object __pyx_PickleError\n *     cdef object __pyx_result\n *     if __pyx_checksum not in (0xb068931, 0x82a3537, 0x6ae9995):             # <<<<<<<<<<<<<<\n *         from pickle import PickleError as __pyx_PickleError\n *         raise __pyx_PickleError(\"Incompatible checksums (0x%x vs (0xb068931, 0x82a3537, 0x6ae9995) = (name))\" % __pyx_checksum)\n */\n  }\n\n  /* \"(tree fragment)\":7\n *         from pickle import PickleError as __pyx_PickleError\n *         raise __pyx_PickleError(\"Incompatible checksums (0x%x vs (0xb068931, 0x82a3537, 0x6ae9995) = (name))\" % __pyx_checksum)\n *     __pyx_result = Enum.__new__(__pyx_type)             # <<<<<<<<<<<<<<\n *     if __pyx_state is not None:\n *         __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)\n */\n  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_MemviewEnum_type), __pyx_n_s_new); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 7, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __pyx_t_5 = NULL;\n  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {\n    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);\n    if (likely(__pyx_t_5)) {\n      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);\n      __Pyx_INCREF(__pyx_t_5);\n      __Pyx_INCREF(function);\n      __Pyx_DECREF_SET(__pyx_t_1, function);\n    }\n  }\n  __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v___pyx_type);\n  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;\n  if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 7, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_4);\n  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n  __pyx_v___pyx_result = __pyx_t_4;\n  __pyx_t_4 = 0;\n\n  /* \"(tree fragment)\":8\n *         raise __pyx_PickleError(\"Incompatible checksums (0x%x vs (0xb068931, 0x82a3537, 0x6ae9995) = (name))\" % __pyx_checksum)\n *     __pyx_result = Enum.__new__(__pyx_type)\n *     if __pyx_state is not None:             # <<<<<<<<<<<<<<\n *         __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)\n *     return __pyx_result\n */\n  __pyx_t_3 = (__pyx_v___pyx_state != Py_None);\n  __pyx_t_2 = (__pyx_t_3 != 0);\n  if (__pyx_t_2) {\n\n    /* \"(tree fragment)\":9\n *     __pyx_result = Enum.__new__(__pyx_type)\n *     if __pyx_state is not None:\n *         __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<\n *     return __pyx_result\n * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):\n */\n    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, \"Expected %.16s, got %.200s\", \"tuple\", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)\n    __pyx_t_4 = __pyx_unpickle_Enum__set_state(((struct __pyx_MemviewEnum_obj *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 9, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_4);\n    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;\n\n    /* \"(tree fragment)\":8\n *         raise __pyx_PickleError(\"Incompatible checksums (0x%x vs (0xb068931, 0x82a3537, 0x6ae9995) = (name))\" % __pyx_checksum)\n *     __pyx_result = Enum.__new__(__pyx_type)\n *     if __pyx_state is not None:             # <<<<<<<<<<<<<<\n *         __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)\n *     return __pyx_result\n */\n  }\n\n  /* \"(tree fragment)\":10\n *     if __pyx_state is not None:\n *         __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)\n *     return __pyx_result             # <<<<<<<<<<<<<<\n * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):\n *     __pyx_result.name = __pyx_state[0]\n */\n  __Pyx_XDECREF(__pyx_r);\n  __Pyx_INCREF(__pyx_v___pyx_result);\n  __pyx_r = __pyx_v___pyx_result;\n  goto __pyx_L0;\n\n  /* \"(tree fragment)\":1\n * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<\n *     cdef object __pyx_PickleError\n *     cdef object __pyx_result\n */\n\n  /* function exit code */\n  __pyx_L1_error:;\n  __Pyx_XDECREF(__pyx_t_1);\n  __Pyx_XDECREF(__pyx_t_4);\n  __Pyx_XDECREF(__pyx_t_5);\n  __Pyx_XDECREF(__pyx_t_6);\n  __Pyx_AddTraceback(\"View.MemoryView.__pyx_unpickle_Enum\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n  __pyx_r = NULL;\n  __pyx_L0:;\n  __Pyx_XDECREF(__pyx_v___pyx_PickleError);\n  __Pyx_XDECREF(__pyx_v___pyx_result);\n  __Pyx_XGIVEREF(__pyx_r);\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\n\n/* \"(tree fragment)\":11\n *         __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)\n *     return __pyx_result\n * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<\n *     __pyx_result.name = __pyx_state[0]\n *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):\n */\n\nstatic PyObject *__pyx_unpickle_Enum__set_state(struct __pyx_MemviewEnum_obj *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {\n  PyObject *__pyx_r = NULL;\n  __Pyx_RefNannyDeclarations\n  PyObject *__pyx_t_1 = NULL;\n  int __pyx_t_2;\n  Py_ssize_t __pyx_t_3;\n  int __pyx_t_4;\n  int __pyx_t_5;\n  PyObject *__pyx_t_6 = NULL;\n  PyObject *__pyx_t_7 = NULL;\n  PyObject *__pyx_t_8 = NULL;\n  int __pyx_lineno = 0;\n  const char *__pyx_filename = NULL;\n  int __pyx_clineno = 0;\n  __Pyx_RefNannySetupContext(\"__pyx_unpickle_Enum__set_state\", 0);\n\n  /* \"(tree fragment)\":12\n *     return __pyx_result\n * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):\n *     __pyx_result.name = __pyx_state[0]             # <<<<<<<<<<<<<<\n *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):\n *         __pyx_result.__dict__.update(__pyx_state[1])\n */\n  if (unlikely(__pyx_v___pyx_state == Py_None)) {\n    PyErr_SetString(PyExc_TypeError, \"'NoneType' object is not subscriptable\");\n    __PYX_ERR(1, 12, __pyx_L1_error)\n  }\n  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_1);\n  __Pyx_GOTREF(__pyx_v___pyx_result->name);\n  __Pyx_DECREF(__pyx_v___pyx_result->name);\n  __pyx_v___pyx_result->name = __pyx_t_1;\n  __pyx_t_1 = 0;\n\n  /* \"(tree fragment)\":13\n * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):\n *     __pyx_result.name = __pyx_state[0]\n *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<\n *         __pyx_result.__dict__.update(__pyx_state[1])\n */\n  if (unlikely(__pyx_v___pyx_state == Py_None)) {\n    PyErr_SetString(PyExc_TypeError, \"object of type 'NoneType' has no len()\");\n    __PYX_ERR(1, 13, __pyx_L1_error)\n  }\n  __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)\n  __pyx_t_4 = ((__pyx_t_3 > 1) != 0);\n  if (__pyx_t_4) {\n  } else {\n    __pyx_t_2 = __pyx_t_4;\n    goto __pyx_L4_bool_binop_done;\n  }\n  __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)\n  __pyx_t_5 = (__pyx_t_4 != 0);\n  __pyx_t_2 = __pyx_t_5;\n  __pyx_L4_bool_binop_done:;\n  if (__pyx_t_2) {\n\n    /* \"(tree fragment)\":14\n *     __pyx_result.name = __pyx_state[0]\n *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):\n *         __pyx_result.__dict__.update(__pyx_state[1])             # <<<<<<<<<<<<<<\n */\n    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_6);\n    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_7);\n    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;\n    if (unlikely(__pyx_v___pyx_state == Py_None)) {\n      PyErr_SetString(PyExc_TypeError, \"'NoneType' object is not subscriptable\");\n      __PYX_ERR(1, 14, __pyx_L1_error)\n    }\n    __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_6);\n    __pyx_t_8 = NULL;\n    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {\n      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);\n      if (likely(__pyx_t_8)) {\n        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);\n        __Pyx_INCREF(__pyx_t_8);\n        __Pyx_INCREF(function);\n        __Pyx_DECREF_SET(__pyx_t_7, function);\n      }\n    }\n    __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);\n    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;\n    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;\n    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)\n    __Pyx_GOTREF(__pyx_t_1);\n    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;\n    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n\n    /* \"(tree fragment)\":13\n * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):\n *     __pyx_result.name = __pyx_state[0]\n *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<\n *         __pyx_result.__dict__.update(__pyx_state[1])\n */\n  }\n\n  /* \"(tree fragment)\":11\n *         __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)\n *     return __pyx_result\n * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<\n *     __pyx_result.name = __pyx_state[0]\n *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):\n */\n\n  /* function exit code */\n  __pyx_r = Py_None; __Pyx_INCREF(Py_None);\n  goto __pyx_L0;\n  __pyx_L1_error:;\n  __Pyx_XDECREF(__pyx_t_1);\n  __Pyx_XDECREF(__pyx_t_6);\n  __Pyx_XDECREF(__pyx_t_7);\n  __Pyx_XDECREF(__pyx_t_8);\n  __Pyx_AddTraceback(\"View.MemoryView.__pyx_unpickle_Enum__set_state\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n  __pyx_r = 0;\n  __pyx_L0:;\n  __Pyx_XGIVEREF(__pyx_r);\n  __Pyx_RefNannyFinishContext();\n  return __pyx_r;\n}\nstatic struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell __pyx_vtable_26_marching_cubes_lewiner_cy_Cell;\n\nstatic PyObject *__pyx_tp_new_26_marching_cubes_lewiner_cy_Cell(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {\n  struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *p;\n  PyObject *o;\n  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {\n    o = (*t->tp_alloc)(t, 0);\n  } else {\n    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);\n  }\n  if (unlikely(!o)) return 0;\n  p = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *)o);\n  p->__pyx_vtab = __pyx_vtabptr_26_marching_cubes_lewiner_cy_Cell;\n  p->luts = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_LutProvider *)Py_None); Py_INCREF(Py_None);\n  if (unlikely(__pyx_pw_26_marching_cubes_lewiner_cy_4Cell_3__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad;\n  return o;\n  bad:\n  Py_DECREF(o); o = 0;\n  return NULL;\n}\n\nstatic void __pyx_tp_dealloc_26_marching_cubes_lewiner_cy_Cell(PyObject *o) {\n  struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *p = (struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *)o;\n  #if CYTHON_USE_TP_FINALIZE\n  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {\n    if (PyObject_CallFinalizerFromDealloc(o)) return;\n  }\n  #endif\n  PyObject_GC_UnTrack(o);\n  {\n    PyObject *etype, *eval, *etb;\n    PyErr_Fetch(&etype, &eval, &etb);\n    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);\n    __pyx_pw_26_marching_cubes_lewiner_cy_4Cell_5__dealloc__(o);\n    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);\n    PyErr_Restore(etype, eval, etb);\n  }\n  Py_CLEAR(p->luts);\n  (*Py_TYPE(o)->tp_free)(o);\n}\n\nstatic int __pyx_tp_traverse_26_marching_cubes_lewiner_cy_Cell(PyObject *o, visitproc v, void *a) {\n  int e;\n  struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *p = (struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *)o;\n  if (p->luts) {\n    e = (*v)(((PyObject *)p->luts), a); if (e) return e;\n  }\n  return 0;\n}\n\nstatic int __pyx_tp_clear_26_marching_cubes_lewiner_cy_Cell(PyObject *o) {\n  PyObject* tmp;\n  struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *p = (struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *)o;\n  tmp = ((PyObject*)p->luts);\n  p->luts = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_LutProvider *)Py_None); Py_INCREF(Py_None);\n  Py_XDECREF(tmp);\n  return 0;\n}\n\nstatic PyMethodDef __pyx_methods_26_marching_cubes_lewiner_cy_Cell[] = {\n  {\"get_vertices\", (PyCFunction)__pyx_pw_26_marching_cubes_lewiner_cy_4Cell_7get_vertices, METH_NOARGS, __pyx_doc_26_marching_cubes_lewiner_cy_4Cell_6get_vertices},\n  {\"get_normals\", (PyCFunction)__pyx_pw_26_marching_cubes_lewiner_cy_4Cell_9get_normals, METH_NOARGS, __pyx_doc_26_marching_cubes_lewiner_cy_4Cell_8get_normals},\n  {\"get_faces\", (PyCFunction)__pyx_pw_26_marching_cubes_lewiner_cy_4Cell_11get_faces, METH_NOARGS, 0},\n  {\"get_values\", (PyCFunction)__pyx_pw_26_marching_cubes_lewiner_cy_4Cell_13get_values, METH_NOARGS, 0},\n  {\"__reduce_cython__\", (PyCFunction)__pyx_pw_26_marching_cubes_lewiner_cy_4Cell_15__reduce_cython__, METH_NOARGS, 0},\n  {\"__setstate_cython__\", (PyCFunction)__pyx_pw_26_marching_cubes_lewiner_cy_4Cell_17__setstate_cython__, METH_O, 0},\n  {0, 0, 0, 0}\n};\n\nstatic PyTypeObject __pyx_type_26_marching_cubes_lewiner_cy_Cell = {\n  PyVarObject_HEAD_INIT(0, 0)\n  \"_marching_cubes_lewiner_cy.Cell\", /*tp_name*/\n  sizeof(struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell), /*tp_basicsize*/\n  0, /*tp_itemsize*/\n  __pyx_tp_dealloc_26_marching_cubes_lewiner_cy_Cell, /*tp_dealloc*/\n  #if PY_VERSION_HEX < 0x030800b4\n  0, /*tp_print*/\n  #endif\n  #if PY_VERSION_HEX >= 0x030800b4\n  0, /*tp_vectorcall_offset*/\n  #endif\n  0, /*tp_getattr*/\n  0, /*tp_setattr*/\n  #if PY_MAJOR_VERSION < 3\n  0, /*tp_compare*/\n  #endif\n  #if PY_MAJOR_VERSION >= 3\n  0, /*tp_as_async*/\n  #endif\n  0, /*tp_repr*/\n  0, /*tp_as_number*/\n  0, /*tp_as_sequence*/\n  0, /*tp_as_mapping*/\n  0, /*tp_hash*/\n  0, /*tp_call*/\n  0, /*tp_str*/\n  0, /*tp_getattro*/\n  0, /*tp_setattro*/\n  0, /*tp_as_buffer*/\n  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/\n  \" Class to keep track of some stuff during the whole cube marching\\n    procedure.\\n\\n    This \\\"struct\\\" keeps track of the current cell location, and the values\\n    of corners of the cube. Gradients for the cube corners are calculated\\n    when needed.\\n\\n    Additionally, it keeps track of the array of vertices, faces and normals.\\n\\n    Notes on vertices\\n    -----------------\\n    The vertices are stored in a C-array that is increased in size with\\n    factors of two if needed. The same applies to the faces and normals.\\n\\n    Notes on faces\\n    --------------\\n    To keep track of the vertices already defined, this class maintains\\n    two faceLayer arrays. faceLayer1 is of the current layer (z-value)\\n    and faceLayer2 is of the next. Both face layers have 4 elements per\\n    cell in that layer, 1 for each unique edge per cell (see\\n    get_index_in_facelayer). These are initialized as -1, and set to the\\n    index in the vertex array when a new vertex is created.\\n    In summary, this allows us to keep track of the already created\\n    vertices without keeping a very big array.\\n\\n    Notes on normals\\n    ----------------\\n    The normal is simply defined as the gradient. Each time that a face is\\n    created, we also add the gradient of that vertex position to the\\n    normals array. The gradients are all calculated from the differences between\\n    the 8 corners of the current cube, but because the final value of a normal\\n    was contributed from multiple cells, the normals are quite accurate.\\n\\n    \", /*tp_doc*/\n  __pyx_tp_traverse_26_marching_cubes_lewiner_cy_Cell, /*tp_traverse*/\n  __pyx_tp_clear_26_marching_cubes_lewiner_cy_Cell, /*tp_clear*/\n  0, /*tp_richcompare*/\n  0, /*tp_weaklistoffset*/\n  0, /*tp_iter*/\n  0, /*tp_iternext*/\n  __pyx_methods_26_marching_cubes_lewiner_cy_Cell, /*tp_methods*/\n  0, /*tp_members*/\n  0, /*tp_getset*/\n  0, /*tp_base*/\n  0, /*tp_dict*/\n  0, /*tp_descr_get*/\n  0, /*tp_descr_set*/\n  0, /*tp_dictoffset*/\n  __pyx_pw_26_marching_cubes_lewiner_cy_4Cell_1__init__, /*tp_init*/\n  0, /*tp_alloc*/\n  __pyx_tp_new_26_marching_cubes_lewiner_cy_Cell, /*tp_new*/\n  0, /*tp_free*/\n  0, /*tp_is_gc*/\n  0, /*tp_bases*/\n  0, /*tp_mro*/\n  0, /*tp_cache*/\n  0, /*tp_subclasses*/\n  0, /*tp_weaklist*/\n  0, /*tp_del*/\n  0, /*tp_version_tag*/\n  #if PY_VERSION_HEX >= 0x030400a1\n  0, /*tp_finalize*/\n  #endif\n  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)\n  0, /*tp_vectorcall*/\n  #endif\n  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000\n  0, /*tp_print*/\n  #endif\n  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000\n  0, /*tp_pypy_flags*/\n  #endif\n};\nstatic struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Lut __pyx_vtable_26_marching_cubes_lewiner_cy_Lut;\n\nstatic PyObject *__pyx_tp_new_26_marching_cubes_lewiner_cy_Lut(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {\n  struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *p;\n  PyObject *o;\n  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {\n    o = (*t->tp_alloc)(t, 0);\n  } else {\n    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);\n  }\n  if (unlikely(!o)) return 0;\n  p = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)o);\n  p->__pyx_vtab = __pyx_vtabptr_26_marching_cubes_lewiner_cy_Lut;\n  if (unlikely(__pyx_pw_26_marching_cubes_lewiner_cy_3Lut_3__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad;\n  return o;\n  bad:\n  Py_DECREF(o); o = 0;\n  return NULL;\n}\n\nstatic void __pyx_tp_dealloc_26_marching_cubes_lewiner_cy_Lut(PyObject *o) {\n  #if CYTHON_USE_TP_FINALIZE\n  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {\n    if (PyObject_CallFinalizerFromDealloc(o)) return;\n  }\n  #endif\n  {\n    PyObject *etype, *eval, *etb;\n    PyErr_Fetch(&etype, &eval, &etb);\n    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);\n    __pyx_pw_26_marching_cubes_lewiner_cy_3Lut_5__dealloc__(o);\n    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);\n    PyErr_Restore(etype, eval, etb);\n  }\n  (*Py_TYPE(o)->tp_free)(o);\n}\n\nstatic PyMethodDef __pyx_methods_26_marching_cubes_lewiner_cy_Lut[] = {\n  {\"__reduce_cython__\", (PyCFunction)__pyx_pw_26_marching_cubes_lewiner_cy_3Lut_7__reduce_cython__, METH_NOARGS, 0},\n  {\"__setstate_cython__\", (PyCFunction)__pyx_pw_26_marching_cubes_lewiner_cy_3Lut_9__setstate_cython__, METH_O, 0},\n  {0, 0, 0, 0}\n};\n\nstatic PyTypeObject __pyx_type_26_marching_cubes_lewiner_cy_Lut = {\n  PyVarObject_HEAD_INIT(0, 0)\n  \"_marching_cubes_lewiner_cy.Lut\", /*tp_name*/\n  sizeof(struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut), /*tp_basicsize*/\n  0, /*tp_itemsize*/\n  __pyx_tp_dealloc_26_marching_cubes_lewiner_cy_Lut, /*tp_dealloc*/\n  #if PY_VERSION_HEX < 0x030800b4\n  0, /*tp_print*/\n  #endif\n  #if PY_VERSION_HEX >= 0x030800b4\n  0, /*tp_vectorcall_offset*/\n  #endif\n  0, /*tp_getattr*/\n  0, /*tp_setattr*/\n  #if PY_MAJOR_VERSION < 3\n  0, /*tp_compare*/\n  #endif\n  #if PY_MAJOR_VERSION >= 3\n  0, /*tp_as_async*/\n  #endif\n  0, /*tp_repr*/\n  0, /*tp_as_number*/\n  0, /*tp_as_sequence*/\n  0, /*tp_as_mapping*/\n  0, /*tp_hash*/\n  0, /*tp_call*/\n  0, /*tp_str*/\n  0, /*tp_getattro*/\n  0, /*tp_setattro*/\n  0, /*tp_as_buffer*/\n  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/\n  \" Representation of a lookup table.\\n    The tables are initially defined as numpy arrays. On initialization,\\n    this class converts them to a C array for fast access.\\n    This class defines functions to look up values using 1, 2 or 3 indices.\\n    \", /*tp_doc*/\n  0, /*tp_traverse*/\n  0, /*tp_clear*/\n  0, /*tp_richcompare*/\n  0, /*tp_weaklistoffset*/\n  0, /*tp_iter*/\n  0, /*tp_iternext*/\n  __pyx_methods_26_marching_cubes_lewiner_cy_Lut, /*tp_methods*/\n  0, /*tp_members*/\n  0, /*tp_getset*/\n  0, /*tp_base*/\n  0, /*tp_dict*/\n  0, /*tp_descr_get*/\n  0, /*tp_descr_set*/\n  0, /*tp_dictoffset*/\n  __pyx_pw_26_marching_cubes_lewiner_cy_3Lut_1__init__, /*tp_init*/\n  0, /*tp_alloc*/\n  __pyx_tp_new_26_marching_cubes_lewiner_cy_Lut, /*tp_new*/\n  0, /*tp_free*/\n  0, /*tp_is_gc*/\n  0, /*tp_bases*/\n  0, /*tp_mro*/\n  0, /*tp_cache*/\n  0, /*tp_subclasses*/\n  0, /*tp_weaklist*/\n  0, /*tp_del*/\n  0, /*tp_version_tag*/\n  #if PY_VERSION_HEX >= 0x030400a1\n  0, /*tp_finalize*/\n  #endif\n  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)\n  0, /*tp_vectorcall*/\n  #endif\n  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000\n  0, /*tp_print*/\n  #endif\n  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000\n  0, /*tp_pypy_flags*/\n  #endif\n};\n\nstatic PyObject *__pyx_tp_new_26_marching_cubes_lewiner_cy_LutProvider(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {\n  struct __pyx_obj_26_marching_cubes_lewiner_cy_LutProvider *p;\n  PyObject *o;\n  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {\n    o = (*t->tp_alloc)(t, 0);\n  } else {\n    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);\n  }\n  if (unlikely(!o)) return 0;\n  p = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_LutProvider *)o);\n  p->EDGESRELX = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)Py_None); Py_INCREF(Py_None);\n  p->EDGESRELY = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)Py_None); Py_INCREF(Py_None);\n  p->EDGESRELZ = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)Py_None); Py_INCREF(Py_None);\n  p->CASESCLASSIC = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)Py_None); Py_INCREF(Py_None);\n  p->CASES = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)Py_None); Py_INCREF(Py_None);\n  p->TILING1 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)Py_None); Py_INCREF(Py_None);\n  p->TILING2 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)Py_None); Py_INCREF(Py_None);\n  p->TILING3_1 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)Py_None); Py_INCREF(Py_None);\n  p->TILING3_2 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)Py_None); Py_INCREF(Py_None);\n  p->TILING4_1 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)Py_None); Py_INCREF(Py_None);\n  p->TILING4_2 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)Py_None); Py_INCREF(Py_None);\n  p->TILING5 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)Py_None); Py_INCREF(Py_None);\n  p->TILING6_1_1 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)Py_None); Py_INCREF(Py_None);\n  p->TILING6_1_2 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)Py_None); Py_INCREF(Py_None);\n  p->TILING6_2 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)Py_None); Py_INCREF(Py_None);\n  p->TILING7_1 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)Py_None); Py_INCREF(Py_None);\n  p->TILING7_2 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)Py_None); Py_INCREF(Py_None);\n  p->TILING7_3 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)Py_None); Py_INCREF(Py_None);\n  p->TILING7_4_1 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)Py_None); Py_INCREF(Py_None);\n  p->TILING7_4_2 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)Py_None); Py_INCREF(Py_None);\n  p->TILING8 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)Py_None); Py_INCREF(Py_None);\n  p->TILING9 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)Py_None); Py_INCREF(Py_None);\n  p->TILING10_1_1 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)Py_None); Py_INCREF(Py_None);\n  p->TILING10_1_1_ = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)Py_None); Py_INCREF(Py_None);\n  p->TILING10_1_2 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)Py_None); Py_INCREF(Py_None);\n  p->TILING10_2 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)Py_None); Py_INCREF(Py_None);\n  p->TILING10_2_ = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)Py_None); Py_INCREF(Py_None);\n  p->TILING11 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)Py_None); Py_INCREF(Py_None);\n  p->TILING12_1_1 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)Py_None); Py_INCREF(Py_None);\n  p->TILING12_1_1_ = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)Py_None); Py_INCREF(Py_None);\n  p->TILING12_1_2 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)Py_None); Py_INCREF(Py_None);\n  p->TILING12_2 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)Py_None); Py_INCREF(Py_None);\n  p->TILING12_2_ = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)Py_None); Py_INCREF(Py_None);\n  p->TILING13_1 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)Py_None); Py_INCREF(Py_None);\n  p->TILING13_1_ = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)Py_None); Py_INCREF(Py_None);\n  p->TILING13_2 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)Py_None); Py_INCREF(Py_None);\n  p->TILING13_2_ = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)Py_None); Py_INCREF(Py_None);\n  p->TILING13_3 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)Py_None); Py_INCREF(Py_None);\n  p->TILING13_3_ = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)Py_None); Py_INCREF(Py_None);\n  p->TILING13_4 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)Py_None); Py_INCREF(Py_None);\n  p->TILING13_5_1 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)Py_None); Py_INCREF(Py_None);\n  p->TILING13_5_2 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)Py_None); Py_INCREF(Py_None);\n  p->TILING14 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)Py_None); Py_INCREF(Py_None);\n  p->TEST3 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)Py_None); Py_INCREF(Py_None);\n  p->TEST4 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)Py_None); Py_INCREF(Py_None);\n  p->TEST6 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)Py_None); Py_INCREF(Py_None);\n  p->TEST7 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)Py_None); Py_INCREF(Py_None);\n  p->TEST10 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)Py_None); Py_INCREF(Py_None);\n  p->TEST12 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)Py_None); Py_INCREF(Py_None);\n  p->TEST13 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)Py_None); Py_INCREF(Py_None);\n  p->SUBCONFIG13 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)Py_None); Py_INCREF(Py_None);\n  return o;\n}\n\nstatic void __pyx_tp_dealloc_26_marching_cubes_lewiner_cy_LutProvider(PyObject *o) {\n  struct __pyx_obj_26_marching_cubes_lewiner_cy_LutProvider *p = (struct __pyx_obj_26_marching_cubes_lewiner_cy_LutProvider *)o;\n  #if CYTHON_USE_TP_FINALIZE\n  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {\n    if (PyObject_CallFinalizerFromDealloc(o)) return;\n  }\n  #endif\n  PyObject_GC_UnTrack(o);\n  Py_CLEAR(p->EDGESRELX);\n  Py_CLEAR(p->EDGESRELY);\n  Py_CLEAR(p->EDGESRELZ);\n  Py_CLEAR(p->CASESCLASSIC);\n  Py_CLEAR(p->CASES);\n  Py_CLEAR(p->TILING1);\n  Py_CLEAR(p->TILING2);\n  Py_CLEAR(p->TILING3_1);\n  Py_CLEAR(p->TILING3_2);\n  Py_CLEAR(p->TILING4_1);\n  Py_CLEAR(p->TILING4_2);\n  Py_CLEAR(p->TILING5);\n  Py_CLEAR(p->TILING6_1_1);\n  Py_CLEAR(p->TILING6_1_2);\n  Py_CLEAR(p->TILING6_2);\n  Py_CLEAR(p->TILING7_1);\n  Py_CLEAR(p->TILING7_2);\n  Py_CLEAR(p->TILING7_3);\n  Py_CLEAR(p->TILING7_4_1);\n  Py_CLEAR(p->TILING7_4_2);\n  Py_CLEAR(p->TILING8);\n  Py_CLEAR(p->TILING9);\n  Py_CLEAR(p->TILING10_1_1);\n  Py_CLEAR(p->TILING10_1_1_);\n  Py_CLEAR(p->TILING10_1_2);\n  Py_CLEAR(p->TILING10_2);\n  Py_CLEAR(p->TILING10_2_);\n  Py_CLEAR(p->TILING11);\n  Py_CLEAR(p->TILING12_1_1);\n  Py_CLEAR(p->TILING12_1_1_);\n  Py_CLEAR(p->TILING12_1_2);\n  Py_CLEAR(p->TILING12_2);\n  Py_CLEAR(p->TILING12_2_);\n  Py_CLEAR(p->TILING13_1);\n  Py_CLEAR(p->TILING13_1_);\n  Py_CLEAR(p->TILING13_2);\n  Py_CLEAR(p->TILING13_2_);\n  Py_CLEAR(p->TILING13_3);\n  Py_CLEAR(p->TILING13_3_);\n  Py_CLEAR(p->TILING13_4);\n  Py_CLEAR(p->TILING13_5_1);\n  Py_CLEAR(p->TILING13_5_2);\n  Py_CLEAR(p->TILING14);\n  Py_CLEAR(p->TEST3);\n  Py_CLEAR(p->TEST4);\n  Py_CLEAR(p->TEST6);\n  Py_CLEAR(p->TEST7);\n  Py_CLEAR(p->TEST10);\n  Py_CLEAR(p->TEST12);\n  Py_CLEAR(p->TEST13);\n  Py_CLEAR(p->SUBCONFIG13);\n  (*Py_TYPE(o)->tp_free)(o);\n}\n\nstatic int __pyx_tp_traverse_26_marching_cubes_lewiner_cy_LutProvider(PyObject *o, visitproc v, void *a) {\n  int e;\n  struct __pyx_obj_26_marching_cubes_lewiner_cy_LutProvider *p = (struct __pyx_obj_26_marching_cubes_lewiner_cy_LutProvider *)o;\n  if (p->EDGESRELX) {\n    e = (*v)(((PyObject *)p->EDGESRELX), a); if (e) return e;\n  }\n  if (p->EDGESRELY) {\n    e = (*v)(((PyObject *)p->EDGESRELY), a); if (e) return e;\n  }\n  if (p->EDGESRELZ) {\n    e = (*v)(((PyObject *)p->EDGESRELZ), a); if (e) return e;\n  }\n  if (p->CASESCLASSIC) {\n    e = (*v)(((PyObject *)p->CASESCLASSIC), a); if (e) return e;\n  }\n  if (p->CASES) {\n    e = (*v)(((PyObject *)p->CASES), a); if (e) return e;\n  }\n  if (p->TILING1) {\n    e = (*v)(((PyObject *)p->TILING1), a); if (e) return e;\n  }\n  if (p->TILING2) {\n    e = (*v)(((PyObject *)p->TILING2), a); if (e) return e;\n  }\n  if (p->TILING3_1) {\n    e = (*v)(((PyObject *)p->TILING3_1), a); if (e) return e;\n  }\n  if (p->TILING3_2) {\n    e = (*v)(((PyObject *)p->TILING3_2), a); if (e) return e;\n  }\n  if (p->TILING4_1) {\n    e = (*v)(((PyObject *)p->TILING4_1), a); if (e) return e;\n  }\n  if (p->TILING4_2) {\n    e = (*v)(((PyObject *)p->TILING4_2), a); if (e) return e;\n  }\n  if (p->TILING5) {\n    e = (*v)(((PyObject *)p->TILING5), a); if (e) return e;\n  }\n  if (p->TILING6_1_1) {\n    e = (*v)(((PyObject *)p->TILING6_1_1), a); if (e) return e;\n  }\n  if (p->TILING6_1_2) {\n    e = (*v)(((PyObject *)p->TILING6_1_2), a); if (e) return e;\n  }\n  if (p->TILING6_2) {\n    e = (*v)(((PyObject *)p->TILING6_2), a); if (e) return e;\n  }\n  if (p->TILING7_1) {\n    e = (*v)(((PyObject *)p->TILING7_1), a); if (e) return e;\n  }\n  if (p->TILING7_2) {\n    e = (*v)(((PyObject *)p->TILING7_2), a); if (e) return e;\n  }\n  if (p->TILING7_3) {\n    e = (*v)(((PyObject *)p->TILING7_3), a); if (e) return e;\n  }\n  if (p->TILING7_4_1) {\n    e = (*v)(((PyObject *)p->TILING7_4_1), a); if (e) return e;\n  }\n  if (p->TILING7_4_2) {\n    e = (*v)(((PyObject *)p->TILING7_4_2), a); if (e) return e;\n  }\n  if (p->TILING8) {\n    e = (*v)(((PyObject *)p->TILING8), a); if (e) return e;\n  }\n  if (p->TILING9) {\n    e = (*v)(((PyObject *)p->TILING9), a); if (e) return e;\n  }\n  if (p->TILING10_1_1) {\n    e = (*v)(((PyObject *)p->TILING10_1_1), a); if (e) return e;\n  }\n  if (p->TILING10_1_1_) {\n    e = (*v)(((PyObject *)p->TILING10_1_1_), a); if (e) return e;\n  }\n  if (p->TILING10_1_2) {\n    e = (*v)(((PyObject *)p->TILING10_1_2), a); if (e) return e;\n  }\n  if (p->TILING10_2) {\n    e = (*v)(((PyObject *)p->TILING10_2), a); if (e) return e;\n  }\n  if (p->TILING10_2_) {\n    e = (*v)(((PyObject *)p->TILING10_2_), a); if (e) return e;\n  }\n  if (p->TILING11) {\n    e = (*v)(((PyObject *)p->TILING11), a); if (e) return e;\n  }\n  if (p->TILING12_1_1) {\n    e = (*v)(((PyObject *)p->TILING12_1_1), a); if (e) return e;\n  }\n  if (p->TILING12_1_1_) {\n    e = (*v)(((PyObject *)p->TILING12_1_1_), a); if (e) return e;\n  }\n  if (p->TILING12_1_2) {\n    e = (*v)(((PyObject *)p->TILING12_1_2), a); if (e) return e;\n  }\n  if (p->TILING12_2) {\n    e = (*v)(((PyObject *)p->TILING12_2), a); if (e) return e;\n  }\n  if (p->TILING12_2_) {\n    e = (*v)(((PyObject *)p->TILING12_2_), a); if (e) return e;\n  }\n  if (p->TILING13_1) {\n    e = (*v)(((PyObject *)p->TILING13_1), a); if (e) return e;\n  }\n  if (p->TILING13_1_) {\n    e = (*v)(((PyObject *)p->TILING13_1_), a); if (e) return e;\n  }\n  if (p->TILING13_2) {\n    e = (*v)(((PyObject *)p->TILING13_2), a); if (e) return e;\n  }\n  if (p->TILING13_2_) {\n    e = (*v)(((PyObject *)p->TILING13_2_), a); if (e) return e;\n  }\n  if (p->TILING13_3) {\n    e = (*v)(((PyObject *)p->TILING13_3), a); if (e) return e;\n  }\n  if (p->TILING13_3_) {\n    e = (*v)(((PyObject *)p->TILING13_3_), a); if (e) return e;\n  }\n  if (p->TILING13_4) {\n    e = (*v)(((PyObject *)p->TILING13_4), a); if (e) return e;\n  }\n  if (p->TILING13_5_1) {\n    e = (*v)(((PyObject *)p->TILING13_5_1), a); if (e) return e;\n  }\n  if (p->TILING13_5_2) {\n    e = (*v)(((PyObject *)p->TILING13_5_2), a); if (e) return e;\n  }\n  if (p->TILING14) {\n    e = (*v)(((PyObject *)p->TILING14), a); if (e) return e;\n  }\n  if (p->TEST3) {\n    e = (*v)(((PyObject *)p->TEST3), a); if (e) return e;\n  }\n  if (p->TEST4) {\n    e = (*v)(((PyObject *)p->TEST4), a); if (e) return e;\n  }\n  if (p->TEST6) {\n    e = (*v)(((PyObject *)p->TEST6), a); if (e) return e;\n  }\n  if (p->TEST7) {\n    e = (*v)(((PyObject *)p->TEST7), a); if (e) return e;\n  }\n  if (p->TEST10) {\n    e = (*v)(((PyObject *)p->TEST10), a); if (e) return e;\n  }\n  if (p->TEST12) {\n    e = (*v)(((PyObject *)p->TEST12), a); if (e) return e;\n  }\n  if (p->TEST13) {\n    e = (*v)(((PyObject *)p->TEST13), a); if (e) return e;\n  }\n  if (p->SUBCONFIG13) {\n    e = (*v)(((PyObject *)p->SUBCONFIG13), a); if (e) return e;\n  }\n  return 0;\n}\n\nstatic int __pyx_tp_clear_26_marching_cubes_lewiner_cy_LutProvider(PyObject *o) {\n  PyObject* tmp;\n  struct __pyx_obj_26_marching_cubes_lewiner_cy_LutProvider *p = (struct __pyx_obj_26_marching_cubes_lewiner_cy_LutProvider *)o;\n  tmp = ((PyObject*)p->EDGESRELX);\n  p->EDGESRELX = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)Py_None); Py_INCREF(Py_None);\n  Py_XDECREF(tmp);\n  tmp = ((PyObject*)p->EDGESRELY);\n  p->EDGESRELY = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)Py_None); Py_INCREF(Py_None);\n  Py_XDECREF(tmp);\n  tmp = ((PyObject*)p->EDGESRELZ);\n  p->EDGESRELZ = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)Py_None); Py_INCREF(Py_None);\n  Py_XDECREF(tmp);\n  tmp = ((PyObject*)p->CASESCLASSIC);\n  p->CASESCLASSIC = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)Py_None); Py_INCREF(Py_None);\n  Py_XDECREF(tmp);\n  tmp = ((PyObject*)p->CASES);\n  p->CASES = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)Py_None); Py_INCREF(Py_None);\n  Py_XDECREF(tmp);\n  tmp = ((PyObject*)p->TILING1);\n  p->TILING1 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)Py_None); Py_INCREF(Py_None);\n  Py_XDECREF(tmp);\n  tmp = ((PyObject*)p->TILING2);\n  p->TILING2 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)Py_None); Py_INCREF(Py_None);\n  Py_XDECREF(tmp);\n  tmp = ((PyObject*)p->TILING3_1);\n  p->TILING3_1 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)Py_None); Py_INCREF(Py_None);\n  Py_XDECREF(tmp);\n  tmp = ((PyObject*)p->TILING3_2);\n  p->TILING3_2 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)Py_None); Py_INCREF(Py_None);\n  Py_XDECREF(tmp);\n  tmp = ((PyObject*)p->TILING4_1);\n  p->TILING4_1 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)Py_None); Py_INCREF(Py_None);\n  Py_XDECREF(tmp);\n  tmp = ((PyObject*)p->TILING4_2);\n  p->TILING4_2 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)Py_None); Py_INCREF(Py_None);\n  Py_XDECREF(tmp);\n  tmp = ((PyObject*)p->TILING5);\n  p->TILING5 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)Py_None); Py_INCREF(Py_None);\n  Py_XDECREF(tmp);\n  tmp = ((PyObject*)p->TILING6_1_1);\n  p->TILING6_1_1 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)Py_None); Py_INCREF(Py_None);\n  Py_XDECREF(tmp);\n  tmp = ((PyObject*)p->TILING6_1_2);\n  p->TILING6_1_2 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)Py_None); Py_INCREF(Py_None);\n  Py_XDECREF(tmp);\n  tmp = ((PyObject*)p->TILING6_2);\n  p->TILING6_2 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)Py_None); Py_INCREF(Py_None);\n  Py_XDECREF(tmp);\n  tmp = ((PyObject*)p->TILING7_1);\n  p->TILING7_1 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)Py_None); Py_INCREF(Py_None);\n  Py_XDECREF(tmp);\n  tmp = ((PyObject*)p->TILING7_2);\n  p->TILING7_2 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)Py_None); Py_INCREF(Py_None);\n  Py_XDECREF(tmp);\n  tmp = ((PyObject*)p->TILING7_3);\n  p->TILING7_3 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)Py_None); Py_INCREF(Py_None);\n  Py_XDECREF(tmp);\n  tmp = ((PyObject*)p->TILING7_4_1);\n  p->TILING7_4_1 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)Py_None); Py_INCREF(Py_None);\n  Py_XDECREF(tmp);\n  tmp = ((PyObject*)p->TILING7_4_2);\n  p->TILING7_4_2 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)Py_None); Py_INCREF(Py_None);\n  Py_XDECREF(tmp);\n  tmp = ((PyObject*)p->TILING8);\n  p->TILING8 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)Py_None); Py_INCREF(Py_None);\n  Py_XDECREF(tmp);\n  tmp = ((PyObject*)p->TILING9);\n  p->TILING9 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)Py_None); Py_INCREF(Py_None);\n  Py_XDECREF(tmp);\n  tmp = ((PyObject*)p->TILING10_1_1);\n  p->TILING10_1_1 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)Py_None); Py_INCREF(Py_None);\n  Py_XDECREF(tmp);\n  tmp = ((PyObject*)p->TILING10_1_1_);\n  p->TILING10_1_1_ = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)Py_None); Py_INCREF(Py_None);\n  Py_XDECREF(tmp);\n  tmp = ((PyObject*)p->TILING10_1_2);\n  p->TILING10_1_2 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)Py_None); Py_INCREF(Py_None);\n  Py_XDECREF(tmp);\n  tmp = ((PyObject*)p->TILING10_2);\n  p->TILING10_2 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)Py_None); Py_INCREF(Py_None);\n  Py_XDECREF(tmp);\n  tmp = ((PyObject*)p->TILING10_2_);\n  p->TILING10_2_ = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)Py_None); Py_INCREF(Py_None);\n  Py_XDECREF(tmp);\n  tmp = ((PyObject*)p->TILING11);\n  p->TILING11 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)Py_None); Py_INCREF(Py_None);\n  Py_XDECREF(tmp);\n  tmp = ((PyObject*)p->TILING12_1_1);\n  p->TILING12_1_1 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)Py_None); Py_INCREF(Py_None);\n  Py_XDECREF(tmp);\n  tmp = ((PyObject*)p->TILING12_1_1_);\n  p->TILING12_1_1_ = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)Py_None); Py_INCREF(Py_None);\n  Py_XDECREF(tmp);\n  tmp = ((PyObject*)p->TILING12_1_2);\n  p->TILING12_1_2 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)Py_None); Py_INCREF(Py_None);\n  Py_XDECREF(tmp);\n  tmp = ((PyObject*)p->TILING12_2);\n  p->TILING12_2 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)Py_None); Py_INCREF(Py_None);\n  Py_XDECREF(tmp);\n  tmp = ((PyObject*)p->TILING12_2_);\n  p->TILING12_2_ = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)Py_None); Py_INCREF(Py_None);\n  Py_XDECREF(tmp);\n  tmp = ((PyObject*)p->TILING13_1);\n  p->TILING13_1 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)Py_None); Py_INCREF(Py_None);\n  Py_XDECREF(tmp);\n  tmp = ((PyObject*)p->TILING13_1_);\n  p->TILING13_1_ = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)Py_None); Py_INCREF(Py_None);\n  Py_XDECREF(tmp);\n  tmp = ((PyObject*)p->TILING13_2);\n  p->TILING13_2 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)Py_None); Py_INCREF(Py_None);\n  Py_XDECREF(tmp);\n  tmp = ((PyObject*)p->TILING13_2_);\n  p->TILING13_2_ = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)Py_None); Py_INCREF(Py_None);\n  Py_XDECREF(tmp);\n  tmp = ((PyObject*)p->TILING13_3);\n  p->TILING13_3 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)Py_None); Py_INCREF(Py_None);\n  Py_XDECREF(tmp);\n  tmp = ((PyObject*)p->TILING13_3_);\n  p->TILING13_3_ = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)Py_None); Py_INCREF(Py_None);\n  Py_XDECREF(tmp);\n  tmp = ((PyObject*)p->TILING13_4);\n  p->TILING13_4 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)Py_None); Py_INCREF(Py_None);\n  Py_XDECREF(tmp);\n  tmp = ((PyObject*)p->TILING13_5_1);\n  p->TILING13_5_1 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)Py_None); Py_INCREF(Py_None);\n  Py_XDECREF(tmp);\n  tmp = ((PyObject*)p->TILING13_5_2);\n  p->TILING13_5_2 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)Py_None); Py_INCREF(Py_None);\n  Py_XDECREF(tmp);\n  tmp = ((PyObject*)p->TILING14);\n  p->TILING14 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)Py_None); Py_INCREF(Py_None);\n  Py_XDECREF(tmp);\n  tmp = ((PyObject*)p->TEST3);\n  p->TEST3 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)Py_None); Py_INCREF(Py_None);\n  Py_XDECREF(tmp);\n  tmp = ((PyObject*)p->TEST4);\n  p->TEST4 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)Py_None); Py_INCREF(Py_None);\n  Py_XDECREF(tmp);\n  tmp = ((PyObject*)p->TEST6);\n  p->TEST6 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)Py_None); Py_INCREF(Py_None);\n  Py_XDECREF(tmp);\n  tmp = ((PyObject*)p->TEST7);\n  p->TEST7 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)Py_None); Py_INCREF(Py_None);\n  Py_XDECREF(tmp);\n  tmp = ((PyObject*)p->TEST10);\n  p->TEST10 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)Py_None); Py_INCREF(Py_None);\n  Py_XDECREF(tmp);\n  tmp = ((PyObject*)p->TEST12);\n  p->TEST12 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)Py_None); Py_INCREF(Py_None);\n  Py_XDECREF(tmp);\n  tmp = ((PyObject*)p->TEST13);\n  p->TEST13 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)Py_None); Py_INCREF(Py_None);\n  Py_XDECREF(tmp);\n  tmp = ((PyObject*)p->SUBCONFIG13);\n  p->SUBCONFIG13 = ((struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *)Py_None); Py_INCREF(Py_None);\n  Py_XDECREF(tmp);\n  return 0;\n}\n\nstatic PyMethodDef __pyx_methods_26_marching_cubes_lewiner_cy_LutProvider[] = {\n  {\"__reduce_cython__\", (PyCFunction)__pyx_pw_26_marching_cubes_lewiner_cy_11LutProvider_3__reduce_cython__, METH_NOARGS, 0},\n  {\"__setstate_cython__\", (PyCFunction)__pyx_pw_26_marching_cubes_lewiner_cy_11LutProvider_5__setstate_cython__, METH_O, 0},\n  {0, 0, 0, 0}\n};\n\nstatic PyTypeObject __pyx_type_26_marching_cubes_lewiner_cy_LutProvider = {\n  PyVarObject_HEAD_INIT(0, 0)\n  \"_marching_cubes_lewiner_cy.LutProvider\", /*tp_name*/\n  sizeof(struct __pyx_obj_26_marching_cubes_lewiner_cy_LutProvider), /*tp_basicsize*/\n  0, /*tp_itemsize*/\n  __pyx_tp_dealloc_26_marching_cubes_lewiner_cy_LutProvider, /*tp_dealloc*/\n  #if PY_VERSION_HEX < 0x030800b4\n  0, /*tp_print*/\n  #endif\n  #if PY_VERSION_HEX >= 0x030800b4\n  0, /*tp_vectorcall_offset*/\n  #endif\n  0, /*tp_getattr*/\n  0, /*tp_setattr*/\n  #if PY_MAJOR_VERSION < 3\n  0, /*tp_compare*/\n  #endif\n  #if PY_MAJOR_VERSION >= 3\n  0, /*tp_as_async*/\n  #endif\n  0, /*tp_repr*/\n  0, /*tp_as_number*/\n  0, /*tp_as_sequence*/\n  0, /*tp_as_mapping*/\n  0, /*tp_hash*/\n  0, /*tp_call*/\n  0, /*tp_str*/\n  0, /*tp_getattro*/\n  0, /*tp_setattro*/\n  0, /*tp_as_buffer*/\n  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/\n  \" Class that provides a common interface to the many lookup tables\\n    used by the algorithm.\\n    All the lists of lut names are autogenerated to prevent human error.\\n    \", /*tp_doc*/\n  __pyx_tp_traverse_26_marching_cubes_lewiner_cy_LutProvider, /*tp_traverse*/\n  __pyx_tp_clear_26_marching_cubes_lewiner_cy_LutProvider, /*tp_clear*/\n  0, /*tp_richcompare*/\n  0, /*tp_weaklistoffset*/\n  0, /*tp_iter*/\n  0, /*tp_iternext*/\n  __pyx_methods_26_marching_cubes_lewiner_cy_LutProvider, /*tp_methods*/\n  0, /*tp_members*/\n  0, /*tp_getset*/\n  0, /*tp_base*/\n  0, /*tp_dict*/\n  0, /*tp_descr_get*/\n  0, /*tp_descr_set*/\n  0, /*tp_dictoffset*/\n  __pyx_pw_26_marching_cubes_lewiner_cy_11LutProvider_1__init__, /*tp_init*/\n  0, /*tp_alloc*/\n  __pyx_tp_new_26_marching_cubes_lewiner_cy_LutProvider, /*tp_new*/\n  0, /*tp_free*/\n  0, /*tp_is_gc*/\n  0, /*tp_bases*/\n  0, /*tp_mro*/\n  0, /*tp_cache*/\n  0, /*tp_subclasses*/\n  0, /*tp_weaklist*/\n  0, /*tp_del*/\n  0, /*tp_version_tag*/\n  #if PY_VERSION_HEX >= 0x030400a1\n  0, /*tp_finalize*/\n  #endif\n  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)\n  0, /*tp_vectorcall*/\n  #endif\n  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000\n  0, /*tp_print*/\n  #endif\n  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000\n  0, /*tp_pypy_flags*/\n  #endif\n};\nstatic struct __pyx_vtabstruct_array __pyx_vtable_array;\n\nstatic PyObject *__pyx_tp_new_array(PyTypeObject *t, PyObject *a, PyObject *k) {\n  struct __pyx_array_obj *p;\n  PyObject *o;\n  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {\n    o = (*t->tp_alloc)(t, 0);\n  } else {\n    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);\n  }\n  if (unlikely(!o)) return 0;\n  p = ((struct __pyx_array_obj *)o);\n  p->__pyx_vtab = __pyx_vtabptr_array;\n  p->mode = ((PyObject*)Py_None); Py_INCREF(Py_None);\n  p->_format = ((PyObject*)Py_None); Py_INCREF(Py_None);\n  if (unlikely(__pyx_array___cinit__(o, a, k) < 0)) goto bad;\n  return o;\n  bad:\n  Py_DECREF(o); o = 0;\n  return NULL;\n}\n\nstatic void __pyx_tp_dealloc_array(PyObject *o) {\n  struct __pyx_array_obj *p = (struct __pyx_array_obj *)o;\n  #if CYTHON_USE_TP_FINALIZE\n  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {\n    if (PyObject_CallFinalizerFromDealloc(o)) return;\n  }\n  #endif\n  {\n    PyObject *etype, *eval, *etb;\n    PyErr_Fetch(&etype, &eval, &etb);\n    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);\n    __pyx_array___dealloc__(o);\n    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);\n    PyErr_Restore(etype, eval, etb);\n  }\n  Py_CLEAR(p->mode);\n  Py_CLEAR(p->_format);\n  (*Py_TYPE(o)->tp_free)(o);\n}\nstatic PyObject *__pyx_sq_item_array(PyObject *o, Py_ssize_t i) {\n  PyObject *r;\n  PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;\n  r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);\n  Py_DECREF(x);\n  return r;\n}\n\nstatic int __pyx_mp_ass_subscript_array(PyObject *o, PyObject *i, PyObject *v) {\n  if (v) {\n    return __pyx_array___setitem__(o, i, v);\n  }\n  else {\n    PyErr_Format(PyExc_NotImplementedError,\n      \"Subscript deletion not supported by %.200s\", Py_TYPE(o)->tp_name);\n    return -1;\n  }\n}\n\nstatic PyObject *__pyx_tp_getattro_array(PyObject *o, PyObject *n) {\n  PyObject *v = __Pyx_PyObject_GenericGetAttr(o, n);\n  if (!v && PyErr_ExceptionMatches(PyExc_AttributeError)) {\n    PyErr_Clear();\n    v = __pyx_array___getattr__(o, n);\n  }\n  return v;\n}\n\nstatic PyObject *__pyx_getprop___pyx_array_memview(PyObject *o, CYTHON_UNUSED void *x) {\n  return __pyx_pw_15View_dot_MemoryView_5array_7memview_1__get__(o);\n}\n\nstatic PyMethodDef __pyx_methods_array[] = {\n  {\"__getattr__\", (PyCFunction)__pyx_array___getattr__, METH_O|METH_COEXIST, 0},\n  {\"__reduce_cython__\", (PyCFunction)__pyx_pw___pyx_array_1__reduce_cython__, METH_NOARGS, 0},\n  {\"__setstate_cython__\", (PyCFunction)__pyx_pw___pyx_array_3__setstate_cython__, METH_O, 0},\n  {0, 0, 0, 0}\n};\n\nstatic struct PyGetSetDef __pyx_getsets_array[] = {\n  {(char *)\"memview\", __pyx_getprop___pyx_array_memview, 0, (char *)0, 0},\n  {0, 0, 0, 0, 0}\n};\n\nstatic PySequenceMethods __pyx_tp_as_sequence_array = {\n  __pyx_array___len__, /*sq_length*/\n  0, /*sq_concat*/\n  0, /*sq_repeat*/\n  __pyx_sq_item_array, /*sq_item*/\n  0, /*sq_slice*/\n  0, /*sq_ass_item*/\n  0, /*sq_ass_slice*/\n  0, /*sq_contains*/\n  0, /*sq_inplace_concat*/\n  0, /*sq_inplace_repeat*/\n};\n\nstatic PyMappingMethods __pyx_tp_as_mapping_array = {\n  __pyx_array___len__, /*mp_length*/\n  __pyx_array___getitem__, /*mp_subscript*/\n  __pyx_mp_ass_subscript_array, /*mp_ass_subscript*/\n};\n\nstatic PyBufferProcs __pyx_tp_as_buffer_array = {\n  #if PY_MAJOR_VERSION < 3\n  0, /*bf_getreadbuffer*/\n  #endif\n  #if PY_MAJOR_VERSION < 3\n  0, /*bf_getwritebuffer*/\n  #endif\n  #if PY_MAJOR_VERSION < 3\n  0, /*bf_getsegcount*/\n  #endif\n  #if PY_MAJOR_VERSION < 3\n  0, /*bf_getcharbuffer*/\n  #endif\n  __pyx_array_getbuffer, /*bf_getbuffer*/\n  0, /*bf_releasebuffer*/\n};\n\nstatic PyTypeObject __pyx_type___pyx_array = {\n  PyVarObject_HEAD_INIT(0, 0)\n  \"_marching_cubes_lewiner_cy.array\", /*tp_name*/\n  sizeof(struct __pyx_array_obj), /*tp_basicsize*/\n  0, /*tp_itemsize*/\n  __pyx_tp_dealloc_array, /*tp_dealloc*/\n  #if PY_VERSION_HEX < 0x030800b4\n  0, /*tp_print*/\n  #endif\n  #if PY_VERSION_HEX >= 0x030800b4\n  0, /*tp_vectorcall_offset*/\n  #endif\n  0, /*tp_getattr*/\n  0, /*tp_setattr*/\n  #if PY_MAJOR_VERSION < 3\n  0, /*tp_compare*/\n  #endif\n  #if PY_MAJOR_VERSION >= 3\n  0, /*tp_as_async*/\n  #endif\n  0, /*tp_repr*/\n  0, /*tp_as_number*/\n  &__pyx_tp_as_sequence_array, /*tp_as_sequence*/\n  &__pyx_tp_as_mapping_array, /*tp_as_mapping*/\n  0, /*tp_hash*/\n  0, /*tp_call*/\n  0, /*tp_str*/\n  __pyx_tp_getattro_array, /*tp_getattro*/\n  0, /*tp_setattro*/\n  &__pyx_tp_as_buffer_array, /*tp_as_buffer*/\n  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/\n  0, /*tp_doc*/\n  0, /*tp_traverse*/\n  0, /*tp_clear*/\n  0, /*tp_richcompare*/\n  0, /*tp_weaklistoffset*/\n  0, /*tp_iter*/\n  0, /*tp_iternext*/\n  __pyx_methods_array, /*tp_methods*/\n  0, /*tp_members*/\n  __pyx_getsets_array, /*tp_getset*/\n  0, /*tp_base*/\n  0, /*tp_dict*/\n  0, /*tp_descr_get*/\n  0, /*tp_descr_set*/\n  0, /*tp_dictoffset*/\n  0, /*tp_init*/\n  0, /*tp_alloc*/\n  __pyx_tp_new_array, /*tp_new*/\n  0, /*tp_free*/\n  0, /*tp_is_gc*/\n  0, /*tp_bases*/\n  0, /*tp_mro*/\n  0, /*tp_cache*/\n  0, /*tp_subclasses*/\n  0, /*tp_weaklist*/\n  0, /*tp_del*/\n  0, /*tp_version_tag*/\n  #if PY_VERSION_HEX >= 0x030400a1\n  0, /*tp_finalize*/\n  #endif\n  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)\n  0, /*tp_vectorcall*/\n  #endif\n  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000\n  0, /*tp_print*/\n  #endif\n  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000\n  0, /*tp_pypy_flags*/\n  #endif\n};\n\nstatic PyObject *__pyx_tp_new_Enum(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {\n  struct __pyx_MemviewEnum_obj *p;\n  PyObject *o;\n  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {\n    o = (*t->tp_alloc)(t, 0);\n  } else {\n    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);\n  }\n  if (unlikely(!o)) return 0;\n  p = ((struct __pyx_MemviewEnum_obj *)o);\n  p->name = Py_None; Py_INCREF(Py_None);\n  return o;\n}\n\nstatic void __pyx_tp_dealloc_Enum(PyObject *o) {\n  struct __pyx_MemviewEnum_obj *p = (struct __pyx_MemviewEnum_obj *)o;\n  #if CYTHON_USE_TP_FINALIZE\n  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {\n    if (PyObject_CallFinalizerFromDealloc(o)) return;\n  }\n  #endif\n  PyObject_GC_UnTrack(o);\n  Py_CLEAR(p->name);\n  (*Py_TYPE(o)->tp_free)(o);\n}\n\nstatic int __pyx_tp_traverse_Enum(PyObject *o, visitproc v, void *a) {\n  int e;\n  struct __pyx_MemviewEnum_obj *p = (struct __pyx_MemviewEnum_obj *)o;\n  if (p->name) {\n    e = (*v)(p->name, a); if (e) return e;\n  }\n  return 0;\n}\n\nstatic int __pyx_tp_clear_Enum(PyObject *o) {\n  PyObject* tmp;\n  struct __pyx_MemviewEnum_obj *p = (struct __pyx_MemviewEnum_obj *)o;\n  tmp = ((PyObject*)p->name);\n  p->name = Py_None; Py_INCREF(Py_None);\n  Py_XDECREF(tmp);\n  return 0;\n}\n\nstatic PyMethodDef __pyx_methods_Enum[] = {\n  {\"__reduce_cython__\", (PyCFunction)__pyx_pw___pyx_MemviewEnum_1__reduce_cython__, METH_NOARGS, 0},\n  {\"__setstate_cython__\", (PyCFunction)__pyx_pw___pyx_MemviewEnum_3__setstate_cython__, METH_O, 0},\n  {0, 0, 0, 0}\n};\n\nstatic PyTypeObject __pyx_type___pyx_MemviewEnum = {\n  PyVarObject_HEAD_INIT(0, 0)\n  \"_marching_cubes_lewiner_cy.Enum\", /*tp_name*/\n  sizeof(struct __pyx_MemviewEnum_obj), /*tp_basicsize*/\n  0, /*tp_itemsize*/\n  __pyx_tp_dealloc_Enum, /*tp_dealloc*/\n  #if PY_VERSION_HEX < 0x030800b4\n  0, /*tp_print*/\n  #endif\n  #if PY_VERSION_HEX >= 0x030800b4\n  0, /*tp_vectorcall_offset*/\n  #endif\n  0, /*tp_getattr*/\n  0, /*tp_setattr*/\n  #if PY_MAJOR_VERSION < 3\n  0, /*tp_compare*/\n  #endif\n  #if PY_MAJOR_VERSION >= 3\n  0, /*tp_as_async*/\n  #endif\n  __pyx_MemviewEnum___repr__, /*tp_repr*/\n  0, /*tp_as_number*/\n  0, /*tp_as_sequence*/\n  0, /*tp_as_mapping*/\n  0, /*tp_hash*/\n  0, /*tp_call*/\n  0, /*tp_str*/\n  0, /*tp_getattro*/\n  0, /*tp_setattro*/\n  0, /*tp_as_buffer*/\n  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/\n  0, /*tp_doc*/\n  __pyx_tp_traverse_Enum, /*tp_traverse*/\n  __pyx_tp_clear_Enum, /*tp_clear*/\n  0, /*tp_richcompare*/\n  0, /*tp_weaklistoffset*/\n  0, /*tp_iter*/\n  0, /*tp_iternext*/\n  __pyx_methods_Enum, /*tp_methods*/\n  0, /*tp_members*/\n  0, /*tp_getset*/\n  0, /*tp_base*/\n  0, /*tp_dict*/\n  0, /*tp_descr_get*/\n  0, /*tp_descr_set*/\n  0, /*tp_dictoffset*/\n  __pyx_MemviewEnum___init__, /*tp_init*/\n  0, /*tp_alloc*/\n  __pyx_tp_new_Enum, /*tp_new*/\n  0, /*tp_free*/\n  0, /*tp_is_gc*/\n  0, /*tp_bases*/\n  0, /*tp_mro*/\n  0, /*tp_cache*/\n  0, /*tp_subclasses*/\n  0, /*tp_weaklist*/\n  0, /*tp_del*/\n  0, /*tp_version_tag*/\n  #if PY_VERSION_HEX >= 0x030400a1\n  0, /*tp_finalize*/\n  #endif\n  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)\n  0, /*tp_vectorcall*/\n  #endif\n  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000\n  0, /*tp_print*/\n  #endif\n  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000\n  0, /*tp_pypy_flags*/\n  #endif\n};\nstatic struct __pyx_vtabstruct_memoryview __pyx_vtable_memoryview;\n\nstatic PyObject *__pyx_tp_new_memoryview(PyTypeObject *t, PyObject *a, PyObject *k) {\n  struct __pyx_memoryview_obj *p;\n  PyObject *o;\n  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {\n    o = (*t->tp_alloc)(t, 0);\n  } else {\n    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);\n  }\n  if (unlikely(!o)) return 0;\n  p = ((struct __pyx_memoryview_obj *)o);\n  p->__pyx_vtab = __pyx_vtabptr_memoryview;\n  p->obj = Py_None; Py_INCREF(Py_None);\n  p->_size = Py_None; Py_INCREF(Py_None);\n  p->_array_interface = Py_None; Py_INCREF(Py_None);\n  p->view.obj = NULL;\n  if (unlikely(__pyx_memoryview___cinit__(o, a, k) < 0)) goto bad;\n  return o;\n  bad:\n  Py_DECREF(o); o = 0;\n  return NULL;\n}\n\nstatic void __pyx_tp_dealloc_memoryview(PyObject *o) {\n  struct __pyx_memoryview_obj *p = (struct __pyx_memoryview_obj *)o;\n  #if CYTHON_USE_TP_FINALIZE\n  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {\n    if (PyObject_CallFinalizerFromDealloc(o)) return;\n  }\n  #endif\n  PyObject_GC_UnTrack(o);\n  {\n    PyObject *etype, *eval, *etb;\n    PyErr_Fetch(&etype, &eval, &etb);\n    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);\n    __pyx_memoryview___dealloc__(o);\n    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);\n    PyErr_Restore(etype, eval, etb);\n  }\n  Py_CLEAR(p->obj);\n  Py_CLEAR(p->_size);\n  Py_CLEAR(p->_array_interface);\n  (*Py_TYPE(o)->tp_free)(o);\n}\n\nstatic int __pyx_tp_traverse_memoryview(PyObject *o, visitproc v, void *a) {\n  int e;\n  struct __pyx_memoryview_obj *p = (struct __pyx_memoryview_obj *)o;\n  if (p->obj) {\n    e = (*v)(p->obj, a); if (e) return e;\n  }\n  if (p->_size) {\n    e = (*v)(p->_size, a); if (e) return e;\n  }\n  if (p->_array_interface) {\n    e = (*v)(p->_array_interface, a); if (e) return e;\n  }\n  if (p->view.obj) {\n    e = (*v)(p->view.obj, a); if (e) return e;\n  }\n  return 0;\n}\n\nstatic int __pyx_tp_clear_memoryview(PyObject *o) {\n  PyObject* tmp;\n  struct __pyx_memoryview_obj *p = (struct __pyx_memoryview_obj *)o;\n  tmp = ((PyObject*)p->obj);\n  p->obj = Py_None; Py_INCREF(Py_None);\n  Py_XDECREF(tmp);\n  tmp = ((PyObject*)p->_size);\n  p->_size = Py_None; Py_INCREF(Py_None);\n  Py_XDECREF(tmp);\n  tmp = ((PyObject*)p->_array_interface);\n  p->_array_interface = Py_None; Py_INCREF(Py_None);\n  Py_XDECREF(tmp);\n  Py_CLEAR(p->view.obj);\n  return 0;\n}\nstatic PyObject *__pyx_sq_item_memoryview(PyObject *o, Py_ssize_t i) {\n  PyObject *r;\n  PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;\n  r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);\n  Py_DECREF(x);\n  return r;\n}\n\nstatic int __pyx_mp_ass_subscript_memoryview(PyObject *o, PyObject *i, PyObject *v) {\n  if (v) {\n    return __pyx_memoryview___setitem__(o, i, v);\n  }\n  else {\n    PyErr_Format(PyExc_NotImplementedError,\n      \"Subscript deletion not supported by %.200s\", Py_TYPE(o)->tp_name);\n    return -1;\n  }\n}\n\nstatic PyObject *__pyx_getprop___pyx_memoryview_T(PyObject *o, CYTHON_UNUSED void *x) {\n  return __pyx_pw_15View_dot_MemoryView_10memoryview_1T_1__get__(o);\n}\n\nstatic PyObject *__pyx_getprop___pyx_memoryview_base(PyObject *o, CYTHON_UNUSED void *x) {\n  return __pyx_pw_15View_dot_MemoryView_10memoryview_4base_1__get__(o);\n}\n\nstatic PyObject *__pyx_getprop___pyx_memoryview_shape(PyObject *o, CYTHON_UNUSED void *x) {\n  return __pyx_pw_15View_dot_MemoryView_10memoryview_5shape_1__get__(o);\n}\n\nstatic PyObject *__pyx_getprop___pyx_memoryview_strides(PyObject *o, CYTHON_UNUSED void *x) {\n  return __pyx_pw_15View_dot_MemoryView_10memoryview_7strides_1__get__(o);\n}\n\nstatic PyObject *__pyx_getprop___pyx_memoryview_suboffsets(PyObject *o, CYTHON_UNUSED void *x) {\n  return __pyx_pw_15View_dot_MemoryView_10memoryview_10suboffsets_1__get__(o);\n}\n\nstatic PyObject *__pyx_getprop___pyx_memoryview_ndim(PyObject *o, CYTHON_UNUSED void *x) {\n  return __pyx_pw_15View_dot_MemoryView_10memoryview_4ndim_1__get__(o);\n}\n\nstatic PyObject *__pyx_getprop___pyx_memoryview_itemsize(PyObject *o, CYTHON_UNUSED void *x) {\n  return __pyx_pw_15View_dot_MemoryView_10memoryview_8itemsize_1__get__(o);\n}\n\nstatic PyObject *__pyx_getprop___pyx_memoryview_nbytes(PyObject *o, CYTHON_UNUSED void *x) {\n  return __pyx_pw_15View_dot_MemoryView_10memoryview_6nbytes_1__get__(o);\n}\n\nstatic PyObject *__pyx_getprop___pyx_memoryview_size(PyObject *o, CYTHON_UNUSED void *x) {\n  return __pyx_pw_15View_dot_MemoryView_10memoryview_4size_1__get__(o);\n}\n\nstatic PyMethodDef __pyx_methods_memoryview[] = {\n  {\"is_c_contig\", (PyCFunction)__pyx_memoryview_is_c_contig, METH_NOARGS, 0},\n  {\"is_f_contig\", (PyCFunction)__pyx_memoryview_is_f_contig, METH_NOARGS, 0},\n  {\"copy\", (PyCFunction)__pyx_memoryview_copy, METH_NOARGS, 0},\n  {\"copy_fortran\", (PyCFunction)__pyx_memoryview_copy_fortran, METH_NOARGS, 0},\n  {\"__reduce_cython__\", (PyCFunction)__pyx_pw___pyx_memoryview_1__reduce_cython__, METH_NOARGS, 0},\n  {\"__setstate_cython__\", (PyCFunction)__pyx_pw___pyx_memoryview_3__setstate_cython__, METH_O, 0},\n  {0, 0, 0, 0}\n};\n\nstatic struct PyGetSetDef __pyx_getsets_memoryview[] = {\n  {(char *)\"T\", __pyx_getprop___pyx_memoryview_T, 0, (char *)0, 0},\n  {(char *)\"base\", __pyx_getprop___pyx_memoryview_base, 0, (char *)0, 0},\n  {(char *)\"shape\", __pyx_getprop___pyx_memoryview_shape, 0, (char *)0, 0},\n  {(char *)\"strides\", __pyx_getprop___pyx_memoryview_strides, 0, (char *)0, 0},\n  {(char *)\"suboffsets\", __pyx_getprop___pyx_memoryview_suboffsets, 0, (char *)0, 0},\n  {(char *)\"ndim\", __pyx_getprop___pyx_memoryview_ndim, 0, (char *)0, 0},\n  {(char *)\"itemsize\", __pyx_getprop___pyx_memoryview_itemsize, 0, (char *)0, 0},\n  {(char *)\"nbytes\", __pyx_getprop___pyx_memoryview_nbytes, 0, (char *)0, 0},\n  {(char *)\"size\", __pyx_getprop___pyx_memoryview_size, 0, (char *)0, 0},\n  {0, 0, 0, 0, 0}\n};\n\nstatic PySequenceMethods __pyx_tp_as_sequence_memoryview = {\n  __pyx_memoryview___len__, /*sq_length*/\n  0, /*sq_concat*/\n  0, /*sq_repeat*/\n  __pyx_sq_item_memoryview, /*sq_item*/\n  0, /*sq_slice*/\n  0, /*sq_ass_item*/\n  0, /*sq_ass_slice*/\n  0, /*sq_contains*/\n  0, /*sq_inplace_concat*/\n  0, /*sq_inplace_repeat*/\n};\n\nstatic PyMappingMethods __pyx_tp_as_mapping_memoryview = {\n  __pyx_memoryview___len__, /*mp_length*/\n  __pyx_memoryview___getitem__, /*mp_subscript*/\n  __pyx_mp_ass_subscript_memoryview, /*mp_ass_subscript*/\n};\n\nstatic PyBufferProcs __pyx_tp_as_buffer_memoryview = {\n  #if PY_MAJOR_VERSION < 3\n  0, /*bf_getreadbuffer*/\n  #endif\n  #if PY_MAJOR_VERSION < 3\n  0, /*bf_getwritebuffer*/\n  #endif\n  #if PY_MAJOR_VERSION < 3\n  0, /*bf_getsegcount*/\n  #endif\n  #if PY_MAJOR_VERSION < 3\n  0, /*bf_getcharbuffer*/\n  #endif\n  __pyx_memoryview_getbuffer, /*bf_getbuffer*/\n  0, /*bf_releasebuffer*/\n};\n\nstatic PyTypeObject __pyx_type___pyx_memoryview = {\n  PyVarObject_HEAD_INIT(0, 0)\n  \"_marching_cubes_lewiner_cy.memoryview\", /*tp_name*/\n  sizeof(struct __pyx_memoryview_obj), /*tp_basicsize*/\n  0, /*tp_itemsize*/\n  __pyx_tp_dealloc_memoryview, /*tp_dealloc*/\n  #if PY_VERSION_HEX < 0x030800b4\n  0, /*tp_print*/\n  #endif\n  #if PY_VERSION_HEX >= 0x030800b4\n  0, /*tp_vectorcall_offset*/\n  #endif\n  0, /*tp_getattr*/\n  0, /*tp_setattr*/\n  #if PY_MAJOR_VERSION < 3\n  0, /*tp_compare*/\n  #endif\n  #if PY_MAJOR_VERSION >= 3\n  0, /*tp_as_async*/\n  #endif\n  __pyx_memoryview___repr__, /*tp_repr*/\n  0, /*tp_as_number*/\n  &__pyx_tp_as_sequence_memoryview, /*tp_as_sequence*/\n  &__pyx_tp_as_mapping_memoryview, /*tp_as_mapping*/\n  0, /*tp_hash*/\n  0, /*tp_call*/\n  __pyx_memoryview___str__, /*tp_str*/\n  0, /*tp_getattro*/\n  0, /*tp_setattro*/\n  &__pyx_tp_as_buffer_memoryview, /*tp_as_buffer*/\n  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/\n  0, /*tp_doc*/\n  __pyx_tp_traverse_memoryview, /*tp_traverse*/\n  __pyx_tp_clear_memoryview, /*tp_clear*/\n  0, /*tp_richcompare*/\n  0, /*tp_weaklistoffset*/\n  0, /*tp_iter*/\n  0, /*tp_iternext*/\n  __pyx_methods_memoryview, /*tp_methods*/\n  0, /*tp_members*/\n  __pyx_getsets_memoryview, /*tp_getset*/\n  0, /*tp_base*/\n  0, /*tp_dict*/\n  0, /*tp_descr_get*/\n  0, /*tp_descr_set*/\n  0, /*tp_dictoffset*/\n  0, /*tp_init*/\n  0, /*tp_alloc*/\n  __pyx_tp_new_memoryview, /*tp_new*/\n  0, /*tp_free*/\n  0, /*tp_is_gc*/\n  0, /*tp_bases*/\n  0, /*tp_mro*/\n  0, /*tp_cache*/\n  0, /*tp_subclasses*/\n  0, /*tp_weaklist*/\n  0, /*tp_del*/\n  0, /*tp_version_tag*/\n  #if PY_VERSION_HEX >= 0x030400a1\n  0, /*tp_finalize*/\n  #endif\n  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)\n  0, /*tp_vectorcall*/\n  #endif\n  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000\n  0, /*tp_print*/\n  #endif\n  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000\n  0, /*tp_pypy_flags*/\n  #endif\n};\nstatic struct __pyx_vtabstruct__memoryviewslice __pyx_vtable__memoryviewslice;\n\nstatic PyObject *__pyx_tp_new__memoryviewslice(PyTypeObject *t, PyObject *a, PyObject *k) {\n  struct __pyx_memoryviewslice_obj *p;\n  PyObject *o = __pyx_tp_new_memoryview(t, a, k);\n  if (unlikely(!o)) return 0;\n  p = ((struct __pyx_memoryviewslice_obj *)o);\n  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_memoryview*)__pyx_vtabptr__memoryviewslice;\n  p->from_object = Py_None; Py_INCREF(Py_None);\n  p->from_slice.memview = NULL;\n  return o;\n}\n\nstatic void __pyx_tp_dealloc__memoryviewslice(PyObject *o) {\n  struct __pyx_memoryviewslice_obj *p = (struct __pyx_memoryviewslice_obj *)o;\n  #if CYTHON_USE_TP_FINALIZE\n  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {\n    if (PyObject_CallFinalizerFromDealloc(o)) return;\n  }\n  #endif\n  PyObject_GC_UnTrack(o);\n  {\n    PyObject *etype, *eval, *etb;\n    PyErr_Fetch(&etype, &eval, &etb);\n    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);\n    __pyx_memoryviewslice___dealloc__(o);\n    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);\n    PyErr_Restore(etype, eval, etb);\n  }\n  Py_CLEAR(p->from_object);\n  PyObject_GC_Track(o);\n  __pyx_tp_dealloc_memoryview(o);\n}\n\nstatic int __pyx_tp_traverse__memoryviewslice(PyObject *o, visitproc v, void *a) {\n  int e;\n  struct __pyx_memoryviewslice_obj *p = (struct __pyx_memoryviewslice_obj *)o;\n  e = __pyx_tp_traverse_memoryview(o, v, a); if (e) return e;\n  if (p->from_object) {\n    e = (*v)(p->from_object, a); if (e) return e;\n  }\n  return 0;\n}\n\nstatic int __pyx_tp_clear__memoryviewslice(PyObject *o) {\n  PyObject* tmp;\n  struct __pyx_memoryviewslice_obj *p = (struct __pyx_memoryviewslice_obj *)o;\n  __pyx_tp_clear_memoryview(o);\n  tmp = ((PyObject*)p->from_object);\n  p->from_object = Py_None; Py_INCREF(Py_None);\n  Py_XDECREF(tmp);\n  __PYX_XDEC_MEMVIEW(&p->from_slice, 1);\n  return 0;\n}\n\nstatic PyObject *__pyx_getprop___pyx_memoryviewslice_base(PyObject *o, CYTHON_UNUSED void *x) {\n  return __pyx_pw_15View_dot_MemoryView_16_memoryviewslice_4base_1__get__(o);\n}\n\nstatic PyMethodDef __pyx_methods__memoryviewslice[] = {\n  {\"__reduce_cython__\", (PyCFunction)__pyx_pw___pyx_memoryviewslice_1__reduce_cython__, METH_NOARGS, 0},\n  {\"__setstate_cython__\", (PyCFunction)__pyx_pw___pyx_memoryviewslice_3__setstate_cython__, METH_O, 0},\n  {0, 0, 0, 0}\n};\n\nstatic struct PyGetSetDef __pyx_getsets__memoryviewslice[] = {\n  {(char *)\"base\", __pyx_getprop___pyx_memoryviewslice_base, 0, (char *)0, 0},\n  {0, 0, 0, 0, 0}\n};\n\nstatic PyTypeObject __pyx_type___pyx_memoryviewslice = {\n  PyVarObject_HEAD_INIT(0, 0)\n  \"_marching_cubes_lewiner_cy._memoryviewslice\", /*tp_name*/\n  sizeof(struct __pyx_memoryviewslice_obj), /*tp_basicsize*/\n  0, /*tp_itemsize*/\n  __pyx_tp_dealloc__memoryviewslice, /*tp_dealloc*/\n  #if PY_VERSION_HEX < 0x030800b4\n  0, /*tp_print*/\n  #endif\n  #if PY_VERSION_HEX >= 0x030800b4\n  0, /*tp_vectorcall_offset*/\n  #endif\n  0, /*tp_getattr*/\n  0, /*tp_setattr*/\n  #if PY_MAJOR_VERSION < 3\n  0, /*tp_compare*/\n  #endif\n  #if PY_MAJOR_VERSION >= 3\n  0, /*tp_as_async*/\n  #endif\n  #if CYTHON_COMPILING_IN_PYPY\n  __pyx_memoryview___repr__, /*tp_repr*/\n  #else\n  0, /*tp_repr*/\n  #endif\n  0, /*tp_as_number*/\n  0, /*tp_as_sequence*/\n  0, /*tp_as_mapping*/\n  0, /*tp_hash*/\n  0, /*tp_call*/\n  #if CYTHON_COMPILING_IN_PYPY\n  __pyx_memoryview___str__, /*tp_str*/\n  #else\n  0, /*tp_str*/\n  #endif\n  0, /*tp_getattro*/\n  0, /*tp_setattro*/\n  0, /*tp_as_buffer*/\n  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/\n  \"Internal class for passing memoryview slices to Python\", /*tp_doc*/\n  __pyx_tp_traverse__memoryviewslice, /*tp_traverse*/\n  __pyx_tp_clear__memoryviewslice, /*tp_clear*/\n  0, /*tp_richcompare*/\n  0, /*tp_weaklistoffset*/\n  0, /*tp_iter*/\n  0, /*tp_iternext*/\n  __pyx_methods__memoryviewslice, /*tp_methods*/\n  0, /*tp_members*/\n  __pyx_getsets__memoryviewslice, /*tp_getset*/\n  0, /*tp_base*/\n  0, /*tp_dict*/\n  0, /*tp_descr_get*/\n  0, /*tp_descr_set*/\n  0, /*tp_dictoffset*/\n  0, /*tp_init*/\n  0, /*tp_alloc*/\n  __pyx_tp_new__memoryviewslice, /*tp_new*/\n  0, /*tp_free*/\n  0, /*tp_is_gc*/\n  0, /*tp_bases*/\n  0, /*tp_mro*/\n  0, /*tp_cache*/\n  0, /*tp_subclasses*/\n  0, /*tp_weaklist*/\n  0, /*tp_del*/\n  0, /*tp_version_tag*/\n  #if PY_VERSION_HEX >= 0x030400a1\n  0, /*tp_finalize*/\n  #endif\n  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)\n  0, /*tp_vectorcall*/\n  #endif\n  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000\n  0, /*tp_print*/\n  #endif\n  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000\n  0, /*tp_pypy_flags*/\n  #endif\n};\n\nstatic PyMethodDef __pyx_methods[] = {\n  {0, 0, 0, 0}\n};\n\n#if PY_MAJOR_VERSION >= 3\n#if CYTHON_PEP489_MULTI_PHASE_INIT\nstatic PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/\nstatic int __pyx_pymod_exec__marching_cubes_lewiner_cy(PyObject* module); /*proto*/\nstatic PyModuleDef_Slot __pyx_moduledef_slots[] = {\n  {Py_mod_create, (void*)__pyx_pymod_create},\n  {Py_mod_exec, (void*)__pyx_pymod_exec__marching_cubes_lewiner_cy},\n  {0, NULL}\n};\n#endif\n\nstatic struct PyModuleDef __pyx_moduledef = {\n    PyModuleDef_HEAD_INIT,\n    \"_marching_cubes_lewiner_cy\",\n    __pyx_k_This_is_an_implementation_of_th, /* m_doc */\n  #if CYTHON_PEP489_MULTI_PHASE_INIT\n    0, /* m_size */\n  #else\n    -1, /* m_size */\n  #endif\n    __pyx_methods /* m_methods */,\n  #if CYTHON_PEP489_MULTI_PHASE_INIT\n    __pyx_moduledef_slots, /* m_slots */\n  #else\n    NULL, /* m_reload */\n  #endif\n    NULL, /* m_traverse */\n    NULL, /* m_clear */\n    NULL /* m_free */\n};\n#endif\n#ifndef CYTHON_SMALL_CODE\n#if defined(__clang__)\n    #define CYTHON_SMALL_CODE\n#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))\n    #define CYTHON_SMALL_CODE __attribute__((cold))\n#else\n    #define CYTHON_SMALL_CODE\n#endif\n#endif\n\nstatic __Pyx_StringTabEntry __pyx_string_tab[] = {\n  {&__pyx_n_s_ASCII, __pyx_k_ASCII, sizeof(__pyx_k_ASCII), 0, 0, 1, 1},\n  {&__pyx_kp_s_Buffer_view_does_not_expose_stri, __pyx_k_Buffer_view_does_not_expose_stri, sizeof(__pyx_k_Buffer_view_does_not_expose_stri), 0, 0, 1, 0},\n  {&__pyx_n_s_CASES, __pyx_k_CASES, sizeof(__pyx_k_CASES), 0, 0, 1, 1},\n  {&__pyx_n_s_CASESCLASSIC, __pyx_k_CASESCLASSIC, sizeof(__pyx_k_CASESCLASSIC), 0, 0, 1, 1},\n  {&__pyx_kp_s_Can_only_create_a_buffer_that_is, __pyx_k_Can_only_create_a_buffer_that_is, sizeof(__pyx_k_Can_only_create_a_buffer_that_is), 0, 0, 1, 0},\n  {&__pyx_kp_s_Cannot_assign_to_read_only_memor, __pyx_k_Cannot_assign_to_read_only_memor, sizeof(__pyx_k_Cannot_assign_to_read_only_memor), 0, 0, 1, 0},\n  {&__pyx_kp_s_Cannot_create_writable_memory_vi, __pyx_k_Cannot_create_writable_memory_vi, sizeof(__pyx_k_Cannot_create_writable_memory_vi), 0, 0, 1, 0},\n  {&__pyx_kp_s_Cannot_index_with_type_s, __pyx_k_Cannot_index_with_type_s, sizeof(__pyx_k_Cannot_index_with_type_s), 0, 0, 1, 0},\n  {&__pyx_n_s_Cell, __pyx_k_Cell, sizeof(__pyx_k_Cell), 0, 0, 1, 1},\n  {&__pyx_n_s_EDGESRELX, __pyx_k_EDGESRELX, sizeof(__pyx_k_EDGESRELX), 0, 0, 1, 1},\n  {&__pyx_n_s_EDGESRELY, __pyx_k_EDGESRELY, sizeof(__pyx_k_EDGESRELY), 0, 0, 1, 1},\n  {&__pyx_n_s_EDGESRELZ, __pyx_k_EDGESRELZ, sizeof(__pyx_k_EDGESRELZ), 0, 0, 1, 1},\n  {&__pyx_n_s_Ellipsis, __pyx_k_Ellipsis, sizeof(__pyx_k_Ellipsis), 0, 0, 1, 1},\n  {&__pyx_kp_s_Empty_shape_tuple_for_cython_arr, __pyx_k_Empty_shape_tuple_for_cython_arr, sizeof(__pyx_k_Empty_shape_tuple_for_cython_arr), 0, 0, 1, 0},\n  {&__pyx_n_s_ImportError, __pyx_k_ImportError, sizeof(__pyx_k_ImportError), 0, 0, 1, 1},\n  {&__pyx_kp_s_Incompatible_checksums_0x_x_vs_0, __pyx_k_Incompatible_checksums_0x_x_vs_0, sizeof(__pyx_k_Incompatible_checksums_0x_x_vs_0), 0, 0, 1, 0},\n  {&__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_2, __pyx_k_Incompatible_checksums_0x_x_vs_0_2, sizeof(__pyx_k_Incompatible_checksums_0x_x_vs_0_2), 0, 0, 1, 0},\n  {&__pyx_n_s_IndexError, __pyx_k_IndexError, sizeof(__pyx_k_IndexError), 0, 0, 1, 1},\n  {&__pyx_kp_s_Indirect_dimensions_not_supporte, __pyx_k_Indirect_dimensions_not_supporte, sizeof(__pyx_k_Indirect_dimensions_not_supporte), 0, 0, 1, 0},\n  {&__pyx_kp_s_Invalid_ambiguous_case_i, __pyx_k_Invalid_ambiguous_case_i, sizeof(__pyx_k_Invalid_ambiguous_case_i), 0, 0, 1, 0},\n  {&__pyx_kp_s_Invalid_edge_i, __pyx_k_Invalid_edge_i, sizeof(__pyx_k_Invalid_edge_i), 0, 0, 1, 0},\n  {&__pyx_kp_s_Invalid_mode_expected_c_or_fortr, __pyx_k_Invalid_mode_expected_c_or_fortr, sizeof(__pyx_k_Invalid_mode_expected_c_or_fortr), 0, 0, 1, 0},\n  {&__pyx_kp_s_Invalid_shape_in_axis_d_d, __pyx_k_Invalid_shape_in_axis_d_d, sizeof(__pyx_k_Invalid_shape_in_axis_d_d), 0, 0, 1, 0},\n  {&__pyx_n_s_Lut, __pyx_k_Lut, sizeof(__pyx_k_Lut), 0, 0, 1, 1},\n  {&__pyx_n_s_LutProvider, __pyx_k_LutProvider, sizeof(__pyx_k_LutProvider), 0, 0, 1, 1},\n  {&__pyx_kp_s_Marching_Cubes_Impossible_case_1, __pyx_k_Marching_Cubes_Impossible_case_1, sizeof(__pyx_k_Marching_Cubes_Impossible_case_1), 0, 0, 1, 0},\n  {&__pyx_n_s_MemoryError, __pyx_k_MemoryError, sizeof(__pyx_k_MemoryError), 0, 0, 1, 1},\n  {&__pyx_kp_s_MemoryView_of_r_at_0x_x, __pyx_k_MemoryView_of_r_at_0x_x, sizeof(__pyx_k_MemoryView_of_r_at_0x_x), 0, 0, 1, 0},\n  {&__pyx_kp_s_MemoryView_of_r_object, __pyx_k_MemoryView_of_r_object, sizeof(__pyx_k_MemoryView_of_r_object), 0, 0, 1, 0},\n  {&__pyx_n_s_Nx, __pyx_k_Nx, sizeof(__pyx_k_Nx), 0, 0, 1, 1},\n  {&__pyx_n_s_Nx_bound, __pyx_k_Nx_bound, sizeof(__pyx_k_Nx_bound), 0, 0, 1, 1},\n  {&__pyx_n_s_Ny, __pyx_k_Ny, sizeof(__pyx_k_Ny), 0, 0, 1, 1},\n  {&__pyx_n_s_Ny_bound, __pyx_k_Ny_bound, sizeof(__pyx_k_Ny_bound), 0, 0, 1, 1},\n  {&__pyx_n_s_Nz, __pyx_k_Nz, sizeof(__pyx_k_Nz), 0, 0, 1, 1},\n  {&__pyx_n_s_Nz_bound, __pyx_k_Nz_bound, sizeof(__pyx_k_Nz_bound), 0, 0, 1, 1},\n  {&__pyx_n_b_O, __pyx_k_O, sizeof(__pyx_k_O), 0, 0, 0, 1},\n  {&__pyx_kp_s_Out_of_bounds_on_buffer_access_a, __pyx_k_Out_of_bounds_on_buffer_access_a, sizeof(__pyx_k_Out_of_bounds_on_buffer_access_a), 0, 0, 1, 0},\n  {&__pyx_n_s_PickleError, __pyx_k_PickleError, sizeof(__pyx_k_PickleError), 0, 0, 1, 1},\n  {&__pyx_n_s_SUBCONFIG13, __pyx_k_SUBCONFIG13, sizeof(__pyx_k_SUBCONFIG13), 0, 0, 1, 1},\n  {&__pyx_n_s_TEST10, __pyx_k_TEST10, sizeof(__pyx_k_TEST10), 0, 0, 1, 1},\n  {&__pyx_n_s_TEST12, __pyx_k_TEST12, sizeof(__pyx_k_TEST12), 0, 0, 1, 1},\n  {&__pyx_n_s_TEST13, __pyx_k_TEST13, sizeof(__pyx_k_TEST13), 0, 0, 1, 1},\n  {&__pyx_n_s_TEST3, __pyx_k_TEST3, sizeof(__pyx_k_TEST3), 0, 0, 1, 1},\n  {&__pyx_n_s_TEST4, __pyx_k_TEST4, sizeof(__pyx_k_TEST4), 0, 0, 1, 1},\n  {&__pyx_n_s_TEST6, __pyx_k_TEST6, sizeof(__pyx_k_TEST6), 0, 0, 1, 1},\n  {&__pyx_n_s_TEST7, __pyx_k_TEST7, sizeof(__pyx_k_TEST7), 0, 0, 1, 1},\n  {&__pyx_n_s_TILING1, __pyx_k_TILING1, sizeof(__pyx_k_TILING1), 0, 0, 1, 1},\n  {&__pyx_n_s_TILING10_1_1, __pyx_k_TILING10_1_1, sizeof(__pyx_k_TILING10_1_1), 0, 0, 1, 1},\n  {&__pyx_n_s_TILING10_1_1_2, __pyx_k_TILING10_1_1_2, sizeof(__pyx_k_TILING10_1_1_2), 0, 0, 1, 1},\n  {&__pyx_n_s_TILING10_1_2, __pyx_k_TILING10_1_2, sizeof(__pyx_k_TILING10_1_2), 0, 0, 1, 1},\n  {&__pyx_n_s_TILING10_2, __pyx_k_TILING10_2, sizeof(__pyx_k_TILING10_2), 0, 0, 1, 1},\n  {&__pyx_n_s_TILING10_2_2, __pyx_k_TILING10_2_2, sizeof(__pyx_k_TILING10_2_2), 0, 0, 1, 1},\n  {&__pyx_n_s_TILING11, __pyx_k_TILING11, sizeof(__pyx_k_TILING11), 0, 0, 1, 1},\n  {&__pyx_n_s_TILING12_1_1, __pyx_k_TILING12_1_1, sizeof(__pyx_k_TILING12_1_1), 0, 0, 1, 1},\n  {&__pyx_n_s_TILING12_1_1_2, __pyx_k_TILING12_1_1_2, sizeof(__pyx_k_TILING12_1_1_2), 0, 0, 1, 1},\n  {&__pyx_n_s_TILING12_1_2, __pyx_k_TILING12_1_2, sizeof(__pyx_k_TILING12_1_2), 0, 0, 1, 1},\n  {&__pyx_n_s_TILING12_2, __pyx_k_TILING12_2, sizeof(__pyx_k_TILING12_2), 0, 0, 1, 1},\n  {&__pyx_n_s_TILING12_2_2, __pyx_k_TILING12_2_2, sizeof(__pyx_k_TILING12_2_2), 0, 0, 1, 1},\n  {&__pyx_n_s_TILING13_1, __pyx_k_TILING13_1, sizeof(__pyx_k_TILING13_1), 0, 0, 1, 1},\n  {&__pyx_n_s_TILING13_1_2, __pyx_k_TILING13_1_2, sizeof(__pyx_k_TILING13_1_2), 0, 0, 1, 1},\n  {&__pyx_n_s_TILING13_2, __pyx_k_TILING13_2, sizeof(__pyx_k_TILING13_2), 0, 0, 1, 1},\n  {&__pyx_n_s_TILING13_2_2, __pyx_k_TILING13_2_2, sizeof(__pyx_k_TILING13_2_2), 0, 0, 1, 1},\n  {&__pyx_n_s_TILING13_3, __pyx_k_TILING13_3, sizeof(__pyx_k_TILING13_3), 0, 0, 1, 1},\n  {&__pyx_n_s_TILING13_3_2, __pyx_k_TILING13_3_2, sizeof(__pyx_k_TILING13_3_2), 0, 0, 1, 1},\n  {&__pyx_n_s_TILING13_4, __pyx_k_TILING13_4, sizeof(__pyx_k_TILING13_4), 0, 0, 1, 1},\n  {&__pyx_n_s_TILING13_5_1, __pyx_k_TILING13_5_1, sizeof(__pyx_k_TILING13_5_1), 0, 0, 1, 1},\n  {&__pyx_n_s_TILING13_5_2, __pyx_k_TILING13_5_2, sizeof(__pyx_k_TILING13_5_2), 0, 0, 1, 1},\n  {&__pyx_n_s_TILING14, __pyx_k_TILING14, sizeof(__pyx_k_TILING14), 0, 0, 1, 1},\n  {&__pyx_n_s_TILING2, __pyx_k_TILING2, sizeof(__pyx_k_TILING2), 0, 0, 1, 1},\n  {&__pyx_n_s_TILING3_1, __pyx_k_TILING3_1, sizeof(__pyx_k_TILING3_1), 0, 0, 1, 1},\n  {&__pyx_n_s_TILING3_2, __pyx_k_TILING3_2, sizeof(__pyx_k_TILING3_2), 0, 0, 1, 1},\n  {&__pyx_n_s_TILING4_1, __pyx_k_TILING4_1, sizeof(__pyx_k_TILING4_1), 0, 0, 1, 1},\n  {&__pyx_n_s_TILING4_2, __pyx_k_TILING4_2, sizeof(__pyx_k_TILING4_2), 0, 0, 1, 1},\n  {&__pyx_n_s_TILING5, __pyx_k_TILING5, sizeof(__pyx_k_TILING5), 0, 0, 1, 1},\n  {&__pyx_n_s_TILING6_1_1, __pyx_k_TILING6_1_1, sizeof(__pyx_k_TILING6_1_1), 0, 0, 1, 1},\n  {&__pyx_n_s_TILING6_1_2, __pyx_k_TILING6_1_2, sizeof(__pyx_k_TILING6_1_2), 0, 0, 1, 1},\n  {&__pyx_n_s_TILING6_2, __pyx_k_TILING6_2, sizeof(__pyx_k_TILING6_2), 0, 0, 1, 1},\n  {&__pyx_n_s_TILING7_1, __pyx_k_TILING7_1, sizeof(__pyx_k_TILING7_1), 0, 0, 1, 1},\n  {&__pyx_n_s_TILING7_2, __pyx_k_TILING7_2, sizeof(__pyx_k_TILING7_2), 0, 0, 1, 1},\n  {&__pyx_n_s_TILING7_3, __pyx_k_TILING7_3, sizeof(__pyx_k_TILING7_3), 0, 0, 1, 1},\n  {&__pyx_n_s_TILING7_4_1, __pyx_k_TILING7_4_1, sizeof(__pyx_k_TILING7_4_1), 0, 0, 1, 1},\n  {&__pyx_n_s_TILING7_4_2, __pyx_k_TILING7_4_2, sizeof(__pyx_k_TILING7_4_2), 0, 0, 1, 1},\n  {&__pyx_n_s_TILING8, __pyx_k_TILING8, sizeof(__pyx_k_TILING8), 0, 0, 1, 1},\n  {&__pyx_n_s_TILING9, __pyx_k_TILING9, sizeof(__pyx_k_TILING9), 0, 0, 1, 1},\n  {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},\n  {&__pyx_kp_s_Unable_to_convert_item_to_object, __pyx_k_Unable_to_convert_item_to_object, sizeof(__pyx_k_Unable_to_convert_item_to_object), 0, 0, 1, 0},\n  {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},\n  {&__pyx_n_s_View_MemoryView, __pyx_k_View_MemoryView, sizeof(__pyx_k_View_MemoryView), 0, 0, 1, 1},\n  {&__pyx_n_s_allocate_buffer, __pyx_k_allocate_buffer, sizeof(__pyx_k_allocate_buffer), 0, 0, 1, 1},\n  {&__pyx_n_s_arange, __pyx_k_arange, sizeof(__pyx_k_arange), 0, 0, 1, 1},\n  {&__pyx_n_s_arr, __pyx_k_arr, sizeof(__pyx_k_arr), 0, 0, 1, 1},\n  {&__pyx_n_s_array, __pyx_k_array, sizeof(__pyx_k_array), 0, 0, 1, 1},\n  {&__pyx_n_s_arrays, __pyx_k_arrays, sizeof(__pyx_k_arrays), 0, 0, 1, 1},\n  {&__pyx_n_s_arrays2, __pyx_k_arrays2, sizeof(__pyx_k_arrays2), 0, 0, 1, 1},\n  {&__pyx_n_s_avg_cube_val, __pyx_k_avg_cube_val, sizeof(__pyx_k_avg_cube_val), 0, 0, 1, 1},\n  {&__pyx_n_s_base, __pyx_k_base, sizeof(__pyx_k_base), 0, 0, 1, 1},\n  {&__pyx_n_s_base_vec, __pyx_k_base_vec, sizeof(__pyx_k_base_vec), 0, 0, 1, 1},\n  {&__pyx_n_s_c, __pyx_k_c, sizeof(__pyx_k_c), 0, 0, 1, 1},\n  {&__pyx_n_u_c, __pyx_k_c, sizeof(__pyx_k_c), 0, 1, 0, 1},\n  {&__pyx_n_s_case, __pyx_k_case, sizeof(__pyx_k_case), 0, 0, 1, 1},\n  {&__pyx_n_s_cell, __pyx_k_cell, sizeof(__pyx_k_cell), 0, 0, 1, 1},\n  {&__pyx_n_s_class, __pyx_k_class, sizeof(__pyx_k_class), 0, 0, 1, 1},\n  {&__pyx_n_s_classic, __pyx_k_classic, sizeof(__pyx_k_classic), 0, 0, 1, 1},\n  {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},\n  {&__pyx_n_s_config, __pyx_k_config, sizeof(__pyx_k_config), 0, 0, 1, 1},\n  {&__pyx_kp_s_contiguous_and_direct, __pyx_k_contiguous_and_direct, sizeof(__pyx_k_contiguous_and_direct), 0, 0, 1, 0},\n  {&__pyx_kp_s_contiguous_and_indirect, __pyx_k_contiguous_and_indirect, sizeof(__pyx_k_contiguous_and_indirect), 0, 0, 1, 0},\n  {&__pyx_n_s_copy, __pyx_k_copy, sizeof(__pyx_k_copy), 0, 0, 1, 1},\n  {&__pyx_n_s_cumsum, __pyx_k_cumsum, sizeof(__pyx_k_cumsum), 0, 0, 1, 1},\n  {&__pyx_n_s_dict, __pyx_k_dict, sizeof(__pyx_k_dict), 0, 0, 1, 1},\n  {&__pyx_n_s_dtype, __pyx_k_dtype, sizeof(__pyx_k_dtype), 0, 0, 1, 1},\n  {&__pyx_n_s_dtype_is_object, __pyx_k_dtype_is_object, sizeof(__pyx_k_dtype_is_object), 0, 0, 1, 1},\n  {&__pyx_n_s_empty, __pyx_k_empty, sizeof(__pyx_k_empty), 0, 0, 1, 1},\n  {&__pyx_n_s_encode, __pyx_k_encode, sizeof(__pyx_k_encode), 0, 0, 1, 1},\n  {&__pyx_n_s_end, __pyx_k_end, sizeof(__pyx_k_end), 0, 0, 1, 1},\n  {&__pyx_n_s_enumerate, __pyx_k_enumerate, sizeof(__pyx_k_enumerate), 0, 0, 1, 1},\n  {&__pyx_n_s_error, __pyx_k_error, sizeof(__pyx_k_error), 0, 0, 1, 1},\n  {&__pyx_n_s_faces, __pyx_k_faces, sizeof(__pyx_k_faces), 0, 0, 1, 1},\n  {&__pyx_n_s_faces2, __pyx_k_faces2, sizeof(__pyx_k_faces2), 0, 0, 1, 1},\n  {&__pyx_n_s_faces_2, __pyx_k_faces_2, sizeof(__pyx_k_faces_2), 0, 0, 1, 1},\n  {&__pyx_n_s_faces_ok, __pyx_k_faces_ok, sizeof(__pyx_k_faces_ok), 0, 0, 1, 1},\n  {&__pyx_n_s_faces_ok_2, __pyx_k_faces_ok_2, sizeof(__pyx_k_faces_ok_2), 0, 0, 1, 1},\n  {&__pyx_n_s_file, __pyx_k_file, sizeof(__pyx_k_file), 0, 0, 1, 1},\n  {&__pyx_n_s_flags, __pyx_k_flags, sizeof(__pyx_k_flags), 0, 0, 1, 1},\n  {&__pyx_n_s_float32, __pyx_k_float32, sizeof(__pyx_k_float32), 0, 0, 1, 1},\n  {&__pyx_n_s_format, __pyx_k_format, sizeof(__pyx_k_format), 0, 0, 1, 1},\n  {&__pyx_n_s_fortran, __pyx_k_fortran, sizeof(__pyx_k_fortran), 0, 0, 1, 1},\n  {&__pyx_n_u_fortran, __pyx_k_fortran, sizeof(__pyx_k_fortran), 0, 1, 0, 1},\n  {&__pyx_n_s_get_faces, __pyx_k_get_faces, sizeof(__pyx_k_get_faces), 0, 0, 1, 1},\n  {&__pyx_n_s_get_normals, __pyx_k_get_normals, sizeof(__pyx_k_get_normals), 0, 0, 1, 1},\n  {&__pyx_n_s_get_values, __pyx_k_get_values, sizeof(__pyx_k_get_values), 0, 0, 1, 1},\n  {&__pyx_n_s_get_vertices, __pyx_k_get_vertices, sizeof(__pyx_k_get_vertices), 0, 0, 1, 1},\n  {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1},\n  {&__pyx_kp_s_got_differing_extents_in_dimensi, __pyx_k_got_differing_extents_in_dimensi, sizeof(__pyx_k_got_differing_extents_in_dimensi), 0, 0, 1, 0},\n  {&__pyx_n_s_grads, __pyx_k_grads, sizeof(__pyx_k_grads), 0, 0, 1, 1},\n  {&__pyx_n_s_i1, __pyx_k_i1, sizeof(__pyx_k_i1), 0, 0, 1, 1},\n  {&__pyx_n_s_i2, __pyx_k_i2, sizeof(__pyx_k_i2), 0, 0, 1, 1},\n  {&__pyx_n_s_i3, __pyx_k_i3, sizeof(__pyx_k_i3), 0, 0, 1, 1},\n  {&__pyx_n_s_id, __pyx_k_id, sizeof(__pyx_k_id), 0, 0, 1, 1},\n  {&__pyx_n_s_im, __pyx_k_im, sizeof(__pyx_k_im), 0, 0, 1, 1},\n  {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},\n  {&__pyx_n_s_int32, __pyx_k_int32, sizeof(__pyx_k_int32), 0, 0, 1, 1},\n  {&__pyx_n_s_inwards_facing_normals_bool, __pyx_k_inwards_facing_normals_bool, sizeof(__pyx_k_inwards_facing_normals_bool), 0, 0, 1, 1},\n  {&__pyx_n_s_inwards_facing_normals_ref, __pyx_k_inwards_facing_normals_ref, sizeof(__pyx_k_inwards_facing_normals_ref), 0, 0, 1, 1},\n  {&__pyx_n_s_isovalue, __pyx_k_isovalue, sizeof(__pyx_k_isovalue), 0, 0, 1, 1},\n  {&__pyx_n_s_itemsize, __pyx_k_itemsize, sizeof(__pyx_k_itemsize), 0, 0, 1, 1},\n  {&__pyx_kp_s_itemsize_0_for_cython_array, __pyx_k_itemsize_0_for_cython_array, sizeof(__pyx_k_itemsize_0_for_cython_array), 0, 0, 1, 0},\n  {&__pyx_n_s_j, __pyx_k_j, sizeof(__pyx_k_j), 0, 0, 1, 1},\n  {&__pyx_n_s_luts, __pyx_k_luts, sizeof(__pyx_k_luts), 0, 0, 1, 1},\n  {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},\n  {&__pyx_n_s_marching_cubes, __pyx_k_marching_cubes, sizeof(__pyx_k_marching_cubes), 0, 0, 1, 1},\n  {&__pyx_n_s_marching_cubes_lewiner_cy, __pyx_k_marching_cubes_lewiner_cy, sizeof(__pyx_k_marching_cubes_lewiner_cy), 0, 0, 1, 1},\n  {&__pyx_kp_s_marching_cubes_lewiner_cy_pyx, __pyx_k_marching_cubes_lewiner_cy_pyx, sizeof(__pyx_k_marching_cubes_lewiner_cy_pyx), 0, 0, 1, 0},\n  {&__pyx_n_s_marching_cubes_udf, __pyx_k_marching_cubes_udf, sizeof(__pyx_k_marching_cubes_udf), 0, 0, 1, 1},\n  {&__pyx_n_s_mask, __pyx_k_mask, sizeof(__pyx_k_mask), 0, 0, 1, 1},\n  {&__pyx_n_s_max_cube_val, __pyx_k_max_cube_val, sizeof(__pyx_k_max_cube_val), 0, 0, 1, 1},\n  {&__pyx_n_s_memview, __pyx_k_memview, sizeof(__pyx_k_memview), 0, 0, 1, 1},\n  {&__pyx_n_s_mode, __pyx_k_mode, sizeof(__pyx_k_mode), 0, 0, 1, 1},\n  {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},\n  {&__pyx_n_s_name_2, __pyx_k_name_2, sizeof(__pyx_k_name_2), 0, 0, 1, 1},\n  {&__pyx_n_s_ndim, __pyx_k_ndim, sizeof(__pyx_k_ndim), 0, 0, 1, 1},\n  {&__pyx_n_s_new, __pyx_k_new, sizeof(__pyx_k_new), 0, 0, 1, 1},\n  {&__pyx_kp_s_no_default___reduce___due_to_non, __pyx_k_no_default___reduce___due_to_non, sizeof(__pyx_k_no_default___reduce___due_to_non), 0, 0, 1, 0},\n  {&__pyx_n_s_no_mask, __pyx_k_no_mask, sizeof(__pyx_k_no_mask), 0, 0, 1, 1},\n  {&__pyx_n_s_np, __pyx_k_np, sizeof(__pyx_k_np), 0, 0, 1, 1},\n  {&__pyx_n_s_nt, __pyx_k_nt, sizeof(__pyx_k_nt), 0, 0, 1, 1},\n  {&__pyx_n_s_numpy, __pyx_k_numpy, sizeof(__pyx_k_numpy), 0, 0, 1, 1},\n  {&__pyx_kp_s_numpy_core_multiarray_failed_to, __pyx_k_numpy_core_multiarray_failed_to, sizeof(__pyx_k_numpy_core_multiarray_failed_to), 0, 0, 1, 0},\n  {&__pyx_kp_s_numpy_core_umath_failed_to_impor, __pyx_k_numpy_core_umath_failed_to_impor, sizeof(__pyx_k_numpy_core_umath_failed_to_impor), 0, 0, 1, 0},\n  {&__pyx_n_s_nx, __pyx_k_nx, sizeof(__pyx_k_nx), 0, 0, 1, 1},\n  {&__pyx_n_s_ny, __pyx_k_ny, sizeof(__pyx_k_ny), 0, 0, 1, 1},\n  {&__pyx_n_s_nz, __pyx_k_nz, sizeof(__pyx_k_nz), 0, 0, 1, 1},\n  {&__pyx_n_s_obj, __pyx_k_obj, sizeof(__pyx_k_obj), 0, 0, 1, 1},\n  {&__pyx_n_s_ones, __pyx_k_ones, sizeof(__pyx_k_ones), 0, 0, 1, 1},\n  {&__pyx_n_s_pack, __pyx_k_pack, sizeof(__pyx_k_pack), 0, 0, 1, 1},\n  {&__pyx_n_s_pickle, __pyx_k_pickle, sizeof(__pyx_k_pickle), 0, 0, 1, 1},\n  {&__pyx_n_s_print, __pyx_k_print, sizeof(__pyx_k_print), 0, 0, 1, 1},\n  {&__pyx_n_s_pyx_PickleError, __pyx_k_pyx_PickleError, sizeof(__pyx_k_pyx_PickleError), 0, 0, 1, 1},\n  {&__pyx_n_s_pyx_checksum, __pyx_k_pyx_checksum, sizeof(__pyx_k_pyx_checksum), 0, 0, 1, 1},\n  {&__pyx_n_s_pyx_getbuffer, __pyx_k_pyx_getbuffer, sizeof(__pyx_k_pyx_getbuffer), 0, 0, 1, 1},\n  {&__pyx_n_s_pyx_result, __pyx_k_pyx_result, sizeof(__pyx_k_pyx_result), 0, 0, 1, 1},\n  {&__pyx_n_s_pyx_state, __pyx_k_pyx_state, sizeof(__pyx_k_pyx_state), 0, 0, 1, 1},\n  {&__pyx_n_s_pyx_type, __pyx_k_pyx_type, sizeof(__pyx_k_pyx_type), 0, 0, 1, 1},\n  {&__pyx_n_s_pyx_unpickle_Enum, __pyx_k_pyx_unpickle_Enum, sizeof(__pyx_k_pyx_unpickle_Enum), 0, 0, 1, 1},\n  {&__pyx_n_s_pyx_unpickle_LutProvider, __pyx_k_pyx_unpickle_LutProvider, sizeof(__pyx_k_pyx_unpickle_LutProvider), 0, 0, 1, 1},\n  {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1},\n  {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},\n  {&__pyx_n_s_ravel, __pyx_k_ravel, sizeof(__pyx_k_ravel), 0, 0, 1, 1},\n  {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1},\n  {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1},\n  {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1},\n  {&__pyx_n_s_remove_degenerate_faces, __pyx_k_remove_degenerate_faces, sizeof(__pyx_k_remove_degenerate_faces), 0, 0, 1, 1},\n  {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1},\n  {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1},\n  {&__pyx_n_s_shape, __pyx_k_shape, sizeof(__pyx_k_shape), 0, 0, 1, 1},\n  {&__pyx_n_s_size, __pyx_k_size, sizeof(__pyx_k_size), 0, 0, 1, 1},\n  {&__pyx_n_s_spacing, __pyx_k_spacing, sizeof(__pyx_k_spacing), 0, 0, 1, 1},\n  {&__pyx_n_s_st, __pyx_k_st, sizeof(__pyx_k_st), 0, 0, 1, 1},\n  {&__pyx_n_s_start, __pyx_k_start, sizeof(__pyx_k_start), 0, 0, 1, 1},\n  {&__pyx_n_s_step, __pyx_k_step, sizeof(__pyx_k_step), 0, 0, 1, 1},\n  {&__pyx_n_s_stop, __pyx_k_stop, sizeof(__pyx_k_stop), 0, 0, 1, 1},\n  {&__pyx_kp_s_strided_and_direct, __pyx_k_strided_and_direct, sizeof(__pyx_k_strided_and_direct), 0, 0, 1, 0},\n  {&__pyx_kp_s_strided_and_direct_or_indirect, __pyx_k_strided_and_direct_or_indirect, sizeof(__pyx_k_strided_and_direct_or_indirect), 0, 0, 1, 0},\n  {&__pyx_kp_s_strided_and_indirect, __pyx_k_strided_and_indirect, sizeof(__pyx_k_strided_and_indirect), 0, 0, 1, 0},\n  {&__pyx_kp_s_stringsource, __pyx_k_stringsource, sizeof(__pyx_k_stringsource), 0, 0, 1, 0},\n  {&__pyx_n_s_struct, __pyx_k_struct, sizeof(__pyx_k_struct), 0, 0, 1, 1},\n  {&__pyx_n_s_subconfig, __pyx_k_subconfig, sizeof(__pyx_k_subconfig), 0, 0, 1, 1},\n  {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},\n  {&__pyx_kp_s_unable_to_allocate_array_data, __pyx_k_unable_to_allocate_array_data, sizeof(__pyx_k_unable_to_allocate_array_data), 0, 0, 1, 0},\n  {&__pyx_kp_s_unable_to_allocate_shape_and_str, __pyx_k_unable_to_allocate_shape_and_str, sizeof(__pyx_k_unable_to_allocate_shape_and_str), 0, 0, 1, 0},\n  {&__pyx_n_s_unpack, __pyx_k_unpack, sizeof(__pyx_k_unpack), 0, 0, 1, 1},\n  {&__pyx_n_s_update, __pyx_k_update, sizeof(__pyx_k_update), 0, 0, 1, 1},\n  {&__pyx_n_s_v1, __pyx_k_v1, sizeof(__pyx_k_v1), 0, 0, 1, 1},\n  {&__pyx_n_s_v2, __pyx_k_v2, sizeof(__pyx_k_v2), 0, 0, 1, 1},\n  {&__pyx_n_s_v3, __pyx_k_v3, sizeof(__pyx_k_v3), 0, 0, 1, 1},\n  {&__pyx_n_s_vertices, __pyx_k_vertices, sizeof(__pyx_k_vertices), 0, 0, 1, 1},\n  {&__pyx_n_s_vertices2, __pyx_k_vertices2, sizeof(__pyx_k_vertices2), 0, 0, 1, 1},\n  {&__pyx_n_s_vertices_2, __pyx_k_vertices_2, sizeof(__pyx_k_vertices_2), 0, 0, 1, 1},\n  {&__pyx_n_s_vertices_map0, __pyx_k_vertices_map0, sizeof(__pyx_k_vertices_map0), 0, 0, 1, 1},\n  {&__pyx_n_s_vertices_map1, __pyx_k_vertices_map1, sizeof(__pyx_k_vertices_map1), 0, 0, 1, 1},\n  {&__pyx_n_s_vertices_map1_2, __pyx_k_vertices_map1_2, sizeof(__pyx_k_vertices_map1_2), 0, 0, 1, 1},\n  {&__pyx_n_s_vertices_map2, __pyx_k_vertices_map2, sizeof(__pyx_k_vertices_map2), 0, 0, 1, 1},\n  {&__pyx_n_s_vertices_ok, __pyx_k_vertices_ok, sizeof(__pyx_k_vertices_ok), 0, 0, 1, 1},\n  {&__pyx_n_s_voxel_size, __pyx_k_voxel_size, sizeof(__pyx_k_voxel_size), 0, 0, 1, 1},\n  {&__pyx_n_s_x, __pyx_k_x, sizeof(__pyx_k_x), 0, 0, 1, 1},\n  {&__pyx_n_s_x_st, __pyx_k_x_st, sizeof(__pyx_k_x_st), 0, 0, 1, 1},\n  {&__pyx_n_s_y, __pyx_k_y, sizeof(__pyx_k_y), 0, 0, 1, 1},\n  {&__pyx_n_s_y_st, __pyx_k_y_st, sizeof(__pyx_k_y_st), 0, 0, 1, 1},\n  {&__pyx_n_s_z, __pyx_k_z, sizeof(__pyx_k_z), 0, 0, 1, 1},\n  {&__pyx_n_s_z_st, __pyx_k_z_st, sizeof(__pyx_k_z_st), 0, 0, 1, 1},\n  {0, 0, 0, 0, 0, 0, 0}\n};\nstatic CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) {\n  __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 58, __pyx_L1_error)\n  __pyx_builtin_MemoryError = __Pyx_GetBuiltinName(__pyx_n_s_MemoryError); if (!__pyx_builtin_MemoryError) __PYX_ERR(0, 196, __pyx_L1_error)\n  __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(1, 2, __pyx_L1_error)\n  __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(2, 945, __pyx_L1_error)\n  __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(1, 133, __pyx_L1_error)\n  __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(1, 151, __pyx_L1_error)\n  __pyx_builtin_Ellipsis = __Pyx_GetBuiltinName(__pyx_n_s_Ellipsis); if (!__pyx_builtin_Ellipsis) __PYX_ERR(1, 404, __pyx_L1_error)\n  __pyx_builtin_id = __Pyx_GetBuiltinName(__pyx_n_s_id); if (!__pyx_builtin_id) __PYX_ERR(1, 613, __pyx_L1_error)\n  __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s_IndexError); if (!__pyx_builtin_IndexError) __PYX_ERR(1, 832, __pyx_L1_error)\n  return 0;\n  __pyx_L1_error:;\n  return -1;\n}\n\nstatic CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {\n  __Pyx_RefNannyDeclarations\n  __Pyx_RefNannySetupContext(\"__Pyx_InitCachedConstants\", 0);\n\n  /* \"(tree fragment)\":2\n * def __reduce_cython__(self):\n *     raise TypeError(\"no default __reduce__ due to non-trivial __cinit__\")             # <<<<<<<<<<<<<<\n * def __setstate_cython__(self, __pyx_state):\n *     raise TypeError(\"no default __reduce__ due to non-trivial __cinit__\")\n */\n  __pyx_tuple_ = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple_)) __PYX_ERR(1, 2, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_tuple_);\n  __Pyx_GIVEREF(__pyx_tuple_);\n\n  /* \"(tree fragment)\":4\n *     raise TypeError(\"no default __reduce__ due to non-trivial __cinit__\")\n * def __setstate_cython__(self, __pyx_state):\n *     raise TypeError(\"no default __reduce__ due to non-trivial __cinit__\")             # <<<<<<<<<<<<<<\n */\n  __pyx_tuple__2 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__2)) __PYX_ERR(1, 4, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_tuple__2);\n  __Pyx_GIVEREF(__pyx_tuple__2);\n\n  /* \"(tree fragment)\":2\n * def __reduce_cython__(self):\n *     raise TypeError(\"no default __reduce__ due to non-trivial __cinit__\")             # <<<<<<<<<<<<<<\n * def __setstate_cython__(self, __pyx_state):\n *     raise TypeError(\"no default __reduce__ due to non-trivial __cinit__\")\n */\n  __pyx_tuple__3 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(1, 2, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_tuple__3);\n  __Pyx_GIVEREF(__pyx_tuple__3);\n\n  /* \"(tree fragment)\":4\n *     raise TypeError(\"no default __reduce__ due to non-trivial __cinit__\")\n * def __setstate_cython__(self, __pyx_state):\n *     raise TypeError(\"no default __reduce__ due to non-trivial __cinit__\")             # <<<<<<<<<<<<<<\n */\n  __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(1, 4, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_tuple__4);\n  __Pyx_GIVEREF(__pyx_tuple__4);\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":1171\n *     \"\"\" Return True if our heurisitic determines that normals are inwards facing\n *     \"\"\"\n *     return (avg_cube(dot3(inwards_facing_normals_ref[0,0,0], g1) >= -0.1,             # <<<<<<<<<<<<<<\n *                     dot3(inwards_facing_normals_ref[0,0,1], g2) >= -0.1,\n *                     dot3(inwards_facing_normals_ref[0,1,1], g3) >= -0.1,\n */\n  __pyx_tuple__5 = PyTuple_Pack(3, __pyx_int_0, __pyx_int_0, __pyx_int_0); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(0, 1171, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_tuple__5);\n  __Pyx_GIVEREF(__pyx_tuple__5);\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":1172\n *     \"\"\"\n *     return (avg_cube(dot3(inwards_facing_normals_ref[0,0,0], g1) >= -0.1,\n *                     dot3(inwards_facing_normals_ref[0,0,1], g2) >= -0.1,             # <<<<<<<<<<<<<<\n *                     dot3(inwards_facing_normals_ref[0,1,1], g3) >= -0.1,\n *                     dot3(inwards_facing_normals_ref[0,1,0], g4) >= -0.1,\n */\n  __pyx_tuple__6 = PyTuple_Pack(3, __pyx_int_0, __pyx_int_0, __pyx_int_1); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(0, 1172, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_tuple__6);\n  __Pyx_GIVEREF(__pyx_tuple__6);\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":1173\n *     return (avg_cube(dot3(inwards_facing_normals_ref[0,0,0], g1) >= -0.1,\n *                     dot3(inwards_facing_normals_ref[0,0,1], g2) >= -0.1,\n *                     dot3(inwards_facing_normals_ref[0,1,1], g3) >= -0.1,             # <<<<<<<<<<<<<<\n *                     dot3(inwards_facing_normals_ref[0,1,0], g4) >= -0.1,\n *                     dot3(inwards_facing_normals_ref[1,0,0], g5) >= -0.1,\n */\n  __pyx_tuple__7 = PyTuple_Pack(3, __pyx_int_0, __pyx_int_1, __pyx_int_1); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(0, 1173, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_tuple__7);\n  __Pyx_GIVEREF(__pyx_tuple__7);\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":1174\n *                     dot3(inwards_facing_normals_ref[0,0,1], g2) >= -0.1,\n *                     dot3(inwards_facing_normals_ref[0,1,1], g3) >= -0.1,\n *                     dot3(inwards_facing_normals_ref[0,1,0], g4) >= -0.1,             # <<<<<<<<<<<<<<\n *                     dot3(inwards_facing_normals_ref[1,0,0], g5) >= -0.1,\n *                     dot3(inwards_facing_normals_ref[1,0,1], g6) >= -0.1,\n */\n  __pyx_tuple__8 = PyTuple_Pack(3, __pyx_int_0, __pyx_int_1, __pyx_int_0); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(0, 1174, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_tuple__8);\n  __Pyx_GIVEREF(__pyx_tuple__8);\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":1175\n *                     dot3(inwards_facing_normals_ref[0,1,1], g3) >= -0.1,\n *                     dot3(inwards_facing_normals_ref[0,1,0], g4) >= -0.1,\n *                     dot3(inwards_facing_normals_ref[1,0,0], g5) >= -0.1,             # <<<<<<<<<<<<<<\n *                     dot3(inwards_facing_normals_ref[1,0,1], g6) >= -0.1,\n *                     dot3(inwards_facing_normals_ref[1,1,1], g7) >= -0.1,\n */\n  __pyx_tuple__9 = PyTuple_Pack(3, __pyx_int_1, __pyx_int_0, __pyx_int_0); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(0, 1175, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_tuple__9);\n  __Pyx_GIVEREF(__pyx_tuple__9);\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":1176\n *                     dot3(inwards_facing_normals_ref[0,1,0], g4) >= -0.1,\n *                     dot3(inwards_facing_normals_ref[1,0,0], g5) >= -0.1,\n *                     dot3(inwards_facing_normals_ref[1,0,1], g6) >= -0.1,             # <<<<<<<<<<<<<<\n *                     dot3(inwards_facing_normals_ref[1,1,1], g7) >= -0.1,\n *                     dot3(inwards_facing_normals_ref[1,1,0], g8) >= -0.1,\n */\n  __pyx_tuple__10 = PyTuple_Pack(3, __pyx_int_1, __pyx_int_0, __pyx_int_1); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 1176, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_tuple__10);\n  __Pyx_GIVEREF(__pyx_tuple__10);\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":1177\n *                     dot3(inwards_facing_normals_ref[1,0,0], g5) >= -0.1,\n *                     dot3(inwards_facing_normals_ref[1,0,1], g6) >= -0.1,\n *                     dot3(inwards_facing_normals_ref[1,1,1], g7) >= -0.1,             # <<<<<<<<<<<<<<\n *                     dot3(inwards_facing_normals_ref[1,1,0], g8) >= -0.1,\n *                              ) >= 2./8.)\n */\n  __pyx_tuple__11 = PyTuple_Pack(3, __pyx_int_1, __pyx_int_1, __pyx_int_1); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(0, 1177, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_tuple__11);\n  __Pyx_GIVEREF(__pyx_tuple__11);\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":1178\n *                     dot3(inwards_facing_normals_ref[1,0,1], g6) >= -0.1,\n *                     dot3(inwards_facing_normals_ref[1,1,1], g7) >= -0.1,\n *                     dot3(inwards_facing_normals_ref[1,1,0], g8) >= -0.1,             # <<<<<<<<<<<<<<\n *                              ) >= 2./8.)\n * \n */\n  __pyx_tuple__12 = PyTuple_Pack(3, __pyx_int_1, __pyx_int_1, __pyx_int_0); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(0, 1178, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_tuple__12);\n  __Pyx_GIVEREF(__pyx_tuple__12);\n\n  /* \"(tree fragment)\":4\n *     cdef object __pyx_PickleError\n *     cdef object __pyx_result\n *     if __pyx_checksum not in (0x3035ec8, 0x4a4e1b2, 0x53f5fc5):             # <<<<<<<<<<<<<<\n *         from pickle import PickleError as __pyx_PickleError\n *         raise __pyx_PickleError(\"Incompatible checksums (0x%x vs (0x3035ec8, 0x4a4e1b2, 0x53f5fc5) = (CASES, CASESCLASSIC, EDGESRELX, EDGESRELY, EDGESRELZ, SUBCONFIG13, TEST10, TEST12, TEST13, TEST3, TEST4, TEST6, TEST7, TILING1, TILING10_1_1, TILING10_1_1_, TILING10_1_2, TILING10_2, TILING10_2_, TILING11, TILING12_1_1, TILING12_1_1_, TILING12_1_2, TILING12_2, TILING12_2_, TILING13_1, TILING13_1_, TILING13_2, TILING13_2_, TILING13_3, TILING13_3_, TILING13_4, TILING13_5_1, TILING13_5_2, TILING14, TILING2, TILING3_1, TILING3_2, TILING4_1, TILING4_2, TILING5, TILING6_1_1, TILING6_1_2, TILING6_2, TILING7_1, TILING7_2, TILING7_3, TILING7_4_1, TILING7_4_2, TILING8, TILING9))\" % __pyx_checksum)\n */\n  __pyx_tuple__13 = PyTuple_Pack(3, __pyx_int_50552520, __pyx_int_77914546, __pyx_int_88039365); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(1, 4, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_tuple__13);\n  __Pyx_GIVEREF(__pyx_tuple__13);\n\n  /* \"../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd\":945\n *         __pyx_import_array()\n *     except Exception:\n *         raise ImportError(\"numpy.core.multiarray failed to import\")             # <<<<<<<<<<<<<<\n * \n * cdef inline int import_umath() except -1:\n */\n  __pyx_tuple__14 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_multiarray_failed_to); if (unlikely(!__pyx_tuple__14)) __PYX_ERR(2, 945, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_tuple__14);\n  __Pyx_GIVEREF(__pyx_tuple__14);\n\n  /* \"../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd\":951\n *         _import_umath()\n *     except Exception:\n *         raise ImportError(\"numpy.core.umath failed to import\")             # <<<<<<<<<<<<<<\n * \n * cdef inline int import_ufunc() except -1:\n */\n  __pyx_tuple__15 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_umath_failed_to_impor); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(2, 951, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_tuple__15);\n  __Pyx_GIVEREF(__pyx_tuple__15);\n\n  /* \"View.MemoryView\":133\n * \n *         if not self.ndim:\n *             raise ValueError(\"Empty shape tuple for cython.array\")             # <<<<<<<<<<<<<<\n * \n *         if itemsize <= 0:\n */\n  __pyx_tuple__16 = PyTuple_Pack(1, __pyx_kp_s_Empty_shape_tuple_for_cython_arr); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(1, 133, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_tuple__16);\n  __Pyx_GIVEREF(__pyx_tuple__16);\n\n  /* \"View.MemoryView\":136\n * \n *         if itemsize <= 0:\n *             raise ValueError(\"itemsize <= 0 for cython.array\")             # <<<<<<<<<<<<<<\n * \n *         if not isinstance(format, bytes):\n */\n  __pyx_tuple__17 = PyTuple_Pack(1, __pyx_kp_s_itemsize_0_for_cython_array); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(1, 136, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_tuple__17);\n  __Pyx_GIVEREF(__pyx_tuple__17);\n\n  /* \"View.MemoryView\":148\n * \n *         if not self._shape:\n *             raise MemoryError(\"unable to allocate shape and strides.\")             # <<<<<<<<<<<<<<\n * \n * \n */\n  __pyx_tuple__18 = PyTuple_Pack(1, __pyx_kp_s_unable_to_allocate_shape_and_str); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(1, 148, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_tuple__18);\n  __Pyx_GIVEREF(__pyx_tuple__18);\n\n  /* \"View.MemoryView\":176\n *             self.data = <char *>malloc(self.len)\n *             if not self.data:\n *                 raise MemoryError(\"unable to allocate array data.\")             # <<<<<<<<<<<<<<\n * \n *             if self.dtype_is_object:\n */\n  __pyx_tuple__19 = PyTuple_Pack(1, __pyx_kp_s_unable_to_allocate_array_data); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(1, 176, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_tuple__19);\n  __Pyx_GIVEREF(__pyx_tuple__19);\n\n  /* \"View.MemoryView\":192\n *             bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS\n *         if not (flags & bufmode):\n *             raise ValueError(\"Can only create a buffer that is contiguous in memory.\")             # <<<<<<<<<<<<<<\n *         info.buf = self.data\n *         info.len = self.len\n */\n  __pyx_tuple__20 = PyTuple_Pack(1, __pyx_kp_s_Can_only_create_a_buffer_that_is); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(1, 192, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_tuple__20);\n  __Pyx_GIVEREF(__pyx_tuple__20);\n\n  /* \"(tree fragment)\":2\n * def __reduce_cython__(self):\n *     raise TypeError(\"no default __reduce__ due to non-trivial __cinit__\")             # <<<<<<<<<<<<<<\n * def __setstate_cython__(self, __pyx_state):\n *     raise TypeError(\"no default __reduce__ due to non-trivial __cinit__\")\n */\n  __pyx_tuple__21 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(1, 2, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_tuple__21);\n  __Pyx_GIVEREF(__pyx_tuple__21);\n\n  /* \"(tree fragment)\":4\n *     raise TypeError(\"no default __reduce__ due to non-trivial __cinit__\")\n * def __setstate_cython__(self, __pyx_state):\n *     raise TypeError(\"no default __reduce__ due to non-trivial __cinit__\")             # <<<<<<<<<<<<<<\n */\n  __pyx_tuple__22 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__22)) __PYX_ERR(1, 4, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_tuple__22);\n  __Pyx_GIVEREF(__pyx_tuple__22);\n\n  /* \"View.MemoryView\":418\n *     def __setitem__(memoryview self, object index, object value):\n *         if self.view.readonly:\n *             raise TypeError(\"Cannot assign to read-only memoryview\")             # <<<<<<<<<<<<<<\n * \n *         have_slices, index = _unellipsify(index, self.view.ndim)\n */\n  __pyx_tuple__23 = PyTuple_Pack(1, __pyx_kp_s_Cannot_assign_to_read_only_memor); if (unlikely(!__pyx_tuple__23)) __PYX_ERR(1, 418, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_tuple__23);\n  __Pyx_GIVEREF(__pyx_tuple__23);\n\n  /* \"View.MemoryView\":495\n *             result = struct.unpack(self.view.format, bytesitem)\n *         except struct.error:\n *             raise ValueError(\"Unable to convert item to object\")             # <<<<<<<<<<<<<<\n *         else:\n *             if len(self.view.format) == 1:\n */\n  __pyx_tuple__24 = PyTuple_Pack(1, __pyx_kp_s_Unable_to_convert_item_to_object); if (unlikely(!__pyx_tuple__24)) __PYX_ERR(1, 495, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_tuple__24);\n  __Pyx_GIVEREF(__pyx_tuple__24);\n\n  /* \"View.MemoryView\":520\n *     def __getbuffer__(self, Py_buffer *info, int flags):\n *         if flags & PyBUF_WRITABLE and self.view.readonly:\n *             raise ValueError(\"Cannot create writable memory view from read-only memoryview\")             # <<<<<<<<<<<<<<\n * \n *         if flags & PyBUF_ND:\n */\n  __pyx_tuple__25 = PyTuple_Pack(1, __pyx_kp_s_Cannot_create_writable_memory_vi); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(1, 520, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_tuple__25);\n  __Pyx_GIVEREF(__pyx_tuple__25);\n\n  /* \"View.MemoryView\":570\n *         if self.view.strides == NULL:\n * \n *             raise ValueError(\"Buffer view does not expose strides\")             # <<<<<<<<<<<<<<\n * \n *         return tuple([stride for stride in self.view.strides[:self.view.ndim]])\n */\n  __pyx_tuple__26 = PyTuple_Pack(1, __pyx_kp_s_Buffer_view_does_not_expose_stri); if (unlikely(!__pyx_tuple__26)) __PYX_ERR(1, 570, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_tuple__26);\n  __Pyx_GIVEREF(__pyx_tuple__26);\n\n  /* \"View.MemoryView\":577\n *     def suboffsets(self):\n *         if self.view.suboffsets == NULL:\n *             return (-1,) * self.view.ndim             # <<<<<<<<<<<<<<\n * \n *         return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]])\n */\n  __pyx_tuple__27 = PyTuple_New(1); if (unlikely(!__pyx_tuple__27)) __PYX_ERR(1, 577, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_tuple__27);\n  __Pyx_INCREF(__pyx_int_neg_1);\n  __Pyx_GIVEREF(__pyx_int_neg_1);\n  PyTuple_SET_ITEM(__pyx_tuple__27, 0, __pyx_int_neg_1);\n  __Pyx_GIVEREF(__pyx_tuple__27);\n\n  /* \"(tree fragment)\":2\n * def __reduce_cython__(self):\n *     raise TypeError(\"no default __reduce__ due to non-trivial __cinit__\")             # <<<<<<<<<<<<<<\n * def __setstate_cython__(self, __pyx_state):\n *     raise TypeError(\"no default __reduce__ due to non-trivial __cinit__\")\n */\n  __pyx_tuple__28 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__28)) __PYX_ERR(1, 2, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_tuple__28);\n  __Pyx_GIVEREF(__pyx_tuple__28);\n\n  /* \"(tree fragment)\":4\n *     raise TypeError(\"no default __reduce__ due to non-trivial __cinit__\")\n * def __setstate_cython__(self, __pyx_state):\n *     raise TypeError(\"no default __reduce__ due to non-trivial __cinit__\")             # <<<<<<<<<<<<<<\n */\n  __pyx_tuple__29 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__29)) __PYX_ERR(1, 4, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_tuple__29);\n  __Pyx_GIVEREF(__pyx_tuple__29);\n\n  /* \"View.MemoryView\":682\n *         if item is Ellipsis:\n *             if not seen_ellipsis:\n *                 result.extend([slice(None)] * (ndim - len(tup) + 1))             # <<<<<<<<<<<<<<\n *                 seen_ellipsis = True\n *             else:\n */\n  __pyx_slice__30 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__30)) __PYX_ERR(1, 682, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_slice__30);\n  __Pyx_GIVEREF(__pyx_slice__30);\n\n  /* \"View.MemoryView\":703\n *     for suboffset in suboffsets[:ndim]:\n *         if suboffset >= 0:\n *             raise ValueError(\"Indirect dimensions not supported\")             # <<<<<<<<<<<<<<\n * \n * \n */\n  __pyx_tuple__31 = PyTuple_Pack(1, __pyx_kp_s_Indirect_dimensions_not_supporte); if (unlikely(!__pyx_tuple__31)) __PYX_ERR(1, 703, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_tuple__31);\n  __Pyx_GIVEREF(__pyx_tuple__31);\n\n  /* \"(tree fragment)\":2\n * def __reduce_cython__(self):\n *     raise TypeError(\"no default __reduce__ due to non-trivial __cinit__\")             # <<<<<<<<<<<<<<\n * def __setstate_cython__(self, __pyx_state):\n *     raise TypeError(\"no default __reduce__ due to non-trivial __cinit__\")\n */\n  __pyx_tuple__32 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__32)) __PYX_ERR(1, 2, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_tuple__32);\n  __Pyx_GIVEREF(__pyx_tuple__32);\n\n  /* \"(tree fragment)\":4\n *     raise TypeError(\"no default __reduce__ due to non-trivial __cinit__\")\n * def __setstate_cython__(self, __pyx_state):\n *     raise TypeError(\"no default __reduce__ due to non-trivial __cinit__\")             # <<<<<<<<<<<<<<\n */\n  __pyx_tuple__33 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__33)) __PYX_ERR(1, 4, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_tuple__33);\n  __Pyx_GIVEREF(__pyx_tuple__33);\n  __pyx_tuple__34 = PyTuple_Pack(3, __pyx_int_184977713, __pyx_int_136983863, __pyx_int_112105877); if (unlikely(!__pyx_tuple__34)) __PYX_ERR(1, 4, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_tuple__34);\n  __Pyx_GIVEREF(__pyx_tuple__34);\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":32\n * \n * # Define tiny winy number\n * cdef double FLT_EPSILON = np.spacing(1.0) #0.0000001             # <<<<<<<<<<<<<<\n * \n * # Define abs function for doubles\n */\n  __pyx_tuple__35 = PyTuple_Pack(1, __pyx_float_1_0); if (unlikely(!__pyx_tuple__35)) __PYX_ERR(0, 32, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_tuple__35);\n  __Pyx_GIVEREF(__pyx_tuple__35);\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":41\n * # todo: can we disable Cython from checking for zero division? Sometimes we know that it never happens!\n * \n * def remove_degenerate_faces(vertices, faces, *arrays):             # <<<<<<<<<<<<<<\n * \n *     vertices_map0 = np.arange(len(vertices), dtype=np.int32)\n */\n  __pyx_tuple__36 = PyTuple_Pack(23, __pyx_n_s_vertices, __pyx_n_s_faces, __pyx_n_s_arrays, __pyx_n_s_vertices_map0, __pyx_n_s_vertices_map1, __pyx_n_s_faces_ok, __pyx_n_s_vertices_2, __pyx_n_s_v1, __pyx_n_s_v2, __pyx_n_s_v3, __pyx_n_s_faces_2, __pyx_n_s_vertices_map1_2, __pyx_n_s_faces_ok_2, __pyx_n_s_j, __pyx_n_s_i1, __pyx_n_s_i2, __pyx_n_s_i3, __pyx_n_s_vertices_ok, __pyx_n_s_vertices_map2, __pyx_n_s_faces2, __pyx_n_s_vertices2, __pyx_n_s_arrays2, __pyx_n_s_arr); if (unlikely(!__pyx_tuple__36)) __PYX_ERR(0, 41, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_tuple__36);\n  __Pyx_GIVEREF(__pyx_tuple__36);\n  __pyx_codeobj__37 = (PyObject*)__Pyx_PyCode_New(2, 0, 23, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__36, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_marching_cubes_lewiner_cy_pyx, __pyx_n_s_remove_degenerate_faces, 41, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__37)) __PYX_ERR(0, 41, __pyx_L1_error)\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":933\n *         self.SUBCONFIG13 = Lut(SUBCONFIG13)\n * \n * def marching_cubes(float[:, :, :] im not None, double isovalue,             # <<<<<<<<<<<<<<\n *                    LutProvider luts, int st=1, int classic=0,\n *                    np.ndarray[np.npy_bool, ndim=3, cast=True] mask=None):\n */\n  __pyx_tuple__38 = PyTuple_Pack(24, __pyx_n_s_im, __pyx_n_s_isovalue, __pyx_n_s_luts, __pyx_n_s_st, __pyx_n_s_classic, __pyx_n_s_mask, __pyx_n_s_Nx, __pyx_n_s_Ny, __pyx_n_s_Nz, __pyx_n_s_cell, __pyx_n_s_x, __pyx_n_s_y, __pyx_n_s_z, __pyx_n_s_x_st, __pyx_n_s_y_st, __pyx_n_s_z_st, __pyx_n_s_nt, __pyx_n_s_case, __pyx_n_s_config, __pyx_n_s_subconfig, __pyx_n_s_no_mask, __pyx_n_s_Nx_bound, __pyx_n_s_Ny_bound, __pyx_n_s_Nz_bound); if (unlikely(!__pyx_tuple__38)) __PYX_ERR(0, 933, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_tuple__38);\n  __Pyx_GIVEREF(__pyx_tuple__38);\n  __pyx_codeobj__39 = (PyObject*)__Pyx_PyCode_New(6, 0, 24, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_marching_cubes_lewiner_cy_pyx, __pyx_n_s_marching_cubes, 933, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__39)) __PYX_ERR(0, 933, __pyx_L1_error)\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":1008\n * \n * \n * def marching_cubes_udf(float[:, :, :] im not None, float[:, :, :, :] grads not None,             # <<<<<<<<<<<<<<\n *                    LutProvider luts, int st=1, int classic=0,\n *                    np.ndarray[np.npy_bool, ndim=3, cast=True] mask=None):\n */\n  __pyx_tuple__40 = PyTuple_Pack(30, __pyx_n_s_im, __pyx_n_s_grads, __pyx_n_s_luts, __pyx_n_s_st, __pyx_n_s_classic, __pyx_n_s_mask, __pyx_n_s_Nx, __pyx_n_s_Ny, __pyx_n_s_Nz, __pyx_n_s_voxel_size, __pyx_n_s_cell, __pyx_n_s_x, __pyx_n_s_y, __pyx_n_s_z, __pyx_n_s_x_st, __pyx_n_s_y_st, __pyx_n_s_z_st, __pyx_n_s_nt, __pyx_n_s_case, __pyx_n_s_config, __pyx_n_s_subconfig, __pyx_n_s_no_mask, __pyx_n_s_Nx_bound, __pyx_n_s_Ny_bound, __pyx_n_s_Nz_bound, __pyx_n_s_base_vec, __pyx_n_s_avg_cube_val, __pyx_n_s_max_cube_val, __pyx_n_s_inwards_facing_normals_ref, __pyx_n_s_inwards_facing_normals_bool); if (unlikely(!__pyx_tuple__40)) __PYX_ERR(0, 1008, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_tuple__40);\n  __Pyx_GIVEREF(__pyx_tuple__40);\n  __pyx_codeobj__41 = (PyObject*)__Pyx_PyCode_New(6, 0, 30, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__40, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_marching_cubes_lewiner_cy_pyx, __pyx_n_s_marching_cubes_udf, 1008, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__41)) __PYX_ERR(0, 1008, __pyx_L1_error)\n\n  /* \"(tree fragment)\":1\n * def __pyx_unpickle_LutProvider(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<\n *     cdef object __pyx_PickleError\n *     cdef object __pyx_result\n */\n  __pyx_tuple__42 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__42)) __PYX_ERR(1, 1, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_tuple__42);\n  __Pyx_GIVEREF(__pyx_tuple__42);\n  __pyx_codeobj__43 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__42, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_LutProvider, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__43)) __PYX_ERR(1, 1, __pyx_L1_error)\n\n  /* \"View.MemoryView\":286\n *         return self.name\n * \n * cdef generic = Enum(\"<strided and direct or indirect>\")             # <<<<<<<<<<<<<<\n * cdef strided = Enum(\"<strided and direct>\") # default\n * cdef indirect = Enum(\"<strided and indirect>\")\n */\n  __pyx_tuple__44 = PyTuple_Pack(1, __pyx_kp_s_strided_and_direct_or_indirect); if (unlikely(!__pyx_tuple__44)) __PYX_ERR(1, 286, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_tuple__44);\n  __Pyx_GIVEREF(__pyx_tuple__44);\n\n  /* \"View.MemoryView\":287\n * \n * cdef generic = Enum(\"<strided and direct or indirect>\")\n * cdef strided = Enum(\"<strided and direct>\") # default             # <<<<<<<<<<<<<<\n * cdef indirect = Enum(\"<strided and indirect>\")\n * \n */\n  __pyx_tuple__45 = PyTuple_Pack(1, __pyx_kp_s_strided_and_direct); if (unlikely(!__pyx_tuple__45)) __PYX_ERR(1, 287, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_tuple__45);\n  __Pyx_GIVEREF(__pyx_tuple__45);\n\n  /* \"View.MemoryView\":288\n * cdef generic = Enum(\"<strided and direct or indirect>\")\n * cdef strided = Enum(\"<strided and direct>\") # default\n * cdef indirect = Enum(\"<strided and indirect>\")             # <<<<<<<<<<<<<<\n * \n * \n */\n  __pyx_tuple__46 = PyTuple_Pack(1, __pyx_kp_s_strided_and_indirect); if (unlikely(!__pyx_tuple__46)) __PYX_ERR(1, 288, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_tuple__46);\n  __Pyx_GIVEREF(__pyx_tuple__46);\n\n  /* \"View.MemoryView\":291\n * \n * \n * cdef contiguous = Enum(\"<contiguous and direct>\")             # <<<<<<<<<<<<<<\n * cdef indirect_contiguous = Enum(\"<contiguous and indirect>\")\n * \n */\n  __pyx_tuple__47 = PyTuple_Pack(1, __pyx_kp_s_contiguous_and_direct); if (unlikely(!__pyx_tuple__47)) __PYX_ERR(1, 291, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_tuple__47);\n  __Pyx_GIVEREF(__pyx_tuple__47);\n\n  /* \"View.MemoryView\":292\n * \n * cdef contiguous = Enum(\"<contiguous and direct>\")\n * cdef indirect_contiguous = Enum(\"<contiguous and indirect>\")             # <<<<<<<<<<<<<<\n * \n * \n */\n  __pyx_tuple__48 = PyTuple_Pack(1, __pyx_kp_s_contiguous_and_indirect); if (unlikely(!__pyx_tuple__48)) __PYX_ERR(1, 292, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_tuple__48);\n  __Pyx_GIVEREF(__pyx_tuple__48);\n\n  /* \"(tree fragment)\":1\n * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<\n *     cdef object __pyx_PickleError\n *     cdef object __pyx_result\n */\n  __pyx_tuple__49 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__49)) __PYX_ERR(1, 1, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_tuple__49);\n  __Pyx_GIVEREF(__pyx_tuple__49);\n  __pyx_codeobj__50 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__49, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Enum, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__50)) __PYX_ERR(1, 1, __pyx_L1_error)\n  __Pyx_RefNannyFinishContext();\n  return 0;\n  __pyx_L1_error:;\n  __Pyx_RefNannyFinishContext();\n  return -1;\n}\n\nstatic CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) {\n  if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error);\n  __pyx_float_1_ = PyFloat_FromDouble(1.); if (unlikely(!__pyx_float_1_)) __PYX_ERR(0, 1, __pyx_L1_error)\n  __pyx_float_1_0 = PyFloat_FromDouble(1.0); if (unlikely(!__pyx_float_1_0)) __PYX_ERR(0, 1, __pyx_L1_error)\n  __pyx_float_1_05 = PyFloat_FromDouble(1.05); if (unlikely(!__pyx_float_1_05)) __PYX_ERR(0, 1, __pyx_L1_error)\n  __pyx_float_1_74 = PyFloat_FromDouble(1.74); if (unlikely(!__pyx_float_1_74)) __PYX_ERR(0, 1, __pyx_L1_error)\n  __pyx_float_neg_1_ = PyFloat_FromDouble(-1.); if (unlikely(!__pyx_float_neg_1_)) __PYX_ERR(0, 1, __pyx_L1_error)\n  __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error)\n  __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error)\n  __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) __PYX_ERR(0, 1, __pyx_L1_error)\n  __pyx_int_3 = PyInt_FromLong(3); if (unlikely(!__pyx_int_3)) __PYX_ERR(0, 1, __pyx_L1_error)\n  __pyx_int_50552520 = PyInt_FromLong(50552520L); if (unlikely(!__pyx_int_50552520)) __PYX_ERR(0, 1, __pyx_L1_error)\n  __pyx_int_77914546 = PyInt_FromLong(77914546L); if (unlikely(!__pyx_int_77914546)) __PYX_ERR(0, 1, __pyx_L1_error)\n  __pyx_int_88039365 = PyInt_FromLong(88039365L); if (unlikely(!__pyx_int_88039365)) __PYX_ERR(0, 1, __pyx_L1_error)\n  __pyx_int_112105877 = PyInt_FromLong(112105877L); if (unlikely(!__pyx_int_112105877)) __PYX_ERR(0, 1, __pyx_L1_error)\n  __pyx_int_136983863 = PyInt_FromLong(136983863L); if (unlikely(!__pyx_int_136983863)) __PYX_ERR(0, 1, __pyx_L1_error)\n  __pyx_int_184977713 = PyInt_FromLong(184977713L); if (unlikely(!__pyx_int_184977713)) __PYX_ERR(0, 1, __pyx_L1_error)\n  __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) __PYX_ERR(0, 1, __pyx_L1_error)\n  return 0;\n  __pyx_L1_error:;\n  return -1;\n}\n\nstatic CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/\nstatic CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/\nstatic CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/\nstatic CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/\nstatic CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/\nstatic CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/\nstatic CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/\n\nstatic int __Pyx_modinit_global_init_code(void) {\n  __Pyx_RefNannyDeclarations\n  __Pyx_RefNannySetupContext(\"__Pyx_modinit_global_init_code\", 0);\n  /*--- Global init code ---*/\n  generic = Py_None; Py_INCREF(Py_None);\n  strided = Py_None; Py_INCREF(Py_None);\n  indirect = Py_None; Py_INCREF(Py_None);\n  contiguous = Py_None; Py_INCREF(Py_None);\n  indirect_contiguous = Py_None; Py_INCREF(Py_None);\n  __Pyx_RefNannyFinishContext();\n  return 0;\n}\n\nstatic int __Pyx_modinit_variable_export_code(void) {\n  __Pyx_RefNannyDeclarations\n  __Pyx_RefNannySetupContext(\"__Pyx_modinit_variable_export_code\", 0);\n  /*--- Variable export code ---*/\n  __Pyx_RefNannyFinishContext();\n  return 0;\n}\n\nstatic int __Pyx_modinit_function_export_code(void) {\n  __Pyx_RefNannyDeclarations\n  __Pyx_RefNannySetupContext(\"__Pyx_modinit_function_export_code\", 0);\n  /*--- Function export code ---*/\n  __Pyx_RefNannyFinishContext();\n  return 0;\n}\n\nstatic int __Pyx_modinit_type_init_code(void) {\n  __Pyx_RefNannyDeclarations\n  int __pyx_lineno = 0;\n  const char *__pyx_filename = NULL;\n  int __pyx_clineno = 0;\n  __Pyx_RefNannySetupContext(\"__Pyx_modinit_type_init_code\", 0);\n  /*--- Type init code ---*/\n  __pyx_vtabptr_26_marching_cubes_lewiner_cy_Cell = &__pyx_vtable_26_marching_cubes_lewiner_cy_Cell;\n  __pyx_vtable_26_marching_cubes_lewiner_cy_Cell._increase_size_vertices = (void (*)(struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *))__pyx_f_26_marching_cubes_lewiner_cy_4Cell__increase_size_vertices;\n  __pyx_vtable_26_marching_cubes_lewiner_cy_Cell._increase_size_faces = (void (*)(struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *))__pyx_f_26_marching_cubes_lewiner_cy_4Cell__increase_size_faces;\n  __pyx_vtable_26_marching_cubes_lewiner_cy_Cell.add_vertex = (int (*)(struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *, float, float, float))__pyx_f_26_marching_cubes_lewiner_cy_4Cell_add_vertex;\n  __pyx_vtable_26_marching_cubes_lewiner_cy_Cell.add_gradient = (void (*)(struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *, int, float, float, float))__pyx_f_26_marching_cubes_lewiner_cy_4Cell_add_gradient;\n  __pyx_vtable_26_marching_cubes_lewiner_cy_Cell.add_gradient_from_index = (void (*)(struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *, int, int, float))__pyx_f_26_marching_cubes_lewiner_cy_4Cell_add_gradient_from_index;\n  __pyx_vtable_26_marching_cubes_lewiner_cy_Cell.add_face = (PyObject *(*)(struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *, int))__pyx_f_26_marching_cubes_lewiner_cy_4Cell_add_face;\n  __pyx_vtable_26_marching_cubes_lewiner_cy_Cell.new_z_value = (void (*)(struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *))__pyx_f_26_marching_cubes_lewiner_cy_4Cell_new_z_value;\n  __pyx_vtable_26_marching_cubes_lewiner_cy_Cell.set_cube = (void (*)(struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *, double, int, int, int, int, double, double, double, double, double, double, double, double))__pyx_f_26_marching_cubes_lewiner_cy_4Cell_set_cube;\n  __pyx_vtable_26_marching_cubes_lewiner_cy_Cell.add_triangles = (void (*)(struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *, struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *, int, int))__pyx_f_26_marching_cubes_lewiner_cy_4Cell_add_triangles;\n  __pyx_vtable_26_marching_cubes_lewiner_cy_Cell.add_triangles2 = (void (*)(struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *, struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *, int, int, int))__pyx_f_26_marching_cubes_lewiner_cy_4Cell_add_triangles2;\n  __pyx_vtable_26_marching_cubes_lewiner_cy_Cell._add_face_from_edge_index = (void (*)(struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *, int))__pyx_f_26_marching_cubes_lewiner_cy_4Cell__add_face_from_edge_index;\n  __pyx_vtable_26_marching_cubes_lewiner_cy_Cell.get_index_in_facelayer = (int (*)(struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *, int))__pyx_f_26_marching_cubes_lewiner_cy_4Cell_get_index_in_facelayer;\n  __pyx_vtable_26_marching_cubes_lewiner_cy_Cell.prepare_for_adding_triangles = (void (*)(struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *))__pyx_f_26_marching_cubes_lewiner_cy_4Cell_prepare_for_adding_triangles;\n  __pyx_vtable_26_marching_cubes_lewiner_cy_Cell.calculate_center_vertex = (void (*)(struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *))__pyx_f_26_marching_cubes_lewiner_cy_4Cell_calculate_center_vertex;\n  if (PyType_Ready(&__pyx_type_26_marching_cubes_lewiner_cy_Cell) < 0) __PYX_ERR(0, 83, __pyx_L1_error)\n  #if PY_VERSION_HEX < 0x030800B1\n  __pyx_type_26_marching_cubes_lewiner_cy_Cell.tp_print = 0;\n  #endif\n  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_26_marching_cubes_lewiner_cy_Cell.tp_dictoffset && __pyx_type_26_marching_cubes_lewiner_cy_Cell.tp_getattro == PyObject_GenericGetAttr)) {\n    __pyx_type_26_marching_cubes_lewiner_cy_Cell.tp_getattro = __Pyx_PyObject_GenericGetAttr;\n  }\n  if (__Pyx_SetVtable(__pyx_type_26_marching_cubes_lewiner_cy_Cell.tp_dict, __pyx_vtabptr_26_marching_cubes_lewiner_cy_Cell) < 0) __PYX_ERR(0, 83, __pyx_L1_error)\n  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Cell, (PyObject *)&__pyx_type_26_marching_cubes_lewiner_cy_Cell) < 0) __PYX_ERR(0, 83, __pyx_L1_error)\n  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_26_marching_cubes_lewiner_cy_Cell) < 0) __PYX_ERR(0, 83, __pyx_L1_error)\n  __pyx_ptype_26_marching_cubes_lewiner_cy_Cell = &__pyx_type_26_marching_cubes_lewiner_cy_Cell;\n  __pyx_vtabptr_26_marching_cubes_lewiner_cy_Lut = &__pyx_vtable_26_marching_cubes_lewiner_cy_Lut;\n  __pyx_vtable_26_marching_cubes_lewiner_cy_Lut.get1 = (int (*)(struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *, int))__pyx_f_26_marching_cubes_lewiner_cy_3Lut_get1;\n  __pyx_vtable_26_marching_cubes_lewiner_cy_Lut.get2 = (int (*)(struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *, int, int))__pyx_f_26_marching_cubes_lewiner_cy_3Lut_get2;\n  __pyx_vtable_26_marching_cubes_lewiner_cy_Lut.get3 = (int (*)(struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *, int, int, int))__pyx_f_26_marching_cubes_lewiner_cy_3Lut_get3;\n  if (PyType_Ready(&__pyx_type_26_marching_cubes_lewiner_cy_Lut) < 0) __PYX_ERR(0, 747, __pyx_L1_error)\n  #if PY_VERSION_HEX < 0x030800B1\n  __pyx_type_26_marching_cubes_lewiner_cy_Lut.tp_print = 0;\n  #endif\n  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_26_marching_cubes_lewiner_cy_Lut.tp_dictoffset && __pyx_type_26_marching_cubes_lewiner_cy_Lut.tp_getattro == PyObject_GenericGetAttr)) {\n    __pyx_type_26_marching_cubes_lewiner_cy_Lut.tp_getattro = __Pyx_PyObject_GenericGetAttr;\n  }\n  if (__Pyx_SetVtable(__pyx_type_26_marching_cubes_lewiner_cy_Lut.tp_dict, __pyx_vtabptr_26_marching_cubes_lewiner_cy_Lut) < 0) __PYX_ERR(0, 747, __pyx_L1_error)\n  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Lut, (PyObject *)&__pyx_type_26_marching_cubes_lewiner_cy_Lut) < 0) __PYX_ERR(0, 747, __pyx_L1_error)\n  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_26_marching_cubes_lewiner_cy_Lut) < 0) __PYX_ERR(0, 747, __pyx_L1_error)\n  __pyx_ptype_26_marching_cubes_lewiner_cy_Lut = &__pyx_type_26_marching_cubes_lewiner_cy_Lut;\n  if (PyType_Ready(&__pyx_type_26_marching_cubes_lewiner_cy_LutProvider) < 0) __PYX_ERR(0, 799, __pyx_L1_error)\n  #if PY_VERSION_HEX < 0x030800B1\n  __pyx_type_26_marching_cubes_lewiner_cy_LutProvider.tp_print = 0;\n  #endif\n  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_26_marching_cubes_lewiner_cy_LutProvider.tp_dictoffset && __pyx_type_26_marching_cubes_lewiner_cy_LutProvider.tp_getattro == PyObject_GenericGetAttr)) {\n    __pyx_type_26_marching_cubes_lewiner_cy_LutProvider.tp_getattro = __Pyx_PyObject_GenericGetAttr;\n  }\n  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_LutProvider, (PyObject *)&__pyx_type_26_marching_cubes_lewiner_cy_LutProvider) < 0) __PYX_ERR(0, 799, __pyx_L1_error)\n  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_26_marching_cubes_lewiner_cy_LutProvider) < 0) __PYX_ERR(0, 799, __pyx_L1_error)\n  __pyx_ptype_26_marching_cubes_lewiner_cy_LutProvider = &__pyx_type_26_marching_cubes_lewiner_cy_LutProvider;\n  __pyx_vtabptr_array = &__pyx_vtable_array;\n  __pyx_vtable_array.get_memview = (PyObject *(*)(struct __pyx_array_obj *))__pyx_array_get_memview;\n  if (PyType_Ready(&__pyx_type___pyx_array) < 0) __PYX_ERR(1, 105, __pyx_L1_error)\n  #if PY_VERSION_HEX < 0x030800B1\n  __pyx_type___pyx_array.tp_print = 0;\n  #endif\n  if (__Pyx_SetVtable(__pyx_type___pyx_array.tp_dict, __pyx_vtabptr_array) < 0) __PYX_ERR(1, 105, __pyx_L1_error)\n  if (__Pyx_setup_reduce((PyObject*)&__pyx_type___pyx_array) < 0) __PYX_ERR(1, 105, __pyx_L1_error)\n  __pyx_array_type = &__pyx_type___pyx_array;\n  if (PyType_Ready(&__pyx_type___pyx_MemviewEnum) < 0) __PYX_ERR(1, 279, __pyx_L1_error)\n  #if PY_VERSION_HEX < 0x030800B1\n  __pyx_type___pyx_MemviewEnum.tp_print = 0;\n  #endif\n  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type___pyx_MemviewEnum.tp_dictoffset && __pyx_type___pyx_MemviewEnum.tp_getattro == PyObject_GenericGetAttr)) {\n    __pyx_type___pyx_MemviewEnum.tp_getattro = __Pyx_PyObject_GenericGetAttr;\n  }\n  if (__Pyx_setup_reduce((PyObject*)&__pyx_type___pyx_MemviewEnum) < 0) __PYX_ERR(1, 279, __pyx_L1_error)\n  __pyx_MemviewEnum_type = &__pyx_type___pyx_MemviewEnum;\n  __pyx_vtabptr_memoryview = &__pyx_vtable_memoryview;\n  __pyx_vtable_memoryview.get_item_pointer = (char *(*)(struct __pyx_memoryview_obj *, PyObject *))__pyx_memoryview_get_item_pointer;\n  __pyx_vtable_memoryview.is_slice = (PyObject *(*)(struct __pyx_memoryview_obj *, PyObject *))__pyx_memoryview_is_slice;\n  __pyx_vtable_memoryview.setitem_slice_assignment = (PyObject *(*)(struct __pyx_memoryview_obj *, PyObject *, PyObject *))__pyx_memoryview_setitem_slice_assignment;\n  __pyx_vtable_memoryview.setitem_slice_assign_scalar = (PyObject *(*)(struct __pyx_memoryview_obj *, struct __pyx_memoryview_obj *, PyObject *))__pyx_memoryview_setitem_slice_assign_scalar;\n  __pyx_vtable_memoryview.setitem_indexed = (PyObject *(*)(struct __pyx_memoryview_obj *, PyObject *, PyObject *))__pyx_memoryview_setitem_indexed;\n  __pyx_vtable_memoryview.convert_item_to_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *))__pyx_memoryview_convert_item_to_object;\n  __pyx_vtable_memoryview.assign_item_from_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *, PyObject *))__pyx_memoryview_assign_item_from_object;\n  if (PyType_Ready(&__pyx_type___pyx_memoryview) < 0) __PYX_ERR(1, 330, __pyx_L1_error)\n  #if PY_VERSION_HEX < 0x030800B1\n  __pyx_type___pyx_memoryview.tp_print = 0;\n  #endif\n  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type___pyx_memoryview.tp_dictoffset && __pyx_type___pyx_memoryview.tp_getattro == PyObject_GenericGetAttr)) {\n    __pyx_type___pyx_memoryview.tp_getattro = __Pyx_PyObject_GenericGetAttr;\n  }\n  if (__Pyx_SetVtable(__pyx_type___pyx_memoryview.tp_dict, __pyx_vtabptr_memoryview) < 0) __PYX_ERR(1, 330, __pyx_L1_error)\n  if (__Pyx_setup_reduce((PyObject*)&__pyx_type___pyx_memoryview) < 0) __PYX_ERR(1, 330, __pyx_L1_error)\n  __pyx_memoryview_type = &__pyx_type___pyx_memoryview;\n  __pyx_vtabptr__memoryviewslice = &__pyx_vtable__memoryviewslice;\n  __pyx_vtable__memoryviewslice.__pyx_base = *__pyx_vtabptr_memoryview;\n  __pyx_vtable__memoryviewslice.__pyx_base.convert_item_to_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *))__pyx_memoryviewslice_convert_item_to_object;\n  __pyx_vtable__memoryviewslice.__pyx_base.assign_item_from_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *, PyObject *))__pyx_memoryviewslice_assign_item_from_object;\n  __pyx_type___pyx_memoryviewslice.tp_base = __pyx_memoryview_type;\n  if (PyType_Ready(&__pyx_type___pyx_memoryviewslice) < 0) __PYX_ERR(1, 965, __pyx_L1_error)\n  #if PY_VERSION_HEX < 0x030800B1\n  __pyx_type___pyx_memoryviewslice.tp_print = 0;\n  #endif\n  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type___pyx_memoryviewslice.tp_dictoffset && __pyx_type___pyx_memoryviewslice.tp_getattro == PyObject_GenericGetAttr)) {\n    __pyx_type___pyx_memoryviewslice.tp_getattro = __Pyx_PyObject_GenericGetAttr;\n  }\n  if (__Pyx_SetVtable(__pyx_type___pyx_memoryviewslice.tp_dict, __pyx_vtabptr__memoryviewslice) < 0) __PYX_ERR(1, 965, __pyx_L1_error)\n  if (__Pyx_setup_reduce((PyObject*)&__pyx_type___pyx_memoryviewslice) < 0) __PYX_ERR(1, 965, __pyx_L1_error)\n  __pyx_memoryviewslice_type = &__pyx_type___pyx_memoryviewslice;\n  __Pyx_RefNannyFinishContext();\n  return 0;\n  __pyx_L1_error:;\n  __Pyx_RefNannyFinishContext();\n  return -1;\n}\n\nstatic int __Pyx_modinit_type_import_code(void) {\n  __Pyx_RefNannyDeclarations\n  PyObject *__pyx_t_1 = NULL;\n  int __pyx_lineno = 0;\n  const char *__pyx_filename = NULL;\n  int __pyx_clineno = 0;\n  __Pyx_RefNannySetupContext(\"__Pyx_modinit_type_import_code\", 0);\n  /*--- Type import code ---*/\n  __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 9, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __pyx_ptype_7cpython_4type_type = __Pyx_ImportType(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, \"type\", \n  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000\n  sizeof(PyTypeObject),\n  #else\n  sizeof(PyHeapTypeObject),\n  #endif\n  __Pyx_ImportType_CheckSize_Warn);\n   if (!__pyx_ptype_7cpython_4type_type) __PYX_ERR(3, 9, __pyx_L1_error)\n  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n  __pyx_t_1 = PyImport_ImportModule(\"numpy\"); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 200, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __pyx_ptype_5numpy_dtype = __Pyx_ImportType(__pyx_t_1, \"numpy\", \"dtype\", sizeof(PyArray_Descr), __Pyx_ImportType_CheckSize_Ignore);\n   if (!__pyx_ptype_5numpy_dtype) __PYX_ERR(2, 200, __pyx_L1_error)\n  __pyx_ptype_5numpy_flatiter = __Pyx_ImportType(__pyx_t_1, \"numpy\", \"flatiter\", sizeof(PyArrayIterObject), __Pyx_ImportType_CheckSize_Ignore);\n   if (!__pyx_ptype_5numpy_flatiter) __PYX_ERR(2, 223, __pyx_L1_error)\n  __pyx_ptype_5numpy_broadcast = __Pyx_ImportType(__pyx_t_1, \"numpy\", \"broadcast\", sizeof(PyArrayMultiIterObject), __Pyx_ImportType_CheckSize_Ignore);\n   if (!__pyx_ptype_5numpy_broadcast) __PYX_ERR(2, 227, __pyx_L1_error)\n  __pyx_ptype_5numpy_ndarray = __Pyx_ImportType(__pyx_t_1, \"numpy\", \"ndarray\", sizeof(PyArrayObject), __Pyx_ImportType_CheckSize_Ignore);\n   if (!__pyx_ptype_5numpy_ndarray) __PYX_ERR(2, 239, __pyx_L1_error)\n  __pyx_ptype_5numpy_generic = __Pyx_ImportType(__pyx_t_1, \"numpy\", \"generic\", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);\n   if (!__pyx_ptype_5numpy_generic) __PYX_ERR(2, 771, __pyx_L1_error)\n  __pyx_ptype_5numpy_number = __Pyx_ImportType(__pyx_t_1, \"numpy\", \"number\", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);\n   if (!__pyx_ptype_5numpy_number) __PYX_ERR(2, 773, __pyx_L1_error)\n  __pyx_ptype_5numpy_integer = __Pyx_ImportType(__pyx_t_1, \"numpy\", \"integer\", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);\n   if (!__pyx_ptype_5numpy_integer) __PYX_ERR(2, 775, __pyx_L1_error)\n  __pyx_ptype_5numpy_signedinteger = __Pyx_ImportType(__pyx_t_1, \"numpy\", \"signedinteger\", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);\n   if (!__pyx_ptype_5numpy_signedinteger) __PYX_ERR(2, 777, __pyx_L1_error)\n  __pyx_ptype_5numpy_unsignedinteger = __Pyx_ImportType(__pyx_t_1, \"numpy\", \"unsignedinteger\", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);\n   if (!__pyx_ptype_5numpy_unsignedinteger) __PYX_ERR(2, 779, __pyx_L1_error)\n  __pyx_ptype_5numpy_inexact = __Pyx_ImportType(__pyx_t_1, \"numpy\", \"inexact\", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);\n   if (!__pyx_ptype_5numpy_inexact) __PYX_ERR(2, 781, __pyx_L1_error)\n  __pyx_ptype_5numpy_floating = __Pyx_ImportType(__pyx_t_1, \"numpy\", \"floating\", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);\n   if (!__pyx_ptype_5numpy_floating) __PYX_ERR(2, 783, __pyx_L1_error)\n  __pyx_ptype_5numpy_complexfloating = __Pyx_ImportType(__pyx_t_1, \"numpy\", \"complexfloating\", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);\n   if (!__pyx_ptype_5numpy_complexfloating) __PYX_ERR(2, 785, __pyx_L1_error)\n  __pyx_ptype_5numpy_flexible = __Pyx_ImportType(__pyx_t_1, \"numpy\", \"flexible\", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);\n   if (!__pyx_ptype_5numpy_flexible) __PYX_ERR(2, 787, __pyx_L1_error)\n  __pyx_ptype_5numpy_character = __Pyx_ImportType(__pyx_t_1, \"numpy\", \"character\", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);\n   if (!__pyx_ptype_5numpy_character) __PYX_ERR(2, 789, __pyx_L1_error)\n  __pyx_ptype_5numpy_ufunc = __Pyx_ImportType(__pyx_t_1, \"numpy\", \"ufunc\", sizeof(PyUFuncObject), __Pyx_ImportType_CheckSize_Ignore);\n   if (!__pyx_ptype_5numpy_ufunc) __PYX_ERR(2, 827, __pyx_L1_error)\n  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n  __Pyx_RefNannyFinishContext();\n  return 0;\n  __pyx_L1_error:;\n  __Pyx_XDECREF(__pyx_t_1);\n  __Pyx_RefNannyFinishContext();\n  return -1;\n}\n\nstatic int __Pyx_modinit_variable_import_code(void) {\n  __Pyx_RefNannyDeclarations\n  __Pyx_RefNannySetupContext(\"__Pyx_modinit_variable_import_code\", 0);\n  /*--- Variable import code ---*/\n  __Pyx_RefNannyFinishContext();\n  return 0;\n}\n\nstatic int __Pyx_modinit_function_import_code(void) {\n  __Pyx_RefNannyDeclarations\n  __Pyx_RefNannySetupContext(\"__Pyx_modinit_function_import_code\", 0);\n  /*--- Function import code ---*/\n  __Pyx_RefNannyFinishContext();\n  return 0;\n}\n\n\n#ifndef CYTHON_NO_PYINIT_EXPORT\n#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC\n#elif PY_MAJOR_VERSION < 3\n#ifdef __cplusplus\n#define __Pyx_PyMODINIT_FUNC extern \"C\" void\n#else\n#define __Pyx_PyMODINIT_FUNC void\n#endif\n#else\n#ifdef __cplusplus\n#define __Pyx_PyMODINIT_FUNC extern \"C\" PyObject *\n#else\n#define __Pyx_PyMODINIT_FUNC PyObject *\n#endif\n#endif\n\n\n#if PY_MAJOR_VERSION < 3\n__Pyx_PyMODINIT_FUNC init_marching_cubes_lewiner_cy(void) CYTHON_SMALL_CODE; /*proto*/\n__Pyx_PyMODINIT_FUNC init_marching_cubes_lewiner_cy(void)\n#else\n__Pyx_PyMODINIT_FUNC PyInit__marching_cubes_lewiner_cy(void) CYTHON_SMALL_CODE; /*proto*/\n__Pyx_PyMODINIT_FUNC PyInit__marching_cubes_lewiner_cy(void)\n#if CYTHON_PEP489_MULTI_PHASE_INIT\n{\n  return PyModuleDef_Init(&__pyx_moduledef);\n}\nstatic CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) {\n    #if PY_VERSION_HEX >= 0x030700A1\n    static PY_INT64_T main_interpreter_id = -1;\n    PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp);\n    if (main_interpreter_id == -1) {\n        main_interpreter_id = current_id;\n        return (unlikely(current_id == -1)) ? -1 : 0;\n    } else if (unlikely(main_interpreter_id != current_id))\n    #else\n    static PyInterpreterState *main_interpreter = NULL;\n    PyInterpreterState *current_interpreter = PyThreadState_Get()->interp;\n    if (!main_interpreter) {\n        main_interpreter = current_interpreter;\n    } else if (unlikely(main_interpreter != current_interpreter))\n    #endif\n    {\n        PyErr_SetString(\n            PyExc_ImportError,\n            \"Interpreter change detected - this module can only be loaded into one interpreter per process.\");\n        return -1;\n    }\n    return 0;\n}\nstatic CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) {\n    PyObject *value = PyObject_GetAttrString(spec, from_name);\n    int result = 0;\n    if (likely(value)) {\n        if (allow_none || value != Py_None) {\n            result = PyDict_SetItemString(moddict, to_name, value);\n        }\n        Py_DECREF(value);\n    } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {\n        PyErr_Clear();\n    } else {\n        result = -1;\n    }\n    return result;\n}\nstatic CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) {\n    PyObject *module = NULL, *moddict, *modname;\n    if (__Pyx_check_single_interpreter())\n        return NULL;\n    if (__pyx_m)\n        return __Pyx_NewRef(__pyx_m);\n    modname = PyObject_GetAttrString(spec, \"name\");\n    if (unlikely(!modname)) goto bad;\n    module = PyModule_NewObject(modname);\n    Py_DECREF(modname);\n    if (unlikely(!module)) goto bad;\n    moddict = PyModule_GetDict(module);\n    if (unlikely(!moddict)) goto bad;\n    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, \"loader\", \"__loader__\", 1) < 0)) goto bad;\n    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, \"origin\", \"__file__\", 1) < 0)) goto bad;\n    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, \"parent\", \"__package__\", 1) < 0)) goto bad;\n    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, \"submodule_search_locations\", \"__path__\", 0) < 0)) goto bad;\n    return module;\nbad:\n    Py_XDECREF(module);\n    return NULL;\n}\n\n\nstatic CYTHON_SMALL_CODE int __pyx_pymod_exec__marching_cubes_lewiner_cy(PyObject *__pyx_pyinit_module)\n#endif\n#endif\n{\n  PyObject *__pyx_t_1 = NULL;\n  int __pyx_t_2;\n  PyObject *__pyx_t_3 = NULL;\n  double __pyx_t_4;\n  static PyThread_type_lock __pyx_t_5[8];\n  int __pyx_lineno = 0;\n  const char *__pyx_filename = NULL;\n  int __pyx_clineno = 0;\n  __Pyx_RefNannyDeclarations\n  #if CYTHON_PEP489_MULTI_PHASE_INIT\n  if (__pyx_m) {\n    if (__pyx_m == __pyx_pyinit_module) return 0;\n    PyErr_SetString(PyExc_RuntimeError, \"Module '_marching_cubes_lewiner_cy' has already been imported. Re-initialisation is not supported.\");\n    return -1;\n  }\n  #elif PY_MAJOR_VERSION >= 3\n  if (__pyx_m) return __Pyx_NewRef(__pyx_m);\n  #endif\n  #if CYTHON_REFNANNY\n__Pyx_RefNanny = __Pyx_RefNannyImportAPI(\"refnanny\");\nif (!__Pyx_RefNanny) {\n  PyErr_Clear();\n  __Pyx_RefNanny = __Pyx_RefNannyImportAPI(\"Cython.Runtime.refnanny\");\n  if (!__Pyx_RefNanny)\n      Py_FatalError(\"failed to import 'refnanny' module\");\n}\n#endif\n  __Pyx_RefNannySetupContext(\"__Pyx_PyMODINIT_FUNC PyInit__marching_cubes_lewiner_cy(void)\", 0);\n  if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error)\n  #ifdef __Pxy_PyFrame_Initialize_Offsets\n  __Pxy_PyFrame_Initialize_Offsets();\n  #endif\n  __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)\n  __pyx_empty_bytes = PyBytes_FromStringAndSize(\"\", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)\n  __pyx_empty_unicode = PyUnicode_FromStringAndSize(\"\", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)\n  #ifdef __Pyx_CyFunction_USED\n  if (__pyx_CyFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)\n  #endif\n  #ifdef __Pyx_FusedFunction_USED\n  if (__pyx_FusedFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)\n  #endif\n  #ifdef __Pyx_Coroutine_USED\n  if (__pyx_Coroutine_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)\n  #endif\n  #ifdef __Pyx_Generator_USED\n  if (__pyx_Generator_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)\n  #endif\n  #ifdef __Pyx_AsyncGen_USED\n  if (__pyx_AsyncGen_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)\n  #endif\n  #ifdef __Pyx_StopAsyncIteration_USED\n  if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)\n  #endif\n  /*--- Library function declarations ---*/\n  /*--- Threads initialization code ---*/\n  #if defined(WITH_THREAD) && PY_VERSION_HEX < 0x030700F0 && defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS\n  PyEval_InitThreads();\n  #endif\n  /*--- Module creation code ---*/\n  #if CYTHON_PEP489_MULTI_PHASE_INIT\n  __pyx_m = __pyx_pyinit_module;\n  Py_INCREF(__pyx_m);\n  #else\n  #if PY_MAJOR_VERSION < 3\n  __pyx_m = Py_InitModule4(\"_marching_cubes_lewiner_cy\", __pyx_methods, __pyx_k_This_is_an_implementation_of_th, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);\n  #else\n  __pyx_m = PyModule_Create(&__pyx_moduledef);\n  #endif\n  if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)\n  #endif\n  __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)\n  Py_INCREF(__pyx_d);\n  __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)\n  Py_INCREF(__pyx_b);\n  __pyx_cython_runtime = PyImport_AddModule((char *) \"cython_runtime\"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)\n  Py_INCREF(__pyx_cython_runtime);\n  if (PyObject_SetAttrString(__pyx_m, \"__builtins__\", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error);\n  /*--- Initialize various global constants etc. ---*/\n  if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error)\n  #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)\n  if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error)\n  #endif\n  if (__pyx_module_is_main__marching_cubes_lewiner_cy) {\n    if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name_2, __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error)\n  }\n  #if PY_MAJOR_VERSION >= 3\n  {\n    PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)\n    if (!PyDict_GetItemString(modules, \"_marching_cubes_lewiner_cy\")) {\n      if (unlikely(PyDict_SetItemString(modules, \"_marching_cubes_lewiner_cy\", __pyx_m) < 0)) __PYX_ERR(0, 1, __pyx_L1_error)\n    }\n  }\n  #endif\n  /*--- Builtin init code ---*/\n  if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error)\n  /*--- Constants init code ---*/\n  if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error)\n  /*--- Global type/function init code ---*/\n  (void)__Pyx_modinit_global_init_code();\n  (void)__Pyx_modinit_variable_export_code();\n  (void)__Pyx_modinit_function_export_code();\n  if (unlikely(__Pyx_modinit_type_init_code() < 0)) __PYX_ERR(0, 1, __pyx_L1_error)\n  if (unlikely(__Pyx_modinit_type_import_code() < 0)) __PYX_ERR(0, 1, __pyx_L1_error)\n  (void)__Pyx_modinit_variable_import_code();\n  (void)__Pyx_modinit_function_import_code();\n  /*--- Execution code ---*/\n  #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)\n  if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error)\n  #endif\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":23\n * \n * # Cython specific imports\n * import numpy as np             # <<<<<<<<<<<<<<\n * cimport numpy as np\n * import cython\n */\n  __pyx_t_1 = __Pyx_Import(__pyx_n_s_numpy, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 23, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  if (PyDict_SetItem(__pyx_d, __pyx_n_s_np, __pyx_t_1) < 0) __PYX_ERR(0, 23, __pyx_L1_error)\n  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":26\n * cimport numpy as np\n * import cython\n * np.import_array()             # <<<<<<<<<<<<<<\n * \n * # Enable low level memory management\n */\n  __pyx_t_2 = __pyx_f_5numpy_import_array(); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 26, __pyx_L1_error)\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":32\n * \n * # Define tiny winy number\n * cdef double FLT_EPSILON = np.spacing(1.0) #0.0000001             # <<<<<<<<<<<<<<\n * \n * # Define abs function for doubles\n */\n  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 32, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_spacing); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 32, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_3);\n  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__35, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 32, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;\n  __pyx_t_4 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_4 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 32, __pyx_L1_error)\n  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n  __pyx_v_26_marching_cubes_lewiner_cy_FLT_EPSILON = __pyx_t_4;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":41\n * # todo: can we disable Cython from checking for zero division? Sometimes we know that it never happens!\n * \n * def remove_degenerate_faces(vertices, faces, *arrays):             # <<<<<<<<<<<<<<\n * \n *     vertices_map0 = np.arange(len(vertices), dtype=np.int32)\n */\n  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_26_marching_cubes_lewiner_cy_1remove_degenerate_faces, NULL, __pyx_n_s_marching_cubes_lewiner_cy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 41, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  if (PyDict_SetItem(__pyx_d, __pyx_n_s_remove_degenerate_faces, __pyx_t_1) < 0) __PYX_ERR(0, 41, __pyx_L1_error)\n  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":933\n *         self.SUBCONFIG13 = Lut(SUBCONFIG13)\n * \n * def marching_cubes(float[:, :, :] im not None, double isovalue,             # <<<<<<<<<<<<<<\n *                    LutProvider luts, int st=1, int classic=0,\n *                    np.ndarray[np.npy_bool, ndim=3, cast=True] mask=None):\n */\n  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_26_marching_cubes_lewiner_cy_3marching_cubes, NULL, __pyx_n_s_marching_cubes_lewiner_cy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 933, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  if (PyDict_SetItem(__pyx_d, __pyx_n_s_marching_cubes, __pyx_t_1) < 0) __PYX_ERR(0, 933, __pyx_L1_error)\n  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":1008\n * \n * \n * def marching_cubes_udf(float[:, :, :] im not None, float[:, :, :, :] grads not None,             # <<<<<<<<<<<<<<\n *                    LutProvider luts, int st=1, int classic=0,\n *                    np.ndarray[np.npy_bool, ndim=3, cast=True] mask=None):\n */\n  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_26_marching_cubes_lewiner_cy_5marching_cubes_udf, NULL, __pyx_n_s_marching_cubes_lewiner_cy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1008, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  if (PyDict_SetItem(__pyx_d, __pyx_n_s_marching_cubes_udf, __pyx_t_1) < 0) __PYX_ERR(0, 1008, __pyx_L1_error)\n  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n\n  /* \"(tree fragment)\":1\n * def __pyx_unpickle_LutProvider(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<\n *     cdef object __pyx_PickleError\n *     cdef object __pyx_result\n */\n  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_26_marching_cubes_lewiner_cy_7__pyx_unpickle_LutProvider, NULL, __pyx_n_s_marching_cubes_lewiner_cy); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_LutProvider, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)\n  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n\n  /* \"_marching_cubes_lewiner_cy.pyx\":1\n * #cython: cdivision=True             # <<<<<<<<<<<<<<\n * #cython: boundscheck=False\n * #cython: nonecheck=False\n */\n  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error)\n  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n\n  /* \"View.MemoryView\":209\n *         info.obj = self\n * \n *     __pyx_getbuffer = capsule(<void *> &__pyx_array_getbuffer, \"getbuffer(obj, view, flags)\")             # <<<<<<<<<<<<<<\n * \n *     def __dealloc__(array self):\n */\n  __pyx_t_1 = __pyx_capsule_create(((void *)(&__pyx_array_getbuffer)), ((char *)\"getbuffer(obj, view, flags)\")); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 209, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  if (PyDict_SetItem((PyObject *)__pyx_array_type->tp_dict, __pyx_n_s_pyx_getbuffer, __pyx_t_1) < 0) __PYX_ERR(1, 209, __pyx_L1_error)\n  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n  PyType_Modified(__pyx_array_type);\n\n  /* \"View.MemoryView\":286\n *         return self.name\n * \n * cdef generic = Enum(\"<strided and direct or indirect>\")             # <<<<<<<<<<<<<<\n * cdef strided = Enum(\"<strided and direct>\") # default\n * cdef indirect = Enum(\"<strided and indirect>\")\n */\n  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__44, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 286, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __Pyx_XGOTREF(generic);\n  __Pyx_DECREF_SET(generic, __pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_1);\n  __pyx_t_1 = 0;\n\n  /* \"View.MemoryView\":287\n * \n * cdef generic = Enum(\"<strided and direct or indirect>\")\n * cdef strided = Enum(\"<strided and direct>\") # default             # <<<<<<<<<<<<<<\n * cdef indirect = Enum(\"<strided and indirect>\")\n * \n */\n  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__45, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 287, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __Pyx_XGOTREF(strided);\n  __Pyx_DECREF_SET(strided, __pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_1);\n  __pyx_t_1 = 0;\n\n  /* \"View.MemoryView\":288\n * cdef generic = Enum(\"<strided and direct or indirect>\")\n * cdef strided = Enum(\"<strided and direct>\") # default\n * cdef indirect = Enum(\"<strided and indirect>\")             # <<<<<<<<<<<<<<\n * \n * \n */\n  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__46, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 288, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __Pyx_XGOTREF(indirect);\n  __Pyx_DECREF_SET(indirect, __pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_1);\n  __pyx_t_1 = 0;\n\n  /* \"View.MemoryView\":291\n * \n * \n * cdef contiguous = Enum(\"<contiguous and direct>\")             # <<<<<<<<<<<<<<\n * cdef indirect_contiguous = Enum(\"<contiguous and indirect>\")\n * \n */\n  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__47, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 291, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __Pyx_XGOTREF(contiguous);\n  __Pyx_DECREF_SET(contiguous, __pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_1);\n  __pyx_t_1 = 0;\n\n  /* \"View.MemoryView\":292\n * \n * cdef contiguous = Enum(\"<contiguous and direct>\")\n * cdef indirect_contiguous = Enum(\"<contiguous and indirect>\")             # <<<<<<<<<<<<<<\n * \n * \n */\n  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__48, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 292, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  __Pyx_XGOTREF(indirect_contiguous);\n  __Pyx_DECREF_SET(indirect_contiguous, __pyx_t_1);\n  __Pyx_GIVEREF(__pyx_t_1);\n  __pyx_t_1 = 0;\n\n  /* \"View.MemoryView\":316\n * \n * DEF THREAD_LOCKS_PREALLOCATED = 8\n * cdef int __pyx_memoryview_thread_locks_used = 0             # <<<<<<<<<<<<<<\n * cdef PyThread_type_lock[THREAD_LOCKS_PREALLOCATED] __pyx_memoryview_thread_locks = [\n *     PyThread_allocate_lock(),\n */\n  __pyx_memoryview_thread_locks_used = 0;\n\n  /* \"View.MemoryView\":317\n * DEF THREAD_LOCKS_PREALLOCATED = 8\n * cdef int __pyx_memoryview_thread_locks_used = 0\n * cdef PyThread_type_lock[THREAD_LOCKS_PREALLOCATED] __pyx_memoryview_thread_locks = [             # <<<<<<<<<<<<<<\n *     PyThread_allocate_lock(),\n *     PyThread_allocate_lock(),\n */\n  __pyx_t_5[0] = PyThread_allocate_lock();\n  __pyx_t_5[1] = PyThread_allocate_lock();\n  __pyx_t_5[2] = PyThread_allocate_lock();\n  __pyx_t_5[3] = PyThread_allocate_lock();\n  __pyx_t_5[4] = PyThread_allocate_lock();\n  __pyx_t_5[5] = PyThread_allocate_lock();\n  __pyx_t_5[6] = PyThread_allocate_lock();\n  __pyx_t_5[7] = PyThread_allocate_lock();\n  memcpy(&(__pyx_memoryview_thread_locks[0]), __pyx_t_5, sizeof(__pyx_memoryview_thread_locks[0]) * (8));\n\n  /* \"View.MemoryView\":549\n *         info.obj = self\n * \n *     __pyx_getbuffer = capsule(<void *> &__pyx_memoryview_getbuffer, \"getbuffer(obj, view, flags)\")             # <<<<<<<<<<<<<<\n * \n * \n */\n  __pyx_t_1 = __pyx_capsule_create(((void *)(&__pyx_memoryview_getbuffer)), ((char *)\"getbuffer(obj, view, flags)\")); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 549, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  if (PyDict_SetItem((PyObject *)__pyx_memoryview_type->tp_dict, __pyx_n_s_pyx_getbuffer, __pyx_t_1) < 0) __PYX_ERR(1, 549, __pyx_L1_error)\n  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n  PyType_Modified(__pyx_memoryview_type);\n\n  /* \"View.MemoryView\":995\n *         return self.from_object\n * \n *     __pyx_getbuffer = capsule(<void *> &__pyx_memoryview_getbuffer, \"getbuffer(obj, view, flags)\")             # <<<<<<<<<<<<<<\n * \n * \n */\n  __pyx_t_1 = __pyx_capsule_create(((void *)(&__pyx_memoryview_getbuffer)), ((char *)\"getbuffer(obj, view, flags)\")); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 995, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  if (PyDict_SetItem((PyObject *)__pyx_memoryviewslice_type->tp_dict, __pyx_n_s_pyx_getbuffer, __pyx_t_1) < 0) __PYX_ERR(1, 995, __pyx_L1_error)\n  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n  PyType_Modified(__pyx_memoryviewslice_type);\n\n  /* \"(tree fragment)\":1\n * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<\n *     cdef object __pyx_PickleError\n *     cdef object __pyx_result\n */\n  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_15View_dot_MemoryView_1__pyx_unpickle_Enum, NULL, __pyx_n_s_View_MemoryView); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)\n  __Pyx_GOTREF(__pyx_t_1);\n  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_Enum, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)\n  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;\n\n  /* \"(tree fragment)\":11\n *         __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)\n *     return __pyx_result\n * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<\n *     __pyx_result.name = __pyx_state[0]\n *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):\n */\n\n  /*--- Wrapped vars code ---*/\n\n  goto __pyx_L0;\n  __pyx_L1_error:;\n  __Pyx_XDECREF(__pyx_t_1);\n  __Pyx_XDECREF(__pyx_t_3);\n  if (__pyx_m) {\n    if (__pyx_d) {\n      __Pyx_AddTraceback(\"init _marching_cubes_lewiner_cy\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n    }\n    Py_CLEAR(__pyx_m);\n  } else if (!PyErr_Occurred()) {\n    PyErr_SetString(PyExc_ImportError, \"init _marching_cubes_lewiner_cy\");\n  }\n  __pyx_L0:;\n  __Pyx_RefNannyFinishContext();\n  #if CYTHON_PEP489_MULTI_PHASE_INIT\n  return (__pyx_m != NULL) ? 0 : -1;\n  #elif PY_MAJOR_VERSION >= 3\n  return __pyx_m;\n  #else\n  return;\n  #endif\n}\n\n/* --- Runtime support code --- */\n/* Refnanny */\n#if CYTHON_REFNANNY\nstatic __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {\n    PyObject *m = NULL, *p = NULL;\n    void *r = NULL;\n    m = PyImport_ImportModule(modname);\n    if (!m) goto end;\n    p = PyObject_GetAttrString(m, \"RefNannyAPI\");\n    if (!p) goto end;\n    r = PyLong_AsVoidPtr(p);\nend:\n    Py_XDECREF(p);\n    Py_XDECREF(m);\n    return (__Pyx_RefNannyAPIStruct *)r;\n}\n#endif\n\n/* PyObjectGetAttrStr */\n#if CYTHON_USE_TYPE_SLOTS\nstatic CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {\n    PyTypeObject* tp = Py_TYPE(obj);\n    if (likely(tp->tp_getattro))\n        return tp->tp_getattro(obj, attr_name);\n#if PY_MAJOR_VERSION < 3\n    if (likely(tp->tp_getattr))\n        return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));\n#endif\n    return PyObject_GetAttr(obj, attr_name);\n}\n#endif\n\n/* GetBuiltinName */\nstatic PyObject *__Pyx_GetBuiltinName(PyObject *name) {\n    PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);\n    if (unlikely(!result)) {\n        PyErr_Format(PyExc_NameError,\n#if PY_MAJOR_VERSION >= 3\n            \"name '%U' is not defined\", name);\n#else\n            \"name '%.200s' is not defined\", PyString_AS_STRING(name));\n#endif\n    }\n    return result;\n}\n\n/* RaiseArgTupleInvalid */\nstatic void __Pyx_RaiseArgtupleInvalid(\n    const char* func_name,\n    int exact,\n    Py_ssize_t num_min,\n    Py_ssize_t num_max,\n    Py_ssize_t num_found)\n{\n    Py_ssize_t num_expected;\n    const char *more_or_less;\n    if (num_found < num_min) {\n        num_expected = num_min;\n        more_or_less = \"at least\";\n    } else {\n        num_expected = num_max;\n        more_or_less = \"at most\";\n    }\n    if (exact) {\n        more_or_less = \"exactly\";\n    }\n    PyErr_Format(PyExc_TypeError,\n                 \"%.200s() takes %.8s %\" CYTHON_FORMAT_SSIZE_T \"d positional argument%.1s (%\" CYTHON_FORMAT_SSIZE_T \"d given)\",\n                 func_name, more_or_less, num_expected,\n                 (num_expected == 1) ? \"\" : \"s\", num_found);\n}\n\n/* RaiseDoubleKeywords */\nstatic void __Pyx_RaiseDoubleKeywordsError(\n    const char* func_name,\n    PyObject* kw_name)\n{\n    PyErr_Format(PyExc_TypeError,\n        #if PY_MAJOR_VERSION >= 3\n        \"%s() got multiple values for keyword argument '%U'\", func_name, kw_name);\n        #else\n        \"%s() got multiple values for keyword argument '%s'\", func_name,\n        PyString_AsString(kw_name));\n        #endif\n}\n\n/* ParseKeywords */\nstatic int __Pyx_ParseOptionalKeywords(\n    PyObject *kwds,\n    PyObject **argnames[],\n    PyObject *kwds2,\n    PyObject *values[],\n    Py_ssize_t num_pos_args,\n    const char* function_name)\n{\n    PyObject *key = 0, *value = 0;\n    Py_ssize_t pos = 0;\n    PyObject*** name;\n    PyObject*** first_kw_arg = argnames + num_pos_args;\n    while (PyDict_Next(kwds, &pos, &key, &value)) {\n        name = first_kw_arg;\n        while (*name && (**name != key)) name++;\n        if (*name) {\n            values[name-argnames] = value;\n            continue;\n        }\n        name = first_kw_arg;\n        #if PY_MAJOR_VERSION < 3\n        if (likely(PyString_Check(key))) {\n            while (*name) {\n                if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))\n                        && _PyString_Eq(**name, key)) {\n                    values[name-argnames] = value;\n                    break;\n                }\n                name++;\n            }\n            if (*name) continue;\n            else {\n                PyObject*** argname = argnames;\n                while (argname != first_kw_arg) {\n                    if ((**argname == key) || (\n                            (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))\n                             && _PyString_Eq(**argname, key))) {\n                        goto arg_passed_twice;\n                    }\n                    argname++;\n                }\n            }\n        } else\n        #endif\n        if (likely(PyUnicode_Check(key))) {\n            while (*name) {\n                int cmp = (**name == key) ? 0 :\n                #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3\n                    (__Pyx_PyUnicode_GET_LENGTH(**name) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :\n                #endif\n                    PyUnicode_Compare(**name, key);\n                if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;\n                if (cmp == 0) {\n                    values[name-argnames] = value;\n                    break;\n                }\n                name++;\n            }\n            if (*name) continue;\n            else {\n                PyObject*** argname = argnames;\n                while (argname != first_kw_arg) {\n                    int cmp = (**argname == key) ? 0 :\n                    #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3\n                        (__Pyx_PyUnicode_GET_LENGTH(**argname) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :\n                    #endif\n                        PyUnicode_Compare(**argname, key);\n                    if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;\n                    if (cmp == 0) goto arg_passed_twice;\n                    argname++;\n                }\n            }\n        } else\n            goto invalid_keyword_type;\n        if (kwds2) {\n            if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;\n        } else {\n            goto invalid_keyword;\n        }\n    }\n    return 0;\narg_passed_twice:\n    __Pyx_RaiseDoubleKeywordsError(function_name, key);\n    goto bad;\ninvalid_keyword_type:\n    PyErr_Format(PyExc_TypeError,\n        \"%.200s() keywords must be strings\", function_name);\n    goto bad;\ninvalid_keyword:\n    PyErr_Format(PyExc_TypeError,\n    #if PY_MAJOR_VERSION < 3\n        \"%.200s() got an unexpected keyword argument '%.200s'\",\n        function_name, PyString_AsString(key));\n    #else\n        \"%s() got an unexpected keyword argument '%U'\",\n        function_name, key);\n    #endif\nbad:\n    return -1;\n}\n\n/* PyDictVersioning */\n#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS\nstatic CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) {\n    PyObject *dict = Py_TYPE(obj)->tp_dict;\n    return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0;\n}\nstatic CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) {\n    PyObject **dictptr = NULL;\n    Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset;\n    if (offset) {\n#if CYTHON_COMPILING_IN_CPYTHON\n        dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj);\n#else\n        dictptr = _PyObject_GetDictPtr(obj);\n#endif\n    }\n    return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0;\n}\nstatic CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) {\n    PyObject *dict = Py_TYPE(obj)->tp_dict;\n    if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict)))\n        return 0;\n    return obj_dict_version == __Pyx_get_object_dict_version(obj);\n}\n#endif\n\n/* GetModuleGlobalName */\n#if CYTHON_USE_DICT_VERSIONS\nstatic PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value)\n#else\nstatic CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name)\n#endif\n{\n    PyObject *result;\n#if !CYTHON_AVOID_BORROWED_REFS\n#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1\n    result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash);\n    __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)\n    if (likely(result)) {\n        return __Pyx_NewRef(result);\n    } else if (unlikely(PyErr_Occurred())) {\n        return NULL;\n    }\n#else\n    result = PyDict_GetItem(__pyx_d, name);\n    __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)\n    if (likely(result)) {\n        return __Pyx_NewRef(result);\n    }\n#endif\n#else\n    result = PyObject_GetItem(__pyx_d, name);\n    __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)\n    if (likely(result)) {\n        return __Pyx_NewRef(result);\n    }\n    PyErr_Clear();\n#endif\n    return __Pyx_GetBuiltinName(name);\n}\n\n/* PyObjectCall */\n#if CYTHON_COMPILING_IN_CPYTHON\nstatic CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {\n    PyObject *result;\n    ternaryfunc call = Py_TYPE(func)->tp_call;\n    if (unlikely(!call))\n        return PyObject_Call(func, arg, kw);\n    if (unlikely(Py_EnterRecursiveCall((char*)\" while calling a Python object\")))\n        return NULL;\n    result = (*call)(func, arg, kw);\n    Py_LeaveRecursiveCall();\n    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {\n        PyErr_SetString(\n            PyExc_SystemError,\n            \"NULL result without error in PyObject_Call\");\n    }\n    return result;\n}\n#endif\n\n/* PyFunctionFastCall */\n#if CYTHON_FAST_PYCALL\nstatic PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na,\n                                               PyObject *globals) {\n    PyFrameObject *f;\n    PyThreadState *tstate = __Pyx_PyThreadState_Current;\n    PyObject **fastlocals;\n    Py_ssize_t i;\n    PyObject *result;\n    assert(globals != NULL);\n    /* XXX Perhaps we should create a specialized\n       PyFrame_New() that doesn't take locals, but does\n       take builtins without sanity checking them.\n       */\n    assert(tstate != NULL);\n    f = PyFrame_New(tstate, co, globals, NULL);\n    if (f == NULL) {\n        return NULL;\n    }\n    fastlocals = __Pyx_PyFrame_GetLocalsplus(f);\n    for (i = 0; i < na; i++) {\n        Py_INCREF(*args);\n        fastlocals[i] = *args++;\n    }\n    result = PyEval_EvalFrameEx(f,0);\n    ++tstate->recursion_depth;\n    Py_DECREF(f);\n    --tstate->recursion_depth;\n    return result;\n}\n#if 1 || PY_VERSION_HEX < 0x030600B1\nstatic PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) {\n    PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);\n    PyObject *globals = PyFunction_GET_GLOBALS(func);\n    PyObject *argdefs = PyFunction_GET_DEFAULTS(func);\n    PyObject *closure;\n#if PY_MAJOR_VERSION >= 3\n    PyObject *kwdefs;\n#endif\n    PyObject *kwtuple, **k;\n    PyObject **d;\n    Py_ssize_t nd;\n    Py_ssize_t nk;\n    PyObject *result;\n    assert(kwargs == NULL || PyDict_Check(kwargs));\n    nk = kwargs ? PyDict_Size(kwargs) : 0;\n    if (Py_EnterRecursiveCall((char*)\" while calling a Python object\")) {\n        return NULL;\n    }\n    if (\n#if PY_MAJOR_VERSION >= 3\n            co->co_kwonlyargcount == 0 &&\n#endif\n            likely(kwargs == NULL || nk == 0) &&\n            co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {\n        if (argdefs == NULL && co->co_argcount == nargs) {\n            result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);\n            goto done;\n        }\n        else if (nargs == 0 && argdefs != NULL\n                 && co->co_argcount == Py_SIZE(argdefs)) {\n            /* function called with no arguments, but all parameters have\n               a default value: use default values as arguments .*/\n            args = &PyTuple_GET_ITEM(argdefs, 0);\n            result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);\n            goto done;\n        }\n    }\n    if (kwargs != NULL) {\n        Py_ssize_t pos, i;\n        kwtuple = PyTuple_New(2 * nk);\n        if (kwtuple == NULL) {\n            result = NULL;\n            goto done;\n        }\n        k = &PyTuple_GET_ITEM(kwtuple, 0);\n        pos = i = 0;\n        while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {\n            Py_INCREF(k[i]);\n            Py_INCREF(k[i+1]);\n            i += 2;\n        }\n        nk = i / 2;\n    }\n    else {\n        kwtuple = NULL;\n        k = NULL;\n    }\n    closure = PyFunction_GET_CLOSURE(func);\n#if PY_MAJOR_VERSION >= 3\n    kwdefs = PyFunction_GET_KW_DEFAULTS(func);\n#endif\n    if (argdefs != NULL) {\n        d = &PyTuple_GET_ITEM(argdefs, 0);\n        nd = Py_SIZE(argdefs);\n    }\n    else {\n        d = NULL;\n        nd = 0;\n    }\n#if PY_MAJOR_VERSION >= 3\n    result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,\n                               args, (int)nargs,\n                               k, (int)nk,\n                               d, (int)nd, kwdefs, closure);\n#else\n    result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,\n                               args, (int)nargs,\n                               k, (int)nk,\n                               d, (int)nd, closure);\n#endif\n    Py_XDECREF(kwtuple);\ndone:\n    Py_LeaveRecursiveCall();\n    return result;\n}\n#endif\n#endif\n\n/* PyObjectCallMethO */\n#if CYTHON_COMPILING_IN_CPYTHON\nstatic CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {\n    PyObject *self, *result;\n    PyCFunction cfunc;\n    cfunc = PyCFunction_GET_FUNCTION(func);\n    self = PyCFunction_GET_SELF(func);\n    if (unlikely(Py_EnterRecursiveCall((char*)\" while calling a Python object\")))\n        return NULL;\n    result = cfunc(self, arg);\n    Py_LeaveRecursiveCall();\n    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {\n        PyErr_SetString(\n            PyExc_SystemError,\n            \"NULL result without error in PyObject_Call\");\n    }\n    return result;\n}\n#endif\n\n/* PyObjectCallNoArg */\n#if CYTHON_COMPILING_IN_CPYTHON\nstatic CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {\n#if CYTHON_FAST_PYCALL\n    if (PyFunction_Check(func)) {\n        return __Pyx_PyFunction_FastCall(func, NULL, 0);\n    }\n#endif\n#ifdef __Pyx_CyFunction_USED\n    if (likely(PyCFunction_Check(func) || __Pyx_CyFunction_Check(func)))\n#else\n    if (likely(PyCFunction_Check(func)))\n#endif\n    {\n        if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) {\n            return __Pyx_PyObject_CallMethO(func, NULL);\n        }\n    }\n    return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL);\n}\n#endif\n\n/* PyCFunctionFastCall */\n#if CYTHON_FAST_PYCCALL\nstatic CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) {\n    PyCFunctionObject *func = (PyCFunctionObject*)func_obj;\n    PyCFunction meth = PyCFunction_GET_FUNCTION(func);\n    PyObject *self = PyCFunction_GET_SELF(func);\n    int flags = PyCFunction_GET_FLAGS(func);\n    assert(PyCFunction_Check(func));\n    assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)));\n    assert(nargs >= 0);\n    assert(nargs == 0 || args != NULL);\n    /* _PyCFunction_FastCallDict() must not be called with an exception set,\n       because it may clear it (directly or indirectly) and so the\n       caller loses its exception */\n    assert(!PyErr_Occurred());\n    if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) {\n        return (*((__Pyx_PyCFunctionFastWithKeywords)(void*)meth)) (self, args, nargs, NULL);\n    } else {\n        return (*((__Pyx_PyCFunctionFast)(void*)meth)) (self, args, nargs);\n    }\n}\n#endif\n\n/* PyObjectCallOneArg */\n#if CYTHON_COMPILING_IN_CPYTHON\nstatic PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) {\n    PyObject *result;\n    PyObject *args = PyTuple_New(1);\n    if (unlikely(!args)) return NULL;\n    Py_INCREF(arg);\n    PyTuple_SET_ITEM(args, 0, arg);\n    result = __Pyx_PyObject_Call(func, args, NULL);\n    Py_DECREF(args);\n    return result;\n}\nstatic CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {\n#if CYTHON_FAST_PYCALL\n    if (PyFunction_Check(func)) {\n        return __Pyx_PyFunction_FastCall(func, &arg, 1);\n    }\n#endif\n    if (likely(PyCFunction_Check(func))) {\n        if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {\n            return __Pyx_PyObject_CallMethO(func, arg);\n#if CYTHON_FAST_PYCCALL\n        } else if (__Pyx_PyFastCFunction_Check(func)) {\n            return __Pyx_PyCFunction_FastCall(func, &arg, 1);\n#endif\n        }\n    }\n    return __Pyx__PyObject_CallOneArg(func, arg);\n}\n#else\nstatic CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {\n    PyObject *result;\n    PyObject *args = PyTuple_Pack(1, arg);\n    if (unlikely(!args)) return NULL;\n    result = __Pyx_PyObject_Call(func, args, NULL);\n    Py_DECREF(args);\n    return result;\n}\n#endif\n\n/* MemviewSliceInit */\nstatic int\n__Pyx_init_memviewslice(struct __pyx_memoryview_obj *memview,\n                        int ndim,\n                        __Pyx_memviewslice *memviewslice,\n                        int memview_is_new_reference)\n{\n    __Pyx_RefNannyDeclarations\n    int i, retval=-1;\n    Py_buffer *buf = &memview->view;\n    __Pyx_RefNannySetupContext(\"init_memviewslice\", 0);\n    if (unlikely(memviewslice->memview || memviewslice->data)) {\n        PyErr_SetString(PyExc_ValueError,\n            \"memviewslice is already initialized!\");\n        goto fail;\n    }\n    if (buf->strides) {\n        for (i = 0; i < ndim; i++) {\n            memviewslice->strides[i] = buf->strides[i];\n        }\n    } else {\n        Py_ssize_t stride = buf->itemsize;\n        for (i = ndim - 1; i >= 0; i--) {\n            memviewslice->strides[i] = stride;\n            stride *= buf->shape[i];\n        }\n    }\n    for (i = 0; i < ndim; i++) {\n        memviewslice->shape[i]   = buf->shape[i];\n        if (buf->suboffsets) {\n            memviewslice->suboffsets[i] = buf->suboffsets[i];\n        } else {\n            memviewslice->suboffsets[i] = -1;\n        }\n    }\n    memviewslice->memview = memview;\n    memviewslice->data = (char *)buf->buf;\n    if (__pyx_add_acquisition_count(memview) == 0 && !memview_is_new_reference) {\n        Py_INCREF(memview);\n    }\n    retval = 0;\n    goto no_fail;\nfail:\n    memviewslice->memview = 0;\n    memviewslice->data = 0;\n    retval = -1;\nno_fail:\n    __Pyx_RefNannyFinishContext();\n    return retval;\n}\n#ifndef Py_NO_RETURN\n#define Py_NO_RETURN\n#endif\nstatic void __pyx_fatalerror(const char *fmt, ...) Py_NO_RETURN {\n    va_list vargs;\n    char msg[200];\n#ifdef HAVE_STDARG_PROTOTYPES\n    va_start(vargs, fmt);\n#else\n    va_start(vargs);\n#endif\n    vsnprintf(msg, 200, fmt, vargs);\n    va_end(vargs);\n    Py_FatalError(msg);\n}\nstatic CYTHON_INLINE int\n__pyx_add_acquisition_count_locked(__pyx_atomic_int *acquisition_count,\n                                   PyThread_type_lock lock)\n{\n    int result;\n    PyThread_acquire_lock(lock, 1);\n    result = (*acquisition_count)++;\n    PyThread_release_lock(lock);\n    return result;\n}\nstatic CYTHON_INLINE int\n__pyx_sub_acquisition_count_locked(__pyx_atomic_int *acquisition_count,\n                                   PyThread_type_lock lock)\n{\n    int result;\n    PyThread_acquire_lock(lock, 1);\n    result = (*acquisition_count)--;\n    PyThread_release_lock(lock);\n    return result;\n}\nstatic CYTHON_INLINE void\n__Pyx_INC_MEMVIEW(__Pyx_memviewslice *memslice, int have_gil, int lineno)\n{\n    int first_time;\n    struct __pyx_memoryview_obj *memview = memslice->memview;\n    if (unlikely(!memview || (PyObject *) memview == Py_None))\n        return;\n    if (unlikely(__pyx_get_slice_count(memview) < 0))\n        __pyx_fatalerror(\"Acquisition count is %d (line %d)\",\n                         __pyx_get_slice_count(memview), lineno);\n    first_time = __pyx_add_acquisition_count(memview) == 0;\n    if (unlikely(first_time)) {\n        if (have_gil) {\n            Py_INCREF((PyObject *) memview);\n        } else {\n            PyGILState_STATE _gilstate = PyGILState_Ensure();\n            Py_INCREF((PyObject *) memview);\n            PyGILState_Release(_gilstate);\n        }\n    }\n}\nstatic CYTHON_INLINE void __Pyx_XDEC_MEMVIEW(__Pyx_memviewslice *memslice,\n                                             int have_gil, int lineno) {\n    int last_time;\n    struct __pyx_memoryview_obj *memview = memslice->memview;\n    if (unlikely(!memview || (PyObject *) memview == Py_None)) {\n        memslice->memview = NULL;\n        return;\n    }\n    if (unlikely(__pyx_get_slice_count(memview) <= 0))\n        __pyx_fatalerror(\"Acquisition count is %d (line %d)\",\n                         __pyx_get_slice_count(memview), lineno);\n    last_time = __pyx_sub_acquisition_count(memview) == 1;\n    memslice->data = NULL;\n    if (unlikely(last_time)) {\n        if (have_gil) {\n            Py_CLEAR(memslice->memview);\n        } else {\n            PyGILState_STATE _gilstate = PyGILState_Ensure();\n            Py_CLEAR(memslice->memview);\n            PyGILState_Release(_gilstate);\n        }\n    } else {\n        memslice->memview = NULL;\n    }\n}\n\n/* PyIntBinop */\n#if !CYTHON_COMPILING_IN_PYPY\nstatic PyObject* __Pyx_PyInt_SubtractObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, int inplace, int zerodivision_check) {\n    (void)inplace;\n    (void)zerodivision_check;\n    #if PY_MAJOR_VERSION < 3\n    if (likely(PyInt_CheckExact(op1))) {\n        const long b = intval;\n        long x;\n        long a = PyInt_AS_LONG(op1);\n            x = (long)((unsigned long)a - b);\n            if (likely((x^a) >= 0 || (x^~b) >= 0))\n                return PyInt_FromLong(x);\n            return PyLong_Type.tp_as_number->nb_subtract(op1, op2);\n    }\n    #endif\n    #if CYTHON_USE_PYLONG_INTERNALS\n    if (likely(PyLong_CheckExact(op1))) {\n        const long b = intval;\n        long a, x;\n#ifdef HAVE_LONG_LONG\n        const PY_LONG_LONG llb = intval;\n        PY_LONG_LONG lla, llx;\n#endif\n        const digit* digits = ((PyLongObject*)op1)->ob_digit;\n        const Py_ssize_t size = Py_SIZE(op1);\n        if (likely(__Pyx_sst_abs(size) <= 1)) {\n            a = likely(size) ? digits[0] : 0;\n            if (size == -1) a = -a;\n        } else {\n            switch (size) {\n                case -2:\n                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {\n                        a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));\n                        break;\n#ifdef HAVE_LONG_LONG\n                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {\n                        lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));\n                        goto long_long;\n#endif\n                    }\n                    CYTHON_FALLTHROUGH;\n                case 2:\n                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {\n                        a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));\n                        break;\n#ifdef HAVE_LONG_LONG\n                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {\n                        lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));\n                        goto long_long;\n#endif\n                    }\n                    CYTHON_FALLTHROUGH;\n                case -3:\n                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {\n                        a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));\n                        break;\n#ifdef HAVE_LONG_LONG\n                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {\n                        lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));\n                        goto long_long;\n#endif\n                    }\n                    CYTHON_FALLTHROUGH;\n                case 3:\n                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {\n                        a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));\n                        break;\n#ifdef HAVE_LONG_LONG\n                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {\n                        lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));\n                        goto long_long;\n#endif\n                    }\n                    CYTHON_FALLTHROUGH;\n                case -4:\n                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {\n                        a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));\n                        break;\n#ifdef HAVE_LONG_LONG\n                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {\n                        lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));\n                        goto long_long;\n#endif\n                    }\n                    CYTHON_FALLTHROUGH;\n                case 4:\n                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {\n                        a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));\n                        break;\n#ifdef HAVE_LONG_LONG\n                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {\n                        lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));\n                        goto long_long;\n#endif\n                    }\n                    CYTHON_FALLTHROUGH;\n                default: return PyLong_Type.tp_as_number->nb_subtract(op1, op2);\n            }\n        }\n                x = a - b;\n            return PyLong_FromLong(x);\n#ifdef HAVE_LONG_LONG\n        long_long:\n                llx = lla - llb;\n            return PyLong_FromLongLong(llx);\n#endif\n        \n        \n    }\n    #endif\n    if (PyFloat_CheckExact(op1)) {\n        const long b = intval;\n        double a = PyFloat_AS_DOUBLE(op1);\n            double result;\n            PyFPE_START_PROTECT(\"subtract\", return NULL)\n            result = ((double)a) - (double)b;\n            PyFPE_END_PROTECT(result)\n            return PyFloat_FromDouble(result);\n    }\n    return (inplace ? PyNumber_InPlaceSubtract : PyNumber_Subtract)(op1, op2);\n}\n#endif\n\n/* PyObjectCall2Args */\nstatic CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) {\n    PyObject *args, *result = NULL;\n    #if CYTHON_FAST_PYCALL\n    if (PyFunction_Check(function)) {\n        PyObject *args[2] = {arg1, arg2};\n        return __Pyx_PyFunction_FastCall(function, args, 2);\n    }\n    #endif\n    #if CYTHON_FAST_PYCCALL\n    if (__Pyx_PyFastCFunction_Check(function)) {\n        PyObject *args[2] = {arg1, arg2};\n        return __Pyx_PyCFunction_FastCall(function, args, 2);\n    }\n    #endif\n    args = PyTuple_New(2);\n    if (unlikely(!args)) goto done;\n    Py_INCREF(arg1);\n    PyTuple_SET_ITEM(args, 0, arg1);\n    Py_INCREF(arg2);\n    PyTuple_SET_ITEM(args, 1, arg2);\n    Py_INCREF(function);\n    result = __Pyx_PyObject_Call(function, args, NULL);\n    Py_DECREF(args);\n    Py_DECREF(function);\ndone:\n    return result;\n}\n\n/* GetItemInt */\nstatic PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {\n    PyObject *r;\n    if (!j) return NULL;\n    r = PyObject_GetItem(o, j);\n    Py_DECREF(j);\n    return r;\n}\nstatic CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,\n                                                              CYTHON_NCP_UNUSED int wraparound,\n                                                              CYTHON_NCP_UNUSED int boundscheck) {\n#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS\n    Py_ssize_t wrapped_i = i;\n    if (wraparound & unlikely(i < 0)) {\n        wrapped_i += PyList_GET_SIZE(o);\n    }\n    if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) {\n        PyObject *r = PyList_GET_ITEM(o, wrapped_i);\n        Py_INCREF(r);\n        return r;\n    }\n    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));\n#else\n    return PySequence_GetItem(o, i);\n#endif\n}\nstatic CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,\n                                                              CYTHON_NCP_UNUSED int wraparound,\n                                                              CYTHON_NCP_UNUSED int boundscheck) {\n#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS\n    Py_ssize_t wrapped_i = i;\n    if (wraparound & unlikely(i < 0)) {\n        wrapped_i += PyTuple_GET_SIZE(o);\n    }\n    if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) {\n        PyObject *r = PyTuple_GET_ITEM(o, wrapped_i);\n        Py_INCREF(r);\n        return r;\n    }\n    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));\n#else\n    return PySequence_GetItem(o, i);\n#endif\n}\nstatic CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list,\n                                                     CYTHON_NCP_UNUSED int wraparound,\n                                                     CYTHON_NCP_UNUSED int boundscheck) {\n#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS\n    if (is_list || PyList_CheckExact(o)) {\n        Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);\n        if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) {\n            PyObject *r = PyList_GET_ITEM(o, n);\n            Py_INCREF(r);\n            return r;\n        }\n    }\n    else if (PyTuple_CheckExact(o)) {\n        Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);\n        if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) {\n            PyObject *r = PyTuple_GET_ITEM(o, n);\n            Py_INCREF(r);\n            return r;\n        }\n    } else {\n        PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;\n        if (likely(m && m->sq_item)) {\n            if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {\n                Py_ssize_t l = m->sq_length(o);\n                if (likely(l >= 0)) {\n                    i += l;\n                } else {\n                    if (!PyErr_ExceptionMatches(PyExc_OverflowError))\n                        return NULL;\n                    PyErr_Clear();\n                }\n            }\n            return m->sq_item(o, i);\n        }\n    }\n#else\n    if (is_list || PySequence_Check(o)) {\n        return PySequence_GetItem(o, i);\n    }\n#endif\n    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));\n}\n\n/* ObjectGetItem */\n#if CYTHON_USE_TYPE_SLOTS\nstatic PyObject *__Pyx_PyObject_GetIndex(PyObject *obj, PyObject* index) {\n    PyObject *runerr;\n    Py_ssize_t key_value;\n    PySequenceMethods *m = Py_TYPE(obj)->tp_as_sequence;\n    if (unlikely(!(m && m->sq_item))) {\n        PyErr_Format(PyExc_TypeError, \"'%.200s' object is not subscriptable\", Py_TYPE(obj)->tp_name);\n        return NULL;\n    }\n    key_value = __Pyx_PyIndex_AsSsize_t(index);\n    if (likely(key_value != -1 || !(runerr = PyErr_Occurred()))) {\n        return __Pyx_GetItemInt_Fast(obj, key_value, 0, 1, 1);\n    }\n    if (PyErr_GivenExceptionMatches(runerr, PyExc_OverflowError)) {\n        PyErr_Clear();\n        PyErr_Format(PyExc_IndexError, \"cannot fit '%.200s' into an index-sized integer\", Py_TYPE(index)->tp_name);\n    }\n    return NULL;\n}\nstatic PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key) {\n    PyMappingMethods *m = Py_TYPE(obj)->tp_as_mapping;\n    if (likely(m && m->mp_subscript)) {\n        return m->mp_subscript(obj, key);\n    }\n    return __Pyx_PyObject_GetIndex(obj, key);\n}\n#endif\n\n/* ArgTypeTest */\nstatic int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact)\n{\n    if (unlikely(!type)) {\n        PyErr_SetString(PyExc_SystemError, \"Missing type object\");\n        return 0;\n    }\n    else if (exact) {\n        #if PY_MAJOR_VERSION == 2\n        if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1;\n        #endif\n    }\n    else {\n        if (likely(__Pyx_TypeCheck(obj, type))) return 1;\n    }\n    PyErr_Format(PyExc_TypeError,\n        \"Argument '%.200s' has incorrect type (expected %.200s, got %.200s)\",\n        name, type->tp_name, Py_TYPE(obj)->tp_name);\n    return 0;\n}\n\n/* KeywordStringCheck */\nstatic int __Pyx_CheckKeywordStrings(\n    PyObject *kwdict,\n    const char* function_name,\n    int kw_allowed)\n{\n    PyObject* key = 0;\n    Py_ssize_t pos = 0;\n#if CYTHON_COMPILING_IN_PYPY\n    if (!kw_allowed && PyDict_Next(kwdict, &pos, &key, 0))\n        goto invalid_keyword;\n    return 1;\n#else\n    while (PyDict_Next(kwdict, &pos, &key, 0)) {\n        #if PY_MAJOR_VERSION < 3\n        if (unlikely(!PyString_Check(key)))\n        #endif\n            if (unlikely(!PyUnicode_Check(key)))\n                goto invalid_keyword_type;\n    }\n    if ((!kw_allowed) && unlikely(key))\n        goto invalid_keyword;\n    return 1;\ninvalid_keyword_type:\n    PyErr_Format(PyExc_TypeError,\n        \"%.200s() keywords must be strings\", function_name);\n    return 0;\n#endif\ninvalid_keyword:\n    PyErr_Format(PyExc_TypeError,\n    #if PY_MAJOR_VERSION < 3\n        \"%.200s() got an unexpected keyword argument '%.200s'\",\n        function_name, PyString_AsString(key));\n    #else\n        \"%s() got an unexpected keyword argument '%U'\",\n        function_name, key);\n    #endif\n    return 0;\n}\n\n/* PyErrFetchRestore */\n#if CYTHON_FAST_THREAD_STATE\nstatic CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {\n    PyObject *tmp_type, *tmp_value, *tmp_tb;\n    tmp_type = tstate->curexc_type;\n    tmp_value = tstate->curexc_value;\n    tmp_tb = tstate->curexc_traceback;\n    tstate->curexc_type = type;\n    tstate->curexc_value = value;\n    tstate->curexc_traceback = tb;\n    Py_XDECREF(tmp_type);\n    Py_XDECREF(tmp_value);\n    Py_XDECREF(tmp_tb);\n}\nstatic CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {\n    *type = tstate->curexc_type;\n    *value = tstate->curexc_value;\n    *tb = tstate->curexc_traceback;\n    tstate->curexc_type = 0;\n    tstate->curexc_value = 0;\n    tstate->curexc_traceback = 0;\n}\n#endif\n\n/* WriteUnraisableException */\nstatic void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno,\n                                  CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename,\n                                  int full_traceback, CYTHON_UNUSED int nogil) {\n    PyObject *old_exc, *old_val, *old_tb;\n    PyObject *ctx;\n    __Pyx_PyThreadState_declare\n#ifdef WITH_THREAD\n    PyGILState_STATE state;\n    if (nogil)\n        state = PyGILState_Ensure();\n#ifdef _MSC_VER\n    else state = (PyGILState_STATE)-1;\n#endif\n#endif\n    __Pyx_PyThreadState_assign\n    __Pyx_ErrFetch(&old_exc, &old_val, &old_tb);\n    if (full_traceback) {\n        Py_XINCREF(old_exc);\n        Py_XINCREF(old_val);\n        Py_XINCREF(old_tb);\n        __Pyx_ErrRestore(old_exc, old_val, old_tb);\n        PyErr_PrintEx(1);\n    }\n    #if PY_MAJOR_VERSION < 3\n    ctx = PyString_FromString(name);\n    #else\n    ctx = PyUnicode_FromString(name);\n    #endif\n    __Pyx_ErrRestore(old_exc, old_val, old_tb);\n    if (!ctx) {\n        PyErr_WriteUnraisable(Py_None);\n    } else {\n        PyErr_WriteUnraisable(ctx);\n        Py_DECREF(ctx);\n    }\n#ifdef WITH_THREAD\n    if (nogil)\n        PyGILState_Release(state);\n#endif\n}\n\n/* RaiseException */\n#if PY_MAJOR_VERSION < 3\nstatic void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,\n                        CYTHON_UNUSED PyObject *cause) {\n    __Pyx_PyThreadState_declare\n    Py_XINCREF(type);\n    if (!value || value == Py_None)\n        value = NULL;\n    else\n        Py_INCREF(value);\n    if (!tb || tb == Py_None)\n        tb = NULL;\n    else {\n        Py_INCREF(tb);\n        if (!PyTraceBack_Check(tb)) {\n            PyErr_SetString(PyExc_TypeError,\n                \"raise: arg 3 must be a traceback or None\");\n            goto raise_error;\n        }\n    }\n    if (PyType_Check(type)) {\n#if CYTHON_COMPILING_IN_PYPY\n        if (!value) {\n            Py_INCREF(Py_None);\n            value = Py_None;\n        }\n#endif\n        PyErr_NormalizeException(&type, &value, &tb);\n    } else {\n        if (value) {\n            PyErr_SetString(PyExc_TypeError,\n                \"instance exception may not have a separate value\");\n            goto raise_error;\n        }\n        value = type;\n        type = (PyObject*) Py_TYPE(type);\n        Py_INCREF(type);\n        if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {\n            PyErr_SetString(PyExc_TypeError,\n                \"raise: exception class must be a subclass of BaseException\");\n            goto raise_error;\n        }\n    }\n    __Pyx_PyThreadState_assign\n    __Pyx_ErrRestore(type, value, tb);\n    return;\nraise_error:\n    Py_XDECREF(value);\n    Py_XDECREF(type);\n    Py_XDECREF(tb);\n    return;\n}\n#else\nstatic void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {\n    PyObject* owned_instance = NULL;\n    if (tb == Py_None) {\n        tb = 0;\n    } else if (tb && !PyTraceBack_Check(tb)) {\n        PyErr_SetString(PyExc_TypeError,\n            \"raise: arg 3 must be a traceback or None\");\n        goto bad;\n    }\n    if (value == Py_None)\n        value = 0;\n    if (PyExceptionInstance_Check(type)) {\n        if (value) {\n            PyErr_SetString(PyExc_TypeError,\n                \"instance exception may not have a separate value\");\n            goto bad;\n        }\n        value = type;\n        type = (PyObject*) Py_TYPE(value);\n    } else if (PyExceptionClass_Check(type)) {\n        PyObject *instance_class = NULL;\n        if (value && PyExceptionInstance_Check(value)) {\n            instance_class = (PyObject*) Py_TYPE(value);\n            if (instance_class != type) {\n                int is_subclass = PyObject_IsSubclass(instance_class, type);\n                if (!is_subclass) {\n                    instance_class = NULL;\n                } else if (unlikely(is_subclass == -1)) {\n                    goto bad;\n                } else {\n                    type = instance_class;\n                }\n            }\n        }\n        if (!instance_class) {\n            PyObject *args;\n            if (!value)\n                args = PyTuple_New(0);\n            else if (PyTuple_Check(value)) {\n                Py_INCREF(value);\n                args = value;\n            } else\n                args = PyTuple_Pack(1, value);\n            if (!args)\n                goto bad;\n            owned_instance = PyObject_Call(type, args, NULL);\n            Py_DECREF(args);\n            if (!owned_instance)\n                goto bad;\n            value = owned_instance;\n            if (!PyExceptionInstance_Check(value)) {\n                PyErr_Format(PyExc_TypeError,\n                             \"calling %R should have returned an instance of \"\n                             \"BaseException, not %R\",\n                             type, Py_TYPE(value));\n                goto bad;\n            }\n        }\n    } else {\n        PyErr_SetString(PyExc_TypeError,\n            \"raise: exception class must be a subclass of BaseException\");\n        goto bad;\n    }\n    if (cause) {\n        PyObject *fixed_cause;\n        if (cause == Py_None) {\n            fixed_cause = NULL;\n        } else if (PyExceptionClass_Check(cause)) {\n            fixed_cause = PyObject_CallObject(cause, NULL);\n            if (fixed_cause == NULL)\n                goto bad;\n        } else if (PyExceptionInstance_Check(cause)) {\n            fixed_cause = cause;\n            Py_INCREF(fixed_cause);\n        } else {\n            PyErr_SetString(PyExc_TypeError,\n                            \"exception causes must derive from \"\n                            \"BaseException\");\n            goto bad;\n        }\n        PyException_SetCause(value, fixed_cause);\n    }\n    PyErr_SetObject(type, value);\n    if (tb) {\n#if CYTHON_COMPILING_IN_PYPY\n        PyObject *tmp_type, *tmp_value, *tmp_tb;\n        PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);\n        Py_INCREF(tb);\n        PyErr_Restore(tmp_type, tmp_value, tb);\n        Py_XDECREF(tmp_tb);\n#else\n        PyThreadState *tstate = __Pyx_PyThreadState_Current;\n        PyObject* tmp_tb = tstate->curexc_traceback;\n        if (tb != tmp_tb) {\n            Py_INCREF(tb);\n            tstate->curexc_traceback = tb;\n            Py_XDECREF(tmp_tb);\n        }\n#endif\n    }\nbad:\n    Py_XDECREF(owned_instance);\n    return;\n}\n#endif\n\n/* PyErrExceptionMatches */\n#if CYTHON_FAST_THREAD_STATE\nstatic int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {\n    Py_ssize_t i, n;\n    n = PyTuple_GET_SIZE(tuple);\n#if PY_MAJOR_VERSION >= 3\n    for (i=0; i<n; i++) {\n        if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;\n    }\n#endif\n    for (i=0; i<n; i++) {\n        if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i))) return 1;\n    }\n    return 0;\n}\nstatic CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {\n    PyObject *exc_type = tstate->curexc_type;\n    if (exc_type == err) return 1;\n    if (unlikely(!exc_type)) return 0;\n    if (unlikely(PyTuple_Check(err)))\n        return __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);\n    return __Pyx_PyErr_GivenExceptionMatches(exc_type, err);\n}\n#endif\n\n/* GetAttr */\nstatic CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) {\n#if CYTHON_USE_TYPE_SLOTS\n#if PY_MAJOR_VERSION >= 3\n    if (likely(PyUnicode_Check(n)))\n#else\n    if (likely(PyString_Check(n)))\n#endif\n        return __Pyx_PyObject_GetAttrStr(o, n);\n#endif\n    return PyObject_GetAttr(o, n);\n}\n\n/* GetAttr3 */\nstatic PyObject *__Pyx_GetAttr3Default(PyObject *d) {\n    __Pyx_PyThreadState_declare\n    __Pyx_PyThreadState_assign\n    if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))\n        return NULL;\n    __Pyx_PyErr_Clear();\n    Py_INCREF(d);\n    return d;\n}\nstatic CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) {\n    PyObject *r = __Pyx_GetAttr(o, n);\n    return (likely(r)) ? r : __Pyx_GetAttr3Default(d);\n}\n\n/* IsLittleEndian */\nstatic CYTHON_INLINE int __Pyx_Is_Little_Endian(void)\n{\n  union {\n    uint32_t u32;\n    uint8_t u8[4];\n  } S;\n  S.u32 = 0x01020304;\n  return S.u8[0] == 4;\n}\n\n/* BufferFormatCheck */\nstatic void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx,\n                              __Pyx_BufFmt_StackElem* stack,\n                              __Pyx_TypeInfo* type) {\n  stack[0].field = &ctx->root;\n  stack[0].parent_offset = 0;\n  ctx->root.type = type;\n  ctx->root.name = \"buffer dtype\";\n  ctx->root.offset = 0;\n  ctx->head = stack;\n  ctx->head->field = &ctx->root;\n  ctx->fmt_offset = 0;\n  ctx->head->parent_offset = 0;\n  ctx->new_packmode = '@';\n  ctx->enc_packmode = '@';\n  ctx->new_count = 1;\n  ctx->enc_count = 0;\n  ctx->enc_type = 0;\n  ctx->is_complex = 0;\n  ctx->is_valid_array = 0;\n  ctx->struct_alignment = 0;\n  while (type->typegroup == 'S') {\n    ++ctx->head;\n    ctx->head->field = type->fields;\n    ctx->head->parent_offset = 0;\n    type = type->fields->type;\n  }\n}\nstatic int __Pyx_BufFmt_ParseNumber(const char** ts) {\n    int count;\n    const char* t = *ts;\n    if (*t < '0' || *t > '9') {\n      return -1;\n    } else {\n        count = *t++ - '0';\n        while (*t >= '0' && *t <= '9') {\n            count *= 10;\n            count += *t++ - '0';\n        }\n    }\n    *ts = t;\n    return count;\n}\nstatic int __Pyx_BufFmt_ExpectNumber(const char **ts) {\n    int number = __Pyx_BufFmt_ParseNumber(ts);\n    if (number == -1)\n        PyErr_Format(PyExc_ValueError,\\\n                     \"Does not understand character buffer dtype format string ('%c')\", **ts);\n    return number;\n}\nstatic void __Pyx_BufFmt_RaiseUnexpectedChar(char ch) {\n  PyErr_Format(PyExc_ValueError,\n               \"Unexpected format string character: '%c'\", ch);\n}\nstatic const char* __Pyx_BufFmt_DescribeTypeChar(char ch, int is_complex) {\n  switch (ch) {\n    case '?': return \"'bool'\";\n    case 'c': return \"'char'\";\n    case 'b': return \"'signed char'\";\n    case 'B': return \"'unsigned char'\";\n    case 'h': return \"'short'\";\n    case 'H': return \"'unsigned short'\";\n    case 'i': return \"'int'\";\n    case 'I': return \"'unsigned int'\";\n    case 'l': return \"'long'\";\n    case 'L': return \"'unsigned long'\";\n    case 'q': return \"'long long'\";\n    case 'Q': return \"'unsigned long long'\";\n    case 'f': return (is_complex ? \"'complex float'\" : \"'float'\");\n    case 'd': return (is_complex ? \"'complex double'\" : \"'double'\");\n    case 'g': return (is_complex ? \"'complex long double'\" : \"'long double'\");\n    case 'T': return \"a struct\";\n    case 'O': return \"Python object\";\n    case 'P': return \"a pointer\";\n    case 's': case 'p': return \"a string\";\n    case 0: return \"end\";\n    default: return \"unparseable format string\";\n  }\n}\nstatic size_t __Pyx_BufFmt_TypeCharToStandardSize(char ch, int is_complex) {\n  switch (ch) {\n    case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1;\n    case 'h': case 'H': return 2;\n    case 'i': case 'I': case 'l': case 'L': return 4;\n    case 'q': case 'Q': return 8;\n    case 'f': return (is_complex ? 8 : 4);\n    case 'd': return (is_complex ? 16 : 8);\n    case 'g': {\n      PyErr_SetString(PyExc_ValueError, \"Python does not define a standard format string size for long double ('g')..\");\n      return 0;\n    }\n    case 'O': case 'P': return sizeof(void*);\n    default:\n      __Pyx_BufFmt_RaiseUnexpectedChar(ch);\n      return 0;\n    }\n}\nstatic size_t __Pyx_BufFmt_TypeCharToNativeSize(char ch, int is_complex) {\n  switch (ch) {\n    case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1;\n    case 'h': case 'H': return sizeof(short);\n    case 'i': case 'I': return sizeof(int);\n    case 'l': case 'L': return sizeof(long);\n    #ifdef HAVE_LONG_LONG\n    case 'q': case 'Q': return sizeof(PY_LONG_LONG);\n    #endif\n    case 'f': return sizeof(float) * (is_complex ? 2 : 1);\n    case 'd': return sizeof(double) * (is_complex ? 2 : 1);\n    case 'g': return sizeof(long double) * (is_complex ? 2 : 1);\n    case 'O': case 'P': return sizeof(void*);\n    default: {\n      __Pyx_BufFmt_RaiseUnexpectedChar(ch);\n      return 0;\n    }\n  }\n}\ntypedef struct { char c; short x; } __Pyx_st_short;\ntypedef struct { char c; int x; } __Pyx_st_int;\ntypedef struct { char c; long x; } __Pyx_st_long;\ntypedef struct { char c; float x; } __Pyx_st_float;\ntypedef struct { char c; double x; } __Pyx_st_double;\ntypedef struct { char c; long double x; } __Pyx_st_longdouble;\ntypedef struct { char c; void *x; } __Pyx_st_void_p;\n#ifdef HAVE_LONG_LONG\ntypedef struct { char c; PY_LONG_LONG x; } __Pyx_st_longlong;\n#endif\nstatic size_t __Pyx_BufFmt_TypeCharToAlignment(char ch, CYTHON_UNUSED int is_complex) {\n  switch (ch) {\n    case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1;\n    case 'h': case 'H': return sizeof(__Pyx_st_short) - sizeof(short);\n    case 'i': case 'I': return sizeof(__Pyx_st_int) - sizeof(int);\n    case 'l': case 'L': return sizeof(__Pyx_st_long) - sizeof(long);\n#ifdef HAVE_LONG_LONG\n    case 'q': case 'Q': return sizeof(__Pyx_st_longlong) - sizeof(PY_LONG_LONG);\n#endif\n    case 'f': return sizeof(__Pyx_st_float) - sizeof(float);\n    case 'd': return sizeof(__Pyx_st_double) - sizeof(double);\n    case 'g': return sizeof(__Pyx_st_longdouble) - sizeof(long double);\n    case 'P': case 'O': return sizeof(__Pyx_st_void_p) - sizeof(void*);\n    default:\n      __Pyx_BufFmt_RaiseUnexpectedChar(ch);\n      return 0;\n    }\n}\n/* These are for computing the padding at the end of the struct to align\n   on the first member of the struct. This will probably the same as above,\n   but we don't have any guarantees.\n */\ntypedef struct { short x; char c; } __Pyx_pad_short;\ntypedef struct { int x; char c; } __Pyx_pad_int;\ntypedef struct { long x; char c; } __Pyx_pad_long;\ntypedef struct { float x; char c; } __Pyx_pad_float;\ntypedef struct { double x; char c; } __Pyx_pad_double;\ntypedef struct { long double x; char c; } __Pyx_pad_longdouble;\ntypedef struct { void *x; char c; } __Pyx_pad_void_p;\n#ifdef HAVE_LONG_LONG\ntypedef struct { PY_LONG_LONG x; char c; } __Pyx_pad_longlong;\n#endif\nstatic size_t __Pyx_BufFmt_TypeCharToPadding(char ch, CYTHON_UNUSED int is_complex) {\n  switch (ch) {\n    case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1;\n    case 'h': case 'H': return sizeof(__Pyx_pad_short) - sizeof(short);\n    case 'i': case 'I': return sizeof(__Pyx_pad_int) - sizeof(int);\n    case 'l': case 'L': return sizeof(__Pyx_pad_long) - sizeof(long);\n#ifdef HAVE_LONG_LONG\n    case 'q': case 'Q': return sizeof(__Pyx_pad_longlong) - sizeof(PY_LONG_LONG);\n#endif\n    case 'f': return sizeof(__Pyx_pad_float) - sizeof(float);\n    case 'd': return sizeof(__Pyx_pad_double) - sizeof(double);\n    case 'g': return sizeof(__Pyx_pad_longdouble) - sizeof(long double);\n    case 'P': case 'O': return sizeof(__Pyx_pad_void_p) - sizeof(void*);\n    default:\n      __Pyx_BufFmt_RaiseUnexpectedChar(ch);\n      return 0;\n    }\n}\nstatic char __Pyx_BufFmt_TypeCharToGroup(char ch, int is_complex) {\n  switch (ch) {\n    case 'c':\n        return 'H';\n    case 'b': case 'h': case 'i':\n    case 'l': case 'q': case 's': case 'p':\n        return 'I';\n    case '?': case 'B': case 'H': case 'I': case 'L': case 'Q':\n        return 'U';\n    case 'f': case 'd': case 'g':\n        return (is_complex ? 'C' : 'R');\n    case 'O':\n        return 'O';\n    case 'P':\n        return 'P';\n    default: {\n      __Pyx_BufFmt_RaiseUnexpectedChar(ch);\n      return 0;\n    }\n  }\n}\nstatic void __Pyx_BufFmt_RaiseExpected(__Pyx_BufFmt_Context* ctx) {\n  if (ctx->head == NULL || ctx->head->field == &ctx->root) {\n    const char* expected;\n    const char* quote;\n    if (ctx->head == NULL) {\n      expected = \"end\";\n      quote = \"\";\n    } else {\n      expected = ctx->head->field->type->name;\n      quote = \"'\";\n    }\n    PyErr_Format(PyExc_ValueError,\n                 \"Buffer dtype mismatch, expected %s%s%s but got %s\",\n                 quote, expected, quote,\n                 __Pyx_BufFmt_DescribeTypeChar(ctx->enc_type, ctx->is_complex));\n  } else {\n    __Pyx_StructField* field = ctx->head->field;\n    __Pyx_StructField* parent = (ctx->head - 1)->field;\n    PyErr_Format(PyExc_ValueError,\n                 \"Buffer dtype mismatch, expected '%s' but got %s in '%s.%s'\",\n                 field->type->name, __Pyx_BufFmt_DescribeTypeChar(ctx->enc_type, ctx->is_complex),\n                 parent->type->name, field->name);\n  }\n}\nstatic int __Pyx_BufFmt_ProcessTypeChunk(__Pyx_BufFmt_Context* ctx) {\n  char group;\n  size_t size, offset, arraysize = 1;\n  if (ctx->enc_type == 0) return 0;\n  if (ctx->head->field->type->arraysize[0]) {\n    int i, ndim = 0;\n    if (ctx->enc_type == 's' || ctx->enc_type == 'p') {\n        ctx->is_valid_array = ctx->head->field->type->ndim == 1;\n        ndim = 1;\n        if (ctx->enc_count != ctx->head->field->type->arraysize[0]) {\n            PyErr_Format(PyExc_ValueError,\n                         \"Expected a dimension of size %zu, got %zu\",\n                         ctx->head->field->type->arraysize[0], ctx->enc_count);\n            return -1;\n        }\n    }\n    if (!ctx->is_valid_array) {\n      PyErr_Format(PyExc_ValueError, \"Expected %d dimensions, got %d\",\n                   ctx->head->field->type->ndim, ndim);\n      return -1;\n    }\n    for (i = 0; i < ctx->head->field->type->ndim; i++) {\n      arraysize *= ctx->head->field->type->arraysize[i];\n    }\n    ctx->is_valid_array = 0;\n    ctx->enc_count = 1;\n  }\n  group = __Pyx_BufFmt_TypeCharToGroup(ctx->enc_type, ctx->is_complex);\n  do {\n    __Pyx_StructField* field = ctx->head->field;\n    __Pyx_TypeInfo* type = field->type;\n    if (ctx->enc_packmode == '@' || ctx->enc_packmode == '^') {\n      size = __Pyx_BufFmt_TypeCharToNativeSize(ctx->enc_type, ctx->is_complex);\n    } else {\n      size = __Pyx_BufFmt_TypeCharToStandardSize(ctx->enc_type, ctx->is_complex);\n    }\n    if (ctx->enc_packmode == '@') {\n      size_t align_at = __Pyx_BufFmt_TypeCharToAlignment(ctx->enc_type, ctx->is_complex);\n      size_t align_mod_offset;\n      if (align_at == 0) return -1;\n      align_mod_offset = ctx->fmt_offset % align_at;\n      if (align_mod_offset > 0) ctx->fmt_offset += align_at - align_mod_offset;\n      if (ctx->struct_alignment == 0)\n          ctx->struct_alignment = __Pyx_BufFmt_TypeCharToPadding(ctx->enc_type,\n                                                                 ctx->is_complex);\n    }\n    if (type->size != size || type->typegroup != group) {\n      if (type->typegroup == 'C' && type->fields != NULL) {\n        size_t parent_offset = ctx->head->parent_offset + field->offset;\n        ++ctx->head;\n        ctx->head->field = type->fields;\n        ctx->head->parent_offset = parent_offset;\n        continue;\n      }\n      if ((type->typegroup == 'H' || group == 'H') && type->size == size) {\n      } else {\n          __Pyx_BufFmt_RaiseExpected(ctx);\n          return -1;\n      }\n    }\n    offset = ctx->head->parent_offset + field->offset;\n    if (ctx->fmt_offset != offset) {\n      PyErr_Format(PyExc_ValueError,\n                   \"Buffer dtype mismatch; next field is at offset %\" CYTHON_FORMAT_SSIZE_T \"d but %\" CYTHON_FORMAT_SSIZE_T \"d expected\",\n                   (Py_ssize_t)ctx->fmt_offset, (Py_ssize_t)offset);\n      return -1;\n    }\n    ctx->fmt_offset += size;\n    if (arraysize)\n      ctx->fmt_offset += (arraysize - 1) * size;\n    --ctx->enc_count;\n    while (1) {\n      if (field == &ctx->root) {\n        ctx->head = NULL;\n        if (ctx->enc_count != 0) {\n          __Pyx_BufFmt_RaiseExpected(ctx);\n          return -1;\n        }\n        break;\n      }\n      ctx->head->field = ++field;\n      if (field->type == NULL) {\n        --ctx->head;\n        field = ctx->head->field;\n        continue;\n      } else if (field->type->typegroup == 'S') {\n        size_t parent_offset = ctx->head->parent_offset + field->offset;\n        if (field->type->fields->type == NULL) continue;\n        field = field->type->fields;\n        ++ctx->head;\n        ctx->head->field = field;\n        ctx->head->parent_offset = parent_offset;\n        break;\n      } else {\n        break;\n      }\n    }\n  } while (ctx->enc_count);\n  ctx->enc_type = 0;\n  ctx->is_complex = 0;\n  return 0;\n}\nstatic PyObject *\n__pyx_buffmt_parse_array(__Pyx_BufFmt_Context* ctx, const char** tsp)\n{\n    const char *ts = *tsp;\n    int i = 0, number, ndim;\n    ++ts;\n    if (ctx->new_count != 1) {\n        PyErr_SetString(PyExc_ValueError,\n                        \"Cannot handle repeated arrays in format string\");\n        return NULL;\n    }\n    if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;\n    ndim = ctx->head->field->type->ndim;\n    while (*ts && *ts != ')') {\n        switch (*ts) {\n            case ' ': case '\\f': case '\\r': case '\\n': case '\\t': case '\\v':  continue;\n            default:  break;\n        }\n        number = __Pyx_BufFmt_ExpectNumber(&ts);\n        if (number == -1) return NULL;\n        if (i < ndim && (size_t) number != ctx->head->field->type->arraysize[i])\n            return PyErr_Format(PyExc_ValueError,\n                        \"Expected a dimension of size %zu, got %d\",\n                        ctx->head->field->type->arraysize[i], number);\n        if (*ts != ',' && *ts != ')')\n            return PyErr_Format(PyExc_ValueError,\n                                \"Expected a comma in format string, got '%c'\", *ts);\n        if (*ts == ',') ts++;\n        i++;\n    }\n    if (i != ndim)\n        return PyErr_Format(PyExc_ValueError, \"Expected %d dimension(s), got %d\",\n                            ctx->head->field->type->ndim, i);\n    if (!*ts) {\n        PyErr_SetString(PyExc_ValueError,\n                        \"Unexpected end of format string, expected ')'\");\n        return NULL;\n    }\n    ctx->is_valid_array = 1;\n    ctx->new_count = 1;\n    *tsp = ++ts;\n    return Py_None;\n}\nstatic const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const char* ts) {\n  int got_Z = 0;\n  while (1) {\n    switch(*ts) {\n      case 0:\n        if (ctx->enc_type != 0 && ctx->head == NULL) {\n          __Pyx_BufFmt_RaiseExpected(ctx);\n          return NULL;\n        }\n        if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;\n        if (ctx->head != NULL) {\n          __Pyx_BufFmt_RaiseExpected(ctx);\n          return NULL;\n        }\n        return ts;\n      case ' ':\n      case '\\r':\n      case '\\n':\n        ++ts;\n        break;\n      case '<':\n        if (!__Pyx_Is_Little_Endian()) {\n          PyErr_SetString(PyExc_ValueError, \"Little-endian buffer not supported on big-endian compiler\");\n          return NULL;\n        }\n        ctx->new_packmode = '=';\n        ++ts;\n        break;\n      case '>':\n      case '!':\n        if (__Pyx_Is_Little_Endian()) {\n          PyErr_SetString(PyExc_ValueError, \"Big-endian buffer not supported on little-endian compiler\");\n          return NULL;\n        }\n        ctx->new_packmode = '=';\n        ++ts;\n        break;\n      case '=':\n      case '@':\n      case '^':\n        ctx->new_packmode = *ts++;\n        break;\n      case 'T':\n        {\n          const char* ts_after_sub;\n          size_t i, struct_count = ctx->new_count;\n          size_t struct_alignment = ctx->struct_alignment;\n          ctx->new_count = 1;\n          ++ts;\n          if (*ts != '{') {\n            PyErr_SetString(PyExc_ValueError, \"Buffer acquisition: Expected '{' after 'T'\");\n            return NULL;\n          }\n          if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;\n          ctx->enc_type = 0;\n          ctx->enc_count = 0;\n          ctx->struct_alignment = 0;\n          ++ts;\n          ts_after_sub = ts;\n          for (i = 0; i != struct_count; ++i) {\n            ts_after_sub = __Pyx_BufFmt_CheckString(ctx, ts);\n            if (!ts_after_sub) return NULL;\n          }\n          ts = ts_after_sub;\n          if (struct_alignment) ctx->struct_alignment = struct_alignment;\n        }\n        break;\n      case '}':\n        {\n          size_t alignment = ctx->struct_alignment;\n          ++ts;\n          if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;\n          ctx->enc_type = 0;\n          if (alignment && ctx->fmt_offset % alignment) {\n            ctx->fmt_offset += alignment - (ctx->fmt_offset % alignment);\n          }\n        }\n        return ts;\n      case 'x':\n        if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;\n        ctx->fmt_offset += ctx->new_count;\n        ctx->new_count = 1;\n        ctx->enc_count = 0;\n        ctx->enc_type = 0;\n        ctx->enc_packmode = ctx->new_packmode;\n        ++ts;\n        break;\n      case 'Z':\n        got_Z = 1;\n        ++ts;\n        if (*ts != 'f' && *ts != 'd' && *ts != 'g') {\n          __Pyx_BufFmt_RaiseUnexpectedChar('Z');\n          return NULL;\n        }\n        CYTHON_FALLTHROUGH;\n      case '?': case 'c': case 'b': case 'B': case 'h': case 'H': case 'i': case 'I':\n      case 'l': case 'L': case 'q': case 'Q':\n      case 'f': case 'd': case 'g':\n      case 'O': case 'p':\n        if ((ctx->enc_type == *ts) && (got_Z == ctx->is_complex) &&\n            (ctx->enc_packmode == ctx->new_packmode) && (!ctx->is_valid_array)) {\n          ctx->enc_count += ctx->new_count;\n          ctx->new_count = 1;\n          got_Z = 0;\n          ++ts;\n          break;\n        }\n        CYTHON_FALLTHROUGH;\n      case 's':\n        if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;\n        ctx->enc_count = ctx->new_count;\n        ctx->enc_packmode = ctx->new_packmode;\n        ctx->enc_type = *ts;\n        ctx->is_complex = got_Z;\n        ++ts;\n        ctx->new_count = 1;\n        got_Z = 0;\n        break;\n      case ':':\n        ++ts;\n        while(*ts != ':') ++ts;\n        ++ts;\n        break;\n      case '(':\n        if (!__pyx_buffmt_parse_array(ctx, &ts)) return NULL;\n        break;\n      default:\n        {\n          int number = __Pyx_BufFmt_ExpectNumber(&ts);\n          if (number == -1) return NULL;\n          ctx->new_count = (size_t)number;\n        }\n    }\n  }\n}\n\n/* BufferGetAndValidate */\n  static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info) {\n  if (unlikely(info->buf == NULL)) return;\n  if (info->suboffsets == __Pyx_minusones) info->suboffsets = NULL;\n  __Pyx_ReleaseBuffer(info);\n}\nstatic void __Pyx_ZeroBuffer(Py_buffer* buf) {\n  buf->buf = NULL;\n  buf->obj = NULL;\n  buf->strides = __Pyx_zeros;\n  buf->shape = __Pyx_zeros;\n  buf->suboffsets = __Pyx_minusones;\n}\nstatic int __Pyx__GetBufferAndValidate(\n        Py_buffer* buf, PyObject* obj,  __Pyx_TypeInfo* dtype, int flags,\n        int nd, int cast, __Pyx_BufFmt_StackElem* stack)\n{\n  buf->buf = NULL;\n  if (unlikely(__Pyx_GetBuffer(obj, buf, flags) == -1)) {\n    __Pyx_ZeroBuffer(buf);\n    return -1;\n  }\n  if (unlikely(buf->ndim != nd)) {\n    PyErr_Format(PyExc_ValueError,\n                 \"Buffer has wrong number of dimensions (expected %d, got %d)\",\n                 nd, buf->ndim);\n    goto fail;\n  }\n  if (!cast) {\n    __Pyx_BufFmt_Context ctx;\n    __Pyx_BufFmt_Init(&ctx, stack, dtype);\n    if (!__Pyx_BufFmt_CheckString(&ctx, buf->format)) goto fail;\n  }\n  if (unlikely((size_t)buf->itemsize != dtype->size)) {\n    PyErr_Format(PyExc_ValueError,\n      \"Item size of buffer (%\" CYTHON_FORMAT_SSIZE_T \"d byte%s) does not match size of '%s' (%\" CYTHON_FORMAT_SSIZE_T \"d byte%s)\",\n      buf->itemsize, (buf->itemsize > 1) ? \"s\" : \"\",\n      dtype->name, (Py_ssize_t)dtype->size, (dtype->size > 1) ? \"s\" : \"\");\n    goto fail;\n  }\n  if (buf->suboffsets == NULL) buf->suboffsets = __Pyx_minusones;\n  return 0;\nfail:;\n  __Pyx_SafeReleaseBuffer(buf);\n  return -1;\n}\n\n/* ExtTypeTest */\n  static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {\n    if (unlikely(!type)) {\n        PyErr_SetString(PyExc_SystemError, \"Missing type object\");\n        return 0;\n    }\n    if (likely(__Pyx_TypeCheck(obj, type)))\n        return 1;\n    PyErr_Format(PyExc_TypeError, \"Cannot convert %.200s to %.200s\",\n                 Py_TYPE(obj)->tp_name, type->tp_name);\n    return 0;\n}\n\n/* None */\n  static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname) {\n    PyErr_Format(PyExc_UnboundLocalError, \"local variable '%s' referenced before assignment\", varname);\n}\n\n/* Import */\n  static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {\n    PyObject *empty_list = 0;\n    PyObject *module = 0;\n    PyObject *global_dict = 0;\n    PyObject *empty_dict = 0;\n    PyObject *list;\n    #if PY_MAJOR_VERSION < 3\n    PyObject *py_import;\n    py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);\n    if (!py_import)\n        goto bad;\n    #endif\n    if (from_list)\n        list = from_list;\n    else {\n        empty_list = PyList_New(0);\n        if (!empty_list)\n            goto bad;\n        list = empty_list;\n    }\n    global_dict = PyModule_GetDict(__pyx_m);\n    if (!global_dict)\n        goto bad;\n    empty_dict = PyDict_New();\n    if (!empty_dict)\n        goto bad;\n    {\n        #if PY_MAJOR_VERSION >= 3\n        if (level == -1) {\n            if ((1) && (strchr(__Pyx_MODULE_NAME, '.'))) {\n                module = PyImport_ImportModuleLevelObject(\n                    name, global_dict, empty_dict, list, 1);\n                if (!module) {\n                    if (!PyErr_ExceptionMatches(PyExc_ImportError))\n                        goto bad;\n                    PyErr_Clear();\n                }\n            }\n            level = 0;\n        }\n        #endif\n        if (!module) {\n            #if PY_MAJOR_VERSION < 3\n            PyObject *py_level = PyInt_FromLong(level);\n            if (!py_level)\n                goto bad;\n            module = PyObject_CallFunctionObjArgs(py_import,\n                name, global_dict, empty_dict, list, py_level, (PyObject *)NULL);\n            Py_DECREF(py_level);\n            #else\n            module = PyImport_ImportModuleLevelObject(\n                name, global_dict, empty_dict, list, level);\n            #endif\n        }\n    }\nbad:\n    #if PY_MAJOR_VERSION < 3\n    Py_XDECREF(py_import);\n    #endif\n    Py_XDECREF(empty_list);\n    Py_XDECREF(empty_dict);\n    return module;\n}\n\n/* ImportFrom */\n  static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) {\n    PyObject* value = __Pyx_PyObject_GetAttrStr(module, name);\n    if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) {\n        PyErr_Format(PyExc_ImportError,\n        #if PY_MAJOR_VERSION < 3\n            \"cannot import name %.230s\", PyString_AS_STRING(name));\n        #else\n            \"cannot import name %S\", name);\n        #endif\n    }\n    return value;\n}\n\n/* HasAttr */\n  static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) {\n    PyObject *r;\n    if (unlikely(!__Pyx_PyBaseString_Check(n))) {\n        PyErr_SetString(PyExc_TypeError,\n                        \"hasattr(): attribute name must be string\");\n        return -1;\n    }\n    r = __Pyx_GetAttr(o, n);\n    if (unlikely(!r)) {\n        PyErr_Clear();\n        return 0;\n    } else {\n        Py_DECREF(r);\n        return 1;\n    }\n}\n\n/* GetTopmostException */\n  #if CYTHON_USE_EXC_INFO_STACK\nstatic _PyErr_StackItem *\n__Pyx_PyErr_GetTopmostException(PyThreadState *tstate)\n{\n    _PyErr_StackItem *exc_info = tstate->exc_info;\n    while ((exc_info->exc_type == NULL || exc_info->exc_type == Py_None) &&\n           exc_info->previous_item != NULL)\n    {\n        exc_info = exc_info->previous_item;\n    }\n    return exc_info;\n}\n#endif\n\n/* SaveResetException */\n  #if CYTHON_FAST_THREAD_STATE\nstatic CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {\n    #if CYTHON_USE_EXC_INFO_STACK\n    _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);\n    *type = exc_info->exc_type;\n    *value = exc_info->exc_value;\n    *tb = exc_info->exc_traceback;\n    #else\n    *type = tstate->exc_type;\n    *value = tstate->exc_value;\n    *tb = tstate->exc_traceback;\n    #endif\n    Py_XINCREF(*type);\n    Py_XINCREF(*value);\n    Py_XINCREF(*tb);\n}\nstatic CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {\n    PyObject *tmp_type, *tmp_value, *tmp_tb;\n    #if CYTHON_USE_EXC_INFO_STACK\n    _PyErr_StackItem *exc_info = tstate->exc_info;\n    tmp_type = exc_info->exc_type;\n    tmp_value = exc_info->exc_value;\n    tmp_tb = exc_info->exc_traceback;\n    exc_info->exc_type = type;\n    exc_info->exc_value = value;\n    exc_info->exc_traceback = tb;\n    #else\n    tmp_type = tstate->exc_type;\n    tmp_value = tstate->exc_value;\n    tmp_tb = tstate->exc_traceback;\n    tstate->exc_type = type;\n    tstate->exc_value = value;\n    tstate->exc_traceback = tb;\n    #endif\n    Py_XDECREF(tmp_type);\n    Py_XDECREF(tmp_value);\n    Py_XDECREF(tmp_tb);\n}\n#endif\n\n/* GetException */\n  #if CYTHON_FAST_THREAD_STATE\nstatic int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb)\n#else\nstatic int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb)\n#endif\n{\n    PyObject *local_type, *local_value, *local_tb;\n#if CYTHON_FAST_THREAD_STATE\n    PyObject *tmp_type, *tmp_value, *tmp_tb;\n    local_type = tstate->curexc_type;\n    local_value = tstate->curexc_value;\n    local_tb = tstate->curexc_traceback;\n    tstate->curexc_type = 0;\n    tstate->curexc_value = 0;\n    tstate->curexc_traceback = 0;\n#else\n    PyErr_Fetch(&local_type, &local_value, &local_tb);\n#endif\n    PyErr_NormalizeException(&local_type, &local_value, &local_tb);\n#if CYTHON_FAST_THREAD_STATE\n    if (unlikely(tstate->curexc_type))\n#else\n    if (unlikely(PyErr_Occurred()))\n#endif\n        goto bad;\n    #if PY_MAJOR_VERSION >= 3\n    if (local_tb) {\n        if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))\n            goto bad;\n    }\n    #endif\n    Py_XINCREF(local_tb);\n    Py_XINCREF(local_type);\n    Py_XINCREF(local_value);\n    *type = local_type;\n    *value = local_value;\n    *tb = local_tb;\n#if CYTHON_FAST_THREAD_STATE\n    #if CYTHON_USE_EXC_INFO_STACK\n    {\n        _PyErr_StackItem *exc_info = tstate->exc_info;\n        tmp_type = exc_info->exc_type;\n        tmp_value = exc_info->exc_value;\n        tmp_tb = exc_info->exc_traceback;\n        exc_info->exc_type = local_type;\n        exc_info->exc_value = local_value;\n        exc_info->exc_traceback = local_tb;\n    }\n    #else\n    tmp_type = tstate->exc_type;\n    tmp_value = tstate->exc_value;\n    tmp_tb = tstate->exc_traceback;\n    tstate->exc_type = local_type;\n    tstate->exc_value = local_value;\n    tstate->exc_traceback = local_tb;\n    #endif\n    Py_XDECREF(tmp_type);\n    Py_XDECREF(tmp_value);\n    Py_XDECREF(tmp_tb);\n#else\n    PyErr_SetExcInfo(local_type, local_value, local_tb);\n#endif\n    return 0;\nbad:\n    *type = 0;\n    *value = 0;\n    *tb = 0;\n    Py_XDECREF(local_type);\n    Py_XDECREF(local_value);\n    Py_XDECREF(local_tb);\n    return -1;\n}\n\n/* BytesEquals */\n  static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {\n#if CYTHON_COMPILING_IN_PYPY\n    return PyObject_RichCompareBool(s1, s2, equals);\n#else\n    if (s1 == s2) {\n        return (equals == Py_EQ);\n    } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) {\n        const char *ps1, *ps2;\n        Py_ssize_t length = PyBytes_GET_SIZE(s1);\n        if (length != PyBytes_GET_SIZE(s2))\n            return (equals == Py_NE);\n        ps1 = PyBytes_AS_STRING(s1);\n        ps2 = PyBytes_AS_STRING(s2);\n        if (ps1[0] != ps2[0]) {\n            return (equals == Py_NE);\n        } else if (length == 1) {\n            return (equals == Py_EQ);\n        } else {\n            int result;\n#if CYTHON_USE_UNICODE_INTERNALS && (PY_VERSION_HEX < 0x030B0000)\n            Py_hash_t hash1, hash2;\n            hash1 = ((PyBytesObject*)s1)->ob_shash;\n            hash2 = ((PyBytesObject*)s2)->ob_shash;\n            if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {\n                return (equals == Py_NE);\n            }\n#endif\n            result = memcmp(ps1, ps2, (size_t)length);\n            return (equals == Py_EQ) ? (result == 0) : (result != 0);\n        }\n    } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) {\n        return (equals == Py_NE);\n    } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) {\n        return (equals == Py_NE);\n    } else {\n        int result;\n        PyObject* py_result = PyObject_RichCompare(s1, s2, equals);\n        if (!py_result)\n            return -1;\n        result = __Pyx_PyObject_IsTrue(py_result);\n        Py_DECREF(py_result);\n        return result;\n    }\n#endif\n}\n\n/* UnicodeEquals */\n  static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {\n#if CYTHON_COMPILING_IN_PYPY\n    return PyObject_RichCompareBool(s1, s2, equals);\n#else\n#if PY_MAJOR_VERSION < 3\n    PyObject* owned_ref = NULL;\n#endif\n    int s1_is_unicode, s2_is_unicode;\n    if (s1 == s2) {\n        goto return_eq;\n    }\n    s1_is_unicode = PyUnicode_CheckExact(s1);\n    s2_is_unicode = PyUnicode_CheckExact(s2);\n#if PY_MAJOR_VERSION < 3\n    if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) {\n        owned_ref = PyUnicode_FromObject(s2);\n        if (unlikely(!owned_ref))\n            return -1;\n        s2 = owned_ref;\n        s2_is_unicode = 1;\n    } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) {\n        owned_ref = PyUnicode_FromObject(s1);\n        if (unlikely(!owned_ref))\n            return -1;\n        s1 = owned_ref;\n        s1_is_unicode = 1;\n    } else if (((!s2_is_unicode) & (!s1_is_unicode))) {\n        return __Pyx_PyBytes_Equals(s1, s2, equals);\n    }\n#endif\n    if (s1_is_unicode & s2_is_unicode) {\n        Py_ssize_t length;\n        int kind;\n        void *data1, *data2;\n        if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0))\n            return -1;\n        length = __Pyx_PyUnicode_GET_LENGTH(s1);\n        if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) {\n            goto return_ne;\n        }\n#if CYTHON_USE_UNICODE_INTERNALS\n        {\n            Py_hash_t hash1, hash2;\n        #if CYTHON_PEP393_ENABLED\n            hash1 = ((PyASCIIObject*)s1)->hash;\n            hash2 = ((PyASCIIObject*)s2)->hash;\n        #else\n            hash1 = ((PyUnicodeObject*)s1)->hash;\n            hash2 = ((PyUnicodeObject*)s2)->hash;\n        #endif\n            if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {\n                goto return_ne;\n            }\n        }\n#endif\n        kind = __Pyx_PyUnicode_KIND(s1);\n        if (kind != __Pyx_PyUnicode_KIND(s2)) {\n            goto return_ne;\n        }\n        data1 = __Pyx_PyUnicode_DATA(s1);\n        data2 = __Pyx_PyUnicode_DATA(s2);\n        if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) {\n            goto return_ne;\n        } else if (length == 1) {\n            goto return_eq;\n        } else {\n            int result = memcmp(data1, data2, (size_t)(length * kind));\n            #if PY_MAJOR_VERSION < 3\n            Py_XDECREF(owned_ref);\n            #endif\n            return (equals == Py_EQ) ? (result == 0) : (result != 0);\n        }\n    } else if ((s1 == Py_None) & s2_is_unicode) {\n        goto return_ne;\n    } else if ((s2 == Py_None) & s1_is_unicode) {\n        goto return_ne;\n    } else {\n        int result;\n        PyObject* py_result = PyObject_RichCompare(s1, s2, equals);\n        #if PY_MAJOR_VERSION < 3\n        Py_XDECREF(owned_ref);\n        #endif\n        if (!py_result)\n            return -1;\n        result = __Pyx_PyObject_IsTrue(py_result);\n        Py_DECREF(py_result);\n        return result;\n    }\nreturn_eq:\n    #if PY_MAJOR_VERSION < 3\n    Py_XDECREF(owned_ref);\n    #endif\n    return (equals == Py_EQ);\nreturn_ne:\n    #if PY_MAJOR_VERSION < 3\n    Py_XDECREF(owned_ref);\n    #endif\n    return (equals == Py_NE);\n#endif\n}\n\n/* decode_c_string */\n  static CYTHON_INLINE PyObject* __Pyx_decode_c_string(\n         const char* cstring, Py_ssize_t start, Py_ssize_t stop,\n         const char* encoding, const char* errors,\n         PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) {\n    Py_ssize_t length;\n    if (unlikely((start < 0) | (stop < 0))) {\n        size_t slen = strlen(cstring);\n        if (unlikely(slen > (size_t) PY_SSIZE_T_MAX)) {\n            PyErr_SetString(PyExc_OverflowError,\n                            \"c-string too long to convert to Python\");\n            return NULL;\n        }\n        length = (Py_ssize_t) slen;\n        if (start < 0) {\n            start += length;\n            if (start < 0)\n                start = 0;\n        }\n        if (stop < 0)\n            stop += length;\n    }\n    if (unlikely(stop <= start))\n        return __Pyx_NewRef(__pyx_empty_unicode);\n    length = stop - start;\n    cstring += start;\n    if (decode_func) {\n        return decode_func(cstring, length, errors);\n    } else {\n        return PyUnicode_Decode(cstring, length, encoding, errors);\n    }\n}\n\n/* RaiseTooManyValuesToUnpack */\n  static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {\n    PyErr_Format(PyExc_ValueError,\n                 \"too many values to unpack (expected %\" CYTHON_FORMAT_SSIZE_T \"d)\", expected);\n}\n\n/* RaiseNeedMoreValuesToUnpack */\n  static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {\n    PyErr_Format(PyExc_ValueError,\n                 \"need more than %\" CYTHON_FORMAT_SSIZE_T \"d value%.1s to unpack\",\n                 index, (index == 1) ? \"\" : \"s\");\n}\n\n/* RaiseNoneIterError */\n  static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) {\n    PyErr_SetString(PyExc_TypeError, \"'NoneType' object is not iterable\");\n}\n\n/* SwapException */\n  #if CYTHON_FAST_THREAD_STATE\nstatic CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {\n    PyObject *tmp_type, *tmp_value, *tmp_tb;\n    #if CYTHON_USE_EXC_INFO_STACK\n    _PyErr_StackItem *exc_info = tstate->exc_info;\n    tmp_type = exc_info->exc_type;\n    tmp_value = exc_info->exc_value;\n    tmp_tb = exc_info->exc_traceback;\n    exc_info->exc_type = *type;\n    exc_info->exc_value = *value;\n    exc_info->exc_traceback = *tb;\n    #else\n    tmp_type = tstate->exc_type;\n    tmp_value = tstate->exc_value;\n    tmp_tb = tstate->exc_traceback;\n    tstate->exc_type = *type;\n    tstate->exc_value = *value;\n    tstate->exc_traceback = *tb;\n    #endif\n    *type = tmp_type;\n    *value = tmp_value;\n    *tb = tmp_tb;\n}\n#else\nstatic CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) {\n    PyObject *tmp_type, *tmp_value, *tmp_tb;\n    PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb);\n    PyErr_SetExcInfo(*type, *value, *tb);\n    *type = tmp_type;\n    *value = tmp_value;\n    *tb = tmp_tb;\n}\n#endif\n\n/* FastTypeChecks */\n  #if CYTHON_COMPILING_IN_CPYTHON\nstatic int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {\n    while (a) {\n        a = a->tp_base;\n        if (a == b)\n            return 1;\n    }\n    return b == &PyBaseObject_Type;\n}\nstatic CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {\n    PyObject *mro;\n    if (a == b) return 1;\n    mro = a->tp_mro;\n    if (likely(mro)) {\n        Py_ssize_t i, n;\n        n = PyTuple_GET_SIZE(mro);\n        for (i = 0; i < n; i++) {\n            if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)\n                return 1;\n        }\n        return 0;\n    }\n    return __Pyx_InBases(a, b);\n}\n#if PY_MAJOR_VERSION == 2\nstatic int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) {\n    PyObject *exception, *value, *tb;\n    int res;\n    __Pyx_PyThreadState_declare\n    __Pyx_PyThreadState_assign\n    __Pyx_ErrFetch(&exception, &value, &tb);\n    res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0;\n    if (unlikely(res == -1)) {\n        PyErr_WriteUnraisable(err);\n        res = 0;\n    }\n    if (!res) {\n        res = PyObject_IsSubclass(err, exc_type2);\n        if (unlikely(res == -1)) {\n            PyErr_WriteUnraisable(err);\n            res = 0;\n        }\n    }\n    __Pyx_ErrRestore(exception, value, tb);\n    return res;\n}\n#else\nstatic CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {\n    int res = exc_type1 ? __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type1) : 0;\n    if (!res) {\n        res = __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);\n    }\n    return res;\n}\n#endif\nstatic int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {\n    Py_ssize_t i, n;\n    assert(PyExceptionClass_Check(exc_type));\n    n = PyTuple_GET_SIZE(tuple);\n#if PY_MAJOR_VERSION >= 3\n    for (i=0; i<n; i++) {\n        if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;\n    }\n#endif\n    for (i=0; i<n; i++) {\n        PyObject *t = PyTuple_GET_ITEM(tuple, i);\n        #if PY_MAJOR_VERSION < 3\n        if (likely(exc_type == t)) return 1;\n        #endif\n        if (likely(PyExceptionClass_Check(t))) {\n            if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t)) return 1;\n        } else {\n        }\n    }\n    return 0;\n}\nstatic CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {\n    if (likely(err == exc_type)) return 1;\n    if (likely(PyExceptionClass_Check(err))) {\n        if (likely(PyExceptionClass_Check(exc_type))) {\n            return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);\n        } else if (likely(PyTuple_Check(exc_type))) {\n            return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type);\n        } else {\n        }\n    }\n    return PyErr_GivenExceptionMatches(err, exc_type);\n}\nstatic CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {\n    assert(PyExceptionClass_Check(exc_type1));\n    assert(PyExceptionClass_Check(exc_type2));\n    if (likely(err == exc_type1 || err == exc_type2)) return 1;\n    if (likely(PyExceptionClass_Check(err))) {\n        return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);\n    }\n    return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));\n}\n#endif\n\n/* PyIntBinop */\n  #if !CYTHON_COMPILING_IN_PYPY\nstatic PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, int inplace, int zerodivision_check) {\n    (void)inplace;\n    (void)zerodivision_check;\n    #if PY_MAJOR_VERSION < 3\n    if (likely(PyInt_CheckExact(op1))) {\n        const long b = intval;\n        long x;\n        long a = PyInt_AS_LONG(op1);\n            x = (long)((unsigned long)a + b);\n            if (likely((x^a) >= 0 || (x^b) >= 0))\n                return PyInt_FromLong(x);\n            return PyLong_Type.tp_as_number->nb_add(op1, op2);\n    }\n    #endif\n    #if CYTHON_USE_PYLONG_INTERNALS\n    if (likely(PyLong_CheckExact(op1))) {\n        const long b = intval;\n        long a, x;\n#ifdef HAVE_LONG_LONG\n        const PY_LONG_LONG llb = intval;\n        PY_LONG_LONG lla, llx;\n#endif\n        const digit* digits = ((PyLongObject*)op1)->ob_digit;\n        const Py_ssize_t size = Py_SIZE(op1);\n        if (likely(__Pyx_sst_abs(size) <= 1)) {\n            a = likely(size) ? digits[0] : 0;\n            if (size == -1) a = -a;\n        } else {\n            switch (size) {\n                case -2:\n                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {\n                        a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));\n                        break;\n#ifdef HAVE_LONG_LONG\n                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {\n                        lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));\n                        goto long_long;\n#endif\n                    }\n                    CYTHON_FALLTHROUGH;\n                case 2:\n                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {\n                        a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));\n                        break;\n#ifdef HAVE_LONG_LONG\n                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {\n                        lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));\n                        goto long_long;\n#endif\n                    }\n                    CYTHON_FALLTHROUGH;\n                case -3:\n                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {\n                        a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));\n                        break;\n#ifdef HAVE_LONG_LONG\n                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {\n                        lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));\n                        goto long_long;\n#endif\n                    }\n                    CYTHON_FALLTHROUGH;\n                case 3:\n                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {\n                        a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));\n                        break;\n#ifdef HAVE_LONG_LONG\n                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {\n                        lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));\n                        goto long_long;\n#endif\n                    }\n                    CYTHON_FALLTHROUGH;\n                case -4:\n                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {\n                        a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));\n                        break;\n#ifdef HAVE_LONG_LONG\n                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {\n                        lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));\n                        goto long_long;\n#endif\n                    }\n                    CYTHON_FALLTHROUGH;\n                case 4:\n                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {\n                        a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));\n                        break;\n#ifdef HAVE_LONG_LONG\n                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {\n                        lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));\n                        goto long_long;\n#endif\n                    }\n                    CYTHON_FALLTHROUGH;\n                default: return PyLong_Type.tp_as_number->nb_add(op1, op2);\n            }\n        }\n                x = a + b;\n            return PyLong_FromLong(x);\n#ifdef HAVE_LONG_LONG\n        long_long:\n                llx = lla + llb;\n            return PyLong_FromLongLong(llx);\n#endif\n        \n        \n    }\n    #endif\n    if (PyFloat_CheckExact(op1)) {\n        const long b = intval;\n        double a = PyFloat_AS_DOUBLE(op1);\n            double result;\n            PyFPE_START_PROTECT(\"add\", return NULL)\n            result = ((double)a) + (double)b;\n            PyFPE_END_PROTECT(result)\n            return PyFloat_FromDouble(result);\n    }\n    return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2);\n}\n#endif\n\n/* PyObject_GenericGetAttrNoDict */\n  #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000\nstatic PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) {\n    PyErr_Format(PyExc_AttributeError,\n#if PY_MAJOR_VERSION >= 3\n                 \"'%.50s' object has no attribute '%U'\",\n                 tp->tp_name, attr_name);\n#else\n                 \"'%.50s' object has no attribute '%.400s'\",\n                 tp->tp_name, PyString_AS_STRING(attr_name));\n#endif\n    return NULL;\n}\nstatic CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name) {\n    PyObject *descr;\n    PyTypeObject *tp = Py_TYPE(obj);\n    if (unlikely(!PyString_Check(attr_name))) {\n        return PyObject_GenericGetAttr(obj, attr_name);\n    }\n    assert(!tp->tp_dictoffset);\n    descr = _PyType_Lookup(tp, attr_name);\n    if (unlikely(!descr)) {\n        return __Pyx_RaiseGenericGetAttributeError(tp, attr_name);\n    }\n    Py_INCREF(descr);\n    #if PY_MAJOR_VERSION < 3\n    if (likely(PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_HAVE_CLASS)))\n    #endif\n    {\n        descrgetfunc f = Py_TYPE(descr)->tp_descr_get;\n        if (unlikely(f)) {\n            PyObject *res = f(descr, obj, (PyObject *)tp);\n            Py_DECREF(descr);\n            return res;\n        }\n    }\n    return descr;\n}\n#endif\n\n/* PyObject_GenericGetAttr */\n  #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000\nstatic PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name) {\n    if (unlikely(Py_TYPE(obj)->tp_dictoffset)) {\n        return PyObject_GenericGetAttr(obj, attr_name);\n    }\n    return __Pyx_PyObject_GenericGetAttrNoDict(obj, attr_name);\n}\n#endif\n\n/* SetVTable */\n  static int __Pyx_SetVtable(PyObject *dict, void *vtable) {\n#if PY_VERSION_HEX >= 0x02070000\n    PyObject *ob = PyCapsule_New(vtable, 0, 0);\n#else\n    PyObject *ob = PyCObject_FromVoidPtr(vtable, 0);\n#endif\n    if (!ob)\n        goto bad;\n    if (PyDict_SetItem(dict, __pyx_n_s_pyx_vtable, ob) < 0)\n        goto bad;\n    Py_DECREF(ob);\n    return 0;\nbad:\n    Py_XDECREF(ob);\n    return -1;\n}\n\n/* PyObjectGetAttrStrNoError */\n  static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) {\n    __Pyx_PyThreadState_declare\n    __Pyx_PyThreadState_assign\n    if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))\n        __Pyx_PyErr_Clear();\n}\nstatic CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) {\n    PyObject *result;\n#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS && PY_VERSION_HEX >= 0x030700B1\n    PyTypeObject* tp = Py_TYPE(obj);\n    if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) {\n        return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1);\n    }\n#endif\n    result = __Pyx_PyObject_GetAttrStr(obj, attr_name);\n    if (unlikely(!result)) {\n        __Pyx_PyObject_GetAttrStr_ClearAttributeError();\n    }\n    return result;\n}\n\n/* SetupReduce */\n  static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) {\n  int ret;\n  PyObject *name_attr;\n  name_attr = __Pyx_PyObject_GetAttrStr(meth, __pyx_n_s_name_2);\n  if (likely(name_attr)) {\n      ret = PyObject_RichCompareBool(name_attr, name, Py_EQ);\n  } else {\n      ret = -1;\n  }\n  if (unlikely(ret < 0)) {\n      PyErr_Clear();\n      ret = 0;\n  }\n  Py_XDECREF(name_attr);\n  return ret;\n}\nstatic int __Pyx_setup_reduce(PyObject* type_obj) {\n    int ret = 0;\n    PyObject *object_reduce = NULL;\n    PyObject *object_getstate = NULL;\n    PyObject *object_reduce_ex = NULL;\n    PyObject *reduce = NULL;\n    PyObject *reduce_ex = NULL;\n    PyObject *reduce_cython = NULL;\n    PyObject *setstate = NULL;\n    PyObject *setstate_cython = NULL;\n    PyObject *getstate = NULL;\n#if CYTHON_USE_PYTYPE_LOOKUP\n    getstate = _PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate);\n#else\n    getstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_getstate);\n    if (!getstate && PyErr_Occurred()) {\n        goto __PYX_BAD;\n    }\n#endif\n    if (getstate) {\n#if CYTHON_USE_PYTYPE_LOOKUP\n        object_getstate = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_getstate);\n#else\n        object_getstate = __Pyx_PyObject_GetAttrStrNoError((PyObject*)&PyBaseObject_Type, __pyx_n_s_getstate);\n        if (!object_getstate && PyErr_Occurred()) {\n            goto __PYX_BAD;\n        }\n#endif\n        if (object_getstate != getstate) {\n            goto __PYX_GOOD;\n        }\n    }\n#if CYTHON_USE_PYTYPE_LOOKUP\n    object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;\n#else\n    object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;\n#endif\n    reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD;\n    if (reduce_ex == object_reduce_ex) {\n#if CYTHON_USE_PYTYPE_LOOKUP\n        object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD;\n#else\n        object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD;\n#endif\n        reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto __PYX_BAD;\n        if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) {\n            reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_reduce_cython);\n            if (likely(reduce_cython)) {\n                ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;\n                ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;\n            } else if (reduce == object_reduce || PyErr_Occurred()) {\n                goto __PYX_BAD;\n            }\n            setstate = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate);\n            if (!setstate) PyErr_Clear();\n            if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) {\n                setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate_cython);\n                if (likely(setstate_cython)) {\n                    ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;\n                    ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;\n                } else if (!setstate || PyErr_Occurred()) {\n                    goto __PYX_BAD;\n                }\n            }\n            PyType_Modified((PyTypeObject*)type_obj);\n        }\n    }\n    goto __PYX_GOOD;\n__PYX_BAD:\n    if (!PyErr_Occurred())\n        PyErr_Format(PyExc_RuntimeError, \"Unable to initialize pickling for %s\", ((PyTypeObject*)type_obj)->tp_name);\n    ret = -1;\n__PYX_GOOD:\n#if !CYTHON_USE_PYTYPE_LOOKUP\n    Py_XDECREF(object_reduce);\n    Py_XDECREF(object_reduce_ex);\n    Py_XDECREF(object_getstate);\n    Py_XDECREF(getstate);\n#endif\n    Py_XDECREF(reduce);\n    Py_XDECREF(reduce_ex);\n    Py_XDECREF(reduce_cython);\n    Py_XDECREF(setstate);\n    Py_XDECREF(setstate_cython);\n    return ret;\n}\n\n/* TypeImport */\n  #ifndef __PYX_HAVE_RT_ImportType\n#define __PYX_HAVE_RT_ImportType\nstatic PyTypeObject *__Pyx_ImportType(PyObject *module, const char *module_name, const char *class_name,\n    size_t size, enum __Pyx_ImportType_CheckSize check_size)\n{\n    PyObject *result = 0;\n    char warning[200];\n    Py_ssize_t basicsize;\n#ifdef Py_LIMITED_API\n    PyObject *py_basicsize;\n#endif\n    result = PyObject_GetAttrString(module, class_name);\n    if (!result)\n        goto bad;\n    if (!PyType_Check(result)) {\n        PyErr_Format(PyExc_TypeError,\n            \"%.200s.%.200s is not a type object\",\n            module_name, class_name);\n        goto bad;\n    }\n#ifndef Py_LIMITED_API\n    basicsize = ((PyTypeObject *)result)->tp_basicsize;\n#else\n    py_basicsize = PyObject_GetAttrString(result, \"__basicsize__\");\n    if (!py_basicsize)\n        goto bad;\n    basicsize = PyLong_AsSsize_t(py_basicsize);\n    Py_DECREF(py_basicsize);\n    py_basicsize = 0;\n    if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred())\n        goto bad;\n#endif\n    if ((size_t)basicsize < size) {\n        PyErr_Format(PyExc_ValueError,\n            \"%.200s.%.200s size changed, may indicate binary incompatibility. \"\n            \"Expected %zd from C header, got %zd from PyObject\",\n            module_name, class_name, size, basicsize);\n        goto bad;\n    }\n    if (check_size == __Pyx_ImportType_CheckSize_Error && (size_t)basicsize != size) {\n        PyErr_Format(PyExc_ValueError,\n            \"%.200s.%.200s size changed, may indicate binary incompatibility. \"\n            \"Expected %zd from C header, got %zd from PyObject\",\n            module_name, class_name, size, basicsize);\n        goto bad;\n    }\n    else if (check_size == __Pyx_ImportType_CheckSize_Warn && (size_t)basicsize > size) {\n        PyOS_snprintf(warning, sizeof(warning),\n            \"%s.%s size changed, may indicate binary incompatibility. \"\n            \"Expected %zd from C header, got %zd from PyObject\",\n            module_name, class_name, size, basicsize);\n        if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad;\n    }\n    return (PyTypeObject *)result;\nbad:\n    Py_XDECREF(result);\n    return NULL;\n}\n#endif\n\n/* CLineInTraceback */\n  #ifndef CYTHON_CLINE_IN_TRACEBACK\nstatic int __Pyx_CLineForTraceback(CYTHON_NCP_UNUSED PyThreadState *tstate, int c_line) {\n    PyObject *use_cline;\n    PyObject *ptype, *pvalue, *ptraceback;\n#if CYTHON_COMPILING_IN_CPYTHON\n    PyObject **cython_runtime_dict;\n#endif\n    if (unlikely(!__pyx_cython_runtime)) {\n        return c_line;\n    }\n    __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);\n#if CYTHON_COMPILING_IN_CPYTHON\n    cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);\n    if (likely(cython_runtime_dict)) {\n        __PYX_PY_DICT_LOOKUP_IF_MODIFIED(\n            use_cline, *cython_runtime_dict,\n            __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback))\n    } else\n#endif\n    {\n      PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback);\n      if (use_cline_obj) {\n        use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True;\n        Py_DECREF(use_cline_obj);\n      } else {\n        PyErr_Clear();\n        use_cline = NULL;\n      }\n    }\n    if (!use_cline) {\n        c_line = 0;\n        (void) PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False);\n    }\n    else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) {\n        c_line = 0;\n    }\n    __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);\n    return c_line;\n}\n#endif\n\n/* CodeObjectCache */\n  static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {\n    int start = 0, mid = 0, end = count - 1;\n    if (end >= 0 && code_line > entries[end].code_line) {\n        return count;\n    }\n    while (start < end) {\n        mid = start + (end - start) / 2;\n        if (code_line < entries[mid].code_line) {\n            end = mid;\n        } else if (code_line > entries[mid].code_line) {\n             start = mid + 1;\n        } else {\n            return mid;\n        }\n    }\n    if (code_line <= entries[mid].code_line) {\n        return mid;\n    } else {\n        return mid + 1;\n    }\n}\nstatic PyCodeObject *__pyx_find_code_object(int code_line) {\n    PyCodeObject* code_object;\n    int pos;\n    if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {\n        return NULL;\n    }\n    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);\n    if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {\n        return NULL;\n    }\n    code_object = __pyx_code_cache.entries[pos].code_object;\n    Py_INCREF(code_object);\n    return code_object;\n}\nstatic void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {\n    int pos, i;\n    __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;\n    if (unlikely(!code_line)) {\n        return;\n    }\n    if (unlikely(!entries)) {\n        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));\n        if (likely(entries)) {\n            __pyx_code_cache.entries = entries;\n            __pyx_code_cache.max_count = 64;\n            __pyx_code_cache.count = 1;\n            entries[0].code_line = code_line;\n            entries[0].code_object = code_object;\n            Py_INCREF(code_object);\n        }\n        return;\n    }\n    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);\n    if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {\n        PyCodeObject* tmp = entries[pos].code_object;\n        entries[pos].code_object = code_object;\n        Py_DECREF(tmp);\n        return;\n    }\n    if (__pyx_code_cache.count == __pyx_code_cache.max_count) {\n        int new_max = __pyx_code_cache.max_count + 64;\n        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(\n            __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry));\n        if (unlikely(!entries)) {\n            return;\n        }\n        __pyx_code_cache.entries = entries;\n        __pyx_code_cache.max_count = new_max;\n    }\n    for (i=__pyx_code_cache.count; i>pos; i--) {\n        entries[i] = entries[i-1];\n    }\n    entries[pos].code_line = code_line;\n    entries[pos].code_object = code_object;\n    __pyx_code_cache.count++;\n    Py_INCREF(code_object);\n}\n\n/* AddTraceback */\n  #include \"compile.h\"\n#include \"frameobject.h\"\n#include \"traceback.h\"\n#if PY_VERSION_HEX >= 0x030b00a6\n  #ifndef Py_BUILD_CORE\n    #define Py_BUILD_CORE 1\n  #endif\n  #include \"internal/pycore_frame.h\"\n#endif\nstatic PyCodeObject* __Pyx_CreateCodeObjectForTraceback(\n            const char *funcname, int c_line,\n            int py_line, const char *filename) {\n    PyCodeObject *py_code = NULL;\n    PyObject *py_funcname = NULL;\n    #if PY_MAJOR_VERSION < 3\n    PyObject *py_srcfile = NULL;\n    py_srcfile = PyString_FromString(filename);\n    if (!py_srcfile) goto bad;\n    #endif\n    if (c_line) {\n        #if PY_MAJOR_VERSION < 3\n        py_funcname = PyString_FromFormat( \"%s (%s:%d)\", funcname, __pyx_cfilenm, c_line);\n        if (!py_funcname) goto bad;\n        #else\n        py_funcname = PyUnicode_FromFormat( \"%s (%s:%d)\", funcname, __pyx_cfilenm, c_line);\n        if (!py_funcname) goto bad;\n        funcname = PyUnicode_AsUTF8(py_funcname);\n        if (!funcname) goto bad;\n        #endif\n    }\n    else {\n        #if PY_MAJOR_VERSION < 3\n        py_funcname = PyString_FromString(funcname);\n        if (!py_funcname) goto bad;\n        #endif\n    }\n    #if PY_MAJOR_VERSION < 3\n    py_code = __Pyx_PyCode_New(\n        0,\n        0,\n        0,\n        0,\n        0,\n        __pyx_empty_bytes, /*PyObject *code,*/\n        __pyx_empty_tuple, /*PyObject *consts,*/\n        __pyx_empty_tuple, /*PyObject *names,*/\n        __pyx_empty_tuple, /*PyObject *varnames,*/\n        __pyx_empty_tuple, /*PyObject *freevars,*/\n        __pyx_empty_tuple, /*PyObject *cellvars,*/\n        py_srcfile,   /*PyObject *filename,*/\n        py_funcname,  /*PyObject *name,*/\n        py_line,\n        __pyx_empty_bytes  /*PyObject *lnotab*/\n    );\n    Py_DECREF(py_srcfile);\n    #else\n    py_code = PyCode_NewEmpty(filename, funcname, py_line);\n    #endif\n    Py_XDECREF(py_funcname);  // XDECREF since it's only set on Py3 if cline\n    return py_code;\nbad:\n    Py_XDECREF(py_funcname);\n    #if PY_MAJOR_VERSION < 3\n    Py_XDECREF(py_srcfile);\n    #endif\n    return NULL;\n}\nstatic void __Pyx_AddTraceback(const char *funcname, int c_line,\n                               int py_line, const char *filename) {\n    PyCodeObject *py_code = 0;\n    PyFrameObject *py_frame = 0;\n    PyThreadState *tstate = __Pyx_PyThreadState_Current;\n    PyObject *ptype, *pvalue, *ptraceback;\n    if (c_line) {\n        c_line = __Pyx_CLineForTraceback(tstate, c_line);\n    }\n    py_code = __pyx_find_code_object(c_line ? -c_line : py_line);\n    if (!py_code) {\n        __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);\n        py_code = __Pyx_CreateCodeObjectForTraceback(\n            funcname, c_line, py_line, filename);\n        if (!py_code) {\n            /* If the code object creation fails, then we should clear the\n               fetched exception references and propagate the new exception */\n            Py_XDECREF(ptype);\n            Py_XDECREF(pvalue);\n            Py_XDECREF(ptraceback);\n            goto bad;\n        }\n        __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);\n        __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);\n    }\n    py_frame = PyFrame_New(\n        tstate,            /*PyThreadState *tstate,*/\n        py_code,           /*PyCodeObject *code,*/\n        __pyx_d,    /*PyObject *globals,*/\n        0                  /*PyObject *locals*/\n    );\n    if (!py_frame) goto bad;\n    __Pyx_PyFrame_SetLineNumber(py_frame, py_line);\n    PyTraceBack_Here(py_frame);\nbad:\n    Py_XDECREF(py_code);\n    Py_XDECREF(py_frame);\n}\n\n#if PY_MAJOR_VERSION < 3\nstatic int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags) {\n    if (PyObject_CheckBuffer(obj)) return PyObject_GetBuffer(obj, view, flags);\n        if (__Pyx_TypeCheck(obj, __pyx_array_type)) return __pyx_array_getbuffer(obj, view, flags);\n        if (__Pyx_TypeCheck(obj, __pyx_memoryview_type)) return __pyx_memoryview_getbuffer(obj, view, flags);\n    PyErr_Format(PyExc_TypeError, \"'%.200s' does not have the buffer interface\", Py_TYPE(obj)->tp_name);\n    return -1;\n}\nstatic void __Pyx_ReleaseBuffer(Py_buffer *view) {\n    PyObject *obj = view->obj;\n    if (!obj) return;\n    if (PyObject_CheckBuffer(obj)) {\n        PyBuffer_Release(view);\n        return;\n    }\n    if ((0)) {}\n    view->obj = NULL;\n    Py_DECREF(obj);\n}\n#endif\n\n\n  /* MemviewSliceIsContig */\n  static int\n__pyx_memviewslice_is_contig(const __Pyx_memviewslice mvs, char order, int ndim)\n{\n    int i, index, step, start;\n    Py_ssize_t itemsize = mvs.memview->view.itemsize;\n    if (order == 'F') {\n        step = 1;\n        start = 0;\n    } else {\n        step = -1;\n        start = ndim - 1;\n    }\n    for (i = 0; i < ndim; i++) {\n        index = start + step * i;\n        if (mvs.suboffsets[index] >= 0 || mvs.strides[index] != itemsize)\n            return 0;\n        itemsize *= mvs.shape[index];\n    }\n    return 1;\n}\n\n/* OverlappingSlices */\n  static void\n__pyx_get_array_memory_extents(__Pyx_memviewslice *slice,\n                               void **out_start, void **out_end,\n                               int ndim, size_t itemsize)\n{\n    char *start, *end;\n    int i;\n    start = end = slice->data;\n    for (i = 0; i < ndim; i++) {\n        Py_ssize_t stride = slice->strides[i];\n        Py_ssize_t extent = slice->shape[i];\n        if (extent == 0) {\n            *out_start = *out_end = start;\n            return;\n        } else {\n            if (stride > 0)\n                end += stride * (extent - 1);\n            else\n                start += stride * (extent - 1);\n        }\n    }\n    *out_start = start;\n    *out_end = end + itemsize;\n}\nstatic int\n__pyx_slices_overlap(__Pyx_memviewslice *slice1,\n                     __Pyx_memviewslice *slice2,\n                     int ndim, size_t itemsize)\n{\n    void *start1, *end1, *start2, *end2;\n    __pyx_get_array_memory_extents(slice1, &start1, &end1, ndim, itemsize);\n    __pyx_get_array_memory_extents(slice2, &start2, &end2, ndim, itemsize);\n    return (start1 < end2) && (start2 < end1);\n}\n\n/* Capsule */\n  static CYTHON_INLINE PyObject *\n__pyx_capsule_create(void *p, CYTHON_UNUSED const char *sig)\n{\n    PyObject *cobj;\n#if PY_VERSION_HEX >= 0x02070000\n    cobj = PyCapsule_New(p, sig, NULL);\n#else\n    cobj = PyCObject_FromVoidPtr(p, NULL);\n#endif\n    return cobj;\n}\n\n/* CIntFromPyVerify */\n  #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\\\n    __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)\n#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\\\n    __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)\n#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\\\n    {\\\n        func_type value = func_value;\\\n        if (sizeof(target_type) < sizeof(func_type)) {\\\n            if (unlikely(value != (func_type) (target_type) value)) {\\\n                func_type zero = 0;\\\n                if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\\\n                    return (target_type) -1;\\\n                if (is_unsigned && unlikely(value < zero))\\\n                    goto raise_neg_overflow;\\\n                else\\\n                    goto raise_overflow;\\\n            }\\\n        }\\\n        return (target_type) value;\\\n    }\n\n/* TypeInfoCompare */\n  static int\n__pyx_typeinfo_cmp(__Pyx_TypeInfo *a, __Pyx_TypeInfo *b)\n{\n    int i;\n    if (!a || !b)\n        return 0;\n    if (a == b)\n        return 1;\n    if (a->size != b->size || a->typegroup != b->typegroup ||\n            a->is_unsigned != b->is_unsigned || a->ndim != b->ndim) {\n        if (a->typegroup == 'H' || b->typegroup == 'H') {\n            return a->size == b->size;\n        } else {\n            return 0;\n        }\n    }\n    if (a->ndim) {\n        for (i = 0; i < a->ndim; i++)\n            if (a->arraysize[i] != b->arraysize[i])\n                return 0;\n    }\n    if (a->typegroup == 'S') {\n        if (a->flags != b->flags)\n            return 0;\n        if (a->fields || b->fields) {\n            if (!(a->fields && b->fields))\n                return 0;\n            for (i = 0; a->fields[i].type && b->fields[i].type; i++) {\n                __Pyx_StructField *field_a = a->fields + i;\n                __Pyx_StructField *field_b = b->fields + i;\n                if (field_a->offset != field_b->offset ||\n                    !__pyx_typeinfo_cmp(field_a->type, field_b->type))\n                    return 0;\n            }\n            return !a->fields[i].type && !b->fields[i].type;\n        }\n    }\n    return 1;\n}\n\n/* MemviewSliceValidateAndInit */\n  static int\n__pyx_check_strides(Py_buffer *buf, int dim, int ndim, int spec)\n{\n    if (buf->shape[dim] <= 1)\n        return 1;\n    if (buf->strides) {\n        if (spec & __Pyx_MEMVIEW_CONTIG) {\n            if (spec & (__Pyx_MEMVIEW_PTR|__Pyx_MEMVIEW_FULL)) {\n                if (unlikely(buf->strides[dim] != sizeof(void *))) {\n                    PyErr_Format(PyExc_ValueError,\n                                 \"Buffer is not indirectly contiguous \"\n                                 \"in dimension %d.\", dim);\n                    goto fail;\n                }\n            } else if (unlikely(buf->strides[dim] != buf->itemsize)) {\n                PyErr_SetString(PyExc_ValueError,\n                                \"Buffer and memoryview are not contiguous \"\n                                \"in the same dimension.\");\n                goto fail;\n            }\n        }\n        if (spec & __Pyx_MEMVIEW_FOLLOW) {\n            Py_ssize_t stride = buf->strides[dim];\n            if (stride < 0)\n                stride = -stride;\n            if (unlikely(stride < buf->itemsize)) {\n                PyErr_SetString(PyExc_ValueError,\n                                \"Buffer and memoryview are not contiguous \"\n                                \"in the same dimension.\");\n                goto fail;\n            }\n        }\n    } else {\n        if (unlikely(spec & __Pyx_MEMVIEW_CONTIG && dim != ndim - 1)) {\n            PyErr_Format(PyExc_ValueError,\n                         \"C-contiguous buffer is not contiguous in \"\n                         \"dimension %d\", dim);\n            goto fail;\n        } else if (unlikely(spec & (__Pyx_MEMVIEW_PTR))) {\n            PyErr_Format(PyExc_ValueError,\n                         \"C-contiguous buffer is not indirect in \"\n                         \"dimension %d\", dim);\n            goto fail;\n        } else if (unlikely(buf->suboffsets)) {\n            PyErr_SetString(PyExc_ValueError,\n                            \"Buffer exposes suboffsets but no strides\");\n            goto fail;\n        }\n    }\n    return 1;\nfail:\n    return 0;\n}\nstatic int\n__pyx_check_suboffsets(Py_buffer *buf, int dim, CYTHON_UNUSED int ndim, int spec)\n{\n    if (spec & __Pyx_MEMVIEW_DIRECT) {\n        if (unlikely(buf->suboffsets && buf->suboffsets[dim] >= 0)) {\n            PyErr_Format(PyExc_ValueError,\n                         \"Buffer not compatible with direct access \"\n                         \"in dimension %d.\", dim);\n            goto fail;\n        }\n    }\n    if (spec & __Pyx_MEMVIEW_PTR) {\n        if (unlikely(!buf->suboffsets || (buf->suboffsets[dim] < 0))) {\n            PyErr_Format(PyExc_ValueError,\n                         \"Buffer is not indirectly accessible \"\n                         \"in dimension %d.\", dim);\n            goto fail;\n        }\n    }\n    return 1;\nfail:\n    return 0;\n}\nstatic int\n__pyx_verify_contig(Py_buffer *buf, int ndim, int c_or_f_flag)\n{\n    int i;\n    if (c_or_f_flag & __Pyx_IS_F_CONTIG) {\n        Py_ssize_t stride = 1;\n        for (i = 0; i < ndim; i++) {\n            if (unlikely(stride * buf->itemsize != buf->strides[i]  &&  buf->shape[i] > 1)) {\n                PyErr_SetString(PyExc_ValueError,\n                    \"Buffer not fortran contiguous.\");\n                goto fail;\n            }\n            stride = stride * buf->shape[i];\n        }\n    } else if (c_or_f_flag & __Pyx_IS_C_CONTIG) {\n        Py_ssize_t stride = 1;\n        for (i = ndim - 1; i >- 1; i--) {\n            if (unlikely(stride * buf->itemsize != buf->strides[i]  &&  buf->shape[i] > 1)) {\n                PyErr_SetString(PyExc_ValueError,\n                    \"Buffer not C contiguous.\");\n                goto fail;\n            }\n            stride = stride * buf->shape[i];\n        }\n    }\n    return 1;\nfail:\n    return 0;\n}\nstatic int __Pyx_ValidateAndInit_memviewslice(\n                int *axes_specs,\n                int c_or_f_flag,\n                int buf_flags,\n                int ndim,\n                __Pyx_TypeInfo *dtype,\n                __Pyx_BufFmt_StackElem stack[],\n                __Pyx_memviewslice *memviewslice,\n                PyObject *original_obj)\n{\n    struct __pyx_memoryview_obj *memview, *new_memview;\n    __Pyx_RefNannyDeclarations\n    Py_buffer *buf;\n    int i, spec = 0, retval = -1;\n    __Pyx_BufFmt_Context ctx;\n    int from_memoryview = __pyx_memoryview_check(original_obj);\n    __Pyx_RefNannySetupContext(\"ValidateAndInit_memviewslice\", 0);\n    if (from_memoryview && __pyx_typeinfo_cmp(dtype, ((struct __pyx_memoryview_obj *)\n                                                            original_obj)->typeinfo)) {\n        memview = (struct __pyx_memoryview_obj *) original_obj;\n        new_memview = NULL;\n    } else {\n        memview = (struct __pyx_memoryview_obj *) __pyx_memoryview_new(\n                                            original_obj, buf_flags, 0, dtype);\n        new_memview = memview;\n        if (unlikely(!memview))\n            goto fail;\n    }\n    buf = &memview->view;\n    if (unlikely(buf->ndim != ndim)) {\n        PyErr_Format(PyExc_ValueError,\n                \"Buffer has wrong number of dimensions (expected %d, got %d)\",\n                ndim, buf->ndim);\n        goto fail;\n    }\n    if (new_memview) {\n        __Pyx_BufFmt_Init(&ctx, stack, dtype);\n        if (unlikely(!__Pyx_BufFmt_CheckString(&ctx, buf->format))) goto fail;\n    }\n    if (unlikely((unsigned) buf->itemsize != dtype->size)) {\n        PyErr_Format(PyExc_ValueError,\n                     \"Item size of buffer (%\" CYTHON_FORMAT_SSIZE_T \"u byte%s) \"\n                     \"does not match size of '%s' (%\" CYTHON_FORMAT_SSIZE_T \"u byte%s)\",\n                     buf->itemsize,\n                     (buf->itemsize > 1) ? \"s\" : \"\",\n                     dtype->name,\n                     dtype->size,\n                     (dtype->size > 1) ? \"s\" : \"\");\n        goto fail;\n    }\n    if (buf->len > 0) {\n        for (i = 0; i < ndim; i++) {\n            spec = axes_specs[i];\n            if (unlikely(!__pyx_check_strides(buf, i, ndim, spec)))\n                goto fail;\n            if (unlikely(!__pyx_check_suboffsets(buf, i, ndim, spec)))\n                goto fail;\n        }\n        if (unlikely(buf->strides && !__pyx_verify_contig(buf, ndim, c_or_f_flag)))\n            goto fail;\n    }\n    if (unlikely(__Pyx_init_memviewslice(memview, ndim, memviewslice,\n                                         new_memview != NULL) == -1)) {\n        goto fail;\n    }\n    retval = 0;\n    goto no_fail;\nfail:\n    Py_XDECREF(new_memview);\n    retval = -1;\nno_fail:\n    __Pyx_RefNannyFinishContext();\n    return retval;\n}\n\n/* ObjectToMemviewSlice */\n  static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dsdsds_float(PyObject *obj, int writable_flag) {\n    __Pyx_memviewslice result = { 0, 0, { 0 }, { 0 }, { 0 } };\n    __Pyx_BufFmt_StackElem stack[1];\n    int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_STRIDED), (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_STRIDED), (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_STRIDED) };\n    int retcode;\n    if (obj == Py_None) {\n        result.memview = (struct __pyx_memoryview_obj *) Py_None;\n        return result;\n    }\n    retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, 0,\n                                                 PyBUF_RECORDS_RO | writable_flag, 3,\n                                                 &__Pyx_TypeInfo_float, stack,\n                                                 &result, obj);\n    if (unlikely(retcode == -1))\n        goto __pyx_fail;\n    return result;\n__pyx_fail:\n    result.memview = NULL;\n    result.data = NULL;\n    return result;\n}\n\n/* ObjectToMemviewSlice */\n  static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dsdsdsds_float(PyObject *obj, int writable_flag) {\n    __Pyx_memviewslice result = { 0, 0, { 0 }, { 0 }, { 0 } };\n    __Pyx_BufFmt_StackElem stack[1];\n    int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_STRIDED), (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_STRIDED), (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_STRIDED), (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_STRIDED) };\n    int retcode;\n    if (obj == Py_None) {\n        result.memview = (struct __pyx_memoryview_obj *) Py_None;\n        return result;\n    }\n    retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, 0,\n                                                 PyBUF_RECORDS_RO | writable_flag, 4,\n                                                 &__Pyx_TypeInfo_float, stack,\n                                                 &result, obj);\n    if (unlikely(retcode == -1))\n        goto __pyx_fail;\n    return result;\n__pyx_fail:\n    result.memview = NULL;\n    result.data = NULL;\n    return result;\n}\n\n/* ObjectToMemviewSlice */\n  static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dsds_float(PyObject *obj, int writable_flag) {\n    __Pyx_memviewslice result = { 0, 0, { 0 }, { 0 }, { 0 } };\n    __Pyx_BufFmt_StackElem stack[1];\n    int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_STRIDED), (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_STRIDED) };\n    int retcode;\n    if (obj == Py_None) {\n        result.memview = (struct __pyx_memoryview_obj *) Py_None;\n        return result;\n    }\n    retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, 0,\n                                                 PyBUF_RECORDS_RO | writable_flag, 2,\n                                                 &__Pyx_TypeInfo_float, stack,\n                                                 &result, obj);\n    if (unlikely(retcode == -1))\n        goto __pyx_fail;\n    return result;\n__pyx_fail:\n    result.memview = NULL;\n    result.data = NULL;\n    return result;\n}\n\n/* ObjectToMemviewSlice */\n  static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dsds_int(PyObject *obj, int writable_flag) {\n    __Pyx_memviewslice result = { 0, 0, { 0 }, { 0 }, { 0 } };\n    __Pyx_BufFmt_StackElem stack[1];\n    int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_STRIDED), (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_STRIDED) };\n    int retcode;\n    if (obj == Py_None) {\n        result.memview = (struct __pyx_memoryview_obj *) Py_None;\n        return result;\n    }\n    retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, 0,\n                                                 PyBUF_RECORDS_RO | writable_flag, 2,\n                                                 &__Pyx_TypeInfo_int, stack,\n                                                 &result, obj);\n    if (unlikely(retcode == -1))\n        goto __pyx_fail;\n    return result;\n__pyx_fail:\n    result.memview = NULL;\n    result.data = NULL;\n    return result;\n}\n\n/* ObjectToMemviewSlice */\n  static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_int(PyObject *obj, int writable_flag) {\n    __Pyx_memviewslice result = { 0, 0, { 0 }, { 0 }, { 0 } };\n    __Pyx_BufFmt_StackElem stack[1];\n    int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_STRIDED) };\n    int retcode;\n    if (obj == Py_None) {\n        result.memview = (struct __pyx_memoryview_obj *) Py_None;\n        return result;\n    }\n    retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, 0,\n                                                 PyBUF_RECORDS_RO | writable_flag, 1,\n                                                 &__Pyx_TypeInfo_int, stack,\n                                                 &result, obj);\n    if (unlikely(retcode == -1))\n        goto __pyx_fail;\n    return result;\n__pyx_fail:\n    result.memview = NULL;\n    result.data = NULL;\n    return result;\n}\n\n/* ObjectToMemviewSlice */\n  static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_float(PyObject *obj, int writable_flag) {\n    __Pyx_memviewslice result = { 0, 0, { 0 }, { 0 }, { 0 } };\n    __Pyx_BufFmt_StackElem stack[1];\n    int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_STRIDED) };\n    int retcode;\n    if (obj == Py_None) {\n        result.memview = (struct __pyx_memoryview_obj *) Py_None;\n        return result;\n    }\n    retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, 0,\n                                                 PyBUF_RECORDS_RO | writable_flag, 1,\n                                                 &__Pyx_TypeInfo_float, stack,\n                                                 &result, obj);\n    if (unlikely(retcode == -1))\n        goto __pyx_fail;\n    return result;\n__pyx_fail:\n    result.memview = NULL;\n    result.data = NULL;\n    return result;\n}\n\n/* Print */\n  #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION < 3\nstatic PyObject *__Pyx_GetStdout(void) {\n    PyObject *f = PySys_GetObject((char *)\"stdout\");\n    if (!f) {\n        PyErr_SetString(PyExc_RuntimeError, \"lost sys.stdout\");\n    }\n    return f;\n}\nstatic int __Pyx_Print(PyObject* f, PyObject *arg_tuple, int newline) {\n    int i;\n    if (!f) {\n        if (!(f = __Pyx_GetStdout()))\n            return -1;\n    }\n    Py_INCREF(f);\n    for (i=0; i < PyTuple_GET_SIZE(arg_tuple); i++) {\n        PyObject* v;\n        if (PyFile_SoftSpace(f, 1)) {\n            if (PyFile_WriteString(\" \", f) < 0)\n                goto error;\n        }\n        v = PyTuple_GET_ITEM(arg_tuple, i);\n        if (PyFile_WriteObject(v, f, Py_PRINT_RAW) < 0)\n            goto error;\n        if (PyString_Check(v)) {\n            char *s = PyString_AsString(v);\n            Py_ssize_t len = PyString_Size(v);\n            if (len > 0) {\n                switch (s[len-1]) {\n                    case ' ': break;\n                    case '\\f': case '\\r': case '\\n': case '\\t': case '\\v':\n                        PyFile_SoftSpace(f, 0);\n                        break;\n                    default:  break;\n                }\n            }\n        }\n    }\n    if (newline) {\n        if (PyFile_WriteString(\"\\n\", f) < 0)\n            goto error;\n        PyFile_SoftSpace(f, 0);\n    }\n    Py_DECREF(f);\n    return 0;\nerror:\n    Py_DECREF(f);\n    return -1;\n}\n#else\nstatic int __Pyx_Print(PyObject* stream, PyObject *arg_tuple, int newline) {\n    PyObject* kwargs = 0;\n    PyObject* result = 0;\n    PyObject* end_string;\n    if (unlikely(!__pyx_print)) {\n        __pyx_print = PyObject_GetAttr(__pyx_b, __pyx_n_s_print);\n        if (!__pyx_print)\n            return -1;\n    }\n    if (stream) {\n        kwargs = PyDict_New();\n        if (unlikely(!kwargs))\n            return -1;\n        if (unlikely(PyDict_SetItem(kwargs, __pyx_n_s_file, stream) < 0))\n            goto bad;\n        if (!newline) {\n            end_string = PyUnicode_FromStringAndSize(\" \", 1);\n            if (unlikely(!end_string))\n                goto bad;\n            if (PyDict_SetItem(kwargs, __pyx_n_s_end, end_string) < 0) {\n                Py_DECREF(end_string);\n                goto bad;\n            }\n            Py_DECREF(end_string);\n        }\n    } else if (!newline) {\n        if (unlikely(!__pyx_print_kwargs)) {\n            __pyx_print_kwargs = PyDict_New();\n            if (unlikely(!__pyx_print_kwargs))\n                return -1;\n            end_string = PyUnicode_FromStringAndSize(\" \", 1);\n            if (unlikely(!end_string))\n                return -1;\n            if (PyDict_SetItem(__pyx_print_kwargs, __pyx_n_s_end, end_string) < 0) {\n                Py_DECREF(end_string);\n                return -1;\n            }\n            Py_DECREF(end_string);\n        }\n        kwargs = __pyx_print_kwargs;\n    }\n    result = PyObject_Call(__pyx_print, arg_tuple, kwargs);\n    if (unlikely(kwargs) && (kwargs != __pyx_print_kwargs))\n        Py_DECREF(kwargs);\n    if (!result)\n        return -1;\n    Py_DECREF(result);\n    return 0;\nbad:\n    if (kwargs != __pyx_print_kwargs)\n        Py_XDECREF(kwargs);\n    return -1;\n}\n#endif\n\n/* Declarations */\n  #if CYTHON_CCOMPLEX\n  #ifdef __cplusplus\n    static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {\n      return ::std::complex< float >(x, y);\n    }\n  #else\n    static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {\n      return x + y*(__pyx_t_float_complex)_Complex_I;\n    }\n  #endif\n#else\n    static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {\n      __pyx_t_float_complex z;\n      z.real = x;\n      z.imag = y;\n      return z;\n    }\n#endif\n\n/* Arithmetic */\n  #if CYTHON_CCOMPLEX\n#else\n    static CYTHON_INLINE int __Pyx_c_eq_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {\n       return (a.real == b.real) && (a.imag == b.imag);\n    }\n    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {\n        __pyx_t_float_complex z;\n        z.real = a.real + b.real;\n        z.imag = a.imag + b.imag;\n        return z;\n    }\n    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {\n        __pyx_t_float_complex z;\n        z.real = a.real - b.real;\n        z.imag = a.imag - b.imag;\n        return z;\n    }\n    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {\n        __pyx_t_float_complex z;\n        z.real = a.real * b.real - a.imag * b.imag;\n        z.imag = a.real * b.imag + a.imag * b.real;\n        return z;\n    }\n    #if 1\n    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {\n        if (b.imag == 0) {\n            return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.real);\n        } else if (fabsf(b.real) >= fabsf(b.imag)) {\n            if (b.real == 0 && b.imag == 0) {\n                return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.imag);\n            } else {\n                float r = b.imag / b.real;\n                float s = (float)(1.0) / (b.real + b.imag * r);\n                return __pyx_t_float_complex_from_parts(\n                    (a.real + a.imag * r) * s, (a.imag - a.real * r) * s);\n            }\n        } else {\n            float r = b.real / b.imag;\n            float s = (float)(1.0) / (b.imag + b.real * r);\n            return __pyx_t_float_complex_from_parts(\n                (a.real * r + a.imag) * s, (a.imag * r - a.real) * s);\n        }\n    }\n    #else\n    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {\n        if (b.imag == 0) {\n            return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.real);\n        } else {\n            float denom = b.real * b.real + b.imag * b.imag;\n            return __pyx_t_float_complex_from_parts(\n                (a.real * b.real + a.imag * b.imag) / denom,\n                (a.imag * b.real - a.real * b.imag) / denom);\n        }\n    }\n    #endif\n    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex a) {\n        __pyx_t_float_complex z;\n        z.real = -a.real;\n        z.imag = -a.imag;\n        return z;\n    }\n    static CYTHON_INLINE int __Pyx_c_is_zero_float(__pyx_t_float_complex a) {\n       return (a.real == 0) && (a.imag == 0);\n    }\n    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex a) {\n        __pyx_t_float_complex z;\n        z.real =  a.real;\n        z.imag = -a.imag;\n        return z;\n    }\n    #if 1\n        static CYTHON_INLINE float __Pyx_c_abs_float(__pyx_t_float_complex z) {\n          #if !defined(HAVE_HYPOT) || defined(_MSC_VER)\n            return sqrtf(z.real*z.real + z.imag*z.imag);\n          #else\n            return hypotf(z.real, z.imag);\n          #endif\n        }\n        static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {\n            __pyx_t_float_complex z;\n            float r, lnr, theta, z_r, z_theta;\n            if (b.imag == 0 && b.real == (int)b.real) {\n                if (b.real < 0) {\n                    float denom = a.real * a.real + a.imag * a.imag;\n                    a.real = a.real / denom;\n                    a.imag = -a.imag / denom;\n                    b.real = -b.real;\n                }\n                switch ((int)b.real) {\n                    case 0:\n                        z.real = 1;\n                        z.imag = 0;\n                        return z;\n                    case 1:\n                        return a;\n                    case 2:\n                        return __Pyx_c_prod_float(a, a);\n                    case 3:\n                        z = __Pyx_c_prod_float(a, a);\n                        return __Pyx_c_prod_float(z, a);\n                    case 4:\n                        z = __Pyx_c_prod_float(a, a);\n                        return __Pyx_c_prod_float(z, z);\n                }\n            }\n            if (a.imag == 0) {\n                if (a.real == 0) {\n                    return a;\n                } else if (b.imag == 0) {\n                    z.real = powf(a.real, b.real);\n                    z.imag = 0;\n                    return z;\n                } else if (a.real > 0) {\n                    r = a.real;\n                    theta = 0;\n                } else {\n                    r = -a.real;\n                    theta = atan2f(0.0, -1.0);\n                }\n            } else {\n                r = __Pyx_c_abs_float(a);\n                theta = atan2f(a.imag, a.real);\n            }\n            lnr = logf(r);\n            z_r = expf(lnr * b.real - theta * b.imag);\n            z_theta = theta * b.real + lnr * b.imag;\n            z.real = z_r * cosf(z_theta);\n            z.imag = z_r * sinf(z_theta);\n            return z;\n        }\n    #endif\n#endif\n\n/* Declarations */\n  #if CYTHON_CCOMPLEX\n  #ifdef __cplusplus\n    static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {\n      return ::std::complex< double >(x, y);\n    }\n  #else\n    static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {\n      return x + y*(__pyx_t_double_complex)_Complex_I;\n    }\n  #endif\n#else\n    static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {\n      __pyx_t_double_complex z;\n      z.real = x;\n      z.imag = y;\n      return z;\n    }\n#endif\n\n/* Arithmetic */\n  #if CYTHON_CCOMPLEX\n#else\n    static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {\n       return (a.real == b.real) && (a.imag == b.imag);\n    }\n    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {\n        __pyx_t_double_complex z;\n        z.real = a.real + b.real;\n        z.imag = a.imag + b.imag;\n        return z;\n    }\n    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {\n        __pyx_t_double_complex z;\n        z.real = a.real - b.real;\n        z.imag = a.imag - b.imag;\n        return z;\n    }\n    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {\n        __pyx_t_double_complex z;\n        z.real = a.real * b.real - a.imag * b.imag;\n        z.imag = a.real * b.imag + a.imag * b.real;\n        return z;\n    }\n    #if 1\n    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {\n        if (b.imag == 0) {\n            return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real);\n        } else if (fabs(b.real) >= fabs(b.imag)) {\n            if (b.real == 0 && b.imag == 0) {\n                return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.imag);\n            } else {\n                double r = b.imag / b.real;\n                double s = (double)(1.0) / (b.real + b.imag * r);\n                return __pyx_t_double_complex_from_parts(\n                    (a.real + a.imag * r) * s, (a.imag - a.real * r) * s);\n            }\n        } else {\n            double r = b.real / b.imag;\n            double s = (double)(1.0) / (b.imag + b.real * r);\n            return __pyx_t_double_complex_from_parts(\n                (a.real * r + a.imag) * s, (a.imag * r - a.real) * s);\n        }\n    }\n    #else\n    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {\n        if (b.imag == 0) {\n            return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real);\n        } else {\n            double denom = b.real * b.real + b.imag * b.imag;\n            return __pyx_t_double_complex_from_parts(\n                (a.real * b.real + a.imag * b.imag) / denom,\n                (a.imag * b.real - a.real * b.imag) / denom);\n        }\n    }\n    #endif\n    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex a) {\n        __pyx_t_double_complex z;\n        z.real = -a.real;\n        z.imag = -a.imag;\n        return z;\n    }\n    static CYTHON_INLINE int __Pyx_c_is_zero_double(__pyx_t_double_complex a) {\n       return (a.real == 0) && (a.imag == 0);\n    }\n    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex a) {\n        __pyx_t_double_complex z;\n        z.real =  a.real;\n        z.imag = -a.imag;\n        return z;\n    }\n    #if 1\n        static CYTHON_INLINE double __Pyx_c_abs_double(__pyx_t_double_complex z) {\n          #if !defined(HAVE_HYPOT) || defined(_MSC_VER)\n            return sqrt(z.real*z.real + z.imag*z.imag);\n          #else\n            return hypot(z.real, z.imag);\n          #endif\n        }\n        static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {\n            __pyx_t_double_complex z;\n            double r, lnr, theta, z_r, z_theta;\n            if (b.imag == 0 && b.real == (int)b.real) {\n                if (b.real < 0) {\n                    double denom = a.real * a.real + a.imag * a.imag;\n                    a.real = a.real / denom;\n                    a.imag = -a.imag / denom;\n                    b.real = -b.real;\n                }\n                switch ((int)b.real) {\n                    case 0:\n                        z.real = 1;\n                        z.imag = 0;\n                        return z;\n                    case 1:\n                        return a;\n                    case 2:\n                        return __Pyx_c_prod_double(a, a);\n                    case 3:\n                        z = __Pyx_c_prod_double(a, a);\n                        return __Pyx_c_prod_double(z, a);\n                    case 4:\n                        z = __Pyx_c_prod_double(a, a);\n                        return __Pyx_c_prod_double(z, z);\n                }\n            }\n            if (a.imag == 0) {\n                if (a.real == 0) {\n                    return a;\n                } else if (b.imag == 0) {\n                    z.real = pow(a.real, b.real);\n                    z.imag = 0;\n                    return z;\n                } else if (a.real > 0) {\n                    r = a.real;\n                    theta = 0;\n                } else {\n                    r = -a.real;\n                    theta = atan2(0.0, -1.0);\n                }\n            } else {\n                r = __Pyx_c_abs_double(a);\n                theta = atan2(a.imag, a.real);\n            }\n            lnr = log(r);\n            z_r = exp(lnr * b.real - theta * b.imag);\n            z_theta = theta * b.real + lnr * b.imag;\n            z.real = z_r * cos(z_theta);\n            z.imag = z_r * sin(z_theta);\n            return z;\n        }\n    #endif\n#endif\n\n/* MemviewSliceCopyTemplate */\n  static __Pyx_memviewslice\n__pyx_memoryview_copy_new_contig(const __Pyx_memviewslice *from_mvs,\n                                 const char *mode, int ndim,\n                                 size_t sizeof_dtype, int contig_flag,\n                                 int dtype_is_object)\n{\n    __Pyx_RefNannyDeclarations\n    int i;\n    __Pyx_memviewslice new_mvs = { 0, 0, { 0 }, { 0 }, { 0 } };\n    struct __pyx_memoryview_obj *from_memview = from_mvs->memview;\n    Py_buffer *buf = &from_memview->view;\n    PyObject *shape_tuple = NULL;\n    PyObject *temp_int = NULL;\n    struct __pyx_array_obj *array_obj = NULL;\n    struct __pyx_memoryview_obj *memview_obj = NULL;\n    __Pyx_RefNannySetupContext(\"__pyx_memoryview_copy_new_contig\", 0);\n    for (i = 0; i < ndim; i++) {\n        if (unlikely(from_mvs->suboffsets[i] >= 0)) {\n            PyErr_Format(PyExc_ValueError, \"Cannot copy memoryview slice with \"\n                                           \"indirect dimensions (axis %d)\", i);\n            goto fail;\n        }\n    }\n    shape_tuple = PyTuple_New(ndim);\n    if (unlikely(!shape_tuple)) {\n        goto fail;\n    }\n    __Pyx_GOTREF(shape_tuple);\n    for(i = 0; i < ndim; i++) {\n        temp_int = PyInt_FromSsize_t(from_mvs->shape[i]);\n        if(unlikely(!temp_int)) {\n            goto fail;\n        } else {\n            PyTuple_SET_ITEM(shape_tuple, i, temp_int);\n            temp_int = NULL;\n        }\n    }\n    array_obj = __pyx_array_new(shape_tuple, sizeof_dtype, buf->format, (char *) mode, NULL);\n    if (unlikely(!array_obj)) {\n        goto fail;\n    }\n    __Pyx_GOTREF(array_obj);\n    memview_obj = (struct __pyx_memoryview_obj *) __pyx_memoryview_new(\n                                    (PyObject *) array_obj, contig_flag,\n                                    dtype_is_object,\n                                    from_mvs->memview->typeinfo);\n    if (unlikely(!memview_obj))\n        goto fail;\n    if (unlikely(__Pyx_init_memviewslice(memview_obj, ndim, &new_mvs, 1) < 0))\n        goto fail;\n    if (unlikely(__pyx_memoryview_copy_contents(*from_mvs, new_mvs, ndim, ndim,\n                                                dtype_is_object) < 0))\n        goto fail;\n    goto no_fail;\nfail:\n    __Pyx_XDECREF(new_mvs.memview);\n    new_mvs.memview = NULL;\n    new_mvs.data = NULL;\nno_fail:\n    __Pyx_XDECREF(shape_tuple);\n    __Pyx_XDECREF(temp_int);\n    __Pyx_XDECREF(array_obj);\n    __Pyx_RefNannyFinishContext();\n    return new_mvs;\n}\n\n/* CIntFromPy */\n  static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {\n#ifdef __Pyx_HAS_GCC_DIAGNOSTIC\n#pragma GCC diagnostic push\n#pragma GCC diagnostic ignored \"-Wconversion\"\n#endif\n    const int neg_one = (int) -1, const_zero = (int) 0;\n#ifdef __Pyx_HAS_GCC_DIAGNOSTIC\n#pragma GCC diagnostic pop\n#endif\n    const int is_unsigned = neg_one > const_zero;\n#if PY_MAJOR_VERSION < 3\n    if (likely(PyInt_Check(x))) {\n        if (sizeof(int) < sizeof(long)) {\n            __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))\n        } else {\n            long val = PyInt_AS_LONG(x);\n            if (is_unsigned && unlikely(val < 0)) {\n                goto raise_neg_overflow;\n            }\n            return (int) val;\n        }\n    } else\n#endif\n    if (likely(PyLong_Check(x))) {\n        if (is_unsigned) {\n#if CYTHON_USE_PYLONG_INTERNALS\n            const digit* digits = ((PyLongObject*)x)->ob_digit;\n            switch (Py_SIZE(x)) {\n                case  0: return (int) 0;\n                case  1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0])\n                case 2:\n                    if (8 * sizeof(int) > 1 * PyLong_SHIFT) {\n                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {\n                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))\n                        } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) {\n                            return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));\n                        }\n                    }\n                    break;\n                case 3:\n                    if (8 * sizeof(int) > 2 * PyLong_SHIFT) {\n                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {\n                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))\n                        } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) {\n                            return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));\n                        }\n                    }\n                    break;\n                case 4:\n                    if (8 * sizeof(int) > 3 * PyLong_SHIFT) {\n                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {\n                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))\n                        } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) {\n                            return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));\n                        }\n                    }\n                    break;\n            }\n#endif\n#if CYTHON_COMPILING_IN_CPYTHON\n            if (unlikely(Py_SIZE(x) < 0)) {\n                goto raise_neg_overflow;\n            }\n#else\n            {\n                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);\n                if (unlikely(result < 0))\n                    return (int) -1;\n                if (unlikely(result == 1))\n                    goto raise_neg_overflow;\n            }\n#endif\n            if (sizeof(int) <= sizeof(unsigned long)) {\n                __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))\n#ifdef HAVE_LONG_LONG\n            } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {\n                __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))\n#endif\n            }\n        } else {\n#if CYTHON_USE_PYLONG_INTERNALS\n            const digit* digits = ((PyLongObject*)x)->ob_digit;\n            switch (Py_SIZE(x)) {\n                case  0: return (int) 0;\n                case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0]))\n                case  1: __PYX_VERIFY_RETURN_INT(int,  digit, +digits[0])\n                case -2:\n                    if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) {\n                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {\n                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))\n                        } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {\n                            return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));\n                        }\n                    }\n                    break;\n                case 2:\n                    if (8 * sizeof(int) > 1 * PyLong_SHIFT) {\n                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {\n                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))\n                        } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {\n                            return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));\n                        }\n                    }\n                    break;\n                case -3:\n                    if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {\n                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {\n                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))\n                        } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {\n                            return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));\n                        }\n                    }\n                    break;\n                case 3:\n                    if (8 * sizeof(int) > 2 * PyLong_SHIFT) {\n                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {\n                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))\n                        } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {\n                            return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));\n                        }\n                    }\n                    break;\n                case -4:\n                    if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {\n                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {\n                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))\n                        } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {\n                            return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));\n                        }\n                    }\n                    break;\n                case 4:\n                    if (8 * sizeof(int) > 3 * PyLong_SHIFT) {\n                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {\n                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))\n                        } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {\n                            return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));\n                        }\n                    }\n                    break;\n            }\n#endif\n            if (sizeof(int) <= sizeof(long)) {\n                __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))\n#ifdef HAVE_LONG_LONG\n            } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {\n                __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))\n#endif\n            }\n        }\n        {\n#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)\n            PyErr_SetString(PyExc_RuntimeError,\n                            \"_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers\");\n#else\n            int val;\n            PyObject *v = __Pyx_PyNumber_IntOrLong(x);\n #if PY_MAJOR_VERSION < 3\n            if (likely(v) && !PyLong_Check(v)) {\n                PyObject *tmp = v;\n                v = PyNumber_Long(tmp);\n                Py_DECREF(tmp);\n            }\n #endif\n            if (likely(v)) {\n                int one = 1; int is_little = (int)*(unsigned char *)&one;\n                unsigned char *bytes = (unsigned char *)&val;\n                int ret = _PyLong_AsByteArray((PyLongObject *)v,\n                                              bytes, sizeof(val),\n                                              is_little, !is_unsigned);\n                Py_DECREF(v);\n                if (likely(!ret))\n                    return val;\n            }\n#endif\n            return (int) -1;\n        }\n    } else {\n        int val;\n        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);\n        if (!tmp) return (int) -1;\n        val = __Pyx_PyInt_As_int(tmp);\n        Py_DECREF(tmp);\n        return val;\n    }\nraise_overflow:\n    PyErr_SetString(PyExc_OverflowError,\n        \"value too large to convert to int\");\n    return (int) -1;\nraise_neg_overflow:\n    PyErr_SetString(PyExc_OverflowError,\n        \"can't convert negative value to int\");\n    return (int) -1;\n}\n\n/* CIntFromPy */\n  static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {\n#ifdef __Pyx_HAS_GCC_DIAGNOSTIC\n#pragma GCC diagnostic push\n#pragma GCC diagnostic ignored \"-Wconversion\"\n#endif\n    const long neg_one = (long) -1, const_zero = (long) 0;\n#ifdef __Pyx_HAS_GCC_DIAGNOSTIC\n#pragma GCC diagnostic pop\n#endif\n    const int is_unsigned = neg_one > const_zero;\n#if PY_MAJOR_VERSION < 3\n    if (likely(PyInt_Check(x))) {\n        if (sizeof(long) < sizeof(long)) {\n            __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))\n        } else {\n            long val = PyInt_AS_LONG(x);\n            if (is_unsigned && unlikely(val < 0)) {\n                goto raise_neg_overflow;\n            }\n            return (long) val;\n        }\n    } else\n#endif\n    if (likely(PyLong_Check(x))) {\n        if (is_unsigned) {\n#if CYTHON_USE_PYLONG_INTERNALS\n            const digit* digits = ((PyLongObject*)x)->ob_digit;\n            switch (Py_SIZE(x)) {\n                case  0: return (long) 0;\n                case  1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0])\n                case 2:\n                    if (8 * sizeof(long) > 1 * PyLong_SHIFT) {\n                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {\n                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))\n                        } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) {\n                            return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));\n                        }\n                    }\n                    break;\n                case 3:\n                    if (8 * sizeof(long) > 2 * PyLong_SHIFT) {\n                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {\n                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))\n                        } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) {\n                            return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));\n                        }\n                    }\n                    break;\n                case 4:\n                    if (8 * sizeof(long) > 3 * PyLong_SHIFT) {\n                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {\n                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))\n                        } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) {\n                            return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));\n                        }\n                    }\n                    break;\n            }\n#endif\n#if CYTHON_COMPILING_IN_CPYTHON\n            if (unlikely(Py_SIZE(x) < 0)) {\n                goto raise_neg_overflow;\n            }\n#else\n            {\n                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);\n                if (unlikely(result < 0))\n                    return (long) -1;\n                if (unlikely(result == 1))\n                    goto raise_neg_overflow;\n            }\n#endif\n            if (sizeof(long) <= sizeof(unsigned long)) {\n                __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))\n#ifdef HAVE_LONG_LONG\n            } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {\n                __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))\n#endif\n            }\n        } else {\n#if CYTHON_USE_PYLONG_INTERNALS\n            const digit* digits = ((PyLongObject*)x)->ob_digit;\n            switch (Py_SIZE(x)) {\n                case  0: return (long) 0;\n                case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0]))\n                case  1: __PYX_VERIFY_RETURN_INT(long,  digit, +digits[0])\n                case -2:\n                    if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) {\n                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {\n                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))\n                        } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {\n                            return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));\n                        }\n                    }\n                    break;\n                case 2:\n                    if (8 * sizeof(long) > 1 * PyLong_SHIFT) {\n                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {\n                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))\n                        } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {\n                            return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));\n                        }\n                    }\n                    break;\n                case -3:\n                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {\n                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {\n                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))\n                        } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {\n                            return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));\n                        }\n                    }\n                    break;\n                case 3:\n                    if (8 * sizeof(long) > 2 * PyLong_SHIFT) {\n                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {\n                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))\n                        } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {\n                            return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));\n                        }\n                    }\n                    break;\n                case -4:\n                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {\n                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {\n                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))\n                        } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {\n                            return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));\n                        }\n                    }\n                    break;\n                case 4:\n                    if (8 * sizeof(long) > 3 * PyLong_SHIFT) {\n                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {\n                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))\n                        } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {\n                            return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));\n                        }\n                    }\n                    break;\n            }\n#endif\n            if (sizeof(long) <= sizeof(long)) {\n                __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))\n#ifdef HAVE_LONG_LONG\n            } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {\n                __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))\n#endif\n            }\n        }\n        {\n#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)\n            PyErr_SetString(PyExc_RuntimeError,\n                            \"_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers\");\n#else\n            long val;\n            PyObject *v = __Pyx_PyNumber_IntOrLong(x);\n #if PY_MAJOR_VERSION < 3\n            if (likely(v) && !PyLong_Check(v)) {\n                PyObject *tmp = v;\n                v = PyNumber_Long(tmp);\n                Py_DECREF(tmp);\n            }\n #endif\n            if (likely(v)) {\n                int one = 1; int is_little = (int)*(unsigned char *)&one;\n                unsigned char *bytes = (unsigned char *)&val;\n                int ret = _PyLong_AsByteArray((PyLongObject *)v,\n                                              bytes, sizeof(val),\n                                              is_little, !is_unsigned);\n                Py_DECREF(v);\n                if (likely(!ret))\n                    return val;\n            }\n#endif\n            return (long) -1;\n        }\n    } else {\n        long val;\n        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);\n        if (!tmp) return (long) -1;\n        val = __Pyx_PyInt_As_long(tmp);\n        Py_DECREF(tmp);\n        return val;\n    }\nraise_overflow:\n    PyErr_SetString(PyExc_OverflowError,\n        \"value too large to convert to long\");\n    return (long) -1;\nraise_neg_overflow:\n    PyErr_SetString(PyExc_OverflowError,\n        \"can't convert negative value to long\");\n    return (long) -1;\n}\n\n/* CIntToPy */\n  static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {\n#ifdef __Pyx_HAS_GCC_DIAGNOSTIC\n#pragma GCC diagnostic push\n#pragma GCC diagnostic ignored \"-Wconversion\"\n#endif\n    const long neg_one = (long) -1, const_zero = (long) 0;\n#ifdef __Pyx_HAS_GCC_DIAGNOSTIC\n#pragma GCC diagnostic pop\n#endif\n    const int is_unsigned = neg_one > const_zero;\n    if (is_unsigned) {\n        if (sizeof(long) < sizeof(long)) {\n            return PyInt_FromLong((long) value);\n        } else if (sizeof(long) <= sizeof(unsigned long)) {\n            return PyLong_FromUnsignedLong((unsigned long) value);\n#ifdef HAVE_LONG_LONG\n        } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {\n            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);\n#endif\n        }\n    } else {\n        if (sizeof(long) <= sizeof(long)) {\n            return PyInt_FromLong((long) value);\n#ifdef HAVE_LONG_LONG\n        } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {\n            return PyLong_FromLongLong((PY_LONG_LONG) value);\n#endif\n        }\n    }\n    {\n        int one = 1; int little = (int)*(unsigned char *)&one;\n        unsigned char *bytes = (unsigned char *)&value;\n        return _PyLong_FromByteArray(bytes, sizeof(long),\n                                     little, !is_unsigned);\n    }\n}\n\n/* CIntToPy */\n  static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {\n#ifdef __Pyx_HAS_GCC_DIAGNOSTIC\n#pragma GCC diagnostic push\n#pragma GCC diagnostic ignored \"-Wconversion\"\n#endif\n    const int neg_one = (int) -1, const_zero = (int) 0;\n#ifdef __Pyx_HAS_GCC_DIAGNOSTIC\n#pragma GCC diagnostic pop\n#endif\n    const int is_unsigned = neg_one > const_zero;\n    if (is_unsigned) {\n        if (sizeof(int) < sizeof(long)) {\n            return PyInt_FromLong((long) value);\n        } else if (sizeof(int) <= sizeof(unsigned long)) {\n            return PyLong_FromUnsignedLong((unsigned long) value);\n#ifdef HAVE_LONG_LONG\n        } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {\n            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);\n#endif\n        }\n    } else {\n        if (sizeof(int) <= sizeof(long)) {\n            return PyInt_FromLong((long) value);\n#ifdef HAVE_LONG_LONG\n        } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {\n            return PyLong_FromLongLong((PY_LONG_LONG) value);\n#endif\n        }\n    }\n    {\n        int one = 1; int little = (int)*(unsigned char *)&one;\n        unsigned char *bytes = (unsigned char *)&value;\n        return _PyLong_FromByteArray(bytes, sizeof(int),\n                                     little, !is_unsigned);\n    }\n}\n\n/* CIntFromPy */\n  static CYTHON_INLINE signed char __Pyx_PyInt_As_signed__char(PyObject *x) {\n#ifdef __Pyx_HAS_GCC_DIAGNOSTIC\n#pragma GCC diagnostic push\n#pragma GCC diagnostic ignored \"-Wconversion\"\n#endif\n    const signed char neg_one = (signed char) -1, const_zero = (signed char) 0;\n#ifdef __Pyx_HAS_GCC_DIAGNOSTIC\n#pragma GCC diagnostic pop\n#endif\n    const int is_unsigned = neg_one > const_zero;\n#if PY_MAJOR_VERSION < 3\n    if (likely(PyInt_Check(x))) {\n        if (sizeof(signed char) < sizeof(long)) {\n            __PYX_VERIFY_RETURN_INT(signed char, long, PyInt_AS_LONG(x))\n        } else {\n            long val = PyInt_AS_LONG(x);\n            if (is_unsigned && unlikely(val < 0)) {\n                goto raise_neg_overflow;\n            }\n            return (signed char) val;\n        }\n    } else\n#endif\n    if (likely(PyLong_Check(x))) {\n        if (is_unsigned) {\n#if CYTHON_USE_PYLONG_INTERNALS\n            const digit* digits = ((PyLongObject*)x)->ob_digit;\n            switch (Py_SIZE(x)) {\n                case  0: return (signed char) 0;\n                case  1: __PYX_VERIFY_RETURN_INT(signed char, digit, digits[0])\n                case 2:\n                    if (8 * sizeof(signed char) > 1 * PyLong_SHIFT) {\n                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {\n                            __PYX_VERIFY_RETURN_INT(signed char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))\n                        } else if (8 * sizeof(signed char) >= 2 * PyLong_SHIFT) {\n                            return (signed char) (((((signed char)digits[1]) << PyLong_SHIFT) | (signed char)digits[0]));\n                        }\n                    }\n                    break;\n                case 3:\n                    if (8 * sizeof(signed char) > 2 * PyLong_SHIFT) {\n                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {\n                            __PYX_VERIFY_RETURN_INT(signed char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))\n                        } else if (8 * sizeof(signed char) >= 3 * PyLong_SHIFT) {\n                            return (signed char) (((((((signed char)digits[2]) << PyLong_SHIFT) | (signed char)digits[1]) << PyLong_SHIFT) | (signed char)digits[0]));\n                        }\n                    }\n                    break;\n                case 4:\n                    if (8 * sizeof(signed char) > 3 * PyLong_SHIFT) {\n                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {\n                            __PYX_VERIFY_RETURN_INT(signed char, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))\n                        } else if (8 * sizeof(signed char) >= 4 * PyLong_SHIFT) {\n                            return (signed char) (((((((((signed char)digits[3]) << PyLong_SHIFT) | (signed char)digits[2]) << PyLong_SHIFT) | (signed char)digits[1]) << PyLong_SHIFT) | (signed char)digits[0]));\n                        }\n                    }\n                    break;\n            }\n#endif\n#if CYTHON_COMPILING_IN_CPYTHON\n            if (unlikely(Py_SIZE(x) < 0)) {\n                goto raise_neg_overflow;\n            }\n#else\n            {\n                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);\n                if (unlikely(result < 0))\n                    return (signed char) -1;\n                if (unlikely(result == 1))\n                    goto raise_neg_overflow;\n            }\n#endif\n            if (sizeof(signed char) <= sizeof(unsigned long)) {\n                __PYX_VERIFY_RETURN_INT_EXC(signed char, unsigned long, PyLong_AsUnsignedLong(x))\n#ifdef HAVE_LONG_LONG\n            } else if (sizeof(signed char) <= sizeof(unsigned PY_LONG_LONG)) {\n                __PYX_VERIFY_RETURN_INT_EXC(signed char, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))\n#endif\n            }\n        } else {\n#if CYTHON_USE_PYLONG_INTERNALS\n            const digit* digits = ((PyLongObject*)x)->ob_digit;\n            switch (Py_SIZE(x)) {\n                case  0: return (signed char) 0;\n                case -1: __PYX_VERIFY_RETURN_INT(signed char, sdigit, (sdigit) (-(sdigit)digits[0]))\n                case  1: __PYX_VERIFY_RETURN_INT(signed char,  digit, +digits[0])\n                case -2:\n                    if (8 * sizeof(signed char) - 1 > 1 * PyLong_SHIFT) {\n                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {\n                            __PYX_VERIFY_RETURN_INT(signed char, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))\n                        } else if (8 * sizeof(signed char) - 1 > 2 * PyLong_SHIFT) {\n                            return (signed char) (((signed char)-1)*(((((signed char)digits[1]) << PyLong_SHIFT) | (signed char)digits[0])));\n                        }\n                    }\n                    break;\n                case 2:\n                    if (8 * sizeof(signed char) > 1 * PyLong_SHIFT) {\n                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {\n                            __PYX_VERIFY_RETURN_INT(signed char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))\n                        } else if (8 * sizeof(signed char) - 1 > 2 * PyLong_SHIFT) {\n                            return (signed char) ((((((signed char)digits[1]) << PyLong_SHIFT) | (signed char)digits[0])));\n                        }\n                    }\n                    break;\n                case -3:\n                    if (8 * sizeof(signed char) - 1 > 2 * PyLong_SHIFT) {\n                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {\n                            __PYX_VERIFY_RETURN_INT(signed char, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))\n                        } else if (8 * sizeof(signed char) - 1 > 3 * PyLong_SHIFT) {\n                            return (signed char) (((signed char)-1)*(((((((signed char)digits[2]) << PyLong_SHIFT) | (signed char)digits[1]) << PyLong_SHIFT) | (signed char)digits[0])));\n                        }\n                    }\n                    break;\n                case 3:\n                    if (8 * sizeof(signed char) > 2 * PyLong_SHIFT) {\n                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {\n                            __PYX_VERIFY_RETURN_INT(signed char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))\n                        } else if (8 * sizeof(signed char) - 1 > 3 * PyLong_SHIFT) {\n                            return (signed char) ((((((((signed char)digits[2]) << PyLong_SHIFT) | (signed char)digits[1]) << PyLong_SHIFT) | (signed char)digits[0])));\n                        }\n                    }\n                    break;\n                case -4:\n                    if (8 * sizeof(signed char) - 1 > 3 * PyLong_SHIFT) {\n                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {\n                            __PYX_VERIFY_RETURN_INT(signed char, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))\n                        } else if (8 * sizeof(signed char) - 1 > 4 * PyLong_SHIFT) {\n                            return (signed char) (((signed char)-1)*(((((((((signed char)digits[3]) << PyLong_SHIFT) | (signed char)digits[2]) << PyLong_SHIFT) | (signed char)digits[1]) << PyLong_SHIFT) | (signed char)digits[0])));\n                        }\n                    }\n                    break;\n                case 4:\n                    if (8 * sizeof(signed char) > 3 * PyLong_SHIFT) {\n                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {\n                            __PYX_VERIFY_RETURN_INT(signed char, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))\n                        } else if (8 * sizeof(signed char) - 1 > 4 * PyLong_SHIFT) {\n                            return (signed char) ((((((((((signed char)digits[3]) << PyLong_SHIFT) | (signed char)digits[2]) << PyLong_SHIFT) | (signed char)digits[1]) << PyLong_SHIFT) | (signed char)digits[0])));\n                        }\n                    }\n                    break;\n            }\n#endif\n            if (sizeof(signed char) <= sizeof(long)) {\n                __PYX_VERIFY_RETURN_INT_EXC(signed char, long, PyLong_AsLong(x))\n#ifdef HAVE_LONG_LONG\n            } else if (sizeof(signed char) <= sizeof(PY_LONG_LONG)) {\n                __PYX_VERIFY_RETURN_INT_EXC(signed char, PY_LONG_LONG, PyLong_AsLongLong(x))\n#endif\n            }\n        }\n        {\n#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)\n            PyErr_SetString(PyExc_RuntimeError,\n                            \"_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers\");\n#else\n            signed char val;\n            PyObject *v = __Pyx_PyNumber_IntOrLong(x);\n #if PY_MAJOR_VERSION < 3\n            if (likely(v) && !PyLong_Check(v)) {\n                PyObject *tmp = v;\n                v = PyNumber_Long(tmp);\n                Py_DECREF(tmp);\n            }\n #endif\n            if (likely(v)) {\n                int one = 1; int is_little = (int)*(unsigned char *)&one;\n                unsigned char *bytes = (unsigned char *)&val;\n                int ret = _PyLong_AsByteArray((PyLongObject *)v,\n                                              bytes, sizeof(val),\n                                              is_little, !is_unsigned);\n                Py_DECREF(v);\n                if (likely(!ret))\n                    return val;\n            }\n#endif\n            return (signed char) -1;\n        }\n    } else {\n        signed char val;\n        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);\n        if (!tmp) return (signed char) -1;\n        val = __Pyx_PyInt_As_signed__char(tmp);\n        Py_DECREF(tmp);\n        return val;\n    }\nraise_overflow:\n    PyErr_SetString(PyExc_OverflowError,\n        \"value too large to convert to signed char\");\n    return (signed char) -1;\nraise_neg_overflow:\n    PyErr_SetString(PyExc_OverflowError,\n        \"can't convert negative value to signed char\");\n    return (signed char) -1;\n}\n\n/* CIntToPy */\n  static CYTHON_INLINE PyObject* __Pyx_PyInt_From_npy_bool(npy_bool value) {\n#ifdef __Pyx_HAS_GCC_DIAGNOSTIC\n#pragma GCC diagnostic push\n#pragma GCC diagnostic ignored \"-Wconversion\"\n#endif\n    const npy_bool neg_one = (npy_bool) -1, const_zero = (npy_bool) 0;\n#ifdef __Pyx_HAS_GCC_DIAGNOSTIC\n#pragma GCC diagnostic pop\n#endif\n    const int is_unsigned = neg_one > const_zero;\n    if (is_unsigned) {\n        if (sizeof(npy_bool) < sizeof(long)) {\n            return PyInt_FromLong((long) value);\n        } else if (sizeof(npy_bool) <= sizeof(unsigned long)) {\n            return PyLong_FromUnsignedLong((unsigned long) value);\n#ifdef HAVE_LONG_LONG\n        } else if (sizeof(npy_bool) <= sizeof(unsigned PY_LONG_LONG)) {\n            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);\n#endif\n        }\n    } else {\n        if (sizeof(npy_bool) <= sizeof(long)) {\n            return PyInt_FromLong((long) value);\n#ifdef HAVE_LONG_LONG\n        } else if (sizeof(npy_bool) <= sizeof(PY_LONG_LONG)) {\n            return PyLong_FromLongLong((PY_LONG_LONG) value);\n#endif\n        }\n    }\n    {\n        int one = 1; int little = (int)*(unsigned char *)&one;\n        unsigned char *bytes = (unsigned char *)&value;\n        return _PyLong_FromByteArray(bytes, sizeof(npy_bool),\n                                     little, !is_unsigned);\n    }\n}\n\n/* PrintOne */\n  #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION < 3\nstatic int __Pyx_PrintOne(PyObject* f, PyObject *o) {\n    if (!f) {\n        if (!(f = __Pyx_GetStdout()))\n            return -1;\n    }\n    Py_INCREF(f);\n    if (PyFile_SoftSpace(f, 0)) {\n        if (PyFile_WriteString(\" \", f) < 0)\n            goto error;\n    }\n    if (PyFile_WriteObject(o, f, Py_PRINT_RAW) < 0)\n        goto error;\n    if (PyFile_WriteString(\"\\n\", f) < 0)\n        goto error;\n    Py_DECREF(f);\n    return 0;\nerror:\n    Py_DECREF(f);\n    return -1;\n    /* the line below is just to avoid C compiler\n     * warnings about unused functions */\n    return __Pyx_Print(f, NULL, 0);\n}\n#else\nstatic int __Pyx_PrintOne(PyObject* stream, PyObject *o) {\n    int res;\n    PyObject* arg_tuple = PyTuple_Pack(1, o);\n    if (unlikely(!arg_tuple))\n        return -1;\n    res = __Pyx_Print(stream, arg_tuple, 1);\n    Py_DECREF(arg_tuple);\n    return res;\n}\n#endif\n\n/* CIntFromPy */\n  static CYTHON_INLINE char __Pyx_PyInt_As_char(PyObject *x) {\n#ifdef __Pyx_HAS_GCC_DIAGNOSTIC\n#pragma GCC diagnostic push\n#pragma GCC diagnostic ignored \"-Wconversion\"\n#endif\n    const char neg_one = (char) -1, const_zero = (char) 0;\n#ifdef __Pyx_HAS_GCC_DIAGNOSTIC\n#pragma GCC diagnostic pop\n#endif\n    const int is_unsigned = neg_one > const_zero;\n#if PY_MAJOR_VERSION < 3\n    if (likely(PyInt_Check(x))) {\n        if (sizeof(char) < sizeof(long)) {\n            __PYX_VERIFY_RETURN_INT(char, long, PyInt_AS_LONG(x))\n        } else {\n            long val = PyInt_AS_LONG(x);\n            if (is_unsigned && unlikely(val < 0)) {\n                goto raise_neg_overflow;\n            }\n            return (char) val;\n        }\n    } else\n#endif\n    if (likely(PyLong_Check(x))) {\n        if (is_unsigned) {\n#if CYTHON_USE_PYLONG_INTERNALS\n            const digit* digits = ((PyLongObject*)x)->ob_digit;\n            switch (Py_SIZE(x)) {\n                case  0: return (char) 0;\n                case  1: __PYX_VERIFY_RETURN_INT(char, digit, digits[0])\n                case 2:\n                    if (8 * sizeof(char) > 1 * PyLong_SHIFT) {\n                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {\n                            __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))\n                        } else if (8 * sizeof(char) >= 2 * PyLong_SHIFT) {\n                            return (char) (((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0]));\n                        }\n                    }\n                    break;\n                case 3:\n                    if (8 * sizeof(char) > 2 * PyLong_SHIFT) {\n                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {\n                            __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))\n                        } else if (8 * sizeof(char) >= 3 * PyLong_SHIFT) {\n                            return (char) (((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]));\n                        }\n                    }\n                    break;\n                case 4:\n                    if (8 * sizeof(char) > 3 * PyLong_SHIFT) {\n                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {\n                            __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))\n                        } else if (8 * sizeof(char) >= 4 * PyLong_SHIFT) {\n                            return (char) (((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]));\n                        }\n                    }\n                    break;\n            }\n#endif\n#if CYTHON_COMPILING_IN_CPYTHON\n            if (unlikely(Py_SIZE(x) < 0)) {\n                goto raise_neg_overflow;\n            }\n#else\n            {\n                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);\n                if (unlikely(result < 0))\n                    return (char) -1;\n                if (unlikely(result == 1))\n                    goto raise_neg_overflow;\n            }\n#endif\n            if (sizeof(char) <= sizeof(unsigned long)) {\n                __PYX_VERIFY_RETURN_INT_EXC(char, unsigned long, PyLong_AsUnsignedLong(x))\n#ifdef HAVE_LONG_LONG\n            } else if (sizeof(char) <= sizeof(unsigned PY_LONG_LONG)) {\n                __PYX_VERIFY_RETURN_INT_EXC(char, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))\n#endif\n            }\n        } else {\n#if CYTHON_USE_PYLONG_INTERNALS\n            const digit* digits = ((PyLongObject*)x)->ob_digit;\n            switch (Py_SIZE(x)) {\n                case  0: return (char) 0;\n                case -1: __PYX_VERIFY_RETURN_INT(char, sdigit, (sdigit) (-(sdigit)digits[0]))\n                case  1: __PYX_VERIFY_RETURN_INT(char,  digit, +digits[0])\n                case -2:\n                    if (8 * sizeof(char) - 1 > 1 * PyLong_SHIFT) {\n                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {\n                            __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))\n                        } else if (8 * sizeof(char) - 1 > 2 * PyLong_SHIFT) {\n                            return (char) (((char)-1)*(((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));\n                        }\n                    }\n                    break;\n                case 2:\n                    if (8 * sizeof(char) > 1 * PyLong_SHIFT) {\n                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {\n                            __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))\n                        } else if (8 * sizeof(char) - 1 > 2 * PyLong_SHIFT) {\n                            return (char) ((((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));\n                        }\n                    }\n                    break;\n                case -3:\n                    if (8 * sizeof(char) - 1 > 2 * PyLong_SHIFT) {\n                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {\n                            __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))\n                        } else if (8 * sizeof(char) - 1 > 3 * PyLong_SHIFT) {\n                            return (char) (((char)-1)*(((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));\n                        }\n                    }\n                    break;\n                case 3:\n                    if (8 * sizeof(char) > 2 * PyLong_SHIFT) {\n                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {\n                            __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))\n                        } else if (8 * sizeof(char) - 1 > 3 * PyLong_SHIFT) {\n                            return (char) ((((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));\n                        }\n                    }\n                    break;\n                case -4:\n                    if (8 * sizeof(char) - 1 > 3 * PyLong_SHIFT) {\n                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {\n                            __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))\n                        } else if (8 * sizeof(char) - 1 > 4 * PyLong_SHIFT) {\n                            return (char) (((char)-1)*(((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));\n                        }\n                    }\n                    break;\n                case 4:\n                    if (8 * sizeof(char) > 3 * PyLong_SHIFT) {\n                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {\n                            __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))\n                        } else if (8 * sizeof(char) - 1 > 4 * PyLong_SHIFT) {\n                            return (char) ((((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));\n                        }\n                    }\n                    break;\n            }\n#endif\n            if (sizeof(char) <= sizeof(long)) {\n                __PYX_VERIFY_RETURN_INT_EXC(char, long, PyLong_AsLong(x))\n#ifdef HAVE_LONG_LONG\n            } else if (sizeof(char) <= sizeof(PY_LONG_LONG)) {\n                __PYX_VERIFY_RETURN_INT_EXC(char, PY_LONG_LONG, PyLong_AsLongLong(x))\n#endif\n            }\n        }\n        {\n#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)\n            PyErr_SetString(PyExc_RuntimeError,\n                            \"_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers\");\n#else\n            char val;\n            PyObject *v = __Pyx_PyNumber_IntOrLong(x);\n #if PY_MAJOR_VERSION < 3\n            if (likely(v) && !PyLong_Check(v)) {\n                PyObject *tmp = v;\n                v = PyNumber_Long(tmp);\n                Py_DECREF(tmp);\n            }\n #endif\n            if (likely(v)) {\n                int one = 1; int is_little = (int)*(unsigned char *)&one;\n                unsigned char *bytes = (unsigned char *)&val;\n                int ret = _PyLong_AsByteArray((PyLongObject *)v,\n                                              bytes, sizeof(val),\n                                              is_little, !is_unsigned);\n                Py_DECREF(v);\n                if (likely(!ret))\n                    return val;\n            }\n#endif\n            return (char) -1;\n        }\n    } else {\n        char val;\n        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);\n        if (!tmp) return (char) -1;\n        val = __Pyx_PyInt_As_char(tmp);\n        Py_DECREF(tmp);\n        return val;\n    }\nraise_overflow:\n    PyErr_SetString(PyExc_OverflowError,\n        \"value too large to convert to char\");\n    return (char) -1;\nraise_neg_overflow:\n    PyErr_SetString(PyExc_OverflowError,\n        \"can't convert negative value to char\");\n    return (char) -1;\n}\n\n/* CheckBinaryVersion */\n  static int __Pyx_check_binary_version(void) {\n    char ctversion[5];\n    int same=1, i, found_dot;\n    const char* rt_from_call = Py_GetVersion();\n    PyOS_snprintf(ctversion, 5, \"%d.%d\", PY_MAJOR_VERSION, PY_MINOR_VERSION);\n    found_dot = 0;\n    for (i = 0; i < 4; i++) {\n        if (!ctversion[i]) {\n            same = (rt_from_call[i] < '0' || rt_from_call[i] > '9');\n            break;\n        }\n        if (rt_from_call[i] != ctversion[i]) {\n            same = 0;\n            break;\n        }\n    }\n    if (!same) {\n        char rtversion[5] = {'\\0'};\n        char message[200];\n        for (i=0; i<4; ++i) {\n            if (rt_from_call[i] == '.') {\n                if (found_dot) break;\n                found_dot = 1;\n            } else if (rt_from_call[i] < '0' || rt_from_call[i] > '9') {\n                break;\n            }\n            rtversion[i] = rt_from_call[i];\n        }\n        PyOS_snprintf(message, sizeof(message),\n                      \"compiletime version %s of module '%.100s' \"\n                      \"does not match runtime version %s\",\n                      ctversion, __Pyx_MODULE_NAME, rtversion);\n        return PyErr_WarnEx(NULL, message, 1);\n    }\n    return 0;\n}\n\n/* InitStrings */\n  static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {\n    while (t->p) {\n        #if PY_MAJOR_VERSION < 3\n        if (t->is_unicode) {\n            *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);\n        } else if (t->intern) {\n            *t->p = PyString_InternFromString(t->s);\n        } else {\n            *t->p = PyString_FromStringAndSize(t->s, t->n - 1);\n        }\n        #else\n        if (t->is_unicode | t->is_str) {\n            if (t->intern) {\n                *t->p = PyUnicode_InternFromString(t->s);\n            } else if (t->encoding) {\n                *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);\n            } else {\n                *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);\n            }\n        } else {\n            *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);\n        }\n        #endif\n        if (!*t->p)\n            return -1;\n        if (PyObject_Hash(*t->p) == -1)\n            return -1;\n        ++t;\n    }\n    return 0;\n}\n\nstatic CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {\n    return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));\n}\nstatic CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) {\n    Py_ssize_t ignore;\n    return __Pyx_PyObject_AsStringAndSize(o, &ignore);\n}\n#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT\n#if !CYTHON_PEP393_ENABLED\nstatic const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {\n    char* defenc_c;\n    PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);\n    if (!defenc) return NULL;\n    defenc_c = PyBytes_AS_STRING(defenc);\n#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII\n    {\n        char* end = defenc_c + PyBytes_GET_SIZE(defenc);\n        char* c;\n        for (c = defenc_c; c < end; c++) {\n            if ((unsigned char) (*c) >= 128) {\n                PyUnicode_AsASCIIString(o);\n                return NULL;\n            }\n        }\n    }\n#endif\n    *length = PyBytes_GET_SIZE(defenc);\n    return defenc_c;\n}\n#else\nstatic CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {\n    if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;\n#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII\n    if (likely(PyUnicode_IS_ASCII(o))) {\n        *length = PyUnicode_GET_LENGTH(o);\n        return PyUnicode_AsUTF8(o);\n    } else {\n        PyUnicode_AsASCIIString(o);\n        return NULL;\n    }\n#else\n    return PyUnicode_AsUTF8AndSize(o, length);\n#endif\n}\n#endif\n#endif\nstatic CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {\n#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT\n    if (\n#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII\n            __Pyx_sys_getdefaultencoding_not_ascii &&\n#endif\n            PyUnicode_Check(o)) {\n        return __Pyx_PyUnicode_AsStringAndSize(o, length);\n    } else\n#endif\n#if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))\n    if (PyByteArray_Check(o)) {\n        *length = PyByteArray_GET_SIZE(o);\n        return PyByteArray_AS_STRING(o);\n    } else\n#endif\n    {\n        char* result;\n        int r = PyBytes_AsStringAndSize(o, &result, length);\n        if (unlikely(r < 0)) {\n            return NULL;\n        } else {\n            return result;\n        }\n    }\n}\nstatic CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {\n   int is_true = x == Py_True;\n   if (is_true | (x == Py_False) | (x == Py_None)) return is_true;\n   else return PyObject_IsTrue(x);\n}\nstatic CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) {\n    int retval;\n    if (unlikely(!x)) return -1;\n    retval = __Pyx_PyObject_IsTrue(x);\n    Py_DECREF(x);\n    return retval;\n}\nstatic PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) {\n#if PY_MAJOR_VERSION >= 3\n    if (PyLong_Check(result)) {\n        if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,\n                \"__int__ returned non-int (type %.200s).  \"\n                \"The ability to return an instance of a strict subclass of int \"\n                \"is deprecated, and may be removed in a future version of Python.\",\n                Py_TYPE(result)->tp_name)) {\n            Py_DECREF(result);\n            return NULL;\n        }\n        return result;\n    }\n#endif\n    PyErr_Format(PyExc_TypeError,\n                 \"__%.4s__ returned non-%.4s (type %.200s)\",\n                 type_name, type_name, Py_TYPE(result)->tp_name);\n    Py_DECREF(result);\n    return NULL;\n}\nstatic CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {\n#if CYTHON_USE_TYPE_SLOTS\n  PyNumberMethods *m;\n#endif\n  const char *name = NULL;\n  PyObject *res = NULL;\n#if PY_MAJOR_VERSION < 3\n  if (likely(PyInt_Check(x) || PyLong_Check(x)))\n#else\n  if (likely(PyLong_Check(x)))\n#endif\n    return __Pyx_NewRef(x);\n#if CYTHON_USE_TYPE_SLOTS\n  m = Py_TYPE(x)->tp_as_number;\n  #if PY_MAJOR_VERSION < 3\n  if (m && m->nb_int) {\n    name = \"int\";\n    res = m->nb_int(x);\n  }\n  else if (m && m->nb_long) {\n    name = \"long\";\n    res = m->nb_long(x);\n  }\n  #else\n  if (likely(m && m->nb_int)) {\n    name = \"int\";\n    res = m->nb_int(x);\n  }\n  #endif\n#else\n  if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {\n    res = PyNumber_Int(x);\n  }\n#endif\n  if (likely(res)) {\n#if PY_MAJOR_VERSION < 3\n    if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) {\n#else\n    if (unlikely(!PyLong_CheckExact(res))) {\n#endif\n        return __Pyx_PyNumber_IntOrLongWrongResultType(res, name);\n    }\n  }\n  else if (!PyErr_Occurred()) {\n    PyErr_SetString(PyExc_TypeError,\n                    \"an integer is required\");\n  }\n  return res;\n}\nstatic CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {\n  Py_ssize_t ival;\n  PyObject *x;\n#if PY_MAJOR_VERSION < 3\n  if (likely(PyInt_CheckExact(b))) {\n    if (sizeof(Py_ssize_t) >= sizeof(long))\n        return PyInt_AS_LONG(b);\n    else\n        return PyInt_AsSsize_t(b);\n  }\n#endif\n  if (likely(PyLong_CheckExact(b))) {\n    #if CYTHON_USE_PYLONG_INTERNALS\n    const digit* digits = ((PyLongObject*)b)->ob_digit;\n    const Py_ssize_t size = Py_SIZE(b);\n    if (likely(__Pyx_sst_abs(size) <= 1)) {\n        ival = likely(size) ? digits[0] : 0;\n        if (size == -1) ival = -ival;\n        return ival;\n    } else {\n      switch (size) {\n         case 2:\n           if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {\n             return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));\n           }\n           break;\n         case -2:\n           if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {\n             return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));\n           }\n           break;\n         case 3:\n           if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {\n             return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));\n           }\n           break;\n         case -3:\n           if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {\n             return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));\n           }\n           break;\n         case 4:\n           if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {\n             return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));\n           }\n           break;\n         case -4:\n           if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {\n             return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));\n           }\n           break;\n      }\n    }\n    #endif\n    return PyLong_AsSsize_t(b);\n  }\n  x = PyNumber_Index(b);\n  if (!x) return -1;\n  ival = PyInt_AsSsize_t(x);\n  Py_DECREF(x);\n  return ival;\n}\nstatic CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) {\n  if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) {\n    return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o);\n#if PY_MAJOR_VERSION < 3\n  } else if (likely(PyInt_CheckExact(o))) {\n    return PyInt_AS_LONG(o);\n#endif\n  } else {\n    Py_ssize_t ival;\n    PyObject *x;\n    x = PyNumber_Index(o);\n    if (!x) return -1;\n    ival = PyInt_AsLong(x);\n    Py_DECREF(x);\n    return ival;\n  }\n}\nstatic CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) {\n  return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False);\n}\nstatic CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {\n    return PyInt_FromSize_t(ival);\n}\n\n\n#endif /* Py_PYTHON_H */\n"
  },
  {
    "path": "custom_mc/_marching_cubes_lewiner_cy.pyx",
    "content": "#cython: cdivision=True\n#cython: boundscheck=False\n#cython: nonecheck=False\n#cython: wraparound=False\n\n\"\"\"\nThis is an implementation of the marching cubes algorithm proposed in:\n\nEfficient implementation of Marching Cubes' cases with topological guarantees.\nThomas Lewiner, Helio Lopes, Antonio Wilson Vieira and Geovan Tavares.\nJournal of Graphics Tools 8(2): pp. 1-15 (december 2003)\n\nThis algorithm has the advantage that it provides topologically correct\nresults, and the algorithms implementation is relatively simple. Most\nof the magic is in the lookup tables, which are provided as open source.\n\nOriginally implemented in C++ by Thomas Lewiner in 2002, ported to Cython\nby Almar Klein in 2012. Adapted for scikit-image in 2016.\n\n\"\"\"\n\n# Cython specific imports\nimport numpy as np\ncimport numpy as np\nimport cython\nnp.import_array()\n\n# Enable low level memory management\nfrom libc.stdlib cimport malloc, free\n\n# Define tiny winy number\ncdef double FLT_EPSILON = np.spacing(1.0) #0.0000001\n\n# Define abs function for doubles\ncdef inline double dabs(double a): return a if a>=0 else -a\ncdef inline int imin(int a, int b): return a if a<b else b\n\n# todo: allow dynamic isovalue?\n# todo: can we disable Cython from checking for zero division? Sometimes we know that it never happens!\n\ndef remove_degenerate_faces(vertices, faces, *arrays):\n\n    vertices_map0 = np.arange(len(vertices), dtype=np.int32)\n    vertices_map1 = vertices_map0.copy()\n    faces_ok = np.ones(len(faces), dtype=np.int32)\n\n    cdef float [:, :] vertices_ = vertices\n    cdef float [:] v1, v2, v3\n    cdef int [:, :]  faces_ = faces\n\n    cdef int [:] vertices_map1_ = vertices_map1\n    cdef int [:] faces_ok_ = faces_ok\n\n    cdef int j, i1, i2, i3\n\n    # Iterate over all faces. When we encounter a degenerate triangle,\n    # we update the vertex map, i.e. we merge the corresponding vertices.\n    for j in range(faces_.shape[0]):\n        i1, i2, i3 = faces_[j][0], faces_[j][1], faces_[j][2]\n        v1, v2, v3 = vertices_[i1], vertices_[i2], vertices_[i3]\n        if v1[0] == v2[0] and v1[1] == v2[1] and v1[2] == v2[2]:\n            vertices_map1_[i1] = vertices_map1_[i2] = imin(vertices_map1_[i1], vertices_map1_[i2])\n            faces_ok_[j] = 0\n        if v1[0] == v3[0] and v1[1] == v3[1] and v1[2] == v3[2]:\n            vertices_map1_[i1] = vertices_map1_[i3] = imin(vertices_map1_[i1], vertices_map1_[i3])\n            faces_ok_[j] = 0\n        if v2[0] == v3[0] and v2[1] == v3[1] and v2[2] == v3[2]:\n            vertices_map1_[i2] = vertices_map1_[i3] = imin(vertices_map1_[i2], vertices_map1_[i3])\n            faces_ok_[j] = 0\n\n    # Create mask and mapping to new vertex indices\n    vertices_ok = vertices_map1 == vertices_map0\n    vertices_map2 = np.cumsum(vertices_ok) - 1\n\n    # Apply selection and mapping\n    faces2 = vertices_map2[vertices_map1[faces[faces_ok>0]]]\n    vertices2 = vertices[vertices_ok]\n    arrays2 = [arr[vertices_ok] for arr in arrays]\n\n    return (vertices2, faces2) + tuple(arrays2)\n\n\ncdef class Cell:\n    \"\"\" Class to keep track of some stuff during the whole cube marching\n    procedure.\n\n    This \"struct\" keeps track of the current cell location, and the values\n    of corners of the cube. Gradients for the cube corners are calculated\n    when needed.\n\n    Additionally, it keeps track of the array of vertices, faces and normals.\n\n    Notes on vertices\n    -----------------\n    The vertices are stored in a C-array that is increased in size with\n    factors of two if needed. The same applies to the faces and normals.\n\n    Notes on faces\n    --------------\n    To keep track of the vertices already defined, this class maintains\n    two faceLayer arrays. faceLayer1 is of the current layer (z-value)\n    and faceLayer2 is of the next. Both face layers have 4 elements per\n    cell in that layer, 1 for each unique edge per cell (see\n    get_index_in_facelayer). These are initialized as -1, and set to the\n    index in the vertex array when a new vertex is created.\n    In summary, this allows us to keep track of the already created\n    vertices without keeping a very big array.\n\n    Notes on normals\n    ----------------\n    The normal is simply defined as the gradient. Each time that a face is\n    created, we also add the gradient of that vertex position to the\n    normals array. The gradients are all calculated from the differences between\n    the 8 corners of the current cube, but because the final value of a normal\n    was contributed from multiple cells, the normals are quite accurate.\n\n    \"\"\"\n\n    # Reference to LUTS object\n    cdef LutProvider luts\n\n    # Location of cube\n    cdef int x\n    cdef int y\n    cdef int z\n\n    # Stepsize\n    cdef int step\n\n    # Values of cube corners (isovalue subtracted)\n    cdef double v0\n    cdef double v1\n    cdef double v2\n    cdef double v3\n    cdef double v4\n    cdef double v5\n    cdef double v6\n    cdef double v7\n\n    # Small arrays to store the above values in (allowing indexing)\n    # and also the gradient at these points\n    cdef double *vv\n    cdef double *vg\n\n    # Max value of the eight corners\n    cdef double vmax\n\n    # Vertex position of center of cube (only calculated if needed)\n    cdef double v12_x\n    cdef double v12_y\n    cdef double v12_z\n    # And corresponding gradient\n    cdef double v12_xg\n    cdef double v12_yg\n    cdef double v12_zg\n    cdef int v12_calculated # a boolean\n\n    # The index value, our magic 256 bit word\n    cdef int index\n\n    # Dimensions of the total volume\n    cdef int nx\n    cdef int ny\n    cdef int nz\n\n    # Arrays with face information\n    cdef int *faceLayer # The current facelayer (reference-copy of one of the below)\n    cdef int *faceLayer1 # The actual first face layer\n    cdef int *faceLayer2 # The actual second face layer\n\n    # Stuff to store the output vertices\n    cdef float *_vertices\n    cdef float *_normals\n    cdef float *_values\n    cdef int _vertexCount\n    cdef int _vertexMaxCount\n\n    # Stuff to store the output faces\n    cdef int *_faces\n    cdef int _faceCount\n    cdef int _faceMaxCount\n\n\n    def __init__(self, LutProvider luts, int nx, int ny, int nz):\n        self.luts = luts\n        self.nx, self.ny, self.nz = nx, ny, nz\n\n        # Allocate face layers\n        self.faceLayer1 = <int *>malloc(self.nx*self.ny*4 * sizeof(int))\n        self.faceLayer2 = <int *>malloc(self.nx*self.ny*4 * sizeof(int))\n\n        if (self.faceLayer1 is NULL or self.faceLayer2 is NULL or\n            self.vv is NULL or self.vg is NULL or self._vertices is NULL or\n            self._normals is NULL or self._values is NULL or\n            self._faces is NULL):\n            raise MemoryError()\n\n        cdef int i\n        for i in range(self.nx*self.ny*4):\n            self.faceLayer1[i] = -1\n            self.faceLayer2[i] = -1\n        self.faceLayer = self.faceLayer1\n\n\n    def __cinit__(self):\n\n        # Init tiny arrays for vertices and gradients at the vertices\n        self.vv = <double *>malloc(8 * sizeof(double))\n        self.vg = <double *>malloc(8*3 * sizeof(double))\n\n        # Init face layers\n        self.faceLayer1 = NULL\n        self.faceLayer2 = NULL\n\n        # Init vertices\n        self._vertexCount = 0\n        self._vertexMaxCount = 8\n        self._vertices = <float *>malloc(self._vertexMaxCount*3 * sizeof(float))\n        self._normals = <float *>malloc(self._vertexMaxCount*3 * sizeof(float))\n        self._values = <float *>malloc(self._vertexMaxCount * sizeof(float))\n        # Clear normals and values\n        cdef int i, j\n        if self._values is not NULL and self._normals is not NULL:\n            for i in range(self._vertexMaxCount):\n                self._values[i] = 0.0\n                for j in range(3):\n                    self._normals[i*3+j] = 0.0\n\n        # Init faces\n        self._faceCount = 0\n        self._faceMaxCount = 8\n        self._faces = <int *>malloc(self._faceMaxCount * sizeof(int))\n\n\n    def __dealloc__(self):\n        free(self.vv)\n        free(self.vg)\n        free(self.faceLayer1)\n        free(self.faceLayer2)\n        free(self._vertices)\n        free(self._normals)\n        free(self._values)\n        free(self._faces)\n\n\n    cdef void _increase_size_vertices(self):\n        \"\"\" Increase the size of the vertices array by a factor two.\n        \"\"\"\n        # Allocate new array\n        cdef int newMaxCount = self._vertexMaxCount * 2\n        cdef float *newVertices = <float *>malloc(newMaxCount*3 * sizeof(float))\n        cdef float *newNormals = <float *>malloc(newMaxCount*3 * sizeof(float))\n        cdef float *newValues = <float *>malloc(newMaxCount * sizeof(float))\n        if newVertices is NULL or newNormals is NULL or newValues is NULL:\n            free(newVertices)\n            free(newNormals)\n            free(newValues)\n            raise MemoryError()\n        # Clear\n        cdef int i, j\n        for i in range(self._vertexCount, newMaxCount):\n            newValues[i] = 0.0\n            for j in range(3):\n                newNormals[i*3+j] = 0.0\n        # Copy\n        for i in range(self._vertexCount):\n            newValues[i] = self._values[i]\n            for j in range(3):\n                newVertices[i*3+j] = self._vertices[i*3+j]\n                newNormals[i*3+j] = self._normals[i*3+j]\n        # Apply\n        free(self._vertices); self._vertices = newVertices\n        free(self._normals); self._normals = newNormals\n        free(self._values); self._values = newValues\n        self._vertexMaxCount = newMaxCount\n\n\n    cdef void _increase_size_faces(self):\n        \"\"\" Increase the size of the faces array by a factor two.\n        \"\"\"\n        # Allocate new array\n        cdef int newMaxCount = self._faceMaxCount * 2\n        cdef int *newFaces = <int *>malloc(newMaxCount * sizeof(int))\n        if newFaces is NULL:\n            raise MemoryError()\n        # Copy\n        cdef int i\n        for i in range(self._faceCount):\n            newFaces[i] = self._faces[i]\n        # Apply\n        free(self._faces)\n        self._faces = newFaces\n        self._faceMaxCount = newMaxCount\n\n\n    ## Adding results\n\n    cdef int add_vertex(self, float x, float y, float z):\n        \"\"\" Add a vertex to the result. Return index in vertex array.\n        \"\"\"\n        # Check if array is large enough\n        if self._vertexCount >= self._vertexMaxCount:\n            self._increase_size_vertices()\n        # Add vertex\n        self._vertices[self._vertexCount*3+0] = x\n        self._vertices[self._vertexCount*3+1] = y\n        self._vertices[self._vertexCount*3+2] = z\n        self._vertexCount += 1\n        return self._vertexCount -1\n\n\n    cdef void add_gradient(self, int vertexIndex, float gx, float gy, float gz):\n        \"\"\" Add a gradient value to the vertex corresponding to the given index.\n        \"\"\"\n        self._normals[vertexIndex*3+0] += gx\n        self._normals[vertexIndex*3+1] += gy\n        self._normals[vertexIndex*3+2] += gz\n\n\n    cdef void add_gradient_from_index(self, int vertexIndex, int i, float strength):\n        \"\"\" Add a gradient value to the vertex corresponding to the given index.\n        vertexIndex is the index in the large array of vertices that is returned.\n        i is the index of the array of vertices 0-7 for the current cell.\n        \"\"\"\n        self.add_gradient(vertexIndex, self.vg[i*3+0] * strength, self.vg[i*3+1] * strength, self.vg[i*3+2] * strength)\n\n\n    cdef add_face(self, int index):\n        \"\"\" Add a face to the result. Also updates the value.\n        \"\"\"\n        # Check if array is large enough\n        if self._faceCount >= self._faceMaxCount:\n            self._increase_size_faces()\n        # Add face\n        self._faces[self._faceCount] = index\n        self._faceCount += 1\n        # Also update value\n        if self.vmax > self._values[index]:\n            self._values[index] = self.vmax\n\n\n    ## Getting results\n\n    def get_vertices(self):\n        \"\"\" Get the final vertex array.\n        \"\"\"\n        vertices = np.empty((self._vertexCount,3), np.float32)\n        cdef float [:, :] vertices_ = vertices\n        cdef int i, j\n        for i in range(self._vertexCount):\n            for j in range(3):\n                vertices_[i, j] = self._vertices[i*3+j]\n        return vertices\n\n    def get_normals(self):\n        \"\"\" Get the final normals array.\n        The normals are normalized to unit length.\n        \"\"\"\n        normals = np.empty((self._vertexCount,3), np.float32)\n        cdef float [:, :] normals_ = normals\n\n        cdef int i, j\n        cdef double length, dtmp\n        for i in range(self._vertexCount):\n            length = 0.0\n            for j in range(3):\n                dtmp = self._normals[i*3+j] # Make it double before taking **2!\n                length +=  dtmp*dtmp\n            if length > 0.0:\n                length = 1.0 / length**0.5\n            for j in range(3):\n                normals_[i,j] = self._normals[i*3+j] * length\n        return normals\n\n    def get_faces(self):\n        faces = np.empty((self._faceCount,), np.int32)\n        cdef int [:] faces_ = faces\n        cdef int i, j\n        for i in range(self._faceCount):\n            faces_[i] = self._faces[i]\n        return faces\n\n    def get_values(self):\n        values = np.empty((self._vertexCount,), np.float32)\n        cdef float [:] values_ = values\n        cdef int i, j\n        for i in range(self._vertexCount):\n            values_[i] = self._values[i]\n        return values\n\n\n    ## Called from marching cube function\n\n    cdef void new_z_value(self):\n        \"\"\" This method should be called each time a new z layer is entered.\n        We will swap the layers with face information and empty the second.\n        \"\"\"\n        # Swap layers\n        self.faceLayer1, self.faceLayer2 = self.faceLayer2, self.faceLayer1\n        # Empty last\n        cdef int i\n        for i in range(self.nx*self.ny*4):\n            self.faceLayer2[i] = -1\n\n\n    cdef void set_cube(self,    double isovalue, int x, int y, int z, int step,\n                                double v0, double v1, double v2, double v3,\n                                double v4, double v5, double v6, double v7):\n        \"\"\" Set the cube to the new location.\n\n        Set the values of the cube corners. The isovalue is subtracted\n        from them, such that in further calculations the isovalue can be\n        taken as zero.\n\n        This method also calculated the magic 256 word to identify the\n        cases (i.e. cell.index).\n        \"\"\"\n\n        # Set location and step\n        self.x = x\n        self.y = y\n        self.z = z\n        self.step = step\n\n        # Set values\n        self.v0 = v0 - isovalue\n        self.v1 = v1 - isovalue\n        self.v2 = v2 - isovalue\n        self.v3 = v3 - isovalue\n        self.v4 = v4 - isovalue\n        self.v5 = v5 - isovalue\n        self.v6 = v6 - isovalue\n        self.v7 = v7 - isovalue\n\n        # Calculate index\n        cdef int index = 0\n        if self.v0 > 0.0:   index += 1\n        if self.v1 > 0.0:   index += 2\n        if self.v2 > 0.0:   index += 4\n        if self.v3 > 0.0:   index += 8\n        if self.v4 > 0.0:   index += 16\n        if self.v5 > 0.0:   index += 32\n        if self.v6 > 0.0:   index += 64\n        if self.v7 > 0.0:   index += 128\n        self.index = index\n\n        # Reset c12\n        self.v12_calculated = 0\n\n\n    cdef void add_triangles(self, Lut lut, int lutIndex, int nt):\n        \"\"\" Add triangles.\n\n        The vertices for the triangles are specified in the given\n        Lut at the specified index. There are nt triangles.\n\n        The reason that nt should be given is because it is often known\n        beforehand.\n\n        \"\"\"\n\n        cdef int i, j\n        cdef int vi\n\n        self.prepare_for_adding_triangles()\n\n        for i in range(nt):\n            for j in range(3):\n                # Get two sides for each element in this vertex\n                vi = lut.get2(lutIndex, i*3+j)\n                self._add_face_from_edge_index(vi)\n\n\n    cdef void add_triangles2(self, Lut lut, int lutIndex, int lutIndex2, int nt):\n        \"\"\" Same as add_triangles, except that now the geometry is in a LUT\n        with 3 dimensions, and an extra index is provided.\n\n        \"\"\"\n        cdef int i, j\n        cdef int vi\n\n        self.prepare_for_adding_triangles()\n\n        for i in range(nt):\n            for j in range(3):\n                # Get two sides for each element in this vertex\n                vi = lut.get3(lutIndex, lutIndex2, i*3+j)\n                self._add_face_from_edge_index(vi)\n\n    ## Used internally\n\n    cdef void _add_face_from_edge_index(self, int vi):\n        \"\"\" Add one face from an edge index. Only adds a face if the\n        vertex already exists. Otherwise also adds a vertex and applies\n        interpolation.\n        \"\"\"\n\n        # typedefs\n        cdef int indexInVertexArray, indexInFaceLayer\n        cdef int dx1, dy1, dz1\n        cdef int dx2, dy2, dz2\n        cdef int index1, index2\n        cdef double tmpf1, tmpf2\n        cdef double fx, fy, fz, ff\n        cdef double stp = <double>self.step\n\n        # Get index in the face layer and corresponding vertex number\n        indexInFaceLayer = self.get_index_in_facelayer(vi)\n        indexInVertexArray = self.faceLayer[indexInFaceLayer]\n\n        # If we have the center vertex, we have things pre-calculated,\n        # otherwise we need to interpolate.\n        # In both cases we distinguish between having this vertex already\n        # or not.\n\n        if vi == 12: # center vertex\n            if self.v12_calculated == 0:\n                self.calculate_center_vertex()\n            if indexInVertexArray >= 0:\n                # Vertex already calculated, only need to add face and gradient\n                self.add_face(indexInVertexArray)\n                self.add_gradient(indexInVertexArray, self.v12_xg, self.v12_yg, self.v12_zg)\n            else:\n                # Add precalculated center vertex position (is interpolated)\n                indexInVertexArray = self.add_vertex( self.v12_x, self.v12_y, self.v12_z)\n                # Update face layer\n                self.faceLayer[indexInFaceLayer] = indexInVertexArray\n                # Add face and gradient\n                self.add_face(indexInVertexArray)\n                self.add_gradient(indexInVertexArray, self.v12_xg, self.v12_yg, self.v12_zg)\n\n        else:\n\n            # Get relative edge indices for x, y and z\n            dx1, dx2 = self.luts.EDGESRELX.get2(vi,0), self.luts.EDGESRELX.get2(vi,1)\n            dy1, dy2 = self.luts.EDGESRELY.get2(vi,0), self.luts.EDGESRELY.get2(vi,1)\n            dz1, dz2 = self.luts.EDGESRELZ.get2(vi,0), self.luts.EDGESRELZ.get2(vi,1)\n            # Make two vertex indices\n            index1 = dz1*4 + dy1*2 + dx1\n            index2 = dz2*4 + dy2*2 + dx2\n            # Define strength of both corners\n            tmpf1 = 1.0 / (FLT_EPSILON + dabs(self.vv[index1]))\n            tmpf2 = 1.0 / (FLT_EPSILON + dabs(self.vv[index2]))\n\n            # print('indexInVertexArray', self.x, self.y, self.z, '-', vi, indexInVertexArray, indexInFaceLayer)\n\n            if indexInVertexArray >= 0:\n                # Vertex already calculated, only need to add face and gradient\n                self.add_face(indexInVertexArray)\n                self.add_gradient_from_index(indexInVertexArray, index1, tmpf1)\n                self.add_gradient_from_index(indexInVertexArray, index2, tmpf2)\n\n            else:\n                # Interpolate by applying a kind of center-of-mass method\n                fx, fy, fz, ff = 0.0, 0.0, 0.0, 0.0\n                fx += <double>dx1 * tmpf1;  fy += <double>dy1 * tmpf1;  fz += <double>dz1 * tmpf1;  ff += tmpf1\n                fx += <double>dx2 * tmpf2;  fy += <double>dy2 * tmpf2;  fz += <double>dz2 * tmpf2;  ff += tmpf2\n\n                # Add vertex\n                indexInVertexArray = self.add_vertex(\n                                <double>self.x + stp*fx/ff,\n                                <double>self.y + stp*fy/ff,\n                                <double>self.z + stp*fz/ff )\n                # Update face layer\n                self.faceLayer[indexInFaceLayer] = indexInVertexArray\n                # Add face and gradient\n                self.add_face(indexInVertexArray)\n                self.add_gradient_from_index(indexInVertexArray, index1, tmpf1)\n                self.add_gradient_from_index(indexInVertexArray, index2, tmpf2)\n\n\n#         # Create vertex non-interpolated\n#         self.add_vertex( self.x + 0.5* dx1 + 0.5 * dx2,\n#                         self.y + 0.5* dy1 + 0.5 * dy2,\n#                         self.z + 0.5* dz1 + 0.5 * dz2 )\n\n\n\n    cdef int get_index_in_facelayer(self, int vi):\n        \"\"\"\n        Get the index of a vertex position, given the edge on which it lies.\n        We keep a list of faces so we can reuse vertices. This improves\n        speed because we need less interpolation, and the result is more\n        compact and can be visualized better because normals can be\n        interpolated.\n\n        For each cell, we store 4 vertex indices; all other edges can be\n        represented as the edge of another cell.  The fourth is the center vertex.\n\n        This method returns -1 if no vertex has been defined yet.\n\n\n              vertices              edges                edge-indices per cell\n        *         7 ________ 6           _____6__             ________\n        *         /|       /|         7/|       /|          /|       /|\n        *       /  |     /  |        /  |     /5 |        /  |     /  |\n        *   4 /_______ /    |      /__4____ /    10     /_______ /    |\n        *    |     |  |5    |     |    11  |     |     |     |  |     |\n        *    |    3|__|_____|2    |     |__|__2__|     |     |__|_____|\n        *    |    /   |    /      8   3/   9    /      2    /   |    /\n        *    |  /     |  /        |  /     |  /1       |  1     |  /\n        *    |/_______|/          |/___0___|/          |/___0___|/\n        *   0          1\n        */\n        \"\"\"\n\n        # Init indices, both are corrected below\n        cdef int i = self.nx * self.y + self.x  # Index of cube to get vertex at\n        cdef int j = 0 # Vertex number for that cell\n        cdef int vi_ = vi\n\n        cdef int *faceLayer\n\n        # Select either upper or lower half\n        if vi < 8:\n            #  8 horizontal edges\n            if vi < 4:\n                faceLayer = self.faceLayer1\n            else:\n                vi -= 4\n                faceLayer = self.faceLayer2\n\n            # Calculate actual index based on edge\n            #if vi == 0: pass  # no step\n            if vi == 1:  # step in x\n                i += self.step\n                j = 1\n            elif vi == 2:  # step in y\n                i += self.nx * self.step\n            elif vi == 3:  # no step\n                j = 1\n\n        elif vi < 12:\n            # 4 vertical edges\n            faceLayer = self.faceLayer1\n            j = 2\n\n            #if vi == 8: pass # no step\n            if vi == 9:   # step in x\n                i += self.step\n            elif vi == 10:   # step in x and y\n                i += self.nx * self.step + self.step\n            elif vi == 11:  # step in y\n                i += self.nx * self.step\n\n        else:\n            # center vertex\n            faceLayer = self.faceLayer1\n            j = 3\n\n        # Store facelayer and return index\n        self.faceLayer = faceLayer # Dirty way of returning a value\n        return 4*i + j\n\n\n    cdef void prepare_for_adding_triangles(self):\n        \"\"\" Calculates some things to help adding the triangles:\n        array with corner values, max corner value, gradient at each corner.\n        \"\"\"\n\n        cdef int i\n\n        # Copy values in array so we can index them. Note the misalignment\n        # because the numbering does not correspond with bitwise OR of xyz.\n        self.vv[0] = self.v0\n        self.vv[1] = self.v1\n        self.vv[2] = self.v3#\n        self.vv[3] = self.v2#\n        self.vv[4] = self.v4\n        self.vv[5] = self.v5\n        self.vv[6] = self.v7#\n        self.vv[7] = self.v6#\n\n        # Calculate max\n        cdef double vmin, vmax\n        vmin, vmax = 0.0, 0.0\n        for i in range(8):\n            if self.vv[i] > vmax:\n                vmax = self.vv[i]\n            if self.vv[i] < vmin:\n                vmin = self.vv[i]\n        self.vmax = vmax-vmin\n\n        # Calculate gradients\n        # Derivatives, selected to always point in same direction.\n        # Note that many corners have the same components as other points,\n        # by interpolating  and averaging the normals this is solved.\n        # todo: we can potentially reuse these similar to how we store vertex indices in face layers\n        self.vg[0*3+0], self.vg[0*3+1], self.vg[0*3+2] = self.v0-self.v1, self.v0-self.v3, self.v0-self.v4\n        self.vg[1*3+0], self.vg[1*3+1], self.vg[1*3+2] = self.v0-self.v1, self.v1-self.v2, self.v1-self.v5\n        self.vg[2*3+0], self.vg[2*3+1], self.vg[2*3+2] = self.v3-self.v2, self.v1-self.v2, self.v2-self.v6\n        self.vg[3*3+0], self.vg[3*3+1], self.vg[3*3+2] = self.v3-self.v2, self.v0-self.v3, self.v3-self.v7\n        self.vg[4*3+0], self.vg[4*3+1], self.vg[4*3+2] = self.v4-self.v5, self.v4-self.v7, self.v0-self.v4\n        self.vg[5*3+0], self.vg[5*3+1], self.vg[5*3+2] = self.v4-self.v5, self.v5-self.v6, self.v1-self.v5\n        self.vg[6*3+0], self.vg[6*3+1], self.vg[6*3+2] = self.v7-self.v6, self.v5-self.v6, self.v2-self.v6\n        self.vg[7*3+0], self.vg[7*3+1], self.vg[7*3+2] = self.v7-self.v6, self.v4-self.v7, self.v3-self.v7\n\n\n    cdef void calculate_center_vertex(self):\n        \"\"\" Calculate interpolated center vertex and its gradient.\n        \"\"\"\n        cdef double v0, v1, v2, v3, v4, v5, v6, v7\n        cdef double fx, fy, fz, ff\n        fx, fy, fz, ff = 0.0, 0.0, 0.0, 0.0\n\n        # Define \"strength\" of each corner of the cube that we need\n        v0 = 1.0 / (FLT_EPSILON + dabs(self.v0))\n        v1 = 1.0 / (FLT_EPSILON + dabs(self.v1))\n        v2 = 1.0 / (FLT_EPSILON + dabs(self.v2))\n        v3 = 1.0 / (FLT_EPSILON + dabs(self.v3))\n        v4 = 1.0 / (FLT_EPSILON + dabs(self.v4))\n        v5 = 1.0 / (FLT_EPSILON + dabs(self.v5))\n        v6 = 1.0 / (FLT_EPSILON + dabs(self.v6))\n        v7 = 1.0 / (FLT_EPSILON + dabs(self.v7))\n\n        # Apply a kind of center-of-mass method\n        fx += 0.0*v0;  fy += 0.0*v0;  fz += 0.0*v0;  ff += v0\n        fx += 1.0*v1;  fy += 0.0*v1;  fz += 0.0*v1;  ff += v1\n        fx += 1.0*v2;  fy += 1.0*v2;  fz += 0.0*v2;  ff += v2\n        fx += 0.0*v3;  fy += 1.0*v3;  fz += 0.0*v3;  ff += v3\n        fx += 0.0*v4;  fy += 0.0*v4;  fz += 1.0*v4;  ff += v4\n        fx += 1.0*v5;  fy += 0.0*v5;  fz += 1.0*v5;  ff += v5\n        fx += 1.0*v6;  fy += 1.0*v6;  fz += 1.0*v6;  ff += v6\n        fx += 0.0*v7;  fy += 1.0*v7;  fz += 1.0*v7;  ff += v7\n\n        # Store\n        cdef double stp = <double>self.step\n        self.v12_x = self.x + stp * fx / ff\n        self.v12_y = self.y + stp * fy / ff\n        self.v12_z = self.z + stp * fz / ff\n\n        # Also pre-calculate gradient of center\n        # note that prepare_for_adding_triangles() must have been called for\n        # the gradient data to exist.\n        self.v12_xg = ( v0*self.vg[0*3+0] + v1*self.vg[1*3+0] + v2*self.vg[2*3+0] + v3*self.vg[3*3+0] +\n                        v4*self.vg[4*3+0] + v5*self.vg[5*3+0] + v6*self.vg[6*3+0] + v7*self.vg[7*3+0] )\n        self.v12_yg = ( v0*self.vg[0*3+1] + v1*self.vg[1*3+1] + v2*self.vg[2*3+1] + v3*self.vg[3*3+1] +\n                        v4*self.vg[4*3+1] + v5*self.vg[5*3+1] + v6*self.vg[6*3+1] + v7*self.vg[7*3+1] )\n        self.v12_xg = ( v0*self.vg[0*3+2] + v1*self.vg[1*3+2] + v2*self.vg[2*3+2] + v3*self.vg[3*3+2] +\n                        v4*self.vg[4*3+2] + v5*self.vg[5*3+2] + v6*self.vg[6*3+2] + v7*self.vg[7*3+2] )\n\n        # Set flag that this stuff is calculated\n        self.v12_calculated = 1\n\n\n\ncdef class Lut:\n    \"\"\" Representation of a lookup table.\n    The tables are initially defined as numpy arrays. On initialization,\n    this class converts them to a C array for fast access.\n    This class defines functions to look up values using 1, 2 or 3 indices.\n    \"\"\"\n\n    cdef signed char* VALUES\n    cdef int L0 # Length\n    cdef int L1 # size of tuple\n    cdef int L2 # size of tuple in tuple (if any)\n\n    def __init__(self, array):\n\n        # Get the shape of the LUT\n        self.L1 = 1\n        self.L2 = 1\n        #\n        self.L0 = array.shape[0]\n        if array.ndim > 1:\n            self.L1 = array.shape[1]\n        if array.ndim > 2:\n            self.L2 = array.shape[2]\n\n        # Copy the contents\n        array = array.ravel()\n        cdef int n, N\n        N = self.L0 * self.L1 * self.L2\n        self.VALUES = <signed char *> malloc(N * sizeof(signed char))\n        if self.VALUES is NULL:\n            raise MemoryError()\n        for n in range(N):\n            self.VALUES[n] = array[n]\n\n    def __cinit__(self):\n        self.VALUES = NULL\n\n    def __dealloc__(self):\n        if self.VALUES is not NULL:\n            free(self.VALUES)\n\n    cdef int get1(self, int i0):\n        return self.VALUES[i0]\n\n    cdef int get2(self, int i0, int i1):\n        return self.VALUES[i0*self.L1 + i1]\n\n    cdef int get3(self, int i0, int i1, int i2):\n        return self.VALUES[i0*self.L1*self.L2 + i1*self.L2 + i2]\n\n\n\ncdef class LutProvider:\n    \"\"\" Class that provides a common interface to the many lookup tables\n    used by the algorithm.\n    All the lists of lut names are autogenerated to prevent human error.\n    \"\"\"\n\n    cdef Lut EDGESRELX # Edges relative X\n    cdef Lut EDGESRELY\n    cdef Lut EDGESRELZ\n\n    cdef Lut CASESCLASSIC\n    cdef Lut CASES\n\n    cdef Lut TILING1\n    cdef Lut TILING2\n    cdef Lut TILING3_1\n    cdef Lut TILING3_2\n    cdef Lut TILING4_1\n    cdef Lut TILING4_2\n    cdef Lut TILING5\n    cdef Lut TILING6_1_1\n    cdef Lut TILING6_1_2\n    cdef Lut TILING6_2\n    cdef Lut TILING7_1\n    cdef Lut TILING7_2\n    cdef Lut TILING7_3\n    cdef Lut TILING7_4_1\n    cdef Lut TILING7_4_2\n    cdef Lut TILING8\n    cdef Lut TILING9\n    cdef Lut TILING10_1_1\n    cdef Lut TILING10_1_1_\n    cdef Lut TILING10_1_2\n    cdef Lut TILING10_2\n    cdef Lut TILING10_2_\n    cdef Lut TILING11\n    cdef Lut TILING12_1_1\n    cdef Lut TILING12_1_1_\n    cdef Lut TILING12_1_2\n    cdef Lut TILING12_2\n    cdef Lut TILING12_2_\n    cdef Lut TILING13_1\n    cdef Lut TILING13_1_\n    cdef Lut TILING13_2\n    cdef Lut TILING13_2_\n    cdef Lut TILING13_3\n    cdef Lut TILING13_3_\n    cdef Lut TILING13_4\n    cdef Lut TILING13_5_1\n    cdef Lut TILING13_5_2\n    cdef Lut TILING14\n\n    cdef Lut TEST3\n    cdef Lut TEST4\n    cdef Lut TEST6\n    cdef Lut TEST7\n    cdef Lut TEST10\n    cdef Lut TEST12\n    cdef Lut TEST13\n\n    cdef Lut SUBCONFIG13\n\n\n    def __init__(self, EDGESRELX, EDGESRELY, EDGESRELZ, CASESCLASSIC, CASES,\n\n            TILING1, TILING2, TILING3_1, TILING3_2, TILING4_1, TILING4_2,\n            TILING5, TILING6_1_1, TILING6_1_2, TILING6_2, TILING7_1, TILING7_2,\n            TILING7_3, TILING7_4_1, TILING7_4_2, TILING8, TILING9,\n            TILING10_1_1, TILING10_1_1_, TILING10_1_2, TILING10_2, TILING10_2_,\n            TILING11, TILING12_1_1, TILING12_1_1_, TILING12_1_2, TILING12_2,\n            TILING12_2_, TILING13_1, TILING13_1_, TILING13_2, TILING13_2_,\n            TILING13_3, TILING13_3_, TILING13_4, TILING13_5_1, TILING13_5_2,\n            TILING14,\n\n            TEST3, TEST4, TEST6, TEST7, TEST10, TEST12, TEST13,\n            SUBCONFIG13,\n            ):\n\n        self.EDGESRELX = Lut(EDGESRELX)\n        self.EDGESRELY = Lut(EDGESRELY)\n        self.EDGESRELZ = Lut(EDGESRELZ)\n\n        self.CASESCLASSIC = Lut(CASESCLASSIC)\n        self.CASES = Lut(CASES)\n\n        self.TILING1 = Lut(TILING1)\n        self.TILING2 = Lut(TILING2)\n        self.TILING3_1 = Lut(TILING3_1)\n        self.TILING3_2 = Lut(TILING3_2)\n        self.TILING4_1 = Lut(TILING4_1)\n        self.TILING4_2 = Lut(TILING4_2)\n        self.TILING5 = Lut(TILING5)\n        self.TILING6_1_1 = Lut(TILING6_1_1)\n        self.TILING6_1_2 = Lut(TILING6_1_2)\n        self.TILING6_2 = Lut(TILING6_2)\n        self.TILING7_1 = Lut(TILING7_1)\n        self.TILING7_2 = Lut(TILING7_2)\n        self.TILING7_3 = Lut(TILING7_3)\n        self.TILING7_4_1 = Lut(TILING7_4_1)\n        self.TILING7_4_2 = Lut(TILING7_4_2)\n        self.TILING8 = Lut(TILING8)\n        self.TILING9 = Lut(TILING9)\n        self.TILING10_1_1 = Lut(TILING10_1_1)\n        self.TILING10_1_1_ = Lut(TILING10_1_1_)\n        self.TILING10_1_2 = Lut(TILING10_1_2)\n        self.TILING10_2 = Lut(TILING10_2)\n        self.TILING10_2_ = Lut(TILING10_2_)\n        self.TILING11 = Lut(TILING11)\n        self.TILING12_1_1 = Lut(TILING12_1_1)\n        self.TILING12_1_1_ = Lut(TILING12_1_1_)\n        self.TILING12_1_2 = Lut(TILING12_1_2)\n        self.TILING12_2 = Lut(TILING12_2)\n        self.TILING12_2_ = Lut(TILING12_2_)\n        self.TILING13_1 = Lut(TILING13_1)\n        self.TILING13_1_ = Lut(TILING13_1_)\n        self.TILING13_2 = Lut(TILING13_2)\n        self.TILING13_2_ = Lut(TILING13_2_)\n        self.TILING13_3 = Lut(TILING13_3)\n        self.TILING13_3_ = Lut(TILING13_3_)\n        self.TILING13_4 = Lut(TILING13_4)\n        self.TILING13_5_1 = Lut(TILING13_5_1)\n        self.TILING13_5_2 = Lut(TILING13_5_2)\n        self.TILING14 = Lut(TILING14)\n\n        self.TEST3 = Lut(TEST3)\n        self.TEST4 = Lut(TEST4)\n        self.TEST6 = Lut(TEST6)\n        self.TEST7 = Lut(TEST7)\n        self.TEST10 = Lut(TEST10)\n        self.TEST12 = Lut(TEST12)\n        self.TEST13 = Lut(TEST13)\n\n        self.SUBCONFIG13 = Lut(SUBCONFIG13)\n\ndef marching_cubes(float[:, :, :] im not None, double isovalue,\n                   LutProvider luts, int st=1, int classic=0,\n                   np.ndarray[np.npy_bool, ndim=3, cast=True] mask=None):\n    \"\"\" marching_cubes(im, double isovalue, LutProvider luts, int st=1, int classic=0)\n    Main entry to apply marching cubes.\n\n    Masked version of marching cubes. This function will check a\n    masking array (same size as im) to decide if the algorithm must be\n    computed for a given voxel. This adds a small overhead that\n    rapidly gets compensated by the fewer computed cubes\n    Returns (vertices, faces, normals, values)\n    \"\"\"\n    # Get dimemsnions\n    cdef int Nx, Ny, Nz\n    Nx, Ny, Nz = im.shape[2], im.shape[1], im.shape[0]\n\n    # Create cell to use throughout\n    cdef Cell cell = Cell(luts, Nx, Ny, Nz)\n\n    # Typedef variables\n    cdef int x, y, z, x_st, y_st, z_st\n    cdef int nt\n    cdef int case, config, subconfig\n    cdef bint no_mask = mask is None\n    # Unfortunately specifying a step in range() significantly degrades\n    # performance. Therefore we use a while loop.\n    # we have:  max_x = Nx_bound + st + st - 1\n    #       ->  Nx_bound = max_allowable_x + 1 - 2 * st\n    #       ->  Nx_bound = Nx - 2 * st\n    assert st > 0\n    cdef int Nx_bound, Ny_bound, Nz_bound\n    Nx_bound, Ny_bound, Nz_bound = Nx - 2 * st, Ny - 2 * st, Nz - 2 * st  # precalculated index range\n\n    z = -st\n    while z < Nz_bound:\n        z += st\n        z_st = z + st\n\n        cell.new_z_value()  # Indicate that we enter a new layer\n        y = -st\n        while y < Ny_bound:\n            y += st\n            y_st = y + st\n\n            x = -st\n            while x < Nx_bound:\n                x += st\n                x_st = x + st\n                if no_mask or mask[z_st, y_st, x_st]:\n                    # Initialize cell\n                    cell.set_cube(isovalue, x, y, z, st,\n                        im[z   ,y, x], im[z   ,y, x_st], im[z   ,y_st, x_st], im[z   ,y_st, x],\n                        im[z_st,y, x], im[z_st,y, x_st], im[z_st,y_st, x_st], im[z_st,y_st, x] )\n\n                    # Do classic!\n                    if classic:\n                        # Determine number of vertices\n                        nt = 0\n                        while luts.CASESCLASSIC.get2(cell.index, 3*nt) != -1:\n                            nt += 1\n                        # Add triangles\n                        if nt > 0:\n                            cell.add_triangles(luts.CASESCLASSIC, cell.index, nt)\n                    else:\n                        # Get case, if non-nul, enter the big switch\n                        case = luts.CASES.get2(cell.index, 0)\n                        if case > 0:\n                            config = luts.CASES.get2(cell.index, 1)\n                            the_big_switch(luts, cell, case, config)\n\n    # Done\n    return cell.get_vertices(), cell.get_faces(), cell.get_normals(), cell.get_values()\n\n\n\ndef marching_cubes_udf(float[:, :, :] im not None, float[:, :, :, :] grads not None,\n                   LutProvider luts, int st=1, int classic=0,\n                   np.ndarray[np.npy_bool, ndim=3, cast=True] mask=None):\n    \"\"\" marching_cubes(im, grads, double isovalue, LutProvider luts, int st=1, int classic=0)\n    Main entry to apply marching cubes.\n\n    Masked version of marching cubes. This function will check a\n    masking array (same size as im) to decide if the algorithm must be\n    computed for a given voxel. This adds a small overhead that\n    rapidly gets compensated by the fewer computed cubes\n    Returns (vertices, faces, normals, values)\n    \"\"\"\n    # Get dimemsnions\n    cdef int Nx, Ny, Nz\n    Nx, Ny, Nz = im.shape[2], im.shape[1], im.shape[0]\n    # Compute voxel size\n    cdef voxel_size = 2.0 / (Nx - 1)\n\n    # Create cell to use throughout\n    cdef Cell cell = Cell(luts, Nx, Ny, Nz)\n\n    # Typedef variables\n    cdef int x, y, z, x_st, y_st, z_st\n    cdef int nt\n    cdef int case, config, subconfig\n    cdef bint no_mask = mask is None\n    # Unfortunately specifying a step in range() significantly degrades\n    # performance. Therefore we use a while loop.\n    # we have:  max_x = Nx_bound + st + st - 1\n    #       ->  Nx_bound = max_allowable_x + 1 - 2 * st\n    #       ->  Nx_bound = Nx - 2 * st\n    assert st > 0\n    cdef int Nx_bound, Ny_bound, Nz_bound\n    Nx_bound, Ny_bound, Nz_bound = Nx - 2 * st, Ny - 2 * st, Nz - 2 * st  # precalculated index range\n    cdef float[:] base_vec\n\n    cdef float avg_cube_val\n    cdef float max_cube_val\n    cdef np.ndarray inwards_facing_normals_ref= np.array([[[[1., 1., 1.],\n                                        [1., 1., -1.]],\n                                        [[1., -1., 1.],\n                                        [1., -1., -1.]]],\n                                        [[[-1., 1., 1.],\n                                        [-1., 1., -1.]],\n                                        [[-1., -1., 1.],\n                                        [-1., -1., -1.]]]], dtype=np.float32)\n    cdef int inwards_facing_normals_bool\n\n\n    z = -st\n    while z < Nz_bound:\n        z += st\n        z_st = z + st\n\n        cell.new_z_value()  # Indicate that we enter a new layer\n        y = -st\n        while y < Ny_bound:\n            y += st\n            y_st = y + st\n\n            x = -st\n            while x < Nx_bound:\n                x += st\n                x_st = x + st\n                if no_mask or mask[z_st, y_st, x_st]:\n                    \n                    avg_cube_val = avg_cube( im[z   ,y, x], im[z   ,y, x_st], im[z   ,y_st, x_st], im[z   ,y_st, x],\n                                    im[z_st,y, x], im[z_st,y, x_st], im[z_st,y_st, x_st], im[z_st,y_st, x])\n\n                    max_cube_val = max_cube( im[z   ,y, x], im[z   ,y, x_st], im[z   ,y_st, x_st], im[z   ,y_st, x],\n                                    im[z_st,y, x], im[z_st,y, x_st], im[z_st,y_st, x_st], im[z_st,y_st, x])\n\n                    if avg_cube_val < 1.05 * voxel_size and max_cube_val <= 1.74 * voxel_size:\n                        # Choose base vector for the dot product that is not (0,0,0)\n                        # in a corner of the cube\n                        if not non_zero_norm(grads[z,y,x]) == 0:\n                            base_vec = grads[z,y,x]\n                        elif not non_zero_norm(grads[z,y,x_st]) == 0:\n                            base_vec = grads[z,y,x_st]\n                        elif not non_zero_norm(grads[z,y_st,x]) == 0:\n                            base_vec = grads[z,y_st,x]\n                        elif not non_zero_norm(grads[z,y_st,x_st]) == 0:\n                            base_vec = grads[z,y_st,x_st]\n                        elif not non_zero_norm(grads[z_st,y,x]) == 0:\n                            base_vec = grads[z_st,y,x]\n                        elif not non_zero_norm(grads[z_st,y,x_st]) == 0:\n                            base_vec = grads[z_st,y,x_st]\n                        elif not non_zero_norm(grads[z_st,y_st,x]) == 0:\n                            base_vec = grads[z_st,y_st,x]\n                        elif not non_zero_norm(grads[z_st,y_st,x_st]) == 0:\n                            base_vec = grads[z_st,y_st,x_st]\n                        # else:\n                        #     print('all 0 vec...')\n                    \n                        # Initialize cell\n                        cell.set_cube(0.0, x, y, z, st,\n                            my_sign(dot3(base_vec, grads[z   ,y, x])) * im[z   ,y, x],\n                            my_sign(dot3(base_vec, grads[z   ,y, x_st])) * im[z   ,y, x_st],\n                            my_sign(dot3(base_vec, grads[z   ,y_st, x_st])) * im[z   ,y_st, x_st],\n                            my_sign(dot3(base_vec, grads[z   ,y_st, x])) * im[z   ,y_st, x],\n                            my_sign(dot3(base_vec, grads[z_st,y, x])) * im[z_st,y, x],\n                            my_sign(dot3(base_vec, grads[z_st,y, x_st])) * im[z_st,y, x_st],\n                            my_sign(dot3(base_vec, grads[z_st,y_st, x_st])) * im[z_st,y_st, x_st],\n                            my_sign(dot3(base_vec, grads[z_st,y_st, x])) * im[z_st,y_st, x] )\n\n                        # Get case, if non-nul, enter the big switch\n                        case = luts.CASES.get2(cell.index, 0)\n                        if case > 0:\n                            inwards_facing_normals_bool = inwards_facing_normals(inwards_facing_normals_ref, \n                                                            grads[z   ,y,x], grads[z   ,y,x_st], grads[z   ,y_st,x_st], grads[z   ,y_st,x],\n                                                            grads[z_st,y,x], grads[z_st,y,x_st], grads[z_st,y_st,x_st], grads[z_st,y_st,x])\n                            if inwards_facing_normals_bool:\n                                config = luts.CASES.get2(cell.index, 1)\n                                the_big_switch(luts, cell, case, config)\n\n\n    # Done\n    return cell.get_vertices(), cell.get_faces(), cell.get_normals(), cell.get_values()\n\n\n\ncdef float my_sign(float a):\n    if a > 0:\n        return 1.\n    if a < 0:\n        return -1.\n    if a == 0:\n        return 0.\n\n\ncdef int non_zero_norm(float[:] a):\n    \"\"\" Returns True if the sum of absolute values > 0\n    \"\"\"\n    return (abs(a[0]) + abs(a[1]) + abs(a[2])) > 0\n\n\ncdef float avg_cube(float v1, float v2, float v3, float v4,\n                    float v5, float v6, float v7, float v8):\n    \"\"\" Return the average value of v_i's\n    \"\"\"\n    return 0.125 * (v1 + v2 + v3 + v4 + v5 + v6 + v7 + v8)\n\ncdef float max_cube(float v1, float v2, float v3, float v4,\n                    float v5, float v6, float v7, float v8):\n    \"\"\" Return the max value of v_i's\n    \"\"\"\n    return max(v1, max(\n                v2, max(\n                v3, max(\n                v4, max(\n                v5, max(\n                v6, max(\n                v7, v8)))))))\n\ncdef float dot3(float[:] a, float[:] b):\n    return a[0]*b[0] + a[1]*b[1] + a[2]*b[2]\n\n\ncdef int inwards_facing_normals(np.ndarray inwards_facing_normals_ref,\n                                float[:] g1, float[:] g2, float[:] g3, float[:] g4,\n                                float[:] g5, float[:] g6, float[:] g7, float[:] g8):\n    \"\"\" Return True if our heurisitic determines that normals are inwards facing\n    \"\"\"\n    return (avg_cube(dot3(inwards_facing_normals_ref[0,0,0], g1) >= -0.1,\n                    dot3(inwards_facing_normals_ref[0,0,1], g2) >= -0.1,\n                    dot3(inwards_facing_normals_ref[0,1,1], g3) >= -0.1,\n                    dot3(inwards_facing_normals_ref[0,1,0], g4) >= -0.1,\n                    dot3(inwards_facing_normals_ref[1,0,0], g5) >= -0.1,\n                    dot3(inwards_facing_normals_ref[1,0,1], g6) >= -0.1,\n                    dot3(inwards_facing_normals_ref[1,1,1], g7) >= -0.1,\n                    dot3(inwards_facing_normals_ref[1,1,0], g8) >= -0.1,\n                             ) >= 2./8.)\n\n\n# cdef int inwards_facing_normals(float[:,:,:,:] inwards_facing_normals_ref,\n#                                 float[:] g1, float[:] g2, float[:] g3, float[:] g4,\n#                                 float[:] g5, float[:] g6, float[:] g7, float[:] g8):\n#     \"\"\" Return True if our heurisitic determines that normals are inwards facing\n#     \"\"\"\n#     # return (avg_cube(np.dot(inwards_facing_normals_ref[0,0,0], g1),\n#     #                 np.dot(inwards_facing_normals_ref[0,0,1], g2),\n#     #                 np.dot(inwards_facing_normals_ref[0,1,1], g3),\n#     #                 np.dot(inwards_facing_normals_ref[0,1,0], g4),\n#     #                 np.dot(inwards_facing_normals_ref[1,0,0], g5),\n#     #                 np.dot(inwards_facing_normals_ref[1,0,1], g6),\n#     #                 np.dot(inwards_facing_normals_ref[1,1,1], g7),\n#     #                 np.dot(inwards_facing_normals_ref[1,1,0], g8),\n#     #                          ) >= 0.)\n#     return (avg_cube(np.dot(inwards_facing_normals_ref[0,0,0], g1) >= -0.1,\n#                     np.dot(inwards_facing_normals_ref[0,0,1], g2) >= -0.1,\n#                     np.dot(inwards_facing_normals_ref[0,1,1], g3) >= -0.1,\n#                     np.dot(inwards_facing_normals_ref[0,1,0], g4) >= -0.1,\n#                     np.dot(inwards_facing_normals_ref[1,0,0], g5) >= -0.1,\n#                     np.dot(inwards_facing_normals_ref[1,0,1], g6) >= -0.1,\n#                     np.dot(inwards_facing_normals_ref[1,1,1], g7) >= -0.1,\n#                     np.dot(inwards_facing_normals_ref[1,1,0], g8) >= -0.1,\n#                              ) >= 2./8.)\n\n\n\ncdef void the_big_switch(LutProvider luts, Cell cell, int case, int config):\n    \"\"\" The big switch (i.e. if-statement) that I meticulously ported from\n    the source code provided by Lewiner et. al.\n\n    Together with all the look-up tables, this is where the magic is ...\n    \"\"\"\n\n    cdef int subconfig = 0\n\n    # Sinatures for tests\n    #test_face(cell, luts.TESTX.get1(config)):\n    #test_internal(cell, luts, case, config, subconfig, luts.TESTX.get1(config)):\n    #cell.add_triangles(luts.TILINGX, config, N)\n\n    if case == 1:\n        cell.add_triangles(luts.TILING1, config, 1)\n\n    elif case == 2:\n        cell.add_triangles(luts.TILING2, config, 2)\n\n    elif case == 3:\n        if test_face(cell, luts.TEST3.get1(config)):\n            cell.add_triangles(luts.TILING3_2, config, 4)\n        else:\n            cell.add_triangles(luts.TILING3_1, config, 2)\n\n    elif case == 4 :\n        if test_internal(cell, luts, case, config, subconfig, luts.TEST4.get1(config)):\n            cell.add_triangles(luts.TILING4_1, config, 2)\n        else:\n            cell.add_triangles(luts.TILING4_2, config, 6)\n\n    elif case == 5 :\n        cell.add_triangles(luts.TILING5, config, 3)\n\n    elif case == 6 :\n        if test_face(cell, luts.TEST6.get2(config,0)):\n            cell.add_triangles(luts.TILING6_2, config, 5)\n        else:\n            if test_internal(cell, luts, case, config, subconfig, luts.TEST6.get2(config,1)):\n                cell.add_triangles(luts.TILING6_1_1, config, 3)\n            else:\n                #cell.calculate_center_vertex() # v12 needed\n                cell.add_triangles(luts.TILING6_1_2, config, 9)\n\n    elif case == 7 :\n        # Get subconfig\n        if test_face(cell, luts.TEST7.get2(config,0)): subconfig += 1\n        if test_face(cell, luts.TEST7.get2(config,1)): subconfig += 2\n        if test_face(cell, luts.TEST7.get2(config,2)): subconfig += 4\n        # Behavior depends on subconfig\n        if subconfig == 0: cell.add_triangles(luts.TILING7_1, config, 3)\n        elif subconfig == 1: cell.add_triangles2(luts.TILING7_2, config, 0, 5)\n        elif subconfig == 2: cell.add_triangles2(luts.TILING7_2, config, 1, 5)\n        elif subconfig == 3:\n            #cell.calculate_center_vertex() # v12 needed\n            cell.add_triangles2(luts.TILING7_3, config, 0, 9)\n        elif subconfig == 4: cell.add_triangles2(luts.TILING7_2, config, 2, 5)\n        elif subconfig == 5:\n            #cell.calculate_center_vertex() # v12 needed\n            cell.add_triangles2(luts.TILING7_3, config, 1, 9)\n        elif subconfig == 6:\n            #cell.calculate_center_vertex() # v12 needed\n            cell.add_triangles2(luts.TILING7_3, config, 2, 9)\n        elif subconfig == 7:\n            if test_internal(cell, luts, case, config, subconfig, luts.TEST7.get2(config,3)):\n                cell.add_triangles(luts.TILING7_4_2, config, 9)\n            else:\n                cell.add_triangles(luts.TILING7_4_1, config, 5)\n\n    elif case == 8 :\n        cell.add_triangles(luts.TILING8, config, 2)\n\n    elif case == 9 :\n        cell.add_triangles(luts.TILING9, config, 4)\n\n    elif case == 10 :\n        if test_face(cell, luts.TEST10.get2(config,0)):\n            if test_face(cell, luts.TEST10.get2(config,1)):\n                cell.add_triangles(luts.TILING10_1_1_, config, 4)\n            else:\n                #cell.calculate_center_vertex() # v12 needed\n                cell.add_triangles(luts.TILING10_2, config, 8)\n        else:\n            if test_face(cell, luts.TEST10.get2(config,1)):\n                #cell.calculate_center_vertex() # v12 needed\n                cell.add_triangles(luts.TILING10_2_, config, 8)\n            else:\n                if test_internal(cell, luts, case, config, subconfig, luts.TEST10.get2(config,2)):\n                    cell.add_triangles(luts.TILING10_1_1, config, 4)\n                else:\n                    cell.add_triangles(luts.TILING10_1_2, config, 8)\n\n    elif case == 11 :\n        cell.add_triangles(luts.TILING11, config, 4)\n\n    elif case == 12 :\n        if test_face(cell, luts.TEST12.get2(config,0)):\n            if test_face(cell, luts.TEST12.get2(config,1)):\n                cell.add_triangles(luts.TILING12_1_1_, config, 4)\n            else:\n                #cell.calculate_center_vertex() # v12 needed\n                cell.add_triangles(luts.TILING12_2, config, 8)\n        else:\n            if test_face(cell, luts.TEST12.get2(config,1)):\n                #cell.calculate_center_vertex() # v12 needed\n                cell.add_triangles(luts.TILING12_2_, config, 8)\n            else:\n                if test_internal(cell, luts, case, config, subconfig, luts.TEST12.get2(config,2)):\n                    cell.add_triangles(luts.TILING12_1_1, config, 4)\n                else:\n                    cell.add_triangles(luts.TILING12_1_2, config, 8)\n\n    elif case == 13 :\n        # Calculate subconfig\n        if test_face(cell, luts.TEST13.get2(config,0)): subconfig += 1\n        if test_face(cell, luts.TEST13.get2(config,1)): subconfig += 2\n        if test_face(cell, luts.TEST13.get2(config,2)): subconfig += 4\n        if test_face(cell, luts.TEST13.get2(config,3)): subconfig += 8\n        if test_face(cell, luts.TEST13.get2(config,4)): subconfig += 16\n        if test_face(cell, luts.TEST13.get2(config,5)): subconfig += 32\n\n        # Map via LUT\n        subconfig = luts.SUBCONFIG13.get1(subconfig)\n\n        # Behavior depends on subconfig\n        if subconfig==0:    cell.add_triangles(luts.TILING13_1, config, 4)\n        elif subconfig==1:  cell.add_triangles2(luts.TILING13_2, config, 0, 6)\n        elif subconfig==2:  cell.add_triangles2(luts.TILING13_2, config, 1, 6)\n        elif subconfig==3:  cell.add_triangles2(luts.TILING13_2, config, 2, 6)\n        elif subconfig==4:  cell.add_triangles2(luts.TILING13_2, config, 3, 6)\n        elif subconfig==5:  cell.add_triangles2(luts.TILING13_2, config, 4, 6)\n        elif subconfig==6:  cell.add_triangles2(luts.TILING13_2, config, 5, 6)\n        #\n        elif subconfig==7:\n            #cell.calculate_center_vertex() # v12 needed\n            cell.add_triangles2(luts.TILING13_3, config, 0, 10)\n        elif subconfig==8:\n            #cell.calculate_center_vertex() # v12 needed\n            cell.add_triangles2(luts.TILING13_3, config, 1, 10)\n        elif subconfig==9:\n            #cell.calculate_center_vertex() # v12 needed\n            cell.add_triangles2(luts.TILING13_3, config, 2, 10)\n        elif subconfig==10:\n            #cell.calculate_center_vertex() # v12 needed\n            cell.add_triangles2(luts.TILING13_3, config, 3, 10)\n        elif subconfig==11:\n            #cell.calculate_center_vertex() # v12 needed\n            cell.add_triangles2(luts.TILING13_3, config, 4, 10)\n        elif subconfig==12:\n            #cell.calculate_center_vertex() # v12 needed\n            cell.add_triangles2(luts.TILING13_3, config, 5, 10)\n        elif subconfig==13:\n            #cell.calculate_center_vertex() # v12 needed\n            cell.add_triangles2(luts.TILING13_3, config, 6, 10)\n        elif subconfig==14:\n            #cell.calculate_center_vertex() # v12 needed\n            cell.add_triangles2(luts.TILING13_3, config, 7, 10)\n        elif subconfig==15:\n            #cell.calculate_center_vertex() # v12 needed\n            cell.add_triangles2(luts.TILING13_3, config, 8, 10)\n        elif subconfig==16:\n            #cell.calculate_center_vertex() # v12 needed\n            cell.add_triangles2(luts.TILING13_3, config, 9, 10)\n        elif subconfig==17:\n            #cell.calculate_center_vertex() # v12 needed\n            cell.add_triangles2(luts.TILING13_3, config, 10, 10)\n        elif subconfig==18:\n            #cell.calculate_center_vertex() # v12 needed\n            cell.add_triangles2(luts.TILING13_3, config, 11, 10)\n        #\n        elif subconfig==19:\n            #cell.calculate_center_vertex() # v12 needed\n            cell.add_triangles2(luts.TILING13_4, config, 0, 12)\n        elif subconfig==20:\n            #cell.calculate_center_vertex() # v12 needed\n            cell.add_triangles2(luts.TILING13_4, config, 1, 12)\n        elif subconfig==21:\n            #cell.calculate_center_vertex() # v12 needed\n            cell.add_triangles2(luts.TILING13_4, config, 2, 12)\n        elif subconfig==22:\n            #cell.calculate_center_vertex() # v12 needed\n            cell.add_triangles2(luts.TILING13_4, config, 3, 12)\n        #\n        elif subconfig==23:\n            subconfig = 0 # Note: the original source code sets the subconfig, without apparent reason\n            if test_internal(cell, luts, case, config, subconfig, luts.TEST13.get2(config,6)):\n                cell.add_triangles2(luts.TILING13_5_1, config, 0, 6)\n            else:\n                cell.add_triangles2(luts.TILING13_5_2, config, 0, 10)\n        elif subconfig==24:\n            subconfig = 1\n            if test_internal(cell, luts, case, config, subconfig, luts.TEST13.get2(config,6)):\n                cell.add_triangles2(luts.TILING13_5_1, config, 1, 6)\n            else:\n                cell.add_triangles2(luts.TILING13_5_2, config, 1, 10)\n        elif subconfig==25:\n            subconfig = 2 ;\n            if test_internal(cell, luts, case, config, subconfig, luts.TEST13.get2(config,6)):\n                cell.add_triangles2(luts.TILING13_5_1, config, 2, 6)\n            else:\n                cell.add_triangles2(luts.TILING13_5_2, config, 2, 10)\n        elif subconfig==26:\n            subconfig = 3 ;\n            if test_internal(cell, luts, case, config, subconfig, luts.TEST13.get2(config,6)):\n                cell.add_triangles2(luts.TILING13_5_1, config, 3, 6)\n            else:\n                cell.add_triangles2(luts.TILING13_5_2, config, 3, 10)\n        #\n        elif subconfig==27:\n            #cell.calculate_center_vertex() # v12 needed\n            cell.add_triangles2(luts.TILING13_3_, config, 0, 10)\n        elif subconfig==28:\n            #cell.calculate_center_vertex() # v12 needed\n            cell.add_triangles2(luts.TILING13_3_, config, 1, 10)\n        elif subconfig==29:\n            #cell.calculate_center_vertex() # v12 needed\n            cell.add_triangles2(luts.TILING13_3_, config, 2, 10)\n        elif subconfig==30:\n            #cell.calculate_center_vertex() # v12 needed\n            cell.add_triangles2(luts.TILING13_3_, config, 3, 10)\n        elif subconfig==31:\n            #cell.calculate_center_vertex() # v12 needed\n            cell.add_triangles2(luts.TILING13_3_, config, 4, 10)\n        elif subconfig==32:\n            #cell.calculate_center_vertex() # v12 needed\n            cell.add_triangles2(luts.TILING13_3_, config, 5, 10)\n        elif subconfig==33:\n            #cell.calculate_center_vertex() # v12 needed\n            cell.add_triangles2(luts.TILING13_3_, config,6, 10)\n        elif subconfig==34:\n            #cell.calculate_center_vertex() # v12 needed\n            cell.add_triangles2(luts.TILING13_3_, config, 7, 10)\n        elif subconfig==35:\n            #cell.calculate_center_vertex() # v12 needed\n            cell.add_triangles2(luts.TILING13_3_, config, 8, 10)\n        elif subconfig==36:\n            #cell.calculate_center_vertex() # v12 needed\n            cell.add_triangles2(luts.TILING13_3_, config, 9, 10)\n        elif subconfig==37:\n            #cell.calculate_center_vertex() # v12 needed\n            cell.add_triangles2(luts.TILING13_3_, config, 10, 10)\n        elif subconfig==38:\n            #cell.calculate_center_vertex() # v12 needed\n            cell.add_triangles2(luts.TILING13_3_, config, 11, 10)\n        #\n        elif subconfig==39:\n            cell.add_triangles2(luts.TILING13_2_, config, 0, 6)\n        elif subconfig==40:\n            cell.add_triangles2(luts.TILING13_2_, config, 1, 6)\n        elif subconfig==41:\n            cell.add_triangles2(luts.TILING13_2_, config, 2, 6)\n        elif subconfig==42:\n            cell.add_triangles2(luts.TILING13_2_, config, 3, 6)\n        elif subconfig==43:\n            cell.add_triangles2(luts.TILING13_2_, config, 4, 6)\n        elif subconfig==44:\n            cell.add_triangles2(luts.TILING13_2_, config, 5, 6)\n        #\n        elif subconfig==45:\n            cell.add_triangles(luts.TILING13_1_, config, 4)\n        #\n        else:\n            print(\"Marching Cubes: Impossible case 13?\" )\n\n    elif case == 14 :\n        cell.add_triangles(luts.TILING14, config, 4)\n\n\ncdef int test_face(Cell cell, int face):\n    \"\"\" Return True of the face contains part of the surface.\n    \"\"\"\n\n    # Get face absolute value\n    cdef int absFace = face\n    if face < 0:\n        absFace *= -1\n\n    # Get values of corners A B C D\n    cdef double A, B, C, D\n    if absFace == 1:\n        A, B, C, D = cell.v0, cell.v4, cell.v5, cell.v1\n    elif absFace == 2:\n        A, B, C, D = cell.v1, cell.v5, cell.v6, cell.v2\n    elif absFace == 3:\n        A, B, C, D = cell.v2, cell.v6, cell.v7, cell.v3\n    elif absFace == 4:\n        A, B, C, D = cell.v3, cell.v7, cell.v4, cell.v0\n    elif absFace == 5:\n        A, B, C, D = cell.v0, cell.v3, cell.v2, cell.v1\n    elif absFace == 6:\n        A, B, C, D = cell.v4, cell.v7, cell.v6, cell.v5\n\n    # Return sign\n    cdef double AC_BD = A*C - B*D\n    if AC_BD > - FLT_EPSILON and AC_BD < FLT_EPSILON:\n        return face >= 0\n    else:\n        return face * A * AC_BD >= 0;  # face and A invert signs\n\n\ncdef int test_internal(Cell cell, LutProvider luts, int case, int config, int subconfig, int s):\n    \"\"\" Return True of the face contains part of the surface.\n    \"\"\"\n\n    # Typedefs\n    cdef double t, At, Bt, Ct, Dt, a, b\n    cdef int test = 0\n    cdef int edge = -1 # reference edge of the triangulation\n\n\n    # Calculate At Bt Ct Dt a b\n    # Select case 4, 10,  7, 12, 13\n    At, Bt, Ct, Dt = 0.0, 0.0, 0.0, 0.0\n\n    if case==4 or case==10:\n        a = ( cell.v4 - cell.v0 ) * ( cell.v6 - cell.v2 ) - ( cell.v7 - cell.v3 ) * ( cell.v5 - cell.v1 )\n        b =  cell.v2 * ( cell.v4 - cell.v0 ) + cell.v0 * ( cell.v6 - cell.v2 ) - cell.v1 * ( cell.v7 - cell.v3 ) - cell.v3 * ( cell.v5 - cell.v1 )\n        t = - b / (2*a + FLT_EPSILON)\n        if t<0 or t>1:  return s>0 ;\n\n        At = cell.v0 + ( cell.v4 - cell.v0 ) * t\n        Bt = cell.v3 + ( cell.v7 - cell.v3 ) * t\n        Ct = cell.v2 + ( cell.v6 - cell.v2 ) * t\n        Dt = cell.v1 + ( cell.v5 - cell.v1 ) * t\n\n    elif case==6 or case==7 or case==12 or case==13:\n        # Define edge\n        if case == 6:  edge = luts.TEST6.get2(config, 2)\n        elif case == 7: edge = luts.TEST7.get2(config, 4)\n        elif case == 12: edge = luts.TEST12.get2(config, 3)\n        elif case == 13: edge = luts.TILING13_5_1.get3(config, subconfig, 0)\n\n        if edge==0:\n            t  = cell.v0 / ( cell.v0 - cell.v1 + FLT_EPSILON )\n            At = 0\n            Bt = cell.v3 + ( cell.v2 - cell.v3 ) * t\n            Ct = cell.v7 + ( cell.v6 - cell.v7 ) * t\n            Dt = cell.v4 + ( cell.v5 - cell.v4 ) * t\n        elif edge==1:\n            t  = cell.v1 / ( cell.v1 - cell.v2 + FLT_EPSILON )\n            At = 0\n            Bt = cell.v0 + ( cell.v3 - cell.v0 ) * t\n            Ct = cell.v4 + ( cell.v7 - cell.v4 ) * t\n            Dt = cell.v5 + ( cell.v6 - cell.v5 ) * t\n        elif edge==2:\n            t  = cell.v2 / ( cell.v2 - cell.v3 + FLT_EPSILON )\n            At = 0\n            Bt = cell.v1 + ( cell.v0 - cell.v1 ) * t\n            Ct = cell.v5 + ( cell.v4 - cell.v5 ) * t\n            Dt = cell.v6 + ( cell.v7 - cell.v6 ) * t\n        elif edge==3:\n            t  = cell.v3 / ( cell.v3 - cell.v0 + FLT_EPSILON )\n            At = 0\n            Bt = cell.v2 + ( cell.v1 - cell.v2 ) * t\n            Ct = cell.v6 + ( cell.v5 - cell.v6 ) * t\n            Dt = cell.v7 + ( cell.v4 - cell.v7 ) * t\n        elif edge==4:\n            t  = cell.v4 / ( cell.v4 - cell.v5 + FLT_EPSILON )\n            At = 0\n            Bt = cell.v7 + ( cell.v6 - cell.v7 ) * t\n            Ct = cell.v3 + ( cell.v2 - cell.v3 ) * t\n            Dt = cell.v0 + ( cell.v1 - cell.v0 ) * t\n        elif edge==5:\n            t  = cell.v5 / ( cell.v5 - cell.v6 + FLT_EPSILON )\n            At = 0\n            Bt = cell.v4 + ( cell.v7 - cell.v4 ) * t\n            Ct = cell.v0 + ( cell.v3 - cell.v0 ) * t\n            Dt = cell.v1 + ( cell.v2 - cell.v1 ) * t\n        elif edge==6:\n            t  = cell.v6 / ( cell.v6 - cell.v7 + FLT_EPSILON )\n            At = 0\n            Bt = cell.v5 + ( cell.v4 - cell.v5 ) * t\n            Ct = cell.v1 + ( cell.v0 - cell.v1 ) * t\n            Dt = cell.v2 + ( cell.v3 - cell.v2 ) * t\n        elif edge==7:\n            t  = cell.v7 / ( cell.v7 - cell.v4 + FLT_EPSILON )\n            At = 0\n            Bt = cell.v6 + ( cell.v5 - cell.v6 ) * t\n            Ct = cell.v2 + ( cell.v1 - cell.v2 ) * t\n            Dt = cell.v3 + ( cell.v0 - cell.v3 ) * t\n        elif edge==8:\n            t  = cell.v0 / ( cell.v0 - cell.v4 + FLT_EPSILON )\n            At = 0\n            Bt = cell.v3 + ( cell.v7 - cell.v3 ) * t\n            Ct = cell.v2 + ( cell.v6 - cell.v2 ) * t\n            Dt = cell.v1 + ( cell.v5 - cell.v1 ) * t\n        elif edge==9:\n            t  = cell.v1 / ( cell.v1 - cell.v5 + FLT_EPSILON )\n            At = 0\n            Bt = cell.v0 + ( cell.v4 - cell.v0 ) * t\n            Ct = cell.v3 + ( cell.v7 - cell.v3 ) * t\n            Dt = cell.v2 + ( cell.v6 - cell.v2 ) * t\n        elif edge==10:\n            t  = cell.v2 / ( cell.v2 - cell.v6 + FLT_EPSILON )\n            At = 0\n            Bt = cell.v1 + ( cell.v5 - cell.v1 ) * t\n            Ct = cell.v0 + ( cell.v4 - cell.v0 ) * t\n            Dt = cell.v3 + ( cell.v7 - cell.v3 ) * t\n        elif edge==11:\n            t  = cell.v3 / ( cell.v3 - cell.v7 + FLT_EPSILON )\n            At = 0\n            Bt = cell.v2 + ( cell.v6 - cell.v2 ) * t\n            Ct = cell.v1 + ( cell.v5 - cell.v1 ) * t\n            Dt = cell.v0 + ( cell.v4 - cell.v0 ) * t\n        else:\n            print( \"Invalid edge %i.\" % edge )\n    else:\n        print( \"Invalid ambiguous case %i.\" % case )\n\n    # Process results\n    if At >= 0: test += 1\n    if Bt >= 0: test += 2\n    if Ct >= 0: test += 4\n    if Dt >= 0: test += 8\n\n    # Determine what to return\n    if test==0: return s>0\n    elif test==1: return s>0\n    elif test==2: return s>0\n    elif test==3: return s>0\n    elif test==4: return s>0\n    elif test==5:\n        if At * Ct - Bt * Dt <  FLT_EPSILON: return s>0\n    elif test==6: return s>0\n    elif test==7: return s<0\n    elif test==8: return s>0\n    elif test==9: return s>0\n    elif test==10:\n        if At * Ct - Bt * Dt >= FLT_EPSILON: return s>0\n    elif test==11: return s<0\n    elif test==12: return s>0\n    elif test==13: return s<0\n    elif test==14: return s<0\n    elif test==15: return s<0\n    else: return s<0\n"
  },
  {
    "path": "custom_mc/_marching_cubes_lewiner_luts.py",
    "content": "# -*- coding: utf-8 -*-\n# This file was auto-generated from `mc_meta/LookUpTable.h` by\n# `mc_meta/createluts.py`.\n\n#static const char casesClassic[256][16]\nCASESCLASSIC = (256, 16), \"\"\"\n/////////////////////wAIA/////////////////8AAQn/////////////////AQgDCQgB////\n/////////wECCv////////////////8ACAMBAgr/////////////CQIKAAIJ/////////////wII\nAwIKCAoJCP////////8DCwL/////////////////AAsCCAsA/////////////wEJAAIDC///////\n//////8BCwIBCQsJCAv/////////AwoBCwoD/////////////wAKAQAICggLCv////////8DCQAD\nCwkLCgn/////////CQgKCggL/////////////wQHCP////////////////8EAwAHAwT/////////\n////AAEJCAQH/////////////wQBCQQHAQcDAf////////8BAgoIBAf/////////////AwQHAwAE\nAQIK/////////wkCCgkAAggEB/////////8CCgkCCQcCBwMHCQT/////CAQHAwsC////////////\n/wsEBwsCBAIABP////////8JAAEIBAcCAwv/////////BAcLCQQLCQsCCQIB/////wMKAQMLCgcI\nBP////////8BCwoBBAsBAAQHCwT/////BAcICQALCQsKCwAD/////wQHCwQLCQkLCv////////8J\nBQT/////////////////CQUEAAgD/////////////wAFBAEFAP////////////8IBQQIAwUDAQX/\n////////AQIKCQUE/////////////wMACAECCgQJBf////////8FAgoFBAIEAAL/////////AgoF\nAwIFAwUEAwQI/////wkFBAIDC/////////////8ACwIACAsECQX/////////AAUEAAEFAgML////\n/////wIBBQIFCAIICwQIBf////8KAwsKAQMJBQT/////////BAkFAAgBCAoBCAsK/////wUEAAUA\nCwULCgsAA/////8FBAgFCAoKCAv/////////CQcIBQcJ/////////////wkDAAkFAwUHA///////\n//8ABwgAAQcBBQf/////////AQUDAwUH/////////////wkHCAkFBwoBAv////////8KAQIJBQAF\nAwAFBwP/////CAACCAIFCAUHCgUC/////wIKBQIFAwMFB/////////8HCQUHCAkDCwL/////////\nCQUHCQcCCQIAAgcL/////wIDCwABCAEHCAEFB/////8LAgELAQcHAQX/////////CQUICAUHCgED\nCgML/////wUHAAUACQcLAAEACgsKAP8LCgALAAMKBQAIAAcFBwD/CwoFBwsF/////////////woG\nBf////////////////8ACAMFCgb/////////////CQABBQoG/////////////wEIAwEJCAUKBv//\n//////8BBgUCBgH/////////////AQYFAQIGAwAI/////////wkGBQkABgACBv////////8FCQgF\nCAIFAgYDAgj/////AgMLCgYF/////////////wsACAsCAAoGBf////////8AAQkCAwsFCgb/////\n////BQoGAQkCCQsCCQgL/////wYDCwYFAwUBA/////////8ACAsACwUABQEFCwb/////AwsGAAMG\nAAYFAAUJ/////wYFCQYJCwsJCP////////8FCgYEBwj/////////////BAMABAcDBgUK////////\n/wEJAAUKBggEB/////////8KBgUBCQcBBwMHCQT/////BgECBgUBBAcI/////////wECBQUCBgMA\nBAMEB/////8IBAcJAAUABgUAAgb/////BwMJBwkEAwIJBQkGAgYJ/wMLAgcIBAoGBf////////8F\nCgYEBwIEAgACBwv/////AAEJBAcIAgMLBQoG/////wkCAQkLAgkECwcLBAUKBv8IBAcDCwUDBQEF\nCwb/////BQELBQsGAQALBwsEAAQL/wAFCQAGBQADBgsGAwgEB/8GBQkGCQsEBwkHCwn/////CgQJ\nBgQK/////////////wQKBgQJCgAIA/////////8KAAEKBgAGBAD/////////CAMBCAEGCAYEBgEK\n/////wEECQECBAIGBP////////8DAAgBAgkCBAkCBgT/////AAIEBAIG/////////////wgDAggC\nBAQCBv////////8KBAkKBgQLAgP/////////AAgCAggLBAkKBAoG/////wMLAgABBgAGBAYBCv//\n//8GBAEGAQoECAECAQsICwH/CQYECQMGCQEDCwYD/////wgLAQgBAAsGAQkBBAYEAf8DCwYDBgAA\nBgT/////////BgQICwYI/////////////wcKBgcICggJCv////////8ABwMACgcACQoGBwr/////\nCgYHAQoHAQcIAQgA/////woGBwoHAQEHA/////////8BAgYBBggBCAkIBgf/////AgYJAgkBBgcJ\nAAkDBwMJ/wcIAAcABgYAAv////////8HAwIGBwL/////////////AgMLCgYICggJCAYH/////wIA\nBwIHCwAJBwYHCgkKB/8BCAABBwgBCgcGBwoCAwv/CwIBCwEHCgYBBgcB/////wgJBggGBwkBBgsG\nAwEDBv8ACQELBgf/////////////BwgABwAGAwsACwYA/////wcLBv////////////////8HBgv/\n////////////////AwAICwcG/////////////wABCQsHBv////////////8IAQkIAwELBwb/////\n////CgECBgsH/////////////wECCgMACAYLB/////////8CCQACCgkGCwf/////////BgsHAgoD\nCggDCgkI/////wcCAwYCB/////////////8HAAgHBgAGAgD/////////AgcGAgMHAAEJ////////\n/wEGAgEIBgEJCAgHBv////8KBwYKAQcBAwf/////////CgcGAQcKAQgHAQAI/////wADBwAHCgAK\nCQYKB/////8HBgoHCggICgn/////////BggECwgG/////////////wMGCwMABgAEBv////////8I\nBgsIBAYJAAH/////////CQQGCQYDCQMBCwMG/////wYIBAYLCAIKAf////////8BAgoDAAsABgsA\nBAb/////BAsIBAYLAAIJAgoJ/////woJAwoDAgkEAwsDBgQGA/8IAgMIBAIEBgL/////////AAQC\nBAYC/////////////wEJAAIDBAIEBgQDCP////8BCQQBBAICBAb/////////CAEDCAYBCAQGBgoB\n/////woBAAoABgYABP////////8EBgMEAwgGCgMAAwkKCQP/CgkEBgoE/////////////wQJBQcG\nC/////////////8ACAMECQULBwb/////////BQABBQQABwYL/////////wsHBggDBAMFBAMBBf//\n//8JBQQKAQIHBgv/////////BgsHAQIKAAgDBAkF/////wcGCwUECgQCCgQAAv////8DBAgDBQQD\nAgUKBQILBwb/BwIDBwYCBQQJ/////////wkFBAAIBgAGAgYIB/////8DBgIDBwYBBQAFBAD/////\nBgIIBggHAgEIBAgFAQUI/wkFBAoBBgEHBgEDB/////8BBgoBBwYBAAcIBwAJBQT/BAAKBAoFAAMK\nBgoHAwcK/wcGCgcKCAUECgQICv////8GCQUGCwkLCAn/////////AwYLAAYDAAUGAAkF/////wAL\nCAAFCwABBQUGC/////8GCwMGAwUFAwH/////////AQIKCQULCQsICwUG/////wALAwAGCwAJBgUG\nCQECCv8LCAULBQYIAAUKBQIAAgX/BgsDBgMFAgoDCgUD/////wUICQUCCAUGAgMIAv////8JBQYJ\nBgAABgL/////////AQUIAQgABQYIAwgCBgII/wEFBgIBBv////////////8BAwYBBgoDCAYFBgkI\nCQb/CgEACgAGCQUABQYA/////wADCAUGCv////////////8KBQb/////////////////CwUKBwUL\n/////////////wsFCgsHBQgDAP////////8FCwcFCgsBCQD/////////CgcFCgsHCQgBCAMB////\n/wsBAgsHAQcFAf////////8ACAMBAgcBBwUHAgv/////CQcFCQIHCQACAgsH/////wcFAgcCCwUJ\nAgMCCAkIAv8CBQoCAwUDBwX/////////CAIACAUCCAcFCgIF/////wkAAQUKAwUDBwMKAv////8J\nCAIJAgEIBwIKAgUHBQL/AQMFAwcF/////////////wAIBwAHAQEHBf////////8JAAMJAwUFAwf/\n////////CQgHBQkH/////////////wUIBAUKCAoLCP////////8FAAQFCwAFCgsLAwD/////AAEJ\nCAQKCAoLCgQF/////woLBAoEBQsDBAkEAQMBBP8CBQECCAUCCwgEBQj/////AAQLAAsDBAULAgsB\nBQEL/wACBQAFCQILBQQFCAsIBf8JBAUCCwP/////////////AgUKAwUCAwQFAwgE/////wUKAgUC\nBAQCAP////////8DCgIDBQoDCAUEBQgAAQn/BQoCBQIEAQkCCQQC/////wgEBQgFAwMFAf//////\n//8ABAUBAAX/////////////CAQFCAUDCQAFAAMF/////wkEBf////////////////8ECwcECQsJ\nCgv/////////AAgDBAkHCQsHCQoL/////wEKCwELBAEEAAcEC/////8DAQQDBAgBCgQHBAsKCwT/\nBAsHCQsECQILCQEC/////wkHBAkLBwkBCwILAQAIA/8LBwQLBAICBAD/////////CwcECwQCCAME\nAwIE/////wIJCgIHCQIDBwcECf////8JCgcJBwQKAgcIBwACAAf/AwcKAwoCBwQKAQoABAAK/wEK\nAggHBP////////////8ECQEEAQcHAQP/////////BAkBBAEHAAgBCAcB/////wQAAwcEA///////\n//////8ECAf/////////////////CQoICgsI/////////////wMACQMJCwsJCv////////8AAQoA\nCggICgv/////////AwEKCwMK/////////////wECCwELCQkLCP////////8DAAkDCQsBAgkCCwn/\n////AAILCAAL/////////////wMCC/////////////////8CAwgCCAoKCAn/////////CQoCAAkC\n/////////////wIDCAIICgABCAEKCP////8BCgL/////////////////AQMICQEI////////////\n/wAJAf////////////////8AAwj//////////////////////////////////////w==\n\"\"\"\n\n#static const char cases[256][2]\nCASES = (256, 2), \"\"\"\nAP8BAAEBAgABAgMAAgMFAAEDAgEDAwUBAgUFBAUJCAABBAICAwQFAgQCBgIGCQsAAwgFBQcDCQEG\nEA4DDAwFGAEFAwECBAUDAwYHAAUKCQAEAwYEBgsOAQYRDAQLBgUZAggFBwUMCAEGEgwFDgcFHAYV\nCwQMDwUeCgUGIAYnAgwBBgQAAwUGAAIGBgMFCw4AAwkGBQcEDAEFDgsDCQQFGgMKBgYHBQwCBhMK\nAQwNBhgHBwwJDQEHCQwUBiEHDQMMAgoGBwUNCwIFEAwHCAMFHQYWCgIMEQYbDgkGIgUnAg4FFA4F\nCQUFIAsKBiMFKQIQDBcGJQcOAxAGLgQGAxUBCAEHAwIEAQYBAwcHAQYKDAACBwUGBgwLAQUPCQIO\nBgUbAgkFCAYNDgIGFAwGCgMGGQUSCAIMEAUfCwkFIgYoAg0DCwcCBg4MAwcGDQAMDgcIBhcMCgoE\nBhwMFQcKBikDDQUVCQMLCAUhDBYHCwYqAw4OCwUkBiwCEQYvAxIEBwEJAgsGCAYPCgAFEQwICwcG\nGgUTDgQMEgYdCAQFIwUoAg8FFgsFDBMGHg4KBiQGKwQECQcFJQcPAxEFLAITAxYBCgUXDAsOCAYf\nCQYHDAUqAw8LCwYmBi0EBQUtAxMCFQELCAUFJgUrAhIFLgMUAhYBDAUvAhQDFwENAhcBDgEPAP8=\n\"\"\"\n\n#static const char tiling1[16][3]\nTILING1 = (16, 3), \"\"\"\nAAgDAAEJAQIKAwsCBAcICQUECgYFBwYLBwsGCgUGCQQFBAgHAwILAQoCAAkBAAMI\n\"\"\"\n\n#static const char tiling2[24][6]\nTILING2 = (24, 6), \"\"\"\nAQgDCQgBAAsCCAsABAMABwMECQIKAAIJAAUEAQUAAwoBCwoDAQYFAgYBBwIDBgIHCQcIBQcJBggE\nCwgGCgQJBgQKCwUKBwULCwoFBwsFCgkEBgoEBgQICwYICQgHBQkHBwMCBgcCAQUGAgEGAwEKCwMK\nAAQFAQAFCQoCAAkCBAADBwQDAAILCAALAQMICQEI\n\"\"\"\n\n#static const char tiling3_1[24][6]\nTILING3_1 = (24, 6), \"\"\"\nAAgDAQIKCQUEAAgDAwAICwcGAQkAAgMLAAEJCAQHCQABBQoGAQIKCQUECgECBgsHCAQHAwsCAgML\nCgYFBQoGBAcIBAkFBwYLBQkECwYHBgoFCAcECwMCBQYKBwQIAgsDAgEKBwsGCgIBBAUJAQAJBgoF\nCQEABwQIAAkBCwMCCAADBgcLBAUJAwgAAwgACgIB\n\"\"\"\n\n#static const char tiling3_2[24][12]\nTILING3_2 = (24, 12), \"\"\"\nCgMCCggDCgEACAoAAwQIAwUEAwAJBQMJBggHBgAIBgsDAAYDCwADCwkACwIBCQsBBwkEBwEJBwgA\nAQcABgEKBgABCQAGCQYFBAoFBAIKBAkBAgQBBwILBwECBwYKAQcKAgcLAgQHAgMIBAIIBQsGBQML\nBQoCAwUCCAYHCAoGCAQFCggFCwUGCwkFCwcECQsEBgULBQkLBAcLBAsJBwYIBgoIBQQIBQgKBgsF\nCwMFAgoFAgUDCwcCBwQCCAMCCAIECwIHAgEHCgYHCgcBBQoECgIEAQkEAQQCCgEGAQAGBgAJBQYJ\nBAkHCQEHAAgHAAcBAwALAAkLAQILAQsJBwgGCAAGAwsGAwYACAQDBAUDCQADCQMFAgMKAwgKAAEK\nAAoI\n\"\"\"\n\n#static const char tiling4_1[8][6]\nTILING4_1 = (8, 6), \"\"\"\nAAgDBQoGAAEJCwcGAQIKCAQHCQUEAgMLBAUJCwMCCgIBBwQICQEABgcLAwgABgoF\n\"\"\"\n\n#static const char tiling4_2[8][18]\nTILING4_2 = (8, 18), \"\"\"\nCAUABQgGAwYIBgMKAAoDCgAFCQYBBgkHAAcJBwALAQsACwEGCgcCBwoEAQQKBAEIAggBCAIHCwQD\nBAsFAgULBQIJAwkCCQMEAwQLBQsECwUCCQIFAgkDBAMJAgcKBAoHCgQBCAEEAQgCBwIIAQYJBwkG\nCQcACwAHAAsBBgELAAUIBggFCAYDCgMGAwoABQAK\n\"\"\"\n\n#static const char tiling5[48][9]\nTILING5 = (48, 9), \"\"\"\nAggDAgoICgkIAQsCAQkLCQgLBAEJBAcBBwMBCAUECAMFAwEFAAoBAAgKCAsKCwQHCwIEAgAEBwAI\nBwYABgIACQMACQUDBQcDAwYLAwAGAAQGAwkAAwsJCwoJBQIKBQQCBAACCQYFCQAGAAIGAAcIAAEH\nAQUHCgABCgYABgQABgMLBgUDBQEDCgcGCgEHAQMHAQQJAQIEAgYECwECCwcBBwUBCAIDCAQCBAYC\nAgUKAgMFAwcFBwoGBwgKCAkKBgkFBgsJCwgJBQgEBQoICgsIBAsHBAkLCQoLBAcLBAsJCQsKBQQI\nBQgKCggLBgUJBgkLCwkIBwYKBwoICAoJAgoFAgUDAwUHCAMCCAIEBAIGCwIBCwEHBwEFAQkEAQQC\nAgQGCgYHCgcBAQcDBgsDBgMFBQMBCgEACgAGBgAEAAgHAAcBAQcFCQUGCQYAAAYCBQoCBQIEBAIA\nAwAJAwkLCwkKAwsGAwYAAAYECQADCQMFBQMHBwgABwAGBgACCwcECwQCAgQAAAEKAAoICAoLCAQF\nCAUDAwUBBAkBBAEHBwEDAQILAQsJCQsIAgMIAggKCggJ\n\"\"\"\n\n#static const char tiling6_1_1[48][9]\nTILING6_1_1 = (48, 9), \"\"\"\nBgUKAwEICQgBCwcGCQMBAwkIAQIKBwAEAAcDAwAIBQIGAgUBBQQJAgALCAsACgYFCAIAAggLCgYF\nAAQDBwMEAwAIBgQKCQoECAMACgcFBwoLCAQHCgACAAoJBwYLAAIJCgkCAgMLBAEFAQQAAAEJBgMH\nAwYCCQABCwQGBAsICwcGAQUABAAFAAEJBwULCgsFBAcIAQMKCwoDCQUECwEDAQsKCgECCAUHBQgJ\nCAQHAgYBBQEGAQIKBAYICwgGAgMLBQcJCAkHCwIDCQYEBgkKCQUEAwcCBgIHBAUJAgcDBwIGAwIL\nBAYJCgkGCwMCCQcFBwkICgIBCAYEBggLBwQIAQYCBgEFAgEKBwUICQgFBAUJAwELCgsBCAcECgMB\nAwoLCQEACwUHBQsKBgcLAAUBBQAEAQAJBgQLCAsECQEABwMGAgYDCwMCBQEEAAQBCwYHCQIAAgkK\nBwQIAgAKCQoAAAMIBQcKCwoHCAADCgQGBAoJBQYKAwQABAMHBQYKAAIICwgCCQQFCwACAAsICAAD\nBgIFAQUCCgIBBAAHAwcABgcLAQMJCAkDCgUGCAEDAQgJ\n\"\"\"\n\n#static const char tiling6_1_2[48][27]\nTILING6_1_2 = (48, 27), \"\"\"\nAQwDDAoDBgMKAwYIBQgGCAUMDAkIAQkMDAUKAQwDAQsMCwEGCQYBBgkHDAcJCQgMDAgDCwcMBAwA\nBAEMAQQKBwoECgcCDAIHBwMMDAMAAQIMBgwCBgMMAwYIBQgGCAUADAAFBQEMDAECAwAMAAwCDAkC\nBQIJAgULBAsFCwQMDAgLAAgMDAQJAAwCAAoMCgAFCAUABQgGDAYICAsMDAsCCgYMBAwADAUACgAF\nAAoDBgMKAwYMDAcDBAcMDAYFBAwGDAgGAwYIBgMKAAoDCgAMDAkKBAkMDAAIBQwHBQgMCAUACgAF\nAAoDDAMKCgsMDAsHCAMMAgwAAggMCAIHCgcCBwoEDAQKCgkMDAkACAQMAgwADAsABwALAAcJBgkH\nCQYMDAoJAgoMDAYLBQwBBQIMAgULBAsFCwQDDAMEBAAMDAABAgMMBwwDBwAMAAcJBgkHCQYBDAEG\nBgIMDAIDAAEMBgwEBgkMCQYBCwEGAQsADAALCwgMDAgECQAMBQwBDAYBCwEGAQsABwALAAcMDAQA\nBQQMDAcGBQwHDAkHAAcJBwALAQsACwEMDAoLBQoMDAEJAwwBDAgBBAEIAQQKBwoECgcMDAsKAwsM\nDAcIAwwBAwkMCQMECwQDBAsFDAULCwoMDAoBCQUMBwwFBwoMCgcCCAIHAggBDAEICAkMDAkFCgEM\nBgwCDAcCCAIHAggBBAEIAQQMDAUBBgUMDAQHBgwEDAoEAQQKBAEIAggBCAIMDAsIBgsMDAIKBwwF\nDAsFAgULBQIJAwkCCQMMDAgJBwgMDAMLBAwGBAsMCwQDCQMEAwkCDAIJCQoMDAoGCwIMBwwDDAQD\nCQMEAwkCBQIJAgUMDAYCBwYMDAUEAwwHAwQMBAMJAgkDCQIFDAUCAgYMDAYHBAUMBgwEDAsEAwQL\nBAMJAgkDCQIMDAoJBgoMDAILBQwHBQsMCwUCCQIFAgkDDAMJCQgMDAgHCwMMBAwGBAoMCgQBCAEE\nAQgCDAIICAsMDAsGCgIMAgwGAgcMBwIIAQgCCAEEDAQBAQUMDAUGBwQMBQwHDAoHAgcKBwIIAQgC\nCAEMDAkIBQkMDAEKAQwDDAkDBAMJAwQLBQsECwUMDAoLAQoMDAUJAQwDAQgMCAEECgQBBAoHDAcK\nCgsMDAsDCAcMBwwFBwkMCQcACwAHAAsBDAELCwoMDAoFCQEMAQwFAQYMBgELAAsBCwAHDAcAAAQM\nDAQFBgcMBAwGDAkGAQYJBgELAAsBCwAMDAgLBAgMDAAJAwwHDAAHCQcABwkGAQYJBgEMDAIGAwIM\nDAEAAQwFDAIFCwUCBQsEAwQLBAMMDAAEAQAMDAMCAAwCAAsMCwAHCQcABwkGDAYJCQoMDAoCCwYM\nAAwCDAgCBwIIAgcKBAoHCgQMDAkKAAkMDAQIBwwFDAgFAAUIBQAKAwoACgMMDAsKBwsMDAMIBgwE\nBggMCAYDCgMGAwoADAAKCgkMDAkECAAMAAwEAAUMBQAKAwoACgMGDAYDAwcMDAcEBQYMAgwADAoA\nBQAKAAUIBggFCAYMDAsIAgsMDAYKAgwAAgkMCQIFCwUCBQsEDAQLCwgMDAgACQQMAgwGDAMGCAYD\nBggFAAUIBQAMDAEFAgEMDAADAAwEDAEECgQBBAoHAgcKBwIMDAMHAAMMDAIBAwwBDAsBBgELAQYJ\nBwkGCQcMDAgJAwgMDAcLAwwBAwoMCgMGCAYDBggFDAUICAkMDAkBCgUM\n\"\"\"\n\n#static const char tiling6_2[48][15]\nTILING6_2 = (48, 15), \"\"\"\nAQoDBgMKAwYIBQgGCAUJAQsDCwEGCQYBBgkHCAcJBAEAAQQKBwoECgcCAwIHBgMCAwYIBQgGCAUA\nAQAFAAkCBQIJAgULBAsFCwQIAAoCCgAFCAUABQgGCwYIBAUACgAFAAoDBgMKAwYHBAgGAwYIBgMK\nAAoDCgAJBQgHCAUACgAFAAoDCwMKAggACAIHCgcCBwoECQQKAgsABwALAAcJBgkHCQYKBQIBAgUL\nBAsFCwQDAAMEBwADAAcJBgkHCQYBAgEGBgkECQYBCwEGAQsACAALBQYBCwEGAQsABwALAAcEBQkH\nAAcJBwALAQsACwEKAwgBBAEIAQQKBwoECgcLAwkBCQMECwQDBAsFCgULBwoFCgcCCAIHAggBCQEI\nBgcCCAIHAggBBAEIAQQFBgoEAQQKBAEIAggBCAILBwsFAgULBQIJAwkCCQMIBAsGCwQDCQMEAwkC\nCgIJBwQDCQMEAwkCBQIJAgUGAwQHBAMJAgkDCQIFBgUCBgsEAwQLBAMJAgkDCQIKBQsHCwUCCQIF\nAgkDCAMJBAoGCgQBCAEEAQgCCwIIAgcGBwIIAQgCCAEEBQQBBQoHAgcKBwIIAQgCCAEJAQkDBAMJ\nAwQLBQsECwUKAQgDCAEECgQBBAoHCwcKBwkFCQcACwAHAAsBCgELAQYFBgELAAsBCwAHBAcABAkG\nAQYJBgELAAsBCwAIAwAHCQcABwkGAQYJBgECAQIFCwUCBQsEAwQLBAMAAAsCCwAHCQcABwkGCgYJ\nAAgCBwIIAgcKBAoHCgQJBwgFAAUIBQAKAwoACgMLBggECAYDCgMGAwoACQAKAAUEBQAKAwoACgMG\nBwYDAgoABQAKAAUIBggFCAYLAgkACQIFCwUCBQsECAQLAgMGCAYDBggFAAUIBQABAAEECgQBBAoH\nAgcKBwIDAwsBBgELAQYJBwkGCQcIAwoBCgMGCAYDBggFCQUI\n\"\"\"\n\n#static const char tiling7_1[16][9]\nTILING7_1 = (16, 9), \"\"\"\nCQUECgECCAMACwcGCAMACgECAwAIBQQJBwYLCAQHCQABCwIDCgYFCwIDCQABAAEJBgUKBAcIAQIK\nBwYLBQQJAgMLBAcIBgUKCwMCCAcECgUGCgIBCwYHCQQFCQEACgUGCAcEBQYKAwILAQAJBwQIAQAJ\nAwILCAADCQQFCwYHBgcLAAMIAgEKBAUJAgEKAAMI\n\"\"\"\n\n#static const char tiling7_2[16][3][15]\nTILING7_2 = (16, 3, 15), \"\"\"\nAQIKAwQIBAMFAAUDBQAJAwAICQEEAgQBBAIFCgUCCQUEAAoBCgAICggCAwIIAwAIAQYKBgEHAgcB\nBwILAQIKCwMGAAYDBgAHCAcACwcGAggDCAIKCAoAAQAKCQUECwMGAAYDBgAHCAcACwcGAwQIBAMF\nAAUDBQAJAwAIBAkHCwcJBQsJCwUGAAEJAgcLBwIEAwQCBAMIAgMLCAAHAQcABwEECQQBCAQHAwkA\nCQMLCQsBAgELAgMLAAUJBQAGAQYABgEKAAEJCgIFAwUCBQMGCwYDBgUKAQsCCwEJCwkDAAMJBgUK\nCAAHAQcABwEECQQBCAQHAAUJBQAGAQYABgEKAAEJBQoECAQKBggKCAYHCwcGCQEEAgQBBAIFCgUC\nCQUEAQYKBgEHAgcBBwILAQIKBgsFCQULBwkLCQcECAQHCgIFAwUCBQMGCwYDBgUKAgcLBwIEAwQC\nBAMIAgMLBwgGCgYIBAoICgQFBwQIBQIKAgUDBgMFAwYLCgUGCwcCBAIHAgQDCAMECwMCBggHCAYK\nCAoEBQQKBgcLBAEJAQQCBQIEAgUKBAUJCgYBBwEGAQcCCwIHCgIBBQsGCwUJCwkHBAcJCgUGBwAI\nAAcBBAEHAQQJBwQICQUABgAFAAYBCgEGCQEABAoFCgQICggGBwYICwMCCQUABgAFAAYBCgEGCQEA\nBQIKAgUDBgMFAwYLCgUGAgsBCQELAwkLCQMACQEACwcCBAIHAgQDCAMECwMCBwAIAAcBBAEHAQQJ\nBwQIAAkDCwMJAQsJCwECBAUJBgMLAwYABwAGAAcIBgcLCAQDBQMEAwUACQAFCAADBwkECQcLCQsF\nBgULCAADCgYBBwEGAQcCCwIHCgIBBgMLAwYABwAGAAcIBgcLAwgCCgIIAAoICgABCgIBCAQDBQME\nAwUACQAFCAADBAEJAQQCBQIEAgUKBAUJAQoACAAKAggKCAID\n\"\"\"\n\n#static const char tiling7_3[16][3][27]\nTILING7_3 = (16, 3, 27), \"\"\"\nDAIKDAoFDAUEDAQIDAgDDAMADAAJDAkBDAECDAUEDAQIDAgDDAMCDAIKDAoBDAEADAAJDAkFBQQM\nCgUMAgoMAwIMCAMMAAgMAQAMCQEMBAkMDAAIDAgHDAcGDAYKDAoBDAECDAILDAsDDAMADAcGDAYK\nDAoBDAEADAAIDAgDDAMCDAILDAsHBwYMCAcMAAgMAQAMCgEMAgoMAwIMCwMMBgsMCQUMAAkMAwAM\nCwMMBgsMBwYMCAcMBAgMBQQMAwAMCwMMBgsMBQYMCQUMBAkMBwQMCAcMAAgMDAMADAAJDAkFDAUG\nDAYLDAsHDAcEDAQIDAgDDAEJDAkEDAQHDAcLDAsCDAIDDAMIDAgADAABDAQHDAcLDAsCDAIBDAEJ\nDAkADAADDAMIDAgEBAcMCQQMAQkMAgEMCwIMAwsMAAMMCAAMBwgMDAMLDAsGDAYFDAUJDAkADAAB\nDAEKDAoCDAIDDAYFDAUJDAkADAADDAMLDAsCDAIBDAEKDAoGBgUMCwYMAwsMAAMMCQAMAQkMAgEM\nCgIMBQoMCgYMAQoMAAEMCAAMBwgMBAcMCQQMBQkMBgUMAAEMCAAMBwgMBgcMCgYMBQoMBAUMCQQM\nAQkMDAABDAEKDAoGDAYHDAcIDAgEDAQFDAUJDAkACwcMAgsMAQIMCQEMBAkMBQQMCgUMBgoMBwYM\nAQIMCQEMBAkMBwQMCwcMBgsMBQYMCgUMAgoMDAECDAILDAsHDAcEDAQJDAkFDAUGDAYKDAoBCAQM\nAwgMAgMMCgIMBQoMBgUMCwYMBwsMBAcMAgMMCgIMBQoMBAUMCAQMBwgMBgcMCwYMAwsMDAIDDAMI\nDAgEDAQFDAUKDAoGDAYHDAcLDAsCDAQIDAgDDAMCDAIKDAoFDAUGDAYLDAsHDAcEDAMCDAIKDAoF\nDAUEDAQIDAgHDAcGDAYLDAsDAwIMCAMMBAgMBQQMCgUMBgoMBwYMCwcMAgsMDAcLDAsCDAIBDAEJ\nDAkEDAQFDAUKDAoGDAYHDAIBDAEJDAkEDAQHDAcLDAsGDAYFDAUKDAoCAgEMCwIMBwsMBAcMCQQM\nBQkMBgUMCgYMAQoMDAYKDAoBDAEADAAIDAgHDAcEDAQJDAkFDAUGDAEADAAIDAgHDAcGDAYKDAoF\nDAUEDAQJDAkBAQAMCgEMBgoMBwYMCAcMBAgMBQQMCQUMAAkMCwMMBgsMBQYMCQUMAAkMAQAMCgEM\nAgoMAwIMBQYMCQUMAAkMAwAMCwMMAgsMAQIMCgEMBgoMDAUGDAYLDAsDDAMADAAJDAkBDAECDAIK\nDAoFCQEMBAkMBwQMCwcMAgsMAwIMCAMMAAgMAQAMBwQMCwcMAgsMAQIMCQEMAAkMAwAMCAMMBAgM\nDAcEDAQJDAkBDAECDAILDAsDDAMADAAIDAgHDAUJDAkADAADDAMLDAsGDAYHDAcIDAgEDAQFDAAD\nDAMLDAsGDAYFDAUJDAkEDAQHDAcIDAgAAAMMCQAMBQkMBgUMCwYMBwsMBAcMCAQMAwgMCAAMBwgM\nBgcMCgYMAQoMAgEMCwIMAwsMAAMMBgcMCgYMAQoMAAEMCAAMAwgMAgMMCwIMBwsMDAYHDAcIDAgA\nDAABDAEKDAoCDAIDDAMLDAsGCgIMBQoMBAUMCAQMAwgMAAMMCQAMAQkMAgEMBAUMCAQMAwgMAgMM\nCgIMAQoMAAEMCQAMBQkMDAQFDAUKDAoCDAIDDAMIDAgADAABDAEJDAkE\n\"\"\"\n\n#static const char tiling7_4_1[16][15]\nTILING7_4_1 = (16, 15), \"\"\"\nAwQIBAMKAgoDBAoFCQEAAQYKBgEIAAgBBggHCwMCCwMGCQYDBgkFAAkDBwQIAgcLBwIJAQkCBwkE\nCAADAAUJBQALAwsABQsGCgIBCAAHCgcABwoGAQoABAUJCQEECwQBBAsHAgsBBQYKCgIFCAUCBQgE\nAwgCBgcLBQIKAgUIBAgFAggDCwcGBAEJAQQLBwsEAQsCCgYFBwAIAAcKBgoHAAoBCQUECQUACwAF\nAAsDBgsFAQIKCwcCCQIHAgkBBAkHAwAIBgMLAwYJBQkGAwkACAQHCgYBCAEGAQgABwgGAgMLCAQD\nCgMEAwoCBQoEAAEJ\n\"\"\"\n\n#static const char tiling7_4_2[16][27]\nTILING7_4_2 = (16, 27), \"\"\"\nCQQIBAkFCgUJAQoJCgECAAIBAgADCAMACQgACwYKBgsHCAcLAwgLCAMAAgADAAIBCgECCwoCCwMI\nAAgDCAAJCAkEBQQJBAUHBgcFBwYLBwsICAcLBwgECQQIAAkICQABAwEAAQMCCwIDCAsDCgUJBQoG\nCwYKAgsKCwIDAQMCAwEACQABCgkBCAAJAQkACQEKCQoFBgUKBQYEBwQGBAcIBAgJCQEKAgoBCgIL\nCgsGBwYLBgcFBAUHBQQJBQkKCgILAwsCCwMICwgHBAcIBwQGBQYEBgUKBgoLCwIKAgsDCAMLBwgL\nCAcEBgQHBAYFCgUGCwoGCgEJAQoCCwIKBgsKCwYHBQcGBwUECQQFCgkFCQAIAAkBCgEJBQoJCgUG\nBAYFBgQHCAcECQgECQUKBgoFCgYLCgsCAwILAgMBAAEDAQAJAQkKCwcIBAgHCAQJCAkAAQAJAAED\nAgMBAwILAwsICAMLAwgACQAIBAkICQQFBwUEBQcGCwYHCAsHCgYLBwsGCwcICwgDAAMIAwACAQIA\nAgEKAgoLCAQJBQkECQUKCQoBAgEKAQIAAwACAAMIAAgJ\n\"\"\"\n\n#static const char tiling8[6][6]\nTILING8 = (6, 6), \"\"\"\nCQgKCggLAQUDAwUHAAQCBAYCAAIEBAIGAQMFAwcFCQoICgsI\n\"\"\"\n\n#static const char tiling9[8][12]\nTILING9 = (8, 12), \"\"\"\nAgoFAwIFAwUEAwQIBAcLCQQLCQsCCQIBCgcGAQcKAQgHAQAIAwYLAAYDAAUGAAkFAwsGAAMGAAYF\nAAUJCgYHAQoHAQcIAQgABAsHCQsECQILCQECAgUKAwUCAwQFAwgE\n\"\"\"\n\n#static const char tiling10_1_1[6][12]\nTILING10_1_1 = (6, 12), \"\"\"\nBQoHCwcKCAEJAQgDAQIFBgUCBAMAAwQHCwAIAAsCBAkGCgYJCQAKAgoABggECAYLBwIDAgcGAAEE\nBQQBBwkFCQcICgELAwsB\n\"\"\"\n\n#static const char tiling10_1_1_[6][12]\nTILING10_1_1_ = (6, 12), \"\"\"\nBQkHCAcJCwEKAQsDAwIHBgcCBAEAAQQFCgAJAAoCBAgGCwYICAALAgsABgkECQYKBQIBAgUGAAME\nBwQDBwoFCgcLCQEIAwgB\n\"\"\"\n\n#static const char tiling10_1_2[6][24]\nTILING10_1_2 = (6, 24), \"\"\"\nAwsHAwcICQgHBQkHCQUKCQoBAwEKCwMKBwYFBwUEAAQFAQAFAAECAAIDBwMCBgcCCwIKBgsKCwYE\nCwQIAAgECQAEAAkKAAoCCwIKCwoGBAYKCQQKBAkABAAICwgAAgsABwYFBAcFBwQABwADAgMAAQIA\nAgEFAgUGBwgDCwcDBwsKBwoFCQUKAQkKCQEDCQMI\n\"\"\"\n\n#static const char tiling10_2[6][24]\nTILING10_2 = (6, 24), \"\"\"\nDAUJDAkIDAgDDAMBDAEKDAoLDAsHDAcFDAEADAAEDAQHDAcDDAMCDAIGDAYFDAUBBAgMBgQMCgYM\nCQoMAAkMAgAMCwIMCAsMDAkEDAQGDAYLDAsIDAgADAACDAIKDAoJAAMMBAAMBQQMAQUMAgEMBgIM\nBwYMAwcMCgUMCwoMAwsMAQMMCQEMCAkMBwgMBQcM\n\"\"\"\n\n#static const char tiling10_2_[6][24]\nTILING10_2_ = (6, 24), \"\"\"\nCAcMCQgMAQkMAwEMCwMMCgsMBQoMBwUMBAUMAAQMAwAMBwMMBgcMAgYMAQIMBQEMDAsGDAYEDAQJ\nDAkKDAoCDAIADAAIDAgLBgoMBAYMCAQMCwgMAgsMAAIMCQAMCgkMDAcEDAQADAABDAEFDAUGDAYC\nDAIDDAMHDAcLDAsKDAoBDAEDDAMIDAgJDAkFDAUH\n\"\"\"\n\n#static const char tiling11[12][12]\nTILING11 = (12, 12), \"\"\"\nAgoJAgkHAgcDBwkEAQYCAQgGAQkICAcGCAMBCAEGCAYEBgEKAAgLAAsFAAUBBQsGCQUHCQcCCQIA\nAgcLBQAEBQsABQoLCwMABQQABQALBQsKCwADCQcFCQIHCQACAgsHAAsIAAULAAEFBQYLCAEDCAYB\nCAQGBgoBAQIGAQYIAQgJCAYHAgkKAgcJAgMHBwQJ\n\"\"\"\n\n#static const char tiling12_1_1[24][12]\nTILING12_1_1 = (24, 12), \"\"\"\nBwYLCgMCAwoICQgKBgUKCQIBAgkLCAsJCgYFBwkECQcBAwEHBwYLBAgFAwUIBQMBBQQJCAEAAQgK\nCwoIAQIKAAkDBQMJAwUHCgECAAsDCwAGBAYACAMAAgkBCQIEBgQCAwAIAgsBBwELAQcFBgUKBwsE\nAgQLBAIACQUEBggHCAYAAgAGCAMABwQLCQsECwkKBAcICwADAAsJCgkLBAcIBQkGAAYJBgACCwcG\nBAoFCgQCAAIECwIDAQgACAEHBQcBAAEJAwgCBAIIAgQGAgMLAQoABgAKAAYECQABAwoCCgMFBwUD\nCQABBAUICggFCAoLCAQHBQsGCwUDAQMFBQQJBgoHAQcKBwEDCgECBQYJCwkGCQsICwIDBgcKCAoH\nCggJ\n\"\"\"\n\n#static const char tiling12_1_1_[24][12]\nTILING12_1_1_ = (24, 12), \"\"\"\nAwILCgcGBwoICQgKAgEKCQYFBgkLCAsJCQQFBwoGCgcBAwEHBwQIBgsFAwULBQMBAQAJCAUEBQgK\nCwoIAQAJAgoDBQMKAwUHCwMCAAoBCgAGBAYACQEAAggDCAIEBgQCAwILAAgBBwEIAQcFBgcLBQoE\nAgQKBAIACAcEBgkFCQYAAgAGCAcEAwALCQsACwkKAAMICwQHBAsJCgkLBAUJBwgGAAYIBgACCgUG\nBAsHCwQCAAIECAADAQsCCwEHBQcBAAMIAQkCBAIJAgQGAgEKAwsABgALAAYECgIBAwkACQMFBwUD\nCQQFAAEICggBCAoLCwYHBQgECAUDAQMFBQYKBAkHAQcJBwEDCgUGAQIJCwkCCQsICwYHAgMKCAoD\nCggJ\n\"\"\"\n\n#static const char tiling12_1_2[24][24]\nTILING12_1_2 = (24, 24), \"\"\"\nBwMLAwcICQgHBgkHCQYKAgoGCwIGAgsDBgIKAgYLCAsGBQgGCAUJAQkFCgEFAQoCCgkFCQoBAwEK\nBgMKAwYHBAcGBQQGBAUJBwgLAwsICwMBCwEGBQYBBgUEBgQHCAcEBQEJAQUKCwoFBAsFCwQIAAgE\nCQAEAAkBAQkKBQoJCgUHCgcCAwIHAgMAAgABCQEACgsCCwoGBAYKAQQKBAEAAwABAgMBAwILCAkA\nCQgEBgQIAwYIBgMCAQIDAAEDAQAJAwsIBwgLCAcFCAUAAQAFAAECAAIDCwMCBgsKAgoLCgIACgAF\nBAUABQQHBQcGCwYHCQgECAkAAgAJBQIJAgUGBwYFBAcFBwQICAQACQAEAAkKAAoDCwMKAwsHAwcI\nBAgHBAAIAAQJCgkEBwoECgcLAwsHCAMHAwgABAkIAAgJCAACCAIHBgcCBwYFBwUECQQFCwoGCgsC\nAAILBwALAAcEBQQHBgUHBQYKCwgDCAsHBQcLAgULBQIBAAECAwACAAMIAAgJBAkICQQGCQYBAgEG\nAQIDAQMACAADAgoLBgsKCwYECwQDAAMEAwABAwECCgIBCQoBCgkFBwUJAAcJBwADAgMAAQIAAgEK\nCQUBCgEFAQoLAQsACAALAAgEAAQJBQkECAsHCwgDAQMIBAEIAQQFBgUEBwYEBgcLBQoJAQkKCQED\nCQMEBwQDBAcGBAYFCgUGCgYCCwIGAgsIAggBCQEIAQkFAQUKBgoFCwcDCAMHAwgJAwkCCgIJAgoG\nAgYLBwsG\n\"\"\"\n\n#static const char tiling12_2[24][24]\nTILING12_2 = (24, 24), \"\"\"\nCQgMCgkMAgoMAwIMCwMMBgsMBwYMCAcMCAsMCQgMAQkMAgEMCgIMBQoMBgUMCwYMAwEMBwMMBAcM\nCQQMBQkMBgUMCgYMAQoMDAMBDAEFDAUGDAYLDAsHDAcEDAQIDAgDCwoMCAsMAAgMAQAMCQEMBAkM\nBQQMCgUMDAUHDAcDDAMCDAIKDAoBDAEADAAJDAkFBAYMAAQMAQAMCgEMAgoMAwIMCwMMBgsMBgQM\nAgYMAwIMCAMMAAgMAQAMCQEMBAkMDAcFDAUBDAEADAAIDAgDDAMCDAILDAsHDAIADAAEDAQFDAUK\nDAoGDAYHDAcLDAsCAgAMBgIMBwYMCAcMBAgMBQQMCQUMAAkMDAkKDAoLDAsHDAcEDAQIDAgDDAMA\nDAAJCgkMCwoMBwsMBAcMCAQMAwgMAAMMCQAMDAACDAIGDAYHDAcIDAgEDAQFDAUJDAkAAAIMBAAM\nBQQMCgUMBgoMBwYMCwcMAgsMBQcMAQUMAAEMCAAMAwgMAgMMCwIMBwsMDAQGDAYCDAIDDAMIDAgA\nDAABDAEJDAkEDAYEDAQADAABDAEKDAoCDAIDDAMLDAsGBwUMAwcMAgMMCgIMAQoMAAEMCQAMBQkM\nDAoLDAsIDAgADAABDAEJDAkEDAQFDAUKAQMMBQEMBgUMCwYMBwsMBAcMCAQMAwgMDAEDDAMHDAcE\nDAQJDAkFDAUGDAYKDAoBDAsIDAgJDAkBDAECDAIKDAoFDAUGDAYLDAgJDAkKDAoCDAIDDAMLDAsG\nDAYHDAcI\n\"\"\"\n\n#static const char tiling12_2_[24][24]\nTILING12_2_ = (24, 24), \"\"\"\nDAILDAsHDAcGDAYKDAoJDAkIDAgDDAMCDAEKDAoGDAYFDAUJDAkIDAgLDAsCDAIBDAQFDAUKDAoG\nDAYHDAcDDAMBDAEJDAkEBwYMCAcMBAgMBQQMAQUMAwEMCwMMBgsMDAAJDAkFDAUEDAQIDAgLDAsK\nDAoBDAEAAQIMCQEMAAkMAwAMBwMMBQcMCgUMAgoMDAECDAILDAsDDAMADAAEDAQGDAYKDAoBDAMA\nDAAJDAkBDAECDAIGDAYEDAQIDAgDAwAMCwMMAgsMAQIMBQEMBwUMCAcMAAgMBgUMCwYMBwsMBAcM\nAAQMAgAMCgIMBQoMDAcEDAQJDAkFDAUGDAYCDAIADAAIDAgHCAcMAAgMAwAMCwMMCgsMCQoMBAkM\nBwQMDAcIDAgADAADDAMLDAsKDAoJDAkEDAQHBAcMCQQMBQkMBgUMAgYMAAIMCAAMBwgMDAUGDAYL\nDAsHDAcEDAQADAACDAIKDAoFDAADDAMLDAsCDAIBDAEFDAUHDAcIDAgAAAMMCQAMAQkMAgEMBgIM\nBAYMCAQMAwgMAgEMCwIMAwsMAAMMBAAMBgQMCgYMAQoMDAIBDAEJDAkADAADDAMHDAcFDAUKDAoC\nCQAMBQkMBAUMCAQMCwgMCgsMAQoMAAEMDAYHDAcIDAgEDAQFDAUBDAEDDAMLDAsGBQQMCgUMBgoM\nBwYMAwcMAQMMCQEMBAkMCgEMBgoMBQYMCQUMCAkMCwgMAgsMAQIMCwIMBwsMBgcMCgYMCQoMCAkM\nAwgMAgMM\n\"\"\"\n\n#static const char tiling13_1[2][12]\nTILING13_1 = (2, 12), \"\"\"\nCwcGAQIKCAMACQUECAQHAgMLCQABCgYF\n\"\"\"\n\n#static const char tiling13_1_[2][12]\nTILING13_1_ = (2, 12), \"\"\"\nBwQICwMCAQAJBQYKBgcLCgIBAAMIBAUJ\n\"\"\"\n\n#static const char tiling13_2[2][6][18]\nTILING13_2 = (2, 6, 18), \"\"\"\nAQIKCwcGAwQIBAMFAAUDBQAJCAMACwcGCQEEAgQBBAIFCgUCCQUECAMAAQYKBgEHAgcBBwILCQUE\nAQIKCwMGAAYDBgAHCAcACQUECwcGAAoBCgAICggCAwIIAQIKAwAIBAkHCwcJBQsJCwUGAgMLCAQH\nAAUJBQAGAQYABgEKCQABCAQHCgIFAwUCBQMGCwYDBgUKCQABAgcLBwIEAwQCBAMIBgUKAgMLCAAH\nAQcABwEECQQBBgUKCAQHAQsCCwEJCwkDAAMJAgMLAAEJBQoECAQKBggKCAYH\n\"\"\"\n\n#static const char tiling13_2_[2][6][18]\nTILING13_2_ = (2, 6, 18), \"\"\"\nCgUGCwMCBwAIAAcBBAEHAQQJCwMCBwQICQUABgAFAAYBCgEGAQAJBwQIBQIKAgUDBgMFAwYLCgUG\nAQAJCwcCBAIHAgQDCAMECgUGBwQIAgsBCQELAwkLCQMACwMCCQEABAoFCgQICggGBwYIBgcLCAAD\nBAEJAQQCBQIEAgUKCAADBAUJCgYBBwEGAQcCCwIHAgEKBAUJBgMLAwYABwAGAAcIBgcLAgEKCAQD\nBQMEAwUACQAFBgcLBAUJAwgCCgIIAAoICgABCAADCgIBBQsGCwUJCwkHBAcJ\n\"\"\"\n\n#static const char tiling13_3[2][12][30]\nTILING13_3 = (2, 12, 30), \"\"\"\nCwcGDAIKDAoFDAUEDAQIDAgDDAMADAAJDAkBDAECAQIKCQUMAAkMAwAMCwMMBgsMBwYMCAcMBAgM\nBQQMCwcGDAUEDAQIDAgDDAMCDAIKDAoBDAEADAAJDAkFAQIKDAMADAAJDAkFDAUGDAYLDAsHDAcE\nDAQIDAgDCAMACwcMAgsMAQIMCQEMBAkMBQQMCgUMBgoMBwYMCwcGBQQMCgUMAgoMAwIMCAMMAAgM\nAQAMCQEMBAkMCAMAAQIMCQEMBAkMBwQMCwcMBgsMBQYMCgUMAgoMCQUEDAAIDAgHDAcGDAYKDAoB\nDAECDAILDAsDDAMACQUEDAcGDAYKDAoBDAEADAAIDAgDDAMCDAILDAsHCAMADAECDAILDAsHDAcE\nDAQJDAkFDAUGDAYKDAoBCQUEBwYMCAcMAAgMAQAMCgEMAgoMAwIMCwMMBgsMAQIKAwAMCwMMBgsM\nBQYMCQUMBAkMBwQMCAcMAAgMCAQHDAMLDAsGDAYFDAUJDAkADAABDAEKDAoCDAIDAgMLCgYMAQoM\nAAEMCAAMBwgMBAcMCQQMBQkMBgUMCAQHDAYFDAUJDAkADAADDAMLDAsCDAIBDAEKDAoGAgMLDAAB\nDAEKDAoGDAYHDAcIDAgEDAQFDAUJDAkAAAEJCAQMAwgMAgMMCgIMBQoMBgUMCwYMBwsMBAcMCAQH\nBgUMCwYMAwsMAAMMCQAMAQkMAgEMCgIMBQoMCQABAgMMCgIMBQoMBAUMCAQMBwgMBgcMCwYMAwsM\nBgUKDAEJDAkEDAQHDAcLDAsCDAIDDAMIDAgADAABBgUKDAQHDAcLDAsCDAIBDAEJDAkADAADDAMI\nDAgECQABDAIDDAMIDAgEDAQFDAUKDAoGDAYHDAcLDAsCBgUKBAcMCQQMAQkMAgEMCwIMAwsMAAMM\nCAAMBwgMAgMLAAEMCAAMBwgMBgcMCgYMBQoMBAUMCQQMAQkM\n\"\"\"\n\n#static const char tiling13_3_[2][12][30]\nTILING13_3_ = (2, 12, 30), \"\"\"\nAwILCAcMAAgMAQAMCgEMBgoMBQYMCQUMBAkMBwQMBQYKDAILDAsHDAcEDAQJDAkBDAEADAAIDAgD\nDAMCCgUGDAcEDAQJDAkBDAECDAILDAsDDAMADAAIDAgHCwMCDAEADAAIDAgHDAcGDAYKDAoFDAUE\nDAQJDAkBBwQICwMMBgsMBQYMCQUMAAkMAQAMCgEMAgoMAwIMBwQIBQYMCQUMAAkMAwAMCwMMAgsM\nAQIMCgEMBgoMCwMCAQAMCgEMBgoMBwYMCAcMBAgMBQQMCQUMAAkMAQAJDAQIDAgDDAMCDAIKDAoF\nDAUGDAYLDAsHDAcEBwQIDAUGDAYLDAsDDAMADAAJDAkBDAECDAIKDAoFAQAJDAMCDAIKDAoFDAUE\nDAQIDAgHDAcGDAYLDAsDCgUGBwQMCwcMAgsMAQIMCQEMAAkMAwAMCAMMBAgMCQEAAwIMCAMMBAgM\nBQQMCgUMBgoMBwYMCwcMAgsMAAMICQQMAQkMAgEMCwIMBwsMBgcMCgYMBQoMBAUMCwYHDAMIDAgE\nDAQFDAUKDAoCDAIBDAEJDAkADAADBgcLDAQFDAUKDAoCDAIDDAMIDAgADAABDAEJDAkECAADDAIB\nDAEJDAkEDAQHDAcLDAsGDAYFDAUKDAoCBAUJCAAMBwgMBgcMCgYMAQoMAgEMCwIMAwsMAAMMBAUJ\nBgcMCgYMAQoMAAEMCAAMAwgMAgMMCwIMBwsMCAADAgEMCwIMBwsMBAcMCQQMBQkMBgUMCgYMAQoM\nAgEKDAUJDAkADAADDAMLDAsGDAYHDAcIDAgEDAQFBAUJDAYHDAcIDAgADAABDAEKDAoCDAIDDAML\nDAsGAgEKDAADDAMLDAsGDAYFDAUJDAkEDAQHDAcIDAgABgcLBAUMCAQMAwgMAgMMCgIMAQoMAAEM\nCQAMBQkMCgIBAAMMCQAMBQkMBgUMCwYMBwsMBAcMCAQMAwgM\n\"\"\"\n\n#static const char tiling13_4[2][4][36]\nTILING13_4 = (2, 4, 36), \"\"\"\nDAIKDAoFDAUGDAYLDAsHDAcEDAQIDAgDDAMADAAJDAkBDAECCwMMBgsMBwYMCAcMBAgMBQQMCQUM\nAAkMAQAMCgEMAgoMAwIMCQEMBAkMBQQMCgUMBgoMBwYMCwcMAgsMAwIMCAMMAAgMAQAMDAAIDAgH\nDAcEDAQJDAkFDAUGDAYKDAoBDAECDAILDAsDDAMADAMLDAsGDAYHDAcIDAgEDAQFDAUJDAkADAAB\nDAEKDAoCDAIDCAAMBwgMBAcMCQQMBQkMBgUMCgYMAQoMAgEMCwIMAwsMAAMMCgIMBQoMBgUMCwYM\nBwsMBAcMCAQMAwgMAAMMCQAMAQkMAgEMDAEJDAkEDAQFDAUKDAoGDAYHDAcLDAsCDAIDDAMIDAgA\nDAAB\n\"\"\"\n\n#static const char tiling13_5_1[2][4][18]\nTILING13_5_1 = (2, 4, 18), \"\"\"\nBwYLAQAJCgMCAwoFAwUIBAgFAQIKBwQIAwALBgsACQYABgkFAwAIBQYKAQIJBAkCCwQCBAsHBQQJ\nAwILCAEAAQgHAQcKBgoHBAcIAgEKCwADAAsGAAYJBQkGAgMLBAUJAAEIBwgBCgcBBwoGAAEJBgcL\nAgMKBQoDCAUDBQgEBgUKAAMICQIBAgkEAgQLBwsE\n\"\"\"\n\n#static const char tiling13_5_2[2][4][30]\nTILING13_5_2 = (2, 4, 30), \"\"\"\nAQAJBwQIBwgDBwMLAgsDCwIKCwoGBQYKBgUHBAcFBwQICwMCBgsCCgYCBgoFCQUKAQkKCQEAAgAB\nAAIDBQYKCQEABAkACAQABAgHCwcIAwsICwMCAAIDAgABAwILBQYKBQoBBQEJAAkBCQAICQgEBAgH\nBAcFBgUHAgEKBAUJBAkABAAIAwgACAMLCAsHBgcLBwYEBQQGBAUJCAADBwgDCwcDBwsGCgYLAgoL\nCgIBAwECAQMABgcLCgIBBQoBCQUBBQkECAQJAAgJCAADAQMAAwECAAMIBgcLBgsCBgIKAQoCCgEJ\nCgkFBQkEBQQGBwYE\n\"\"\"\n\n#static const char tiling14[12][12]\nTILING14 = (12, 12), \"\"\"\nBQkIBQgCBQIGAwIIAgEFAgUIAggLBAgFCQQGCQYDCQMBCwMGAQsKAQQLAQAEBwsECAIACAUCCAcF\nCgIFAAcDAAoHAAkKBgcKAAMHAAcKAAoJBgoHCAACCAIFCAUHCgUCAQoLAQsEAQQABwQLCQYECQMG\nCQEDCwYDAgUBAggFAgsIBAUIBQgJBQIIBQYCAwgC\n\"\"\"\n\n#static const char test3[24]\nTEST3 = (24,), \"\"\"\nBQEEBQECAgMEAwYG+vr9/P3+/v/7/P/7\n\"\"\"\n\n#static const char test4[8]\nTEST4 = (8,), \"\"\"\nBwcHB/n5+fk=\n\"\"\"\n\n#static const char test6[48][3]\nTEST6 = (48, 3), \"\"\"\nAgcKBAcLBQcBBQcDAQcJAwcKBgcFAQcIBAcIAQcIAwcLBQcCBQcAAQcJBgcGAgcJBAcIAgcJAgcK\nBgcHAwcKBAcLAwcLBgcE+vkE/fkL/PkL/fkK+vkH/vkK/vkJ/PkI/vkJ+vkG//kJ+/kA+/kC/fkL\n//kI/PkI//kI+vkF/fkK//kJ+/kD+/kB/PkL/vkK\n\"\"\"\n\n#static const char test7[16][5]\nTEST7 = (16, 5), \"\"\"\nAQIFBwEDBAUHAwQBBgcEBAEFBwACAwUHAgECBgcFAgMGBwYDBAYHB/38+vkH/v36+Qb//vr5Bf79\n+/kC/P/7+QD8//r5BP38+/kD//77+QE=\n\"\"\"\n\n#static const char test10[6][3]\nTEST10 = (6, 3), \"\"\"\nAgQHBQYHAQMHAQMHBQYHAgQH\n\"\"\"\n\n#static const char test12[24][4]\nTEST12 = (24, 4), \"\"\"\nBAMHCwMCBwoCBgcFBgQHBwIBBwkFAgcBBQMHAgUBBwAFBAcDBgMHBgEGBwQBBAcIBAEHCAYBBwQD\nBgcGBAUHAwEFBwADBQcCAgUHAQECBwkEBgcHBgIHBQIDBwoDBAcL\n\"\"\"\n\n#static const char test13[2][7]\nTEST13 = (2, 7), \"\"\"\nAQIDBAUGBwIDBAEFBgc=\n\"\"\"\n\n#static const char subconfig13[64]\nSUBCONFIG13 = (64,), \"\"\"\nAAECBwP/C/8ECP//Dv///wUJDBcP/xUmERT/JBohHiwGCg0TEP8ZJRIY/yMWIB0r////Iv//HCr/\nH/8pGygnLQ==\n\"\"\"\n"
  },
  {
    "path": "custom_mc/setup.py",
    "content": "# python setup.py build_ext --inplace\nfrom setuptools import setup\nfrom Cython.Build import cythonize\nimport numpy as np\nimport os\n\nincludes_numpy = '-I ' + np.get_include() + ' '\nos.environ['CFLAGS'] = includes_numpy + (os.environ['CFLAGS'] if 'CFLAGS' in os.environ else '')\n\nsetup(\n    name=\"My MC\",\n    ext_modules=cythonize(\"_marching_cubes_lewiner_cy.pyx\", include_path=[np.get_include()]),\n)\n"
  },
  {
    "path": "exp_runner.py",
    "content": "import os\nimport time\nimport logging\nimport argparse\nimport numpy as np\nimport cv2 as cv\nimport trimesh\nimport torch\nimport torch.nn.functional as F\nfrom torch.utils.tensorboard import SummaryWriter\nfrom shutil import copyfile\nfrom icecream import ic\nfrom tqdm import tqdm\nfrom pyhocon import ConfigFactory\nfrom models.dataset import Dataset\nfrom models.fields import RenderingNetwork, SDFNetwork, SingleVarianceNetwork, NeRF\nfrom models.renderer import NeuSRenderer\n\nfrom matplotlib import pyplot as plt\n\nfrom scipy.sparse import coo_matrix\nfrom collections import defaultdict\n\nimport lib.workspace as ws\n\nimport sys\nsys.path.append('custom_mc')\nfrom _marching_cubes_lewiner import udf_mc_lewiner\n\n# import pymeshlab as ml\n\nclass Runner:\n    def __init__(self, conf_path, mode='train', case='CASE_NAME', is_continue=False):\n        self.device = torch.device('cuda')\n\n        # Configuration\n        self.conf_path = conf_path\n        f = open(self.conf_path)\n        conf_text = f.read()\n        conf_text = conf_text.replace('CASE_NAME', case)\n        f.close()\n\n        self.conf = ConfigFactory.parse_string(conf_text)\n        self.conf['dataset.data_dir'] = self.conf['dataset.data_dir'].replace('CASE_NAME', case)\n        self.base_exp_dir = self.conf['general.base_exp_dir']\n        os.makedirs(self.base_exp_dir, exist_ok=True)\n        self.dataset = Dataset(self.conf['dataset'])\n        self.iter_step = 0\n\n        # Training parameters\n        self.end_iter = self.conf.get_int('train.end_iter')\n        self.save_freq = self.conf.get_int('train.save_freq')\n        self.report_freq = self.conf.get_int('train.report_freq')\n        self.val_freq = self.conf.get_int('train.val_freq')\n        self.val_mesh_freq = self.conf.get_int('train.val_mesh_freq')\n        self.batch_size = self.conf.get_int('train.batch_size')\n        self.validate_resolution_level = self.conf.get_int('train.validate_resolution_level')\n        self.learning_rate = self.conf.get_float('train.learning_rate')\n        self.learning_rate_alpha = self.conf.get_float('train.learning_rate_alpha')\n        # self.learning_rate_sdf = self.conf.get_float('train.learning_rate_sdf')\n        self.use_white_bkgd = self.conf.get_bool('train.use_white_bkgd')\n        self.warm_up_end = self.conf.get_float('train.warm_up_end', default=0.0)\n        self.anneal_end = self.conf.get_float('train.anneal_end', default=0.0)\n\n        self.weight_anneal_end = self.conf.get_float('train.weight_anneal_end', default=0.)\n\n        self.mcube_threshold = self.conf.get_float('train.mcube_threshold')\n\n        self.up_sample_start = self.conf.get_int('train.up_sample_start')\n\n        self.perm_num = self.conf.get_int('train.perm_num')\n\n        # Weights\n        self.igr_weight = self.conf.get_float('train.igr_weight')\n        self.mask_weight = self.conf.get_float('train.mask_weight')\n        self.normal_weight = self.conf.get_float('train.normal_weight')\n\n        self.is_continue = is_continue\n        self.mode = mode\n        self.model_list = []\n        self.writer = None\n\n        # Networks\n        params_to_train = []\n        self.nerf_outside = NeRF(**self.conf['model.nerf']).to(self.device)\n        self.sdf_network = SDFNetwork(**self.conf['model.sdf_network']).to(self.device)\n        self.deviation_network = SingleVarianceNetwork(**self.conf['model.variance_network']).to(self.device)\n        self.color_network = RenderingNetwork(**self.conf['model.rendering_network']).to(self.device)\n\n        # params_to_train += list(self.nerf_outside.parameters())\n        # params_to_train += list(self.deviation_network.parameters())\n        # params_to_train += list(self.color_network.parameters())\n\n        # params_to_train_sdf = list(self.sdf_network.parameters())\n        # self.optimizer = torch.optim.Adam([{'params':params_to_train}, {'params':params_to_train_sdf}], lr=self.learning_rate)\n        \n        params_to_train += list(self.nerf_outside.parameters())\n        params_to_train += list(self.sdf_network.parameters())\n        params_to_train += list(self.deviation_network.parameters())\n        params_to_train += list(self.color_network.parameters())\n\n        self.optimizer = torch.optim.Adam(params_to_train, lr=self.learning_rate)\n\n\n        self.renderer = NeuSRenderer(self.nerf_outside,\n                                     self.sdf_network,\n                                     self.deviation_network,\n                                     self.color_network,\n                                     **self.conf['model.neus_renderer'])\n        self.n_samples = self.renderer.n_samples\n\n        # Load checkpoint\n        latest_model_name = None\n        if is_continue and os.path.exists(os.path.join(self.base_exp_dir, 'checkpoints')):\n            model_list_raw = os.listdir(os.path.join(self.base_exp_dir, 'checkpoints'))\n            model_list = []\n            for model_name in model_list_raw:\n                if model_name[-3:] == 'pth' and int(model_name[5:-4]):\n                    model_list.append(model_name)\n            model_list.sort()\n            latest_model_name = model_list[-1]\n\n        if latest_model_name is not None:\n            logging.info('Found checkpoint: {}'.format(latest_model_name))\n            self.load_checkpoint(latest_model_name)\n\n        # Backup codes and configs for debug\n        if self.mode[:5] == 'train':\n            self.file_backup()\n\n    def train(self):\n        self.writer = SummaryWriter(log_dir=os.path.join(self.base_exp_dir, 'logs'))\n        self.update_learning_rate()\n        res_step = self.end_iter - self.iter_step\n        image_perm = []\n        for _ in range(self.perm_num):\n            image_perm.append(self.get_image_perm())\n\n        for iter_i in tqdm(range(res_step)):\n            self.patch_size = 1\n            self.patch_num = int(self.batch_size/self.patch_size/self.patch_size)\n            self.renderer.patch_num = self.patch_num\n            self.renderer.patch_size = self.patch_size\n            \n            for i in range(self.perm_num):\n                if i == 0:\n                    data = self.dataset.gen_random_rays_at(image_perm[0][self.iter_step % len(image_perm)],\n                                                            int(self.batch_size/self.perm_num))\n                else:\n                    data_p = self.dataset.gen_random_rays_at(image_perm[i][self.iter_step % len(image_perm)],\n                                                                int(self.batch_size/self.perm_num))\n                    data = torch.cat([data, data_p], dim=0)\n\n            rays_o, rays_d, true_rgb, mask = data[:, :3], data[:, 3: 6], data[:, 6: 9], data[:, 9: 10]\n            near, far = self.dataset.near_far_from_sphere(rays_o, rays_d)\n\n            background_rgb = None\n            if self.use_white_bkgd:\n                background_rgb = torch.ones([1, 3])\n\n            if self.mask_weight > 0.0:\n                mask = (mask > 0.5).float()\n            else:\n                mask = torch.ones_like(mask)\n\n            mask_sum = mask.sum() + 1e-5\n            up_sample = False\n            if self.iter_step >= self.up_sample_start:\n                up_sample = True\n            self.renderer.iter_step = self.iter_step\n\n            render_out = self.renderer.render(rays_o, rays_d, near, far,\n                                              background_rgb=background_rgb,\n                                              cos_anneal_ratio=self.get_cos_anneal_ratio(),\n                                              weight_anneal_ratio=self.get_weight_anneal_ratio(),\n                                              up_sample=up_sample,\n                                              )\n\n            color_fine = render_out['color_fine']\n            s_val = render_out['s_val']\n            cdf_fine = render_out['cdf_fine']\n            gradient_error = render_out['gradient_error']\n            weight_max = render_out['weight_max']\n            weight_sum = render_out['weight_sum']\n            normal_error = render_out['normal_error']\n\n            # Loss\n            color_error = (color_fine - true_rgb) * mask\n            color_fine_loss = F.l1_loss(color_error, torch.zeros_like(color_error), reduction='sum') / mask_sum\n            psnr = 20.0 * torch.log10(1.0 / (((color_fine - true_rgb)**2 * mask).sum() / (mask_sum * 3.0)).sqrt())\n\n            eikonal_loss = gradient_error\n\n            mask_loss = F.binary_cross_entropy(weight_sum.clip(1e-3, 1.0 - 1e-3), mask)\n\n            normal_loss = normal_error\n\n            loss = color_fine_loss\n            loss += eikonal_loss * self.igr_weight\n            loss += mask_loss * self.mask_weight\n            loss += normal_loss * self.normal_weight\n\n            self.optimizer.zero_grad()\n            loss.backward()\n            self.optimizer.step()\n\n            self.iter_step += 1\n\n            self.writer.add_scalar('Loss/loss', loss, self.iter_step)\n            self.writer.add_scalar('Loss/color_loss', color_fine_loss, self.iter_step)\n            self.writer.add_scalar('Loss/eikonal_loss', eikonal_loss, self.iter_step)\n            self.writer.add_scalar('Loss/normal_loss', normal_loss, self.iter_step)\n\n            self.writer.add_scalar('Statistics/s_val', s_val.mean(), self.iter_step)\n            self.writer.add_scalar('Statistics/cdf', (cdf_fine[:, :1] * mask).sum() / mask_sum, self.iter_step)\n            self.writer.add_scalar('Statistics/weight_max', (weight_max * mask).sum() / mask_sum, self.iter_step)\n            self.writer.add_scalar('Statistics/psnr', psnr, self.iter_step)\n\n            if self.iter_step % self.report_freq == 0:\n                print(self.base_exp_dir)\n                print('iter:{:8>d} loss = {} lr={}'.format(self.iter_step, loss, self.optimizer.param_groups[0]['lr']))\n\n            if self.iter_step % self.save_freq == 0:\n                self.save_checkpoint()\n\n            if self.iter_step % self.val_freq == 0:\n                self.validate_image(up_sample=True)\n\n            if self.iter_step % self.val_mesh_freq == 0:\n                self.validate_mesh(world_space=True, resolution=256, threshold=self.mcube_threshold)\n\n            self.update_learning_rate()\n\n            if self.iter_step % self.perm_num == 0:\n                image_perm = []\n                for _ in range(self.perm_num):\n                    image_perm.append(self.get_image_perm())\n\n    def get_image_perm(self):\n        return torch.randperm(self.dataset.n_images)\n\n    def get_cos_anneal_ratio(self):\n        if self.anneal_end == 0.0:\n            return 1.0\n        else:\n            return np.min([1.0, self.iter_step / self.anneal_end])\n\n    def get_weight_anneal_ratio(self):\n        if self.weight_anneal_end == 0.0:\n            return 1.0\n        else:\n            return np.min([1.0, self.iter_step / self.weight_anneal_end])\n\n    def update_learning_rate(self):\n        if self.iter_step < self.warm_up_end:\n            learning_factor = self.iter_step / self.warm_up_end\n        else:\n            alpha = self.learning_rate_alpha\n            progress = (self.iter_step - self.warm_up_end) / (self.end_iter - self.warm_up_end)\n            learning_factor = (np.cos(np.pi * progress) + 1.0) * 0.5 * (1 - alpha) + alpha\n\n        for g in self.optimizer.param_groups:\n            g['lr'] = self.learning_rate * learning_factor\n        # self.optimizer.param_groups[0]['lr'] = self.learning_rate * learning_factor\n        # self.optimizer.param_groups[1]['lr'] = self.learning_rate_sdf * learning_factor\n\n    def file_backup(self):\n        dir_lis = self.conf['general.recording']\n        os.makedirs(os.path.join(self.base_exp_dir, 'recording'), exist_ok=True)\n        for dir_name in dir_lis:\n            cur_dir = os.path.join(self.base_exp_dir, 'recording', dir_name)\n            os.makedirs(cur_dir, exist_ok=True)\n            files = os.listdir(dir_name)\n            for f_name in files:\n                if f_name[-3:] == '.py':\n                    copyfile(os.path.join(dir_name, f_name), os.path.join(cur_dir, f_name))\n\n        copyfile(self.conf_path, os.path.join(self.base_exp_dir, 'recording', 'config.conf'))\n\n    def load_checkpoint(self, checkpoint_name):\n        checkpoint = torch.load(os.path.join(self.base_exp_dir, 'checkpoints', checkpoint_name), map_location=self.device)\n        self.nerf_outside.load_state_dict(checkpoint['nerf'])\n        self.sdf_network.load_state_dict(checkpoint['sdf_network_fine'])\n        self.deviation_network.load_state_dict(checkpoint['variance_network_fine'])\n        self.color_network.load_state_dict(checkpoint['color_network_fine'])\n        self.optimizer.load_state_dict(checkpoint['optimizer'])\n        self.iter_step = checkpoint['iter_step']\n\n        logging.info('End')\n\n    def save_checkpoint(self):\n        checkpoint = {\n            'nerf': self.nerf_outside.state_dict(),\n            'sdf_network_fine': self.sdf_network.state_dict(),\n            'variance_network_fine': self.deviation_network.state_dict(),\n            'color_network_fine': self.color_network.state_dict(),\n            'optimizer': self.optimizer.state_dict(),\n            'iter_step': self.iter_step,\n        }\n\n        os.makedirs(os.path.join(self.base_exp_dir, 'checkpoints'), exist_ok=True)\n        torch.save(checkpoint, os.path.join(self.base_exp_dir, 'checkpoints', 'ckpt_{:0>6d}.pth'.format(self.iter_step)))\n\n    def validate_image(self, idx=-1, resolution_level=-1, up_sample=True):\n        if idx < 0:\n            idx = np.random.randint(self.dataset.n_images)\n\n        print('Validate: iter: {}, camera: {}'.format(self.iter_step, idx))\n\n        if resolution_level < 0:\n            resolution_level = self.validate_resolution_level\n        rays_o, rays_d = self.dataset.gen_rays_at(idx, resolution_level=resolution_level)\n        H, W, _ = rays_o.shape\n        rays_o = rays_o.reshape(-1, 3).split(self.batch_size)\n        rays_d = rays_d.reshape(-1, 3).split(self.batch_size)\n\n        out_rgb_fine = []\n        out_normal_fine = []\n\n        for rays_o_batch, rays_d_batch in zip(rays_o, rays_d):\n            near, far = self.dataset.near_far_from_sphere(rays_o_batch, rays_d_batch)\n            background_rgb = torch.ones([1, 3]) if self.use_white_bkgd else None\n\n            render_out = self.renderer.render(rays_o_batch,\n                                              rays_d_batch,\n                                              near,\n                                              far,\n                                              cos_anneal_ratio=self.get_cos_anneal_ratio(),\n                                              background_rgb=background_rgb,\n                                              up_sample=up_sample,\n                                              )\n\n            def feasible(key): return (key in render_out) and (render_out[key] is not None)\n\n            if feasible('color_fine'):\n                out_rgb_fine.append(render_out['color_fine'].detach().cpu().numpy())\n            if feasible('gradients') and feasible('weights'):\n                n_samples = self.renderer.n_samples + self.renderer.n_importance\n                normals = render_out['gradients'] * render_out['weights'][:, :n_samples, None]\n                if feasible('inside_sphere'):\n                    normals = normals * render_out['inside_sphere'][..., None]\n                normals = normals.sum(dim=1).detach().cpu().numpy()\n                out_normal_fine.append(normals)\n            del render_out\n\n        img_fine = None\n        if len(out_rgb_fine) > 0:\n            img_fine = (np.concatenate(out_rgb_fine, axis=0).reshape([H, W, 3, -1]) * 256).clip(0, 255)\n\n        normal_img = None\n        if len(out_normal_fine) > 0:\n            normal_img = np.concatenate(out_normal_fine, axis=0)\n            rot = np.linalg.inv(self.dataset.pose_all[idx, :3, :3].detach().cpu().numpy())\n            normal_img = (np.matmul(rot[None, :, :], normal_img[:, :, None])\n                          .reshape([H, W, 3, -1]) * 128 + 128).clip(0, 255)\n\n        os.makedirs(os.path.join(self.base_exp_dir, 'validations_fine'), exist_ok=True)\n        os.makedirs(os.path.join(self.base_exp_dir, 'normals'), exist_ok=True)\n\n        for i in range(img_fine.shape[-1]):\n            if len(out_rgb_fine) > 0:\n                cv.imwrite(os.path.join(self.base_exp_dir,\n                                        'validations_fine',\n                                        '{:0>8d}_{}_{}.png'.format(self.iter_step, i, idx)),\n                           np.concatenate([img_fine[..., i],\n                                           self.dataset.image_at(idx, resolution_level=resolution_level)]))\n            if len(out_normal_fine) > 0:\n                cv.imwrite(os.path.join(self.base_exp_dir,\n                                        'normals',\n                                        '{:0>8d}_{}_{}.png'.format(self.iter_step, i, idx)),\n                           normal_img[..., i])\n\n    def render_novel_image(self, idx_0, idx_1, ratio, resolution_level):\n        \"\"\"\n        Interpolate view between two cameras.\n        \"\"\"\n        rays_o, rays_d = self.dataset.gen_rays_between(idx_0, idx_1, ratio, resolution_level=resolution_level)\n        H, W, _ = rays_o.shape\n        rays_o = rays_o.reshape(-1, 3).split(self.batch_size)\n        rays_d = rays_d.reshape(-1, 3).split(self.batch_size)\n\n        out_rgb_fine = []\n        for rays_o_batch, rays_d_batch in zip(rays_o, rays_d):\n            near, far = self.dataset.near_far_from_sphere(rays_o_batch, rays_d_batch)\n            background_rgb = torch.ones([1, 3]) if self.use_white_bkgd else None\n\n            render_out = self.renderer.render(rays_o_batch,\n                                              rays_d_batch,\n                                              near,\n                                              far,\n                                              cos_anneal_ratio=self.get_cos_anneal_ratio(),\n                                              background_rgb=background_rgb)\n\n            out_rgb_fine.append(render_out['color_fine'].detach().cpu().numpy())\n\n            del render_out\n\n        img_fine = (np.concatenate(out_rgb_fine, axis=0).reshape([H, W, 3]) * 256).clip(0, 255).astype(np.uint8)\n        return img_fine\n\n    def validate_mesh(self, world_space=False, resolution=64, threshold=0.0):\n        bound_min = torch.tensor(self.dataset.object_bbox_min, dtype=torch.float32)\n        bound_max = torch.tensor(self.dataset.object_bbox_max, dtype=torch.float32)\n\n        vertices, triangles =\\\n            self.renderer.extract_geometry(bound_min, bound_max, resolution=resolution, threshold=threshold)\n        os.makedirs(os.path.join(self.base_exp_dir, 'meshes'), exist_ok=True)\n\n        if world_space:\n            vertices = vertices * self.dataset.scale_mats_np[0][0, 0] + self.dataset.scale_mats_np[0][:3, 3][None]\n\n        mesh = trimesh.Trimesh(vertices, triangles)\n        mesh.export(os.path.join(self.base_exp_dir, 'meshes', '{:0>8d}.ply'.format(self.iter_step)))\n\n        logging.info('End')\n\n    def validate_point(self, num_steps=10, world_space=True, patch_size=10000, color=False):\n        point_cloud, duration = self.renderer.generate_point_cloud(num_steps=num_steps, device=self.device, num_points=1000000, filter_val=0.001)\n\n        print('num_steps', num_steps, 'duration', duration)\n\n        if color:\n            color_cpu = []\n            while len(color_cpu) < len(point_cloud):\n                print(len(color_cpu))\n                min_idx = len(color_cpu)\n                max_idx = np.min([len(point_cloud), min_idx+patch_size])\n                color = self.get_vertices_color(vertices=torch.from_numpy(point_cloud[min_idx:max_idx, :].astype(np.float32)).to(self.device))\n                if len(color_cpu)==0:\n                    color_cpu = color\n                else:\n                    color_cpu = np.vstack((color_cpu, color))\n        else:\n            color_cpu = np.ones_like(point_cloud)\n\n        if world_space:\n            point_cloud = point_cloud * self.dataset.scale_mats_np[0][0, 0] + self.dataset.scale_mats_np[0][:3, 3][None]\n\n        cloud = trimesh.points.PointCloud(vertices=point_cloud, colors=color_cpu[:, ::-1])\n        cloud.export(os.path.join(self.base_exp_dir, 'meshes', 'pc{:0>8d}.ply'.format(self.iter_step)))\n\n    def interpolate_view(self, img_idx_0, img_idx_1):\n        images = []\n        n_frames = 60\n        for i in range(n_frames):\n            print(i)\n            images.append(self.render_novel_image(img_idx_0,\n                                                  img_idx_1,\n                                                  np.sin(((i / n_frames) - 0.5) * np.pi) * 0.5 + 0.5,\n                          resolution_level=4))\n        for i in range(n_frames):\n            images.append(images[n_frames - i - 1])\n\n        fourcc = cv.VideoWriter_fourcc(*'mp4v')\n        video_dir = os.path.join(self.base_exp_dir, 'render')\n        os.makedirs(video_dir, exist_ok=True)\n        h, w, _ = images[0].shape\n        writer = cv.VideoWriter(os.path.join(video_dir,\n                                             '{:0>8d}_{}_{}.mp4'.format(self.iter_step, img_idx_0, img_idx_1)),\n                                fourcc, 30, (w, h))\n\n        for image in images:\n            writer.write(image)\n\n        writer.release()\n\n    def validate_mesh_udf_backups(self, world_space=False, resolution=64, color=False):\n        bound_min = torch.tensor(self.dataset.object_bbox_min, dtype=torch.float32)\n        bound_max = torch.tensor(self.dataset.object_bbox_max, dtype=torch.float32)\n\n        os.makedirs(os.path.join(self.base_exp_dir, 'meshes'), exist_ok=True)\n        vertices, triangles, vertices_color = validate_mesh_udf.main(bound_min, bound_max, self.sdf_network, self.color_network,  resolution, color)\n\n        if world_space:\n            vertices = vertices * self.dataset.scale_mats_np[0][0, 0] + self.dataset.scale_mats_np[0][:3, 3][None]\n\n        mesh = trimesh.Trimesh(vertices, triangles)\n        if color:\n            mesh.visual.vertex_colors = vertices_color\n        mesh.export(os.path.join(self.base_exp_dir, 'meshes', 'mu{:0>8d}.ply'.format(self.iter_step)))\n\n        logging.info('End')\n\n    def validate_ray(self, idx=-1):\n        if idx < 0:\n            idx = self.dataset.n_images // 2\n\n        print('Validate: iter: {}, camera: {}'.format(self.iter_step, idx))\n\n        rays_o, rays_d = self.dataset.gen_rays_at(idx)\n        H, W, _ = rays_o.shape\n        ray_o = rays_o[H//2, W//2, :].reshape(1, 3)\n        ray_d = rays_d[H//2, W//2, :].reshape(1, 3)\n\n        near, far = self.dataset.near_far_from_sphere(ray_o, ray_d)\n        background_rgb = torch.ones([1, 3]) if self.use_white_bkgd else None\n        z_vals, sdf, weights = self.renderer.generate_ray(ray_o,\n                                          ray_d,\n                                          near,\n                                          far,\n                                          cos_anneal_ratio=self.get_cos_anneal_ratio(),\n                                          background_rgb=background_rgb)\n        weights = weights/(z_vals[1:]-z_vals[:-1])\n\n        os.makedirs(os.path.join(self.base_exp_dir, 'validations_ray'), exist_ok=True)\n\n        plt.plot(z_vals, sdf, marker='1')\n        plt.plot((z_vals[1:] / 2 + z_vals[:-1] / 2), weights/weights.max())\n        plt.savefig(os.path.join(self.base_exp_dir, 'validations_ray', '{:0>8d}_{}.png'.format(self.iter_step, idx)))\n        plt.close()\n\n    def get_vertices_color(self, vertices):\n        pts = vertices\n        dirs = torch.zeros_like(pts)\n        sdf_nn_output = self.sdf_network(pts)\n        sdf = sdf_nn_output[:, :1]\n        feature_vector = sdf_nn_output[:, 1:]\n        print(self.color_network.mode)\n        \n        if self.color_network.mode == 'second_order_udf':\n            second_order_gradients, gradients = self.sdf_network.second_order_gradient(pts)\n            second_order_gradients = second_order_gradients.squeeze()\n            gradients = gradients.squeeze()\n        else:\n            second_order_gradients = None\n            gradients = self.sdf_network.gradient(pts).squeeze()\n        sampled_color = self.color_network(pts, gradients, dirs, feature_vector, sdf, second_order_gradients).reshape(-1, 3)\n        return sampled_color.detach().cpu().numpy()\n\n    def get_vertices_normal(self, vertices):\n        normals = self.sdf_network.gradient(vertices).reshape(-1, 3)\n        return normals.detach().cpu().numpy()\n\n    def get_vertices_sdf(self, vertices):\n        normals = self.sdf_network.sdf(vertices)\n        return normals.detach().cpu().numpy()\n\n    def validate_normal(self, num_steps=10, world_space=True, patch_size=10000, num_points=900000, disturb=0.01):\n        point_cloud, duration = self.renderer.generate_point_cloud(num_steps=num_steps, device=self.device, num_points=num_points)\n        point_cloud = (np.random.rand(len(point_cloud), 3) * 2 - 1) * disturb + point_cloud\n\n        print('num_steps', num_steps, 'duration', duration)\n\n        normal_cpu = []\n        while len(normal_cpu) < len(point_cloud):\n            print(len(normal_cpu))\n            min_idx = len(normal_cpu)\n            max_idx = np.min([len(point_cloud), min_idx+patch_size])\n            normal = self.get_vertices_normal(vertices=torch.from_numpy(point_cloud[min_idx:max_idx, :].astype(np.float32)).to(self.device))\n            if len(normal_cpu)==0:\n                normal_cpu = normal\n            else:\n                normal_cpu = np.vstack((normal_cpu, normal))\n\n        if world_space:\n            point_cloud = point_cloud * self.dataset.scale_mats_np[0][0, 0] + self.dataset.scale_mats_np[0][:3, 3][None]\n\n        normal_cpu_p = normal_cpu.clip(0, 1)\n        normal_cpu_n = -normal_cpu.clip(-1, 0)\n        normal_cpu = (normal_cpu_p + normal_cpu_n[:, [1, 2, 0]])*255\n        normal_cpu = np.clip(normal_cpu, 0, 255)\n        cloud = trimesh.points.PointCloud(vertices=point_cloud, colors=normal_cpu)\n        cloud.export(os.path.join(self.base_exp_dir, 'meshes', 'pn{:0>8d}.ply'.format(self.iter_step)))\n\n    def validate_udf(self, num_steps=10, world_space=True, patch_size=10000, num_points=900000, disturb=0.01):\n        point_cloud, duration = self.renderer.generate_point_cloud(num_steps=num_steps, device=self.device, num_points=num_points)\n        point_cloud = (np.random.rand(len(point_cloud), 3) * 2 - 1) * disturb + point_cloud\n\n        print('num_steps', num_steps, 'duration', duration)\n\n        sdf_cpu = []\n        while len(sdf_cpu) < len(point_cloud):\n            print(len(sdf_cpu))\n            min_idx = len(sdf_cpu)\n            max_idx = np.min([len(point_cloud), min_idx+patch_size])\n            sdf = self.get_vertices_sdf(vertices=torch.from_numpy(point_cloud[min_idx:max_idx, :].astype(np.float32)).to(self.device))\n            if len(sdf_cpu)==0:\n                sdf_cpu = sdf\n            else:\n                sdf_cpu = np.vstack((sdf_cpu, sdf))\n\n        if world_space:\n            point_cloud = point_cloud * self.dataset.scale_mats_np[0][0, 0] + self.dataset.scale_mats_np[0][:3, 3][None]\n\n        sdf_cpu = np.column_stack((np.zeros_like(sdf_cpu), (sdf_cpu*100).clip(0, 1)*255, (sdf_cpu*100).clip(0, 1)*255))\n        cloud = trimesh.points.PointCloud(vertices=point_cloud, colors=sdf_cpu)\n        cloud.export(os.path.join(self.base_exp_dir, 'meshes', 'pu{:0>8d}.ply'.format(self.iter_step)))\n\n    def get_udf_normals_grid_slow(self, b_min, b_max, N=56, max_batch=int(2 ** 20), fourier=False):\n        \"\"\"\n        Fills a dense N*N*N regular grid by querying the decoder network\n        Inputs:\n            decoder: coordinate network to evaluate\n            latent_vec: conditioning vector\n            N: grid size\n            max_batch: number of points we can simultaneously evaluate\n            fourier: are xyz coordinates encoded with fourier?\n        Returns:\n            df_values: (N,N,N) tensor representing distance field values on the grid\n            vecs: (N,N,N,3) tensor representing gradients values on the grid, only for locations with a small\n                    distance field value\n            samples: (N**3, 7) tensor representing (x,y,z, distance field, grad_x, grad_y, grad_z)\n        \"\"\"\n        self.sdf_network.eval()\n        ################\n        # 1: setting up the empty grid\n        ################\n        # NOTE: the voxel_origin is actually the (bottom, left, down) corner, not the middle\n        voxel_origin = [b_min, b_min, b_min]\n        voxel_size = (b_max - b_min) / (N - 1)\n        overall_index = torch.arange(0, N ** 3, 1, out=torch.LongTensor())\n        samples = torch.zeros(N ** 3, 7).cpu()\n        # transform first 3 columns\n        # to be the x, y, z index\n        samples[:, 2] = overall_index % N\n        samples[:, 1] = torch.div(overall_index, N, rounding_mode='floor') % N\n        samples[:, 0] = torch.div(torch.div(overall_index, N, rounding_mode='floor'), N, rounding_mode='floor') % N\n        # transform first 3 columns\n        # to be the x, y, z coordinate\n        samples[:, 0] = (samples[:, 0] * voxel_size) + voxel_origin[2]\n        samples[:, 1] = (samples[:, 1] * voxel_size) + voxel_origin[1]\n        samples[:, 2] = (samples[:, 2] * voxel_size) + voxel_origin[0]\n        num_samples = N ** 3\n        samples.requires_grad = False\n        # samples.pin_memory()\n        ################\n        # 2: Run forward pass to fill the grid\n        ################\n        head = 0\n        ## FIRST: fill distance field grid without gradients\n        while head < num_samples:\n            # xyz coords\n            sample_subset = samples[head: min(head + max_batch, num_samples), 0:3].clone().cuda()\n            # Create input\n            if fourier:\n                xyz = ws.fourier_transform(sample_subset)\n            else:\n                xyz = sample_subset\n            # Run forward pass\n            with torch.no_grad():\n                df = self.sdf_network.sdf(xyz)\n            # Store df\n            samples[head: min(head + max_batch, num_samples), 3] = df.squeeze(-1).detach().cpu()\n            # Next iter\n            head += max_batch\n        #\n        ## THEN: compute gradients only where needed,\n        # ie. where the predicted df value is small\n        max_batch = max_batch // 4\n        norm_mask = samples[:, 3] < 2 * voxel_size\n        norm_idx = torch.where(norm_mask)[0]\n        head, num_samples = 0, norm_idx.shape[0]\n        while head < num_samples:\n            # Find the subset of indices to compute:\n            # -> a subset of indices where normal computations are needed\n            sample_subset_mask = torch.zeros_like(norm_mask)\n            sample_subset_mask[norm_idx[head]: norm_idx[min(head + max_batch, num_samples) - 1] + 1] = True\n            sample_subset_mask = norm_mask * sample_subset_mask\n            # xyz coords\n            sample_subset = samples[sample_subset_mask, 0:3].clone().cuda()\n            sample_subset.requires_grad = True\n            # Create input\n            if fourier:\n                xyz = ws.fourier_transform(sample_subset)\n            else:\n                xyz = sample_subset\n            # Run forward pass\n            df = self.sdf_network.sdf(xyz)\n            # Compute and store normalized vectors pointing towards the surface\n            df.sum().backward()\n            grad = sample_subset.grad.detach()\n            samples[sample_subset_mask, 4:] = - F.normalize(grad, dim=1).cpu()\n            # Next iter\n            head += max_batch\n        #\n        # Separate values in DF / gradients\n        df_values = samples[:, 3]\n        df_values = df_values.reshape(N, N, N)\n        vecs = samples[:, 4:]\n        vecs = vecs.reshape(N, N, N, 3)\n        return df_values, vecs, samples\n\n    def get_mesh_udf_fast(self, b_min, b_max, N_MC=128, fourier=False,\n                          gradient=True, eps=0.1, border_gradients=False, smooth_borders=False):\n        \"\"\"\n        Computes a triangulated mesh from a distance field network conditioned on the latent vector\n        Inputs:\n            decoder: coordinate network to evaluate\n            latent_vec: conditioning vector\n            samples: already computed (N**3, 7) tensor representing (x,y,z, distance field, grad_x, grad_y, grad_z)\n                        for a previous latent_vec, which is assumed to be close to the current one, if any\n            indices: tensor representing the coordinates that need updating in the previous samples tensor (to speed\n                        up iterations)\n            N_MC: grid size\n            fourier: are xyz coordinates encoded with fourier?\n            gradient: do we need gradients?\n            eps: length of the normal vectors used to derive gradients\n            border_gradients: add a special case for border gradients?\n            smooth_borders: do we smooth borders with a Laplacian?\n        Returns:\n            verts: vertices of the mesh\n            faces: faces of the mesh\n            mesh: trimesh object of the mesh\n            samples: (N**3, 7) tensor representing (x,y,z, distance field, grad_x, grad_y, grad_z)\n            indices: tensor representing the coordinates that need updating in the next iteration\n        \"\"\"\n        ### 1: sample grid\n        df_values, normals, samples = self.get_udf_normals_grid_slow(b_min, b_max, N=N_MC, fourier=fourier)\n        df_values[df_values < 0] = 0\n        ### 2: run our custom MC on it\n        N = df_values.shape[0]\n        voxel_size = (b_max - b_min) / (N - 1)\n        voxel_origin = [b_min, b_min, b_min]\n        verts, faces, _, _ = udf_mc_lewiner(df_values.cpu().detach().numpy(),\n                                            normals.cpu().detach().numpy(),\n                                            spacing=[voxel_size] * 3)\n        verts = verts + b_min  # since voxel_origin = [-1, -1, -1]\n        ### 3: evaluate vertices DF, and remove the ones that are too far\n        verts_torch = torch.from_numpy(verts).float().cuda()\n        with torch.no_grad():\n            if fourier:\n                xyz = ws.fourier_transform(verts_torch)\n            else:\n                xyz = verts_torch\n            pred_df_verts = self.sdf_network.sdf(xyz)\n        pred_df_verts = pred_df_verts.cpu().numpy()\n        # Remove faces that have vertices far from the surface\n        filtered_faces = faces[np.max(pred_df_verts[faces], axis=1)[:, 0] < voxel_size / 6]\n        filtered_mesh = trimesh.Trimesh(verts, filtered_faces)\n        ### 4: clean the mesh a bit\n        # Remove NaNs, flat triangles, duplicate faces\n        filtered_mesh = filtered_mesh.process(\n            validate=False)  # DO NOT try to consistently align winding directions: too slow and poor results\n        filtered_mesh.remove_duplicate_faces()\n        filtered_mesh.remove_degenerate_faces()\n        # Fill single triangle holes\n        filtered_mesh.fill_holes()\n\n        filtered_mesh_2 = trimesh.Trimesh(filtered_mesh.vertices, filtered_mesh.faces)\n        # Re-process the mesh until it is stable:\n        n_verts, n_faces, n_iter = 0, 0, 0\n        while (n_verts, n_faces) != (len(filtered_mesh_2.vertices), len(filtered_mesh_2.faces)) and n_iter < 10:\n            filtered_mesh_2 = filtered_mesh_2.process(validate=False)\n            filtered_mesh_2.remove_duplicate_faces()\n            filtered_mesh_2.remove_degenerate_faces()\n            (n_verts, n_faces) = (len(filtered_mesh_2.vertices), len(filtered_mesh_2.faces))\n            n_iter += 1\n            filtered_mesh_2 = trimesh.Trimesh(filtered_mesh_2.vertices, filtered_mesh_2.faces)\n\n        filtered_mesh = trimesh.Trimesh(filtered_mesh_2.vertices, filtered_mesh_2.faces)\n\n        if smooth_borders:\n            # Identify borders: those appearing only once\n            border_edges = trimesh.grouping.group_rows(filtered_mesh.edges_sorted, require_count=1)\n\n            # Build a dictionnary of (u,l): l is the list of vertices that are adjacent to u\n            neighbours = defaultdict(lambda: [])\n            for (u, v) in filtered_mesh.edges_sorted[border_edges]:\n                neighbours[u].append(v)\n                neighbours[v].append(u)\n            border_vertices = np.array(list(neighbours.keys()))\n\n            # Build a sparse matrix for computing laplacian\n            pos_i, pos_j = [], []\n            for k, ns in enumerate(neighbours.values()):\n                for j in ns:\n                    pos_i.append(k)\n                    pos_j.append(j)\n\n            sparse = coo_matrix((np.ones(len(pos_i)),  # put ones\n                                 (pos_i, pos_j)),  # at these locations\n                                shape=(len(border_vertices), len(filtered_mesh.vertices)))\n\n            # Smoothing operation:\n            lambda_ = 0.3\n            for _ in range(5):\n                border_neighbouring_averages = sparse @ filtered_mesh.vertices / sparse.sum(axis=1)\n                laplacian = border_neighbouring_averages - filtered_mesh.vertices[border_vertices]\n                filtered_mesh.vertices[border_vertices] = filtered_mesh.vertices[border_vertices] + lambda_ * laplacian\n\n        if not gradient:\n            return torch.tensor(filtered_mesh.vertices).float().cuda(), torch.tensor(\n                filtered_mesh.faces).long().cuda(), filtered_mesh\n        else:\n            ### 5: use the mesh to compute normals\n            normals = trimesh.geometry.weighted_vertex_normals(vertex_count=len(filtered_mesh.vertices),\n                                                               faces=filtered_mesh.faces,\n                                                               face_normals=filtered_mesh.face_normals,\n                                                               face_angles=filtered_mesh.face_angles)\n            ### 6: evaluate the DF around each vertex, based on normals\n            normals = torch.tensor(normals).float().cuda()\n            verts = torch.tensor(filtered_mesh.vertices).float().cuda()\n            if fourier:\n                xyz_s1 = ws.fourier_transform(verts + eps * normals)\n                xyz_s2 = ws.fourier_transform(verts - eps * normals)\n            else:\n                xyz_s1 = verts + eps * normals\n                xyz_s2 = verts - eps * normals\n            s1 = decoder(torch.cat([latent_vec.repeat(verts.shape[0], 1), xyz_s1], dim=1))\n            s2 = decoder(torch.cat([latent_vec.repeat(verts.shape[0], 1), xyz_s2], dim=1))\n            # Re-plug differentiability here, by this rewriting trick\n            new_verts = verts - eps * s1 * normals + eps * s2 * normals\n\n            ## Compute indices needed for re-evaluation at the next iteration\n            # fetch bins that are activated\n            k = ((new_verts[:, 2].detach().cpu().numpy() - voxel_origin[2]) / voxel_size).astype(int)\n            j = ((new_verts[:, 1].detach().cpu().numpy() - voxel_origin[1]) / voxel_size).astype(int)\n            i = ((new_verts[:, 0].detach().cpu().numpy() - voxel_origin[0]) / voxel_size).astype(int)\n            # find points around\n            next_samples = i * N_MC * N_MC + j * N_MC + k\n            next_samples_ip = np.minimum(i + 1, N_MC - 1) * N_MC * N_MC + j * N_MC + k\n            next_samples_jp = i * N_MC * N_MC + np.minimum(j + 1, N_MC - 1) * N_MC + k\n            next_samples_kp = i * N_MC * N_MC + j * N_MC + np.minimum(k + 1, N - 1)\n            next_samples_im = np.maximum(i - 1, 0) * N_MC * N_MC + j * N_MC + k\n            next_samples_jm = i * N_MC * N_MC + np.maximum(j - 1, 0) * N_MC + k\n            next_samples_km = i * N_MC * N_MC + j * N_MC + np.maximum(k - 1, 0)\n            # Concatenate\n            next_indices = np.concatenate((next_samples, next_samples_ip, next_samples_jp,\n                                           next_samples_kp, next_samples_im, next_samples_jm, next_samples_km))\n\n            if border_gradients:\n                ### 7: Add gradients at the surface borders?\n                # Identify borders\n                border_edges = trimesh.grouping.group_rows(filtered_mesh.edges_sorted, require_count=1)\n\n                # Build a dictionnary of (u,v) edges, such that each vertex on the border\n                # gets associated to exactly one border edge\n                border_edges_dict = {}\n                for (u, v) in filtered_mesh.edges_sorted[border_edges]:\n                    border_edges_dict[u] = v\n                    border_edges_dict[v] = u\n                u_v_border = np.array(list(border_edges_dict.items()))\n                u_border = u_v_border[:, 0]  # split border edges (u,v) into u and v arrays\n                v_border = u_v_border[:, 1]\n\n                # For each vertex on the border, take the cross product between\n                # its normal and the border's edge\n                normals_border = normals[u_border]\n                edge_border = filtered_mesh.vertices[v_border] - filtered_mesh.vertices[u_border]\n                edge_border = torch.tensor(edge_border).float().cuda()\n                out_vec = torch.cross(edge_border, normals_border, dim=1)\n                out_vec = out_vec / (torch.norm(out_vec, dim=1, keepdim=True) + 1e-6)  # make it unit length\n\n                # Then we need to orient the out_vec such that they point outwards\n                # To do so, we evaluate at +- their offset, and take the corresponding max DF value\n                border_verts = torch.tensor(filtered_mesh.vertices[u_border]).float().cuda()\n                if fourier:\n                    xyz_s1_border = ws.fourier_transform(border_verts + 3 * eps * out_vec)\n                    xyz_s2_border = ws.fourier_transform(border_verts - 3 * eps * out_vec)\n                else:\n                    xyz_s1_border = border_verts + 3 * eps * out_vec\n                    xyz_s2_border = border_verts - 3 * eps * out_vec\n\n                s1_border = decoder(torch.cat([latent_vec.repeat(border_verts.shape[0], 1), xyz_s1_border], dim=1))\n                s2_border = decoder(torch.cat([latent_vec.repeat(border_verts.shape[0], 1), xyz_s2_border], dim=1))\n                s1s2 = torch.stack((s1_border, s2_border))\n                sign_out_vec = -torch.argmax(s1s2, dim=0) * 2 + 1\n                out_vec = sign_out_vec * out_vec\n\n                # Filter out the verts borders for which a displacement of out_vec\n                # still evaluates at < eps DF, ie. verts classified as borders which are not really so\n                u_border_filtered = u_border[((s1_border + s2_border)[:, 0] > eps).detach().cpu().numpy()]\n                out_vec_filtered = out_vec[(s1_border + s2_border)[:, 0] > eps]\n                out_df_filtered = torch.max(s1_border, s2_border)[(s1_border + s2_border) > eps]\n\n                # Plug gradients to verts positions\n                s_border = (eps * (out_df_filtered - out_df_filtered.detach())).unsqueeze(\n                    -1)  # Fake zero, just to pass grads\n                new_verts[u_border_filtered] = new_verts[u_border_filtered] - s_border * out_vec_filtered\n\n            return new_verts, torch.tensor(filtered_mesh.faces).long().cuda(), filtered_mesh, samples, next_indices\n\n    def validate_mesh_udf(self, world_space=False, resolution=64, color=False):\n        bound_min = torch.tensor(self.dataset.object_bbox_min, dtype=torch.float32)\n        bound_max = torch.tensor(self.dataset.object_bbox_max, dtype=torch.float32)\n\n        os.makedirs(os.path.join(self.base_exp_dir, 'meshes'), exist_ok=True)\n        vertices, triangles, vertices_color = self.validate_mesh_udf_main(bound_min, bound_max, resolution, color)\n\n        if world_space:\n            vertices = vertices * self.dataset.scale_mats_np[0][0, 0] + self.dataset.scale_mats_np[0][:3, 3][None]\n\n        mesh = trimesh.Trimesh(vertices, triangles)\n        if color:\n            mesh.visual.vertex_colors = vertices_color\n        mesh.export(os.path.join(self.base_exp_dir, 'meshes', 'mu{:0>8d}.ply'.format(self.iter_step)))\n\n        logging.info('End')\n\n    def validate_mesh_udf_main(self, b_min, b_max, n, color):\n        b_min_np = b_min.detach().cpu().numpy().min()\n        b_max_np = b_max.detach().cpu().numpy().max()\n        vertices, triangles, _ = self.get_mesh_udf_fast(b_min=b_min_np, b_max=b_max_np,\n                                                        N_MC=n, gradient=False,\n                                                        smooth_borders=False, fourier=False)\n        if color:\n            vertices_color = self.get_vertices_color(vertices)\n        else:\n            vertices_color = torch.zeros_like(vertices)\n        return vertices.detach().cpu().numpy(), triangles.detach().cpu().numpy(), vertices_color.detach().cpu().numpy()[\n                                                                                  :, ::-1]\n\n\n\nif __name__ == '__main__':\n    print('Hello Wooden')\n\n    torch.set_default_tensor_type('torch.cuda.FloatTensor')\n\n    FORMAT = \"[%(filename)s:%(lineno)s - %(funcName)20s() ] %(message)s\"\n    logging.basicConfig(level=logging.DEBUG, format=FORMAT)\n\n    parser = argparse.ArgumentParser()\n    parser.add_argument('--conf', type=str, default='./confs/base.conf')\n    parser.add_argument('--mode', type=str, default='train')\n    parser.add_argument('--mcube_threshold', type=float, default=0.0025)\n    parser.add_argument('--is_continue', default=False, action=\"store_true\")\n    parser.add_argument('--gpu', type=int, default=0)\n    parser.add_argument('--case', type=str, default='')\n    parser.add_argument('--resolution', type=int, default=512)\n    parser.add_argument('--idx', type=int, default=-1)\n    parser.add_argument('--is_sequence', default=False, action='store_true')\n    parser.add_argument('--unit_sphere', default=False, action='store_true')\n    parser.add_argument('--rev_sequence', default=False, action='store_true')\n    parser.add_argument('--use_color', default=False, action='store_true')\n\n    args = parser.parse_args()\n\n    torch.cuda.set_device(args.gpu)\n    if not args.is_sequence:\n        runner = Runner(args.conf, args.mode, args.case, args.is_continue)\n\n        if args.mode == 'train':\n            runner.train()\n        elif args.mode == 'validate_mesh':\n            runner.validate_mesh(world_space=not args.unit_sphere, resolution=args.resolution, threshold=args.mcube_threshold)\n        elif args.mode == 'validate_point':\n            runner.validate_point(10, color=args.use_color, world_space=not args.unit_sphere)\n        elif args.mode.startswith('interpolate'):  # Interpolate views given two image indices\n            _, img_idx_0, img_idx_1 = args.mode.split('_')\n            img_idx_0 = int(img_idx_0)\n            img_idx_1 = int(img_idx_1)\n            runner.interpolate_view(img_idx_0, img_idx_1)\n        elif args.mode == 'validate_mesh_udf':\n            runner.validate_mesh_udf(world_space=not args.unit_sphere, resolution=args.resolution, color=args.use_color)\n        elif args.mode == 'refine':\n            runner.refine()\n        elif args.mode == 'validate_image':\n            runner.validate_image(idx=args.idx)\n        elif args.mode == 'validate_ray':\n            runner.renderer.iter_step = runner.iter_step\n            runner.validate_ray()\n        elif args.mode == 'validate_normal':\n            runner.validate_normal()\n        elif args.mode == 'validate_udf':\n            runner.validate_udf()\n        elif args.mode == 'validate_mesh_poisson':\n            runner.validate_mesh_poisson()\n        elif args.mode == 'validate_mesh_poisson_test':\n            runner.validate_mesh_poisson_test(threshold=args.mcube_threshold)\n    else:\n        case_list = os.listdir(os.path.join('./public_data', args.case))\n        if args.rev_sequence:\n            case_list = reversed(case_list)\n        for case in case_list:\n            runner = Runner(args.conf, args.mode, os.path.join(args.case, case), args.is_continue)\n\n            if args.mode == 'train':\n                runner.train()\n                runner.validate_point()\n                # try:\n                #     runner.validate_mesh_udf(world_space=True, resolution=args.resolution)\n                # except:\n                #     print('validate_mesh_udf error')\n                # finally:\n                #     pass\n            elif args.mode == 'validate_mesh':\n                runner.validate_mesh(world_space=True, resolution=args.resolution, threshold=args.mcube_threshold)\n            elif args.mode == 'validate_point':\n                runner.validate_point(10, color=args.use_color, world_space=not args.unit_sphere)\n            elif args.mode.startswith('interpolate'):  # Interpolate views given two image indices\n                _, img_idx_0, img_idx_1 = args.mode.split('_')\n                img_idx_0 = int(img_idx_0)\n                img_idx_1 = int(img_idx_1)\n                runner.interpolate_view(img_idx_0, img_idx_1)\n            elif args.mode == 'validate_mesh_udf':\n                runner.validate_mesh_udf(world_space=True, resolution=args.resolution, color=args.use_color)\n            elif args.mode == 'refine':\n                runner.refine()\n            elif args.mode == 'validate_image':\n                runner.validate_image(idx=args.idx)\n            elif args.mode == 'validate_ray':\n                runner.renderer.iter_step = runner.iter_step\n                runner.validate_ray()\n            elif args.mode == 'validate_normal':\n                runner.validate_normal()\n            elif args.mode == 'validate_udf':\n                runner.validate_udf()\n\n            del runner.dataset\n            del runner\n\n"
  },
  {
    "path": "lib/__init__.py",
    "content": "from lib.workspace import *\n"
  },
  {
    "path": "lib/models/deep_udf_decoder.py",
    "content": "import torch.nn as nn\nimport torch\nimport torch.nn.functional as F\n\n\nclass Decoder(nn.Module):\n    def __init__(\n        self,\n        latent_size,\n        dims,\n        dropout=None,\n        dropout_prob=0.0,\n        norm_layers=(),\n        latent_in=(),\n        weight_norm=False,\n        xyz_in_all=None,\n        use_tanh=False,\n        latent_dropout=False,\n        fourier = False,\n        fourier_add = False,\n        fourier_latent = False,\n        fourier_latent_add = False\n    ):\n        super(Decoder, self).__init__()\n\n        # handle fourier transform of latent code\n        if fourier_latent is True and fourier_latent_add is False:\n            latent_dimension = 2*4*latent_size\n        elif fourier_latent is False and fourier_latent_add is True:\n            latent_dimension = 2*4*latent_size + latent_size\n        else:\n            latent_dimension = latent_size\n\n        # handle fourier transform of poisitional coordinates\n        if fourier is True and fourier_add is False:\n            spatial_dimension = 2*5*3\n        elif fourier is False and fourier_add is True:\n            spatial_dimension = 2*5*3+3\n        else:\n            spatial_dimension = 3\n\n        dims = [latent_dimension + spatial_dimension] + dims + [1]\n\n        self.num_layers = len(dims)\n        self.norm_layers = norm_layers\n        self.latent_in = latent_in\n        self.latent_dropout = latent_dropout\n        if self.latent_dropout:\n            self.lat_dp = nn.Dropout(0.2)\n\n        self.xyz_in_all = xyz_in_all\n        self.weight_norm = weight_norm\n\n        for layer in range(0, self.num_layers - 1):\n            if layer + 1 in latent_in:\n                out_dim = dims[layer + 1] - dims[0]\n            else:\n                out_dim = dims[layer + 1]\n                if self.xyz_in_all and layer != self.num_layers - 2:\n                    out_dim -= 3\n\n            if weight_norm and layer in self.norm_layers:\n                setattr(\n                    self,\n                    \"lin\" + str(layer),\n                    nn.utils.weight_norm(nn.Linear(dims[layer], out_dim)),\n                )\n            else:\n                setattr(self, \"lin\" + str(layer), nn.Linear(dims[layer], out_dim))\n\n            if (\n                (not weight_norm)\n                and self.norm_layers is not None\n                and layer in self.norm_layers\n            ):\n                setattr(self, \"bn\" + str(layer), nn.LayerNorm(out_dim))\n\n        self.use_tanh = use_tanh\n        if use_tanh:\n            self.tanh = nn.Tanh()\n        self.relu = nn.ReLU()\n\n        self.dropout_prob = dropout_prob\n        self.dropout = dropout\n        self.relu = nn.ReLU()\n\n    # input: N x (L+3)\n    def forward(self, input):\n        xyz = input[:, -3:]\n\n        if input.shape[1] > 3 and self.latent_dropout:\n            latent_vecs = input[:, :-3]\n            latent_vecs = F.dropout(latent_vecs, p=0.2, training=self.training)\n            x = torch.cat([latent_vecs, xyz], 1)\n        else:\n            x = input\n\n        for layer in range(0, self.num_layers - 1):\n            lin = getattr(self, \"lin\" + str(layer))\n            if layer in self.latent_in:\n                x = torch.cat([x, input], 1)\n            elif layer != 0 and self.xyz_in_all:\n                x = torch.cat([x, xyz], 1)\n            x = lin(x)\n            # last layer Tanh\n            if layer == self.num_layers - 2 and self.use_tanh:\n                x = self.tanh(x)\n            if layer < self.num_layers - 2:\n                if (\n                    self.norm_layers is not None\n                    and layer in self.norm_layers\n                    and not self.weight_norm\n                ):\n                    bn = getattr(self, \"bn\" + str(layer))\n                    x = bn(x)\n                x = self.relu(x)\n                if self.dropout is not None and layer in self.dropout:\n                    x = F.dropout(x, p=self.dropout_prob, training=self.training)\n\n        x = self.relu(x)\n\n        return x\n"
  },
  {
    "path": "lib/workspace.py",
    "content": "import json\nimport os\nimport torch\n\nmodel_params_subdir = \"ModelParameters\"\nlatent_codes_subdir = \"LatentCodes\"\nspecifications_filename = \"specs.json\"\n\n\ndef load_experiment_specifications(experiment_directory):\n    filename = os.path.join(experiment_directory, specifications_filename)\n    if not os.path.isfile(filename):\n        raise Exception(\n            \"The experiment directory ({}) does not include specifications file \"\n            + '\"specs.json\"'.format(experiment_directory)\n        )\n    return json.load(open(filename))\n\n\ndef load_model_parameters_decoder(experiment_directory, checkpoint, decoder):\n    filename = os.path.join(\n        experiment_directory, model_params_subdir, checkpoint + \".pth\"\n    )\n    if not os.path.isfile(filename):\n        raise Exception('model state dict \"{}\" does not exist'.format(filename))\n    data = torch.load(filename)\n    decoder.load_state_dict(data[\"model_state_dict\"])\n    return data[\"epoch\"]\n\n\ndef get_latent_codes_dir(experiment_dir, create_if_nonexistent=False):\n    dir = os.path.join(experiment_dir, latent_codes_subdir)\n    if create_if_nonexistent and not os.path.isdir(dir):\n        os.makedirs(dir)\n    return dir\n\n\ndef load_latent_vectors(experiment_directory, filename):\n    full_filename = os.path.join(\n        get_latent_codes_dir(experiment_directory), filename\n    )\n    if not os.path.isfile(full_filename):\n        raise Exception('latent state file \"{}\" does not exist'.format(full_filename))\n    return torch.load(full_filename)[\"latent_codes\"]\n\ndef fourier_transform(x, L=5):\n    cosines = torch.cat([torch.cos(2**l*3.1415*x) for l in range(L)], -1)\n    sines = torch.cat([torch.sin(2**l*3.1415*x) for l in range(L)], -1)\n    transformed_x = torch.cat((cosines,sines),-1)\n    return transformed_x\n"
  },
  {
    "path": "models/dataset.py",
    "content": "import torch\nimport torch.nn.functional as F\nimport cv2 as cv\nimport numpy as np\nimport os\nfrom glob import glob\nfrom icecream import ic\nfrom scipy.spatial.transform import Rotation as Rot\nfrom scipy.spatial.transform import Slerp\n\n\n# This function is borrowed from IDR: https://github.com/lioryariv/idr\ndef load_K_Rt_from_P(filename, P=None):\n    if P is None:\n        lines = open(filename).read().splitlines()\n        if len(lines) == 4:\n            lines = lines[1:]\n        lines = [[x[0], x[1], x[2], x[3]] for x in (x.split(\" \") for x in lines)]\n        P = np.asarray(lines).astype(np.float32).squeeze()\n\n    out = cv.decomposeProjectionMatrix(P)\n    K = out[0]\n    R = out[1]\n    t = out[2]\n\n    K = K / K[2, 2]\n    intrinsics = np.eye(4)\n    intrinsics[:3, :3] = K\n\n    pose = np.eye(4, dtype=np.float32)\n    pose[:3, :3] = R.transpose()\n    pose[:3, 3] = (t[:3] / t[3])[:, 0]\n\n    return intrinsics, pose\n\n\nclass Dataset:\n    def __init__(self, conf):\n        super(Dataset, self).__init__()\n        print('Load data: Begin')\n        self.device = torch.device('cuda')\n        self.conf = conf\n\n        self.data_dir = conf.get_string('data_dir')\n        self.render_cameras_name = conf.get_string('render_cameras_name')\n        self.object_cameras_name = conf.get_string('object_cameras_name')\n\n        self.camera_outside_sphere = conf.get_bool('camera_outside_sphere', default=True)\n        self.scale_mat_scale = conf.get_float('scale_mat_scale', default=1.1)\n\n        camera_dict = np.load(os.path.join(self.data_dir, self.render_cameras_name))\n        self.camera_dict = camera_dict\n        self.images_lis = sorted(glob(os.path.join(self.data_dir, 'image/*.png')))\n        self.n_images = len(self.images_lis)\n        self.images_np = np.stack([cv.imread(im_name) for im_name in self.images_lis]) / 256.0\n        self.masks_lis = sorted(glob(os.path.join(self.data_dir, 'mask/*.png')))\n        self.masks_np = np.stack([cv.imread(im_name) for im_name in self.masks_lis]) / 256.0\n\n        # world_mat is a projection matrix from world to image\n        self.world_mats_np = [camera_dict['world_mat_%d' % idx].astype(np.float32) for idx in range(self.n_images)]\n\n        self.scale_mats_np = []\n\n        # scale_mat: used for coordinate normalization, we assume the scene to render is inside a unit sphere at origin.\n        self.scale_mats_np = [camera_dict['scale_mat_%d' % idx].astype(np.float32) for idx in range(self.n_images)]\n\n        self.intrinsics_all = []\n        self.pose_all = []\n\n        for scale_mat, world_mat in zip(self.scale_mats_np, self.world_mats_np):\n            P = world_mat @ scale_mat\n            P = P[:3, :4]\n            intrinsics, pose = load_K_Rt_from_P(None, P)\n            self.intrinsics_all.append(torch.from_numpy(intrinsics).float())\n            self.pose_all.append(torch.from_numpy(pose).float())\n\n        self.images = torch.from_numpy(self.images_np.astype(np.float32)).cpu()  # [n_images, H, W, 3]\n        self.masks  = torch.from_numpy(self.masks_np.astype(np.float32)).cpu()   # [n_images, H, W, 3]\n        self.intrinsics_all = torch.stack(self.intrinsics_all).to(self.device)   # [n_images, 4, 4]\n        self.intrinsics_all_inv = torch.inverse(self.intrinsics_all)  # [n_images, 4, 4]\n        self.focal = self.intrinsics_all[0][0, 0]\n        self.pose_all = torch.stack(self.pose_all).to(self.device)  # [n_images, 4, 4]\n        self.H, self.W = self.images.shape[1], self.images.shape[2]\n        self.image_pixels = self.H * self.W\n\n        object_bbox_min = np.array([-1.01, -1.01, -1.01, 1.0])\n        object_bbox_max = np.array([ 1.01,  1.01,  1.01, 1.0])\n        # Object scale mat: region of interest to **extract mesh**\n        object_scale_mat = np.load(os.path.join(self.data_dir, self.object_cameras_name))['scale_mat_0']\n        object_bbox_min = np.linalg.inv(self.scale_mats_np[0]) @ object_scale_mat @ object_bbox_min[:, None]\n        object_bbox_max = np.linalg.inv(self.scale_mats_np[0]) @ object_scale_mat @ object_bbox_max[:, None]\n        self.object_bbox_min = object_bbox_min[:3, 0]\n        self.object_bbox_max = object_bbox_max[:3, 0]\n\n        print('Load data: End')\n\n    def gen_rays_at(self, img_idx, resolution_level=1):\n        \"\"\"\n        Generate rays at world space from one camera.\n        \"\"\"\n        l = resolution_level\n        tx = torch.linspace(0, self.W - 1, self.W // l)\n        ty = torch.linspace(0, self.H - 1, self.H // l)\n        pixels_x, pixels_y = torch.meshgrid(tx, ty)\n        p = torch.stack([pixels_x, pixels_y, torch.ones_like(pixels_y)], dim=-1) # W, H, 3\n        p = torch.matmul(self.intrinsics_all_inv[img_idx, None, None, :3, :3], p[:, :, :, None]).squeeze()  # W, H, 3\n        rays_v = p / torch.linalg.norm(p, ord=2, dim=-1, keepdim=True)  # W, H, 3\n        rays_v = torch.matmul(self.pose_all[img_idx, None, None, :3, :3], rays_v[:, :, :, None]).squeeze()  # W, H, 3\n        rays_o = self.pose_all[img_idx, None, None, :3, 3].expand(rays_v.shape)  # W, H, 3\n        return rays_o.transpose(0, 1), rays_v.transpose(0, 1)\n\n    def gen_random_rays_at(self, img_idx, batch_size):\n        \"\"\"\n        Generate random rays at world space from one camera.\n        \"\"\"\n        pixels_x = torch.randint(low=0, high=self.W, size=[batch_size])\n        pixels_y = torch.randint(low=0, high=self.H, size=[batch_size])\n        color = self.images[img_idx][(pixels_y, pixels_x)]    # batch_size, 3\n        mask = self.masks[img_idx][(pixels_y, pixels_x)]      # batch_size, 3\n        p = torch.stack([pixels_x, pixels_y, torch.ones_like(pixels_y)], dim=-1).float()  # batch_size, 3\n        p = torch.matmul(self.intrinsics_all_inv[img_idx, None, :3, :3], p[:, :, None]).squeeze() # batch_size, 3\n        rays_v = p / torch.linalg.norm(p, ord=2, dim=-1, keepdim=True)    # batch_size, 3\n        rays_v = torch.matmul(self.pose_all[img_idx, None, :3, :3], rays_v[:, :, None]).squeeze()  # batch_size, 3\n        rays_o = self.pose_all[img_idx, None, :3, 3].expand(rays_v.shape) # batch_size, 3\n        return torch.cat([rays_o.cpu(), rays_v.cpu(), color, mask[:, :1]], dim=-1).cuda()    # batch_size, 10\n\n    def gen_rays_between(self, idx_0, idx_1, ratio, resolution_level=1):\n        \"\"\"\n        Interpolate pose between two cameras.\n        \"\"\"\n        l = resolution_level\n        tx = torch.linspace(0, self.W - 1, self.W // l)\n        ty = torch.linspace(0, self.H - 1, self.H // l)\n        pixels_x, pixels_y = torch.meshgrid(tx, ty)\n        p = torch.stack([pixels_x, pixels_y, torch.ones_like(pixels_y)], dim=-1)  # W, H, 3\n        p = torch.matmul(self.intrinsics_all_inv[0, None, None, :3, :3], p[:, :, :, None]).squeeze()  # W, H, 3\n        rays_v = p / torch.linalg.norm(p, ord=2, dim=-1, keepdim=True)  # W, H, 3\n        trans = self.pose_all[idx_0, :3, 3] * (1.0 - ratio) + self.pose_all[idx_1, :3, 3] * ratio\n        pose_0 = self.pose_all[idx_0].detach().cpu().numpy()\n        pose_1 = self.pose_all[idx_1].detach().cpu().numpy()\n        pose_0 = np.linalg.inv(pose_0)\n        pose_1 = np.linalg.inv(pose_1)\n        rot_0 = pose_0[:3, :3]\n        rot_1 = pose_1[:3, :3]\n        rots = Rot.from_matrix(np.stack([rot_0, rot_1]))\n        key_times = [0, 1]\n        slerp = Slerp(key_times, rots)\n        rot = slerp(ratio)\n        pose = np.diag([1.0, 1.0, 1.0, 1.0])\n        pose = pose.astype(np.float32)\n        pose[:3, :3] = rot.as_matrix()\n        pose[:3, 3] = ((1.0 - ratio) * pose_0 + ratio * pose_1)[:3, 3]\n        pose = np.linalg.inv(pose)\n        rot = torch.from_numpy(pose[:3, :3]).cuda()\n        trans = torch.from_numpy(pose[:3, 3]).cuda()\n        rays_v = torch.matmul(rot[None, None, :3, :3], rays_v[:, :, :, None]).squeeze()  # W, H, 3\n        rays_o = trans[None, None, :3].expand(rays_v.shape)  # W, H, 3\n        return rays_o.transpose(0, 1), rays_v.transpose(0, 1)\n\n    def near_far_from_sphere(self, rays_o, rays_d):\n        a = torch.sum(rays_d**2, dim=-1, keepdim=True)\n        b = 2.0 * torch.sum(rays_o * rays_d, dim=-1, keepdim=True)\n        mid = 0.5 * (-b) / a\n        near = mid - 1.0\n        far = mid + 1.0\n        return near, far\n\n    def image_at(self, idx, resolution_level):\n        img = cv.imread(self.images_lis[idx])\n        return (cv.resize(img, (self.W // resolution_level, self.H // resolution_level))).clip(0, 255)\n\n    def gen_patch_rays_at(self, img_idx, batch_size, patch_size):\n        \"\"\"\n        Generate rays at world space from one camera.\n        \"\"\"\n        # tx = torch.arange(patch_size)[None, :]+torch.randint(low=0, high=self.W-patch_size+1, size=[batch_size])[:, None].reshape(-1)\n        # ty = torch.arange(patch_size)[None, :]+torch.randint(low=0, high=self.H-patch_size+1, size=[batch_size])[:, None].reshape(-1)\n        # pixels_x, pixels_y = torch.meshgrid(tx, ty)\n        # pixels_x = pixels_x.reshape(-1)\n        # pixels_y = pixels_y.reshape(-1)\n        # print(self.W-patch_size+1, [batch_size])\n        anchor_x = torch.randint(low=0, high=self.W-patch_size+1, size=[batch_size])\n        anchor_y = torch.randint(low=0, high=self.H-patch_size+1, size=[batch_size])\n        patch_x = torch.arange(patch_size)\n        patch_y = torch.arange(patch_size)\n        patch_pixel_x, patch_pixel_y = torch.meshgrid(patch_x, patch_y)\n        pixels_x = (anchor_x[:, None, None] + patch_pixel_x[None, :, :]).reshape(-1)\n        pixels_y = (anchor_y[:, None, None] + patch_pixel_y[None, :, :]).reshape(-1)\n        color = self.images[img_idx][(pixels_y, pixels_x)]  # batch_size, 3\n        mask = self.masks[img_idx][(pixels_y, pixels_x)]  # batch_size, 3\n        p = torch.stack([pixels_x, pixels_y, torch.ones_like(pixels_y)], dim=-1).float()  # batch_size, 3\n        p = torch.matmul(self.intrinsics_all_inv[img_idx, None, :3, :3], p[:, :, None]).squeeze()  # batch_size, 3\n        rays_v = p / torch.linalg.norm(p, ord=2, dim=-1, keepdim=True)  # batch_size, 3\n        rays_v = torch.matmul(self.pose_all[img_idx, None, :3, :3], rays_v[:, :, None]).squeeze()  # batch_size, 3\n        rays_o = self.pose_all[img_idx, None, :3, 3].expand(rays_v.shape)  # batch_size, 3\n        return torch.cat([rays_o.cpu(), rays_v.cpu(), color, mask[:, :1]], dim=-1).cuda()  # batch_size, 10\n\n"
  },
  {
    "path": "models/embedder.py",
    "content": "import torch\nimport torch.nn as nn\n\n\n# Positional encoding embedding. Code was taken from https://github.com/bmild/nerf.\nclass Embedder:\n    def __init__(self, **kwargs):\n        self.kwargs = kwargs\n        self.create_embedding_fn()\n\n    def create_embedding_fn(self):\n        embed_fns = []\n        d = self.kwargs['input_dims']\n        out_dim = 0\n        if self.kwargs['include_input']:\n            embed_fns.append(lambda x: x)\n            out_dim += d\n\n        max_freq = self.kwargs['max_freq_log2']\n        N_freqs = self.kwargs['num_freqs']\n\n        if self.kwargs['log_sampling']:\n            freq_bands = 2. ** torch.linspace(0., max_freq, N_freqs)\n        else:\n            freq_bands = torch.linspace(2.**0., 2.**max_freq, N_freqs)\n\n        for freq in freq_bands:\n            for p_fn in self.kwargs['periodic_fns']:\n                embed_fns.append(lambda x, p_fn=p_fn, freq=freq: p_fn(x * freq))\n                out_dim += d\n\n        self.embed_fns = embed_fns\n        self.out_dim = out_dim\n\n    def embed(self, inputs):\n        return torch.cat([fn(inputs) for fn in self.embed_fns], -1)\n\n\ndef get_embedder(multires, input_dims=3):\n    embed_kwargs = {\n        'include_input': True,\n        'input_dims': input_dims,\n        'max_freq_log2': multires-1,\n        'num_freqs': multires,\n        'log_sampling': True,\n        'periodic_fns': [torch.sin, torch.cos],\n    }\n\n    embedder_obj = Embedder(**embed_kwargs)\n    def embed(x, eo=embedder_obj): return eo.embed(x)\n    return embed, embedder_obj.out_dim\n"
  },
  {
    "path": "models/fields.py",
    "content": "import torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nimport numpy as np\nfrom models.embedder import get_embedder\n\n\n# This implementation is borrowed from IDR: https://github.com/lioryariv/idr\nclass SDFNetwork(nn.Module):\n    def __init__(self,\n                 d_in,\n                 d_out,\n                 d_hidden,\n                 n_layers,\n                 skip_in=(4,),\n                 multires=0,\n                 bias=0.5,\n                 scale=1,\n                 geometric_init=True,\n                 weight_norm=True,\n                 inside_outside=False,\n                 mode='act'):\n        super(SDFNetwork, self).__init__()\n\n        dims = [d_in] + [d_hidden for _ in range(n_layers)] + [d_out]\n\n        self.embed_fn_fine = None\n\n        if multires > 0:\n            embed_fn, input_ch = get_embedder(multires, input_dims=d_in)\n            self.embed_fn_fine = embed_fn\n            dims[0] = input_ch\n\n        self.num_layers = len(dims)\n        self.skip_in = skip_in\n        self.scale = scale\n\n        for l in range(0, self.num_layers - 1):\n            if l + 1 in self.skip_in:\n                out_dim = dims[l + 1] - dims[0]\n            else:\n                out_dim = dims[l + 1]\n\n            lin = nn.Linear(dims[l], out_dim)\n\n            if geometric_init:\n                if l == self.num_layers - 2:\n                    if not inside_outside:\n                        torch.nn.init.normal_(lin.weight, mean=np.sqrt(np.pi) / np.sqrt(dims[l]), std=0.0001)\n                        torch.nn.init.constant_(lin.bias, -bias)\n                    else:\n                        torch.nn.init.normal_(lin.weight, mean=-np.sqrt(np.pi) / np.sqrt(dims[l]), std=0.0001)\n                        torch.nn.init.constant_(lin.bias, bias)\n                elif multires > 0 and l == 0:\n                    torch.nn.init.constant_(lin.bias, 0.0)\n                    torch.nn.init.constant_(lin.weight[:, 3:], 0.0)\n                    torch.nn.init.normal_(lin.weight[:, :3], 0.0, np.sqrt(2) / np.sqrt(out_dim))\n                elif multires > 0 and l in self.skip_in:\n                    torch.nn.init.constant_(lin.bias, 0.0)\n                    torch.nn.init.normal_(lin.weight, 0.0, np.sqrt(2) / np.sqrt(out_dim))\n                    torch.nn.init.constant_(lin.weight[:, -(dims[0] - 3):], 0.0)\n                else:\n                    torch.nn.init.constant_(lin.bias, 0.0)\n                    torch.nn.init.normal_(lin.weight, 0.0, np.sqrt(2) / np.sqrt(out_dim))\n\n            if weight_norm:\n                lin = nn.utils.weight_norm(lin)\n\n            setattr(self, \"lin\" + str(l), lin)\n\n        self.activation = nn.Softplus(beta=100)\n\n        self.mode = mode\n\n    def forward(self, inputs):\n        inputs = inputs * self.scale\n        if self.embed_fn_fine is not None:\n            inputs = self.embed_fn_fine(inputs)\n\n        x = inputs\n        for l in range(0, self.num_layers - 1):\n            lin = getattr(self, \"lin\" + str(l))\n\n            if l in self.skip_in:\n                x = torch.cat([x, inputs], 1) / np.sqrt(2)\n\n            x = lin(x)\n\n            if l < self.num_layers - 2:\n                x = self.activation(x)\n\n        x = self.activation(x)\n\n        return torch.cat([x[:, :1] / self.scale, x[:, 1:]], dim=-1)\n\n    def sdf(self, x):\n        return self.forward(x)[:, :1]\n\n    def sdf_hidden_appearance(self, x):\n        return self.forward(x)\n\n    def gradient(self, x):\n        x.requires_grad_(True)\n        y = self.sdf(x)\n        d_output = torch.ones_like(y, requires_grad=False, device=y.device)\n        gradients = torch.autograd.grad(\n            outputs=y,\n            inputs=x,\n            grad_outputs=d_output,\n            create_graph=True,\n            retain_graph=True,\n            only_inputs=True)[0]\n        return gradients.unsqueeze(1)\n\n\n# This implementation is borrowed from IDR: https://github.com/lioryariv/idr\nclass RenderingNetwork(nn.Module):\n    def __init__(self,\n                 d_feature,\n                 mode,\n                 d_in,\n                 d_out,\n                 d_hidden,\n                 n_layers,\n                 weight_norm=True,\n                 multires_view=0,\n                 squeeze_out=True):\n        super().__init__()\n\n        self.mode = mode\n        self.squeeze_out = squeeze_out\n        dims = [d_in + d_feature] + [d_hidden for _ in range(n_layers)] + [d_out]\n\n        self.embedview_fn = None\n        if multires_view > 0:\n            embedview_fn, input_ch = get_embedder(multires_view)\n            self.embedview_fn = embedview_fn\n            dims[0] += (input_ch - 3)\n\n        self.num_layers = len(dims)\n\n        for l in range(0, self.num_layers - 1):\n            out_dim = dims[l + 1]\n            lin = nn.Linear(dims[l], out_dim)\n\n            if weight_norm:\n                lin = nn.utils.weight_norm(lin)\n\n            setattr(self, \"lin\" + str(l), lin)\n\n        self.relu = nn.ReLU()\n\n    def forward(self, points, normals, view_dirs, feature_vectors, sdf=None, second_order_gradients=None):\n        view_dirs_raw = view_dirs\n        if self.embedview_fn is not None:\n            view_dirs = self.embedview_fn(view_dirs)\n\n        rendering_input = None\n\n        if self.mode == 'idr' or self.mode == 'normal_appr':\n            rendering_input = torch.cat([points, view_dirs, normals, feature_vectors], dim=-1)\n        elif self.mode == 'no_view_dir':\n            rendering_input = torch.cat([points, normals, feature_vectors], dim=-1)\n        elif self.mode == 'no_normal':\n            rendering_input = torch.cat([points, view_dirs, feature_vectors], dim=-1)\n        elif self.mode == 'udf':\n            rendering_input = torch.cat([points, view_dirs, sdf, feature_vectors], dim=-1)\n        elif self.mode == 'second_order_udf':\n            rendering_input = torch.cat([points, view_dirs, second_order_gradients, feature_vectors], dim=-1)\n        elif self.mode == 'approximate_udf':\n            appr_gradients = (normals[:, 2:] - normals[:, :-2])\n            appr_zeros = torch.zeros_like(appr_gradients[:, :1])\n            appr_gradients = torch.cat([appr_zeros, appr_gradients, appr_zeros], dim=-1)\n            rendering_input = torch.cat([points, view_dirs, appr_gradients, feature_vectors], dim=-1)\n        elif self.mode == 'multi_udf':\n            prev_normals = torch.cat([torch.zeros_like(normals[:, :1]), normals[:, :-1]], dim=-1)\n            next_normals = torch.cat([normals[:, 1:], torch.zeros_like(normals[:, :1])], dim=-1)\n            rendering_input = torch.cat([points, view_dirs, prev_normals, normals, next_normals, feature_vectors], dim=-1)\n        elif self.mode == 'positive_normal_z':\n            normals_z = normals[..., 2]\n            is_invert = torch.where(normals_z>0, torch.ones_like(normals_z), -torch.ones_like(normals_z))\n            rendering_input = torch.cat([points, view_dirs, normals*is_invert[..., None], feature_vectors], dim=-1)\n        elif self.mode == 'prev_normal':\n            prev_normals = torch.cat([torch.zeros_like(normals[:, :1]), normals[:, :-1]], dim=-1)\n            rendering_input = torch.cat([points, view_dirs, prev_normals, feature_vectors], dim=-1)\n        elif self.mode == 'random_normal':\n            sign = torch.sign(torch.randn(1)).item()\n            rendering_input = torch.cat([points, view_dirs, normals*sign, feature_vectors], dim=-1)\n        elif self.mode == 'npnz':\n            n_normals = normals / torch.linalg.norm(normals, ord=2, dim=-1)[..., None]\n            normals_z = n_normals[..., 2]\n            is_invert = torch.where(normals_z>0, torch.ones_like(normals_z), -torch.ones_like(normals_z))\n            rendering_input = torch.cat([points, view_dirs, n_normals*is_invert[..., None], feature_vectors], dim=-1)\n        elif self.mode == 'multi_npnz':\n            n_normals = normals / torch.linalg.norm(normals, ord=2, dim=-1)[..., None]\n            normals_z = n_normals[..., 2]\n            is_invert_z = torch.where(normals_z > 0, torch.ones_like(normals_z), -torch.ones_like(normals_z))\n            normals_y = n_normals[..., 1]\n            is_invert_y = torch.where(normals_y > 0, torch.ones_like(normals_y), -torch.ones_like(normals_y))\n            normals_x = n_normals[..., 0]\n            is_invert_x = torch.where(normals_x > 0, torch.ones_like(normals_x), -torch.ones_like(normals_x))\n            rendering_input = torch.cat([points, view_dirs,\n                                         n_normals * is_invert_z[..., None],\n                                         n_normals * is_invert_y[..., None],\n                                         n_normals * is_invert_x[..., None],\n                                         feature_vectors], dim=-1)\n        elif self.mode == 'angle':\n            norm = torch.linalg.norm(normals, ord=2, dim=-1, keepdim=True)\n            theta = torch.acos(normals[:, :1]/((normals[:, 1:2]**2+normals[:, :1]**2)**0.5+1e-10))*torch.sign(normals[:, 1:2])\n            phi = torch.asin(normals[:, -1:]/(norm+1e-10))\n            rendering_input = torch.cat([points, view_dirs, norm, theta, phi, feature_vectors], dim=-1)\n        elif self.mode == 'reflect':\n            normals = normals / torch.linalg.norm(normals)\n            # print(view_dirs_raw.shape)\n            # print(normals.shape)\n            view_cos = (view_dirs_raw * normals).sum(dim=-1, keepdim=True)\n            reflect_dir = view_dirs_raw - 2 * view_cos * normals\n            rendering_input = torch.cat([points, view_dirs, reflect_dir, feature_vectors], dim=-1)\n        elif self.mode == 'obtuse_normal':\n            cos = (normals * view_dirs_raw).sum(dim=-1, keepdim=True)\n            is_invert = torch.where(cos<0, torch.ones_like(cos), -torch.ones_like(cos))\n            rendering_input = torch.cat([points, view_dirs, normals*is_invert, feature_vectors], dim=-1)\n\n        x = rendering_input\n\n        for l in range(0, self.num_layers - 1):\n            lin = getattr(self, \"lin\" + str(l))\n\n            x = lin(x)\n\n            if l < self.num_layers - 2:\n                x = self.relu(x)\n\n        if self.squeeze_out:\n            x = torch.sigmoid(x)\n        return x\n\n\n# This implementation is borrowed from nerf-pytorch: https://github.com/yenchenlin/nerf-pytorch\nclass NeRF(nn.Module):\n    def __init__(self,\n                 D=8,\n                 W=256,\n                 d_in=3,\n                 d_in_view=3,\n                 multires=0,\n                 multires_view=0,\n                 output_ch=4,\n                 skips=[4],\n                 use_viewdirs=False):\n        super(NeRF, self).__init__()\n        self.D = D\n        self.W = W\n        self.d_in = d_in\n        self.d_in_view = d_in_view\n        self.input_ch = 3\n        self.input_ch_view = 3\n        self.embed_fn = None\n        self.embed_fn_view = None\n\n        if multires > 0:\n            embed_fn, input_ch = get_embedder(multires, input_dims=d_in)\n            self.embed_fn = embed_fn\n            self.input_ch = input_ch\n\n        if multires_view > 0:\n            embed_fn_view, input_ch_view = get_embedder(multires_view, input_dims=d_in_view)\n            self.embed_fn_view = embed_fn_view\n            self.input_ch_view = input_ch_view\n\n        self.skips = skips\n        self.use_viewdirs = use_viewdirs\n\n        self.pts_linears = nn.ModuleList(\n            [nn.Linear(self.input_ch, W)] +\n            [nn.Linear(W, W) if i not in self.skips else nn.Linear(W + self.input_ch, W) for i in range(D - 1)])\n\n        ### Implementation according to the official code release\n        ### (https://github.com/bmild/nerf/blob/master/run_nerf_helpers.py#L104-L105)\n        self.views_linears = nn.ModuleList([nn.Linear(self.input_ch_view + W, W // 2)])\n\n        ### Implementation according to the paper\n        # self.views_linears = nn.ModuleList(\n        #     [nn.Linear(input_ch_views + W, W//2)] + [nn.Linear(W//2, W//2) for i in range(D//2)])\n\n        if use_viewdirs:\n            self.feature_linear = nn.Linear(W, W)\n            self.alpha_linear = nn.Linear(W, 1)\n            self.rgb_linear = nn.Linear(W // 2, 3)\n        else:\n            self.output_linear = nn.Linear(W, output_ch)\n\n    def forward(self, input_pts, input_views):\n        if self.embed_fn is not None:\n            input_pts = self.embed_fn(input_pts)\n        if self.embed_fn_view is not None:\n            input_views = self.embed_fn_view(input_views)\n\n        h = input_pts\n        for i, l in enumerate(self.pts_linears):\n            h = self.pts_linears[i](h)\n            h = F.relu(h)\n            if i in self.skips:\n                h = torch.cat([input_pts, h], -1)\n\n        if self.use_viewdirs:\n            alpha = self.alpha_linear(h)\n            feature = self.feature_linear(h)\n            h = torch.cat([feature, input_views], -1)\n\n            for i, l in enumerate(self.views_linears):\n                h = self.views_linears[i](h)\n                h = F.relu(h)\n\n            rgb = self.rgb_linear(h)\n            return alpha, rgb\n        else:\n            assert False\n\n\nclass SingleVarianceNetwork(nn.Module):\n    def __init__(self, init_val):\n        super(SingleVarianceNetwork, self).__init__()\n        self.register_parameter('variance', nn.Parameter(torch.tensor(init_val)))\n\n    def forward(self, x):\n        return torch.ones([len(x), 1]) * torch.exp(self.variance * 10.0)\n"
  },
  {
    "path": "models/renderer.py",
    "content": "import torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nimport numpy as np\nimport logging\nimport mcubes\nfrom icecream import ic\nimport time\nfrom skimage.measure import marching_cubes\n\n\ndef extract_fields(bound_min, bound_max, resolution, query_func):\n    N = 64\n    X = torch.linspace(bound_min[0], bound_max[0], resolution).split(N)\n    Y = torch.linspace(bound_min[1], bound_max[1], resolution).split(N)\n    Z = torch.linspace(bound_min[2], bound_max[2], resolution).split(N)\n\n    u = np.zeros([resolution, resolution, resolution], dtype=np.float32)\n    with torch.no_grad():\n        for xi, xs in enumerate(X):\n            for yi, ys in enumerate(Y):\n                for zi, zs in enumerate(Z):\n                    xx, yy, zz = torch.meshgrid(xs, ys, zs)\n                    pts = torch.cat([xx.reshape(-1, 1), yy.reshape(-1, 1), zz.reshape(-1, 1)], dim=-1)\n                    #print('pts shape: {}'.format(pts.shape))\n                    val = query_func(pts).reshape(len(xs), len(ys), len(zs)).detach().cpu().numpy()\n                    u[xi * N: xi * N + len(xs), yi * N: yi * N + len(ys), zi * N: zi * N + len(zs)] = val\n    return u\n\n\ndef extract_geometry(bound_min, bound_max, resolution, threshold, query_func):\n    print('threshold: {}'.format(threshold))\n\n    #print('bound_min: {}'.format(bound_min))\n    #print('bound_max: {}'.format(bound_max))\n\n    u = extract_fields(bound_min, bound_max, resolution, query_func)\n\n    # for debug udf\n    u_min = np.min(u)\n    u_max = np.max(u)\n    print('u max: {}'.format(u_max))\n    print('u min: {}'.format(u_min))\n\n    if threshold < np.min(u) or threshold > np.max(u):\n        threshold_mc = 0.99*u_min+0.01*u_max\n    else:\n        threshold_mc = threshold\n    vertices, triangles, _, _ = marching_cubes(u, threshold_mc)\n    b_max_np = bound_max.detach().cpu().numpy()\n    b_min_np = bound_min.detach().cpu().numpy()\n\n    vertices = vertices / (resolution - 1.0) * (b_max_np - b_min_np)[None, :] + b_min_np[None, :]\n    return vertices, triangles\n\n\ndef sample_pdf(bins, weights, n_samples, det=False):\n    # This implementation is from NeRF\n    # Get pdf\n    weights = weights + 1e-5  # prevent nans\n    pdf = weights / torch.sum(weights, -1, keepdim=True)\n    cdf = torch.cumsum(pdf, -1)\n    cdf = torch.cat([torch.zeros_like(cdf[..., :1]), cdf], -1)\n    # Take uniform samples\n    if det:\n        u = torch.linspace(0. + 0.5 / n_samples, 1. - 0.5 / n_samples, steps=n_samples)\n        u = u.expand(list(cdf.shape[:-1]) + [n_samples])\n    else:\n        u = torch.rand(list(cdf.shape[:-1]) + [n_samples])\n\n    # Invert CDF\n    u = u.contiguous()\n    inds = torch.searchsorted(cdf, u, right=True)\n    below = torch.max(torch.zeros_like(inds - 1), inds - 1)\n    above = torch.min((cdf.shape[-1] - 1) * torch.ones_like(inds), inds)\n    inds_g = torch.stack([below, above], -1)  # (batch, N_samples, 2)\n\n    matched_shape = [inds_g.shape[0], inds_g.shape[1], cdf.shape[-1]]\n    cdf_g = torch.gather(cdf.unsqueeze(1).expand(matched_shape), 2, inds_g)\n    bins_g = torch.gather(bins.unsqueeze(1).expand(matched_shape), 2, inds_g)\n\n    denom = (cdf_g[..., 1] - cdf_g[..., 0])\n    denom = torch.where(denom < 1e-5, torch.ones_like(denom), denom)\n    t = (u - cdf_g[..., 0]) / denom\n    samples = bins_g[..., 0] + t * (bins_g[..., 1] - bins_g[..., 0])\n\n    return samples\n\n\nclass NeuSRenderer:\n    def __init__(self,\n                 nerf,\n                 sdf_network,\n                 deviation_network,\n                 color_network,\n                 n_samples,\n                 n_importance,\n                 n_outside,\n                 up_sample_steps,\n                 perturb,\n                 disturb=0.,\n                 disturb_end=100000,\n                 up_sample_mode='naive_appr',\n                 up_sample_appr_level=0,\n                 up_sample_s=64,\n                 up_sample_min=1e-2,\n                 render_mode='div',\n                 ):\n        self.nerf = nerf\n        self.sdf_network = sdf_network\n        self.deviation_network = deviation_network\n        self.color_network = color_network\n        self.n_samples = n_samples\n        self.n_importance = n_importance\n        self.n_outside = n_outside\n        self.up_sample_steps = up_sample_steps\n        self.perturb = perturb\n        self.disturb = disturb\n        self.disturb_end = disturb_end\n        self.up_sample_mode = up_sample_mode\n        self.up_sample_appr_level = up_sample_appr_level\n        self.up_sample_s = up_sample_s\n        self.up_sample_min = up_sample_min\n        self.render_mode = render_mode\n\n    def render_core_outside(self, rays_o, rays_d, z_vals, sample_dist, nerf, background_rgb=None):\n        \"\"\"\n        Render background\n        \"\"\"\n        batch_size, n_samples = z_vals.shape\n\n        # Section length\n        dists = z_vals[..., 1:] - z_vals[..., :-1]\n        dists = torch.cat([dists, torch.Tensor([sample_dist]).expand(dists[..., :1].shape)], -1)\n        mid_z_vals = z_vals + dists * 0.5\n\n        # Section midpoints\n        pts = rays_o[:, None, :] + rays_d[:, None, :] * mid_z_vals[..., :, None]  # batch_size, n_samples, 3\n\n        dis_to_center = torch.linalg.norm(pts, ord=2, dim=-1, keepdim=True).clip(1.0, 1e10)\n        pts = torch.cat([pts / dis_to_center, 1.0 / dis_to_center], dim=-1)       # batch_size, n_samples, 4\n\n        dirs = rays_d[:, None, :].expand(batch_size, n_samples, 3)\n\n        pts = pts.reshape(-1, 3 + int(self.n_outside > 0))\n        dirs = dirs.reshape(-1, 3)\n\n        density, sampled_color = nerf(pts, dirs)\n        alpha = 1.0 - torch.exp(-F.softplus(density.reshape(batch_size, n_samples)) * dists)\n        alpha = alpha.reshape(batch_size, n_samples)\n        weights = alpha * torch.cumprod(torch.cat([torch.ones([batch_size, 1]), 1. - alpha + 1e-7], -1), -1)[:, :-1]\n        sampled_color = sampled_color.reshape(batch_size, n_samples, 3)\n        color = (weights[:, :, None] * sampled_color).sum(dim=1)\n        if background_rgb is not None:\n            color = color + background_rgb * (1.0 - weights.sum(dim=-1, keepdim=True))\n\n        return {\n            'color': color,\n            'sampled_color': sampled_color,\n            'alpha': alpha,\n            'weights': weights,\n        }\n\n    def up_sample(self, rays_o, rays_d, z_vals, sdf, n_importance, i):\n        \"\"\"\n        Up sampling give a fixed inv_s\n        \"\"\"\n        inv_s = 64 * 2 ** i\n        batch_size, n_samples = z_vals.shape\n        pts = rays_o[:, None, :] + rays_d[:, None, :] * z_vals[..., :, None]  # n_rays, n_samples, 3\n        radius = torch.linalg.norm(pts, ord=2, dim=-1, keepdim=False)\n        inside_sphere = (radius[:, :-1] < 1.0) | (radius[:, 1:] < 1.0)\n        sdf = sdf.reshape(batch_size, n_samples)\n        prev_sdf, next_sdf = sdf[:, :-1], sdf[:, 1:]\n        prev_z_vals, next_z_vals = z_vals[:, :-1], z_vals[:, 1:]\n        mid_sdf = (prev_sdf + next_sdf) * 0.5\n        cos_val = (next_sdf - prev_sdf) / (next_z_vals - prev_z_vals + 1e-5)\n\n        # ----------------------------------------------------------------------------------------------------------\n        # Use min value of [ cos, prev_cos ]\n        # Though it makes the sampling (not rendering) a little bit biased, this strategy can make the sampling more\n        # robust when meeting situations like below:\n        #\n        # SDF\n        # ^\n        # |\\          -----x----...\n        # | \\        /\n        # |  x      x\n        # |---\\----/-------------> 0 level\n        # |    \\  /\n        # |     \\/\n        # |\n        # ----------------------------------------------------------------------------------------------------------\n        prev_cos_val = torch.cat([torch.zeros([batch_size, 1]), cos_val[:, :-1]], dim=-1)\n        cos_val = torch.stack([prev_cos_val, cos_val], dim=-1)\n        cos_val, _ = torch.min(cos_val, dim=-1, keepdim=False)\n        cos_val = cos_val * inside_sphere\n\n        dist = (next_z_vals - prev_z_vals)\n        # prev_esti_sdf = mid_sdf - cos_val * dist * 0.5\n        # next_esti_sdf = mid_sdf + cos_val * dist * 0.5\n        # prev_cdf = torch.sigmoid(prev_esti_sdf * inv_s)\n        # next_cdf = torch.sigmoid(next_esti_sdf * inv_s)\n        \n        prev_esti_sdf = (mid_sdf - cos_val * dist * 0.5).clip(0., 1e6)\n        next_esti_sdf = (mid_sdf + cos_val * dist * 0.5).clip(0., 1e6)\n        prev_cdf = prev_esti_sdf*inv_s/(1+prev_esti_sdf*inv_s)\n        next_cdf = next_esti_sdf*inv_s/(1+next_esti_sdf*inv_s)\n        alpha = ((torch.abs(prev_cdf - next_cdf) +0) / (torch.abs(prev_cdf) + 1e-20)).clip(0., 1.)\n        weights = alpha * torch.cumprod(\n            torch.cat([torch.ones([batch_size, 1]), 1. - alpha + 1e-7], -1), -1)[:, :-1]\n        # print(weights.min(), alpha.min(), alpha.max())\n        # if weights.min() < 0:\n        #     exit()\n\n        z_samples = sample_pdf(z_vals, weights, n_importance, det=True).detach()\n        return z_samples\n\n    def cat_z_vals(self, rays_o, rays_d, z_vals, new_z_vals, sdf, last=False):\n        # print(z_vals)\n        # print(new_z_vals)\n        batch_size, n_samples = z_vals.shape\n        _, n_importance = new_z_vals.shape\n        pts = rays_o[:, None, :] + rays_d[:, None, :] * new_z_vals[..., :, None]\n        z_vals = torch.cat([z_vals, new_z_vals], dim=-1)\n        z_vals, index = torch.sort(z_vals, dim=-1)\n\n        if not last:\n            new_sdf = self.sdf_network.sdf(pts.reshape(-1, 3)).reshape(batch_size, n_importance)\n            sdf = torch.cat([sdf, new_sdf], dim=-1)\n            xx = torch.arange(batch_size)[:, None].expand(batch_size, n_samples + n_importance).reshape(-1)\n            index = index.reshape(-1)\n            sdf = sdf[(xx, index)].reshape(batch_size, n_samples + n_importance)\n\n        return z_vals, sdf\n\n    def render_core(self,\n                    near,\n                    far,\n                    rays_o,\n                    rays_d,\n                    z_vals,\n                    sample_dist,\n                    sdf_network,\n                    deviation_network,\n                    color_network,\n                    background_alpha=None,\n                    background_sampled_color=None,\n                    background_rgb=None,\n                    cos_anneal_ratio=0.0,\n                    weight_anneal_ratio=0.0,):\n        batch_size, n_samples = z_vals.shape\n\n        # Section length\n        dists = z_vals[..., 1:] - z_vals[..., :-1]\n        dists = torch.cat([dists, torch.Tensor([sample_dist]).expand(dists[..., :1].shape)], -1)\n        mid_z_vals = z_vals + dists * 0.5\n\n        # Section midpoints\n        pts = rays_o[:, None, :] + rays_d[:, None, :] * mid_z_vals[..., :, None]  # n_rays, n_samples, 3\n        dirs = rays_d[:, None, :].expand(pts.shape)\n\n        pts = pts.reshape(-1, 3)\n        dirs = dirs.reshape(-1, 3)\n\n        sdf_nn_output = sdf_network(pts)\n        sdf = sdf_nn_output[:, :1]\n        feature_vector = sdf_nn_output[:, 1:]\n\n        #print('sdf max: {}'.format(torch.max(sdf)))\n        #print('sdf min: {}'.format(torch.min(sdf)))\n\n        if color_network.mode == 'second_order_udf':\n            second_order_gradients, gradients = sdf_network.second_order_gradient(pts)\n            second_order_gradients = second_order_gradients.squeeze()\n            gradients = gradients.squeeze()\n        else:\n            second_order_gradients = None\n            gradients = sdf_network.gradient(pts).squeeze()\n\n        gradients_original = gradients\n\n        if color_network.mode == 'normal_appr':\n            sdf_bn = sdf.reshape(batch_size, n_samples)\n            grad_bn = gradients.reshape(batch_size, n_samples, 3)\n            grad_norm_bn = torch.linalg.norm(grad_bn, ord=2, dim=-1)\n            is_sdf_small = (sdf_bn < 0.01)\n            is_grad_small = (grad_norm_bn < 0.1)\n\n            prev_grad_bn = grad_bn\n            next_grad_bn = grad_bn\n            prev_grad_sum = torch.zeros_like(grad_bn)\n            next_grad_sum = torch.zeros_like(grad_bn)\n            for _ in range(5):\n                prev_grad_bn = torch.cat([prev_grad_bn[:, :1, :], prev_grad_bn[:, :-1, :]], dim=1)\n                next_grad_bn = torch.cat([next_grad_bn[:, 1:, :], next_grad_bn[:, -1:, :]], dim=1)\n                prev_grad_sum = prev_grad_sum + prev_grad_bn\n                next_grad_sum = next_grad_sum + next_grad_bn\n            grad_sum_delta = (prev_grad_sum * next_grad_sum).sum(-1)\n            is_grad_singular = (grad_sum_delta < 0)\n\n            is_normal_appr = (is_sdf_small & is_grad_small & is_grad_singular)\n            # mid_z_vals_bn = mid_z_vals.reshape(batch_size, n_samples)\n            # mid_z_vals_bn_delta = mid_z_vals_bn - 0.01\n            # pts_bn_delta = rays_o[:, None, :] + rays_d[:, None, :] * mid_z_vals_bn_delta[..., :, None]\n            pts_bn = pts.reshape(batch_size, n_samples, 3)\n            dirs_bn = F.normalize(prev_grad_bn, dim=-1).reshape(batch_size, n_samples, 3)\n            pts_bn_delta = pts_bn + dirs_bn * 0.01\n            pts_appr = pts_bn_delta[is_normal_appr, :]\n            grad_appr = sdf_network.gradient(pts_appr.reshape(-1, 3)).squeeze()\n            grad_bn[is_normal_appr, :] = grad_appr\n            gradients = grad_bn.reshape(-1, 3)\n            # print(grad_appr.shape)\n\n\n\n\n\n\n        sampled_color = color_network(pts, gradients, dirs, feature_vector, sdf, second_order_gradients).reshape(batch_size, n_samples, 3)\n\n        # inv_s = deviation_network(torch.zeros([1, 3]))[:, :1].clip(1e-6, 1e6)           # Single parameter\n        inv_s = deviation_network(torch.zeros([1, 3]))[:, :1]\n        inv_s = inv_s.expand(batch_size * n_samples, 1)\n        # inv_s = inv_s.squeeze()\n        # print(inv_s,inv_s.shape)\n\n        true_cos = (dirs * gradients).sum(-1, keepdim=True)\n\n        # \"cos_anneal_ratio\" grows from 0 to 1 in the beginning training iterations. The anneal strategy below makes\n        # the cos value \"not dead\" at the beginning training iterations, for better convergence.\n        true_cos_sign = torch.where(true_cos > 0, 1, -1)\n        iter_cos = ((true_cos * 0.5 + 0.5 * true_cos_sign) * (1.0 - cos_anneal_ratio) +\n                     (true_cos) * cos_anneal_ratio)  # not always non-positive\n\n        # Estimate signed distances at section points\n        estimated_next_sdf = (sdf + iter_cos * dists.reshape(-1, 1) * 0.5).clip(0., 1e6)\n        estimated_prev_sdf = (sdf - iter_cos * dists.reshape(-1, 1) * 0.5).clip(0., 1e6)\n\n        #print('estimated_next_sdf max: {}'.format(torch.max(estimated_next_sdf)))\n        #print('estimated_next_sdf min: {}'.format(torch.min(estimated_next_sdf)))\n        #print('estimated_prev_sdf max: {}'.format(torch.max(estimated_prev_sdf)))\n        #print('estimated_prev_sdf min: {}'.format(torch.min(estimated_prev_sdf)))\n\n        if self.render_mode == 'div' or 'div_anneal':\n            prev_cdf = (estimated_prev_sdf * inv_s / (1+estimated_prev_sdf * inv_s)).clip(0., 1e6)\n            next_cdf = (estimated_next_sdf * inv_s / (1+estimated_next_sdf * inv_s)).clip(0., 1e6)\n        elif self.render_mode == 'exp':\n            prev_cdf = (1 - torch.exp(-estimated_prev_sdf * inv_s)).clip(0., 1e6)\n            next_cdf = (1 - torch.exp(-estimated_next_sdf * inv_s)).clip(0., 1e6)\n        elif self.render_mode == 'atan':\n            prev_cdf = (torch.atan(estimated_prev_sdf * inv_s) * 2 / np.pi).clip(0., 1e6)\n            next_cdf = (torch.atan(estimated_next_sdf * inv_s) * 2 / np.pi).clip(0., 1e6)\n        elif self.render_mode == 'neus':\n            prev_cdf = torch.sigmoid(estimated_prev_sdf * inv_s)\n            next_cdf = torch.sigmoid(estimated_next_sdf * inv_s)\n        elif self.render_mode == 'neus_abs':\n            prev_cdf = torch.abs(torch.sigmoid(estimated_prev_sdf * inv_s))\n            next_cdf = torch.abs(torch.sigmoid(estimated_next_sdf * inv_s))\n        elif self.render_mode == 'div_appr':\n            prev_cdf = ((0.1+estimated_prev_sdf * inv_s) / (1+estimated_prev_sdf * inv_s)).clip(0., 1e6)\n            next_cdf = ((0.1+estimated_next_sdf * inv_s) / (1+estimated_next_sdf * inv_s)).clip(0., 1e6)\n        \n        p = torch.abs(prev_cdf - next_cdf)\n        c = torch.max(prev_cdf, next_cdf)\n\n        alpha = ((p + 0) / (c + 1e-10)).reshape(batch_size, n_samples).clip(0.0, 1.0)\n\n        pts_norm = torch.linalg.norm(pts, ord=2, dim=-1, keepdim=True).reshape(batch_size, n_samples)\n        inside_sphere = (pts_norm < 1.0).float().detach()\n        relax_inside_sphere = (pts_norm < 1.2).float().detach()\n\n        # Render with background\n        if background_alpha is not None:\n            alpha = alpha * inside_sphere + background_alpha[:, :n_samples] * (1.0 - inside_sphere)\n            alpha = torch.cat([alpha, background_alpha[:, n_samples:]], dim=-1)\n            sampled_color = sampled_color * inside_sphere[:, :, None] +\\\n                            background_sampled_color[:, :n_samples] * (1.0 - inside_sphere)[:, :, None]\n            sampled_color = torch.cat([sampled_color, background_sampled_color[:, n_samples:]], dim=1)\n\n        weights = alpha * torch.cumprod(torch.cat([torch.ones([batch_size, 1]), 1. - alpha + 1e-7], -1), -1)[:, :-1]\n        if self.render_mode == 'div_anneal':\n            weights = (weights * 0.5 + 0.5 / n_samples) * (1. - weight_anneal_ratio) + weights * weight_anneal_ratio\n\n        weights_sum = weights.sum(dim=-1, keepdim=True)\n\n        color = (sampled_color * weights[:, :, None]).sum(dim=1)\n\n        if background_rgb is not None:    # Fixed background, usually black\n            color = color + background_rgb * (1.0 - weights_sum)\n\n\n        # Eikonal loss\n        gradient_error = (torch.linalg.norm(gradients_original.reshape(batch_size, n_samples, 3), ord=2,\n                                            dim=-1) - 1.0) ** 2\n        # gradient_error = gradient_error * dists * 64 / 2\n        gradient_error = (relax_inside_sphere * gradient_error).sum() / (relax_inside_sphere.sum() + 1e-5)\n\n\n        # normal loss\n        normals = gradients.reshape(batch_size, n_samples, 3)\n        normals = normals / torch.linalg.norm(normals, ord=2, dim=-1, keepdim=True)\n        prev_normals = torch.cat([normals[:, :1, :], normals[:, :-1, :]], dim=1)\n        sin_p = torch.abs((normals-prev_normals)).sum(dim=-1)\n        sin_n = torch.abs((normals+prev_normals)).sum(dim=-1)\n        sin = torch.min(sin_p, sin_n)\n        normal_error = torch.abs(sin)\n        normal_error = (normal_error * relax_inside_sphere).sum() / (relax_inside_sphere.sum() + 1e-5)\n\n        return {\n            'color': color,\n            'dists': dists,\n            'gradients': gradients.reshape(batch_size, n_samples, 3),\n            's_val': 1.0 / inv_s,\n            'mid_z_vals': mid_z_vals,\n            'weights': weights,\n            'cdf': c.reshape(batch_size, n_samples),\n            'gradient_error': gradient_error,\n            'inside_sphere': inside_sphere,\n            'normal_error': normal_error,\n        }\n\n    def render(self, rays_o, rays_d, near, far, perturb_overwrite=-1, background_rgb=None, cos_anneal_ratio=0.0, weight_anneal_ratio=0.0, up_sample=False):\n        z_dist_sdf_gradient = 0\n\n        batch_size = len(rays_o)\n        sample_dist = 2.0 / self.n_samples   # Assuming the region of interest is a unit sphere\n        z_vals = torch.linspace(0.0, 1.0, self.n_samples)\n        z_vals = near + (far - near) * z_vals[None, :]\n\n        z_vals_outside = None\n        if self.n_outside > 0:\n            z_vals_outside = torch.linspace(1e-3, 1.0 - 1.0 / (self.n_outside + 1.0), self.n_outside)\n\n        n_samples = self.n_samples\n        perturb = self.perturb\n\n        if perturb_overwrite >= 0:\n            perturb = perturb_overwrite\n        if perturb > 0:\n            t_rand = (torch.rand([batch_size, 1]) - 0.5)\n            z_vals = z_vals + t_rand * 2.0 / self.n_samples\n\n            if self.n_outside > 0:\n                mids = .5 * (z_vals_outside[..., 1:] + z_vals_outside[..., :-1])\n                upper = torch.cat([mids, z_vals_outside[..., -1:]], -1)\n                lower = torch.cat([z_vals_outside[..., :1], mids], -1)\n                t_rand = torch.rand([batch_size, z_vals_outside.shape[-1]])\n                z_vals_outside = lower[None, :] + (upper - lower)[None, :] * t_rand\n\n        if self.n_outside > 0:\n            z_vals_outside = far / torch.flip(z_vals_outside, dims=[-1]) + 1.0 / self.n_samples\n\n        background_alpha = None\n        background_sampled_color = None\n\n        # Up sample\n        if up_sample and self.n_importance > 0:\n            with torch.no_grad():\n                pts = rays_o[:, None, :] + rays_d[:, None, :] * z_vals[..., :, None]\n                sdf = self.sdf_network.sdf(pts.reshape(-1, 3)).reshape(batch_size, self.n_samples)\n\n                if self.up_sample_mode == 'surface':\n                    max_r = 0.1\n                    min_r = 0.005\n                    beta = 1.5e-5\n                    interval_radius = np.max([max_r * np.exp(-self.iter_step * beta), min_r])\n                    new_z_vals, new_z_vals_inv = self.up_sample_surface(rays_o, rays_d, z_vals, sdf, self.n_importance//2, interval_radius)\n                    z_vals, sdf = self.cat_z_vals(rays_o, rays_d, z_vals, new_z_vals, sdf, last=True)\n                    z_vals, sdf = self.cat_z_vals(rays_o, rays_d, z_vals, new_z_vals_inv, sdf, last=True)\n                elif self.up_sample_mode == 'naive':\n                    for i in range(self.up_sample_steps):\n                        new_z_vals = self.up_sample_naive(rays_o,\n                                                    rays_d,\n                                                    z_vals,\n                                                    sdf,\n                                                    self.n_importance // self.up_sample_steps,\n                                                    i)\n\n                        z_vals, sdf = self.cat_z_vals(rays_o,\n                                                      rays_d,\n                                                      z_vals,\n                                                      new_z_vals,\n                                                      sdf,\n                                                      last=False)\n                elif self.up_sample_mode == 'neus':\n                    for i in range(self.up_sample_steps):\n                        new_z_vals = self.up_sample(rays_o,\n                                                          rays_d,\n                                                          z_vals,\n                                                          sdf,\n                                                          self.n_importance // self.up_sample_steps,\n                                                          i)\n\n                        z_vals, sdf = self.cat_z_vals(rays_o,\n                                                      rays_d,\n                                                      z_vals,\n                                                      new_z_vals,\n                                                      sdf,\n                                                      last=False)\n                elif self.up_sample_mode == 'udf':\n                    for i in range(self.up_sample_steps):\n                        new_z_vals = self.up_sample_udf(rays_o,\n                                                          rays_d,\n                                                          z_vals,\n                                                          sdf,\n                                                          self.n_importance // self.up_sample_steps,\n                                                          i)\n\n                        z_vals, sdf = self.cat_z_vals(rays_o,\n                                                      rays_d,\n                                                      z_vals,\n                                                      new_z_vals,\n                                                      sdf,\n                                                      last=False)\n                elif self.up_sample_mode == 'neus_appr':\n                    for i in range(self.up_sample_steps):\n                        new_z_vals = self.up_sample_neus_appr(rays_o,\n                                                          rays_d,\n                                                          z_vals,\n                                                          sdf,\n                                                          self.n_importance // self.up_sample_steps,\n                                                          i)\n\n                        z_vals, sdf = self.cat_z_vals(rays_o,\n                                                      rays_d,\n                                                      z_vals,\n                                                      new_z_vals,\n                                                      sdf,\n                                                      last=False)\n                elif self.up_sample_mode == 'naive_appr':\n                    for i in range(self.up_sample_steps):\n                        new_z_vals = self.up_sample_naive_appr(rays_o,\n                                                          rays_d,\n                                                          z_vals,\n                                                          sdf,\n                                                          self.n_importance // self.up_sample_steps,\n                                                          i)\n\n                        z_vals, sdf = self.cat_z_vals(rays_o,\n                                                      rays_d,\n                                                      z_vals,\n                                                      new_z_vals,\n                                                      sdf,\n                                                      last=False)\n                elif self.up_sample_mode == 'fake_f':\n                    for i in range(self.up_sample_steps):\n                        new_z_vals = self.up_sample_fake_f(rays_o,\n                                                          rays_d,\n                                                          z_vals,\n                                                          sdf,\n                                                          self.n_importance // self.up_sample_steps,\n                                                          i)\n\n                        z_vals, sdf = self.cat_z_vals(rays_o,\n                                                      rays_d,\n                                                      z_vals,\n                                                      new_z_vals,\n                                                      sdf,\n                                                      last=False)\n                elif self.up_sample_mode == 'uniform':\n                    for i in range(self.up_sample_steps):\n                        new_z_vals = self.up_sample_uniform(rays_o,\n                                                          rays_d,\n                                                          z_vals,\n                                                          sdf,\n                                                          self.n_importance // self.up_sample_steps,\n                                                          i)\n\n                        z_vals, sdf = self.cat_z_vals(rays_o,\n                                                      rays_d,\n                                                      z_vals,\n                                                      new_z_vals,\n                                                      sdf,\n                                                      last=False)\n\n            n_samples = self.n_samples + self.n_importance\n\n        # Background model\n        if self.n_outside > 0:\n            z_vals_feed = torch.cat([z_vals, z_vals_outside], dim=-1)\n            z_vals_feed, _ = torch.sort(z_vals_feed, dim=-1)\n            ret_outside = self.render_core_outside(rays_o, rays_d, z_vals_feed, sample_dist, self.nerf)\n\n            background_sampled_color = ret_outside['sampled_color']\n            background_alpha = ret_outside['alpha']\n\n        # Render core\n        ret_fine = self.render_core(near,\n                                    far,\n                                    rays_o,\n                                    rays_d,\n                                    z_vals,\n                                    sample_dist,\n                                    self.sdf_network,\n                                    self.deviation_network,\n                                    self.color_network,\n                                    background_rgb=background_rgb,\n                                    background_alpha=background_alpha,\n                                    background_sampled_color=background_sampled_color,\n                                    cos_anneal_ratio=cos_anneal_ratio,\n                                    weight_anneal_ratio=weight_anneal_ratio,)\n\n        color_fine = ret_fine['color']\n        weights = ret_fine['weights']\n        weights_sum = weights.sum(dim=-1, keepdim=True)\n        gradients = ret_fine['gradients']\n        s_val = ret_fine['s_val'].reshape(batch_size, n_samples).mean(dim=-1, keepdim=True)\n\n        return {\n            'color_fine': color_fine,\n            's_val': s_val,\n            'cdf_fine': ret_fine['cdf'],\n            'weight_sum': weights_sum,\n            'weight_max': torch.max(weights, dim=-1, keepdim=True)[0],\n            'gradients': gradients,\n            'weights': weights,\n            'gradient_error': ret_fine['gradient_error'],\n            'inside_sphere': ret_fine['inside_sphere'],\n            'normal_error': ret_fine['normal_error'],\n        }\n\n    def extract_geometry(self, bound_min, bound_max, resolution, threshold=0.0):\n        return extract_geometry(bound_min,\n                                bound_max,\n                                resolution=resolution,\n                                threshold=threshold,\n                                query_func=lambda pts: self.sdf_network.sdf(pts))\n\n    def generate_point_cloud(self, device, num_steps = 10, num_points = 900000, filter_val = 0.009, threshold=0.1):\n\n        start = time.time()\n\n\n        for param in self.sdf_network.parameters():\n            param.requires_grad = False\n\n        sample_num = 200000\n        samples_cpu = np.zeros((0, 3))\n        samples = torch.rand(1, sample_num, 3).float().to(device) * 2 - 1\n        samples.requires_grad = True\n\n        #encoding = self.model.encoder(inputs)\n\n        i = 0\n        while len(samples_cpu) < num_points:\n            print('iteration', i)\n\n            for j in range(num_steps):\n                print('refinement', j)\n                df_pred = torch.clamp(self.sdf_network.sdf(samples.squeeze(0)), max=threshold).unsqueeze(0)\n\n                df_pred.sum().backward()\n\n                gradient = samples.grad.detach()\n                samples = samples.detach()\n                df_pred = df_pred.detach()\n                #inputs = inputs.detach()\n                samples = samples - F.normalize(gradient, dim=2) * df_pred.reshape(-1, 1)  # better use Tensor.copy method?\n                samples = samples.detach()\n                samples.requires_grad = True\n\n\n            print('finished refinement')\n\n            if not i == 0:\n                samples_cpu = np.vstack((samples_cpu, samples[df_pred.squeeze(-1) < filter_val].detach().cpu().numpy()))\n\n            samples = samples[df_pred.squeeze(-1) < 0.03].unsqueeze(0)\n            indices = torch.randint(samples.shape[1], (1, sample_num))\n            samples = samples[[[0, ] * sample_num], indices]\n            samples += (threshold / 3) * torch.randn(samples.shape).to(device)  # 3 sigma rule\n            samples = samples.detach()\n            samples.requires_grad = True\n\n            i += 1\n            print(samples_cpu.shape)\n\n        duration = time.time() - start\n\n        return samples_cpu, duration\n    \n    def up_sample_uniformity(self, rays_o, rays_d, z_vals, sdf, n_importance):\n        batch_size, n_samples = z_vals.shape\n        pts = rays_o[:, None, :] + rays_d[:, None, :] * z_vals[..., :, None]  # n_rays, n_samples, 3\n        radius = torch.linalg.norm(pts, ord=2, dim=-1, keepdim=False)\n        inside_sphere = (radius[:, :] < 1.0)\n        sdf = sdf.reshape(batch_size, n_samples)\n\n        new_z_vals = torch.linspace(0. + 0.5 / n_importance, 1. - 0.5 / n_importance, steps=n_importance)\n        new_z_vals = new_z_vals.expand([batch_size, n_importance])\n        \n        _, bins_index = torch.min(torch.max(sdf,100*(1-1*inside_sphere)), dim=-1)\n        \n        prev_z_val = z_vals[torch.arange(0, batch_size), (bins_index-1).clip(0, n_samples)]\n        next_z_val = z_vals[torch.arange(0, batch_size), (bins_index+1).clip(0, n_samples)]\n        \n        new_z_vals = torch.ones_like(new_z_vals)*prev_z_val[:,None]+new_z_vals*(next_z_val-prev_z_val)[:,None]\n\n        return new_z_vals.detach()\n\n    def up_sample_surface(self, rays_o, rays_d, z_vals, sdf, n_importance, interval_radius):\n        batch_size, n_samples = z_vals.shape\n        pts = rays_o[:, None, :] + rays_d[:, None, :] * z_vals[..., :, None]  # n_rays, n_samples, 3\n        radius = torch.linalg.norm(pts, ord=2, dim=-1, keepdim=False)\n        inside_sphere = (radius[:, :-1] < 1.0) | (radius[:, 1:] < 1.0)\n        sdf = sdf.reshape(batch_size, n_samples)\n        prev_sdf, next_sdf = sdf[:, :-1], sdf[:, 1:]\n        prev_z_vals, next_z_vals = z_vals[:, :-1], z_vals[:, 1:]\n        mid_sdf = (prev_sdf + next_sdf) * 0.5\n        cos_val = (next_sdf - prev_sdf) / (next_z_vals - prev_z_vals + 1e-5)\n\n        prev_cos_val = torch.cat([torch.zeros([batch_size, 1]), cos_val[:, :-1]], dim=-1)\n        cos_val = torch.stack([prev_cos_val, cos_val], dim=-1)\n        cos_val, _ = torch.min(cos_val, dim=-1, keepdim=False)\n        cos_val = cos_val * inside_sphere\n\n        dist = (next_z_vals - prev_z_vals)\n\n        inv_s = self.deviation_network(torch.zeros([1, 3]))[:, :1].detach()\n        prev_esti_sdf = (mid_sdf - cos_val * dist * 0.5).clip(0., 1e6)\n        next_esti_sdf = (mid_sdf + cos_val * dist * 0.5).clip(0., 1e6)\n        prev_cdf = prev_esti_sdf * inv_s / (1 + prev_esti_sdf * inv_s)\n        next_cdf = next_esti_sdf * inv_s / (1 + next_esti_sdf * inv_s)\n        alpha = ((torch.abs(prev_cdf - next_cdf) + 0) / (torch.abs(prev_cdf) + 1e-20)).clip(0., 1.)\n        weights = alpha * torch.cumprod(\n            torch.cat([torch.ones([batch_size, 1]), 1. - alpha + 1e-7], -1), -1)[:, :-1]\n\n        _, min_weight_idx = torch.max(weights, dim=-1)\n        prev_z_val = z_vals[torch.arange(0, batch_size), (min_weight_idx - 1).clip(0, n_samples - 1)]\n        next_z_val = z_vals[torch.arange(0, batch_size), (min_weight_idx + 1).clip(0, n_samples - 1)]\n\n        new_z_vals = torch.linspace(0. + 0.5 / n_importance, 1. - 0.5 / n_importance, steps=n_importance)\n        new_z_vals = new_z_vals.expand([batch_size, n_importance])\n        new_z_vals = torch.ones_like(new_z_vals) * prev_z_val[:, None] + new_z_vals * (next_z_val - prev_z_val)[:, None]\n\n        new_pts = rays_o[:, None, :] + rays_d[:, None, :] * new_z_vals[..., :, None]\n        new_sdf = self.sdf_network.sdf(new_pts.reshape(-1, 3)).reshape(batch_size, n_importance)\n        _, min_sdf_idx = torch.min(new_sdf, dim=-1)\n        min_sdf_z = new_z_vals[torch.arange(0, batch_size), min_sdf_idx]\n        sample_distribution = torch.abs(torch.randn(batch_size, n_importance)) * interval_radius\n        sample_z_vals = sample_distribution + min_sdf_z[:, None]\n        sample_z_vals_inv = -sample_distribution + min_sdf_z[:, None]\n\n        new_pts_norm = torch.linalg.norm(new_pts.reshape(-1, 3), ord=2, dim=-1, keepdim=True).reshape(batch_size, -1)\n        new_pts_inside_sphere = (new_pts_norm < 1.2).float()\n        min_sdf_inside_sphere = new_pts_inside_sphere[torch.arange(0, batch_size), min_sdf_idx]\n\n        uniform_sample_distribution = torch.linspace(0.+1./n_importance, 1.-1./n_importance, n_importance*2)\n        uniform_sample_z_vals = z_vals[:, :1] + uniform_sample_distribution[None, :] * (z_vals[:, -1:]-z_vals[:, :1])\n        uniform_sample_z_vals_inv = uniform_sample_z_vals[:, :n_importance]\n        uniform_sample_z_vals = uniform_sample_z_vals[:, n_importance:]\n\n        sample_z_vals = min_sdf_inside_sphere[:, None] * sample_z_vals + (1-min_sdf_inside_sphere)[:, None] * uniform_sample_z_vals\n        sample_z_vals_inv = min_sdf_inside_sphere[:, None] * sample_z_vals_inv + (1-min_sdf_inside_sphere)[:, None] * uniform_sample_z_vals_inv\n\n        return sample_z_vals.detach(), sample_z_vals_inv.detach()\n\n    def up_sample_udf(self, rays_o, rays_d, z_vals, sdf, n_importance, i):\n        \"\"\"\n        Up sampling give a fixed inv_s\n        \"\"\"\n        batch_size, n_samples = z_vals.shape\n        pts = rays_o[:, None, :] + rays_d[:, None, :] * z_vals[..., :, None]  # n_rays, n_samples, 3\n        radius = torch.linalg.norm(pts, ord=2, dim=-1, keepdim=False)\n        inside_sphere = (radius[:, :-1] < 1.0) | (radius[:, 1:] < 1.0)\n        sdf = sdf.reshape(batch_size, n_samples)\n        mid_sdf = sdf[:, 1:]+sdf[:, :-1]\n\n        inv_s = 64 * 2 ** i\n\n        sigma = 1 / (1 + torch.exp(-mid_sdf * inv_s))\n        rho = sigma * (1 - sigma) * inv_s\n        weights = rho\n\n        z_samples = sample_pdf(z_vals, weights, n_importance, det=True).detach()\n        return z_samples\n\n    def up_sample_naive(self, rays_o, rays_d, z_vals, sdf, n_importance, i):\n        \"\"\"\n        Up sampling give a fixed inv_s\n        \"\"\"\n        with torch.enable_grad():\n            batch_size, n_samples = z_vals.shape\n            pts = rays_o[:, None, :] + rays_d[:, None, :] * z_vals[..., :, None]  # n_rays, n_samples, 3\n            radius = torch.linalg.norm(pts, ord=2, dim=-1, keepdim=False)\n            inside_sphere = (radius[:, :-1] < 1.0) | (radius[:, 1:] < 1.0)\n            sdf = sdf.reshape(batch_size, n_samples)\n            prev_sdf, next_sdf = sdf[:, :-1], sdf[:, 1:]\n            prev_z_vals, next_z_vals = z_vals[:, :-1], z_vals[:, 1:]\n            mid_sdf = (prev_sdf + next_sdf) * 0.5\n            cos_val = (next_sdf - prev_sdf) / (next_z_vals - prev_z_vals + 1e-5)\n            \n            inv_s = 64 * 2 ** i\n        \n            sigma = 1/(1+torch.exp(-mid_sdf * inv_s))\n            rho = sigma * (1 - sigma) * inv_s\n            \n\n            alpha = 1 - torch.exp(-rho * (next_z_vals - prev_z_vals))\n            # print('alpha',alpha[0])\n            weights = alpha * torch.cumprod(\n                torch.cat([torch.ones([batch_size, 1]), 1. - alpha + 1e-7], -1), -1)[:, :-1]\n\n            z_samples = sample_pdf(z_vals, weights, n_importance, det=True).detach()\n        return z_samples\n\n    def up_sample_naive_appr(self, rays_o, rays_d, z_vals, sdf, n_importance, i):\n        \"\"\"\n        Up sampling give a fixed inv_s\n        \"\"\"\n        batch_size, n_samples = z_vals.shape\n        pts = rays_o[:, None, :] + rays_d[:, None, :] * z_vals[..., :, None]  # n_rays, n_samples, 3\n        radius = torch.linalg.norm(pts, ord=2, dim=-1, keepdim=False)\n        inside_sphere = (radius[:, :-1] < 1.0) | (radius[:, 1:] < 1.0)\n        sdf = sdf.reshape(batch_size, n_samples)\n        prev_sdf, next_sdf = sdf[:, :-1], sdf[:, 1:]\n        prev_z_vals, next_z_vals = z_vals[:, :-1], z_vals[:, 1:]\n        mid_sdf = (prev_sdf + next_sdf) * 0.5\n        cos_val = (next_sdf - prev_sdf) / (next_z_vals - prev_z_vals + 1e-5)\n\n        inv_s = self.up_sample_s * 2 ** i\n\n        sigma = 1 / (1 + torch.exp(-mid_sdf * inv_s))\n        rho = sigma * (1 - sigma) * inv_s\n\n        alpha = 1 - torch.exp(-rho * (next_z_vals - prev_z_vals))\n        weights = alpha * torch.cumprod(\n            torch.cat([torch.ones([batch_size, 1]), 1. - alpha + 1e-7], -1), -1)[:, :-1]\n\n        for _ in range(self.up_sample_appr_level):\n            weights_prev = torch.cat([weights[:, :1], weights[:, :-1]], dim=-1)\n            weights_next = torch.cat([weights[:, 1:], weights[:, -1:]], dim=-1)\n            weights = torch.max(weights, weights_prev)\n            weights = torch.max(weights, weights_next)\n\n        z_samples = sample_pdf(z_vals, weights, n_importance, det=True).detach()\n        return z_samples\n\n    def up_sample_neus_appr(self, rays_o, rays_d, z_vals, sdf, n_importance, i):\n        inv_s = 64 * 2 ** i\n        batch_size, n_samples = z_vals.shape\n        pts = rays_o[:, None, :] + rays_d[:, None, :] * z_vals[..., :, None]  # n_rays, n_samples, 3\n        radius = torch.linalg.norm(pts, ord=2, dim=-1, keepdim=False)\n        inside_sphere = (radius[:, :-1] < 1.0) | (radius[:, 1:] < 1.0)\n        sdf = sdf.reshape(batch_size, n_samples)\n        prev_sdf, next_sdf = sdf[:, :-1], sdf[:, 1:]\n        prev_z_vals, next_z_vals = z_vals[:, :-1], z_vals[:, 1:]\n        mid_sdf = (prev_sdf + next_sdf) * 0.5\n        cos_val = (next_sdf - prev_sdf) / (next_z_vals - prev_z_vals + 1e-5)\n\n        prev_cos_val = torch.cat([torch.zeros([batch_size, 1]), cos_val[:, :-1]], dim=-1)\n        cos_val = torch.stack([prev_cos_val, cos_val], dim=-1)\n        cos_val, _ = torch.min(cos_val, dim=-1, keepdim=False)\n        cos_val = cos_val * inside_sphere\n\n        dist = (next_z_vals - prev_z_vals)\n\n        prev_esti_sdf = (mid_sdf - cos_val * dist * 0.5).clip(0., 1e6)\n        next_esti_sdf = (mid_sdf + cos_val * dist * 0.5).clip(0., 1e6)\n        prev_cdf = prev_esti_sdf * inv_s / (1 + prev_esti_sdf * inv_s)\n        next_cdf = next_esti_sdf * inv_s / (1 + next_esti_sdf * inv_s)\n        alpha = ((torch.abs(prev_cdf - next_cdf) + 0) / (torch.abs(prev_cdf) + 1e-20)).clip(0., 1.)\n        weights = alpha * torch.cumprod(\n            torch.cat([torch.ones([batch_size, 1]), 1. - alpha + 1e-7], -1), -1)[:, :-1]\n\n        for _ in range(3):\n            weights_prev = torch.cat([weights[:, :1], weights[:, :-1]], dim=-1)\n            weights_next = torch.cat([weights[:, 1:], weights[:, -1:]], dim=-1)\n            weights = torch.max(weights, weights_prev)\n            weights = torch.max(weights, weights_next)\n\n        z_samples = sample_pdf(z_vals, weights, n_importance, det=True).detach()\n        return z_samples\n\n    def up_sample_fake_f(self, rays_o, rays_d, z_vals, sdf, n_importance, i):\n        \"\"\"\n        Up sampling give a fixed inv_s\n        \"\"\"\n        inv_s = self.up_sample_s * 2 ** i\n        batch_size, n_samples = z_vals.shape\n        pts = rays_o[:, None, :] + rays_d[:, None, :] * z_vals[..., :, None]  # n_rays, n_samples, 3\n        radius = torch.linalg.norm(pts, ord=2, dim=-1, keepdim=False)\n        inside_sphere = (radius[:, :-1] < 1.0) | (radius[:, 1:] < 1.0)\n        sdf = sdf.reshape(batch_size, n_samples)\n        prev_sdf, next_sdf = sdf[:, :-1], sdf[:, 1:]\n        prev_z_vals, next_z_vals = z_vals[:, :-1], z_vals[:, 1:]\n        mid_sdf = (prev_sdf + next_sdf) * 0.5\n        cos_val = (next_sdf - prev_sdf) / (next_z_vals - prev_z_vals + 1e-5)\n\n        is_cos_inverse = torch.where(cos_val < 0, 1, -1)\n        is_sdf_big = torch.where(sdf > 1e-2, 1, -1)\n        is_fake_sdf = torch.max(torch.cat([torch.ones_like(is_cos_inverse[:, :1]), is_cos_inverse], dim=-1), is_sdf_big)\n        fake_sdf = sdf * is_fake_sdf\n        fake_cos_val = cos_val * is_cos_inverse\n\n        fake_mid_sdf = (fake_sdf[:, 1:] + fake_sdf[:, :-1])/2\n        dist = next_z_vals - prev_z_vals\n        fake_prev_esti_sdf = fake_mid_sdf - fake_cos_val * dist * 0.5\n        fake_next_esti_sdf = fake_mid_sdf + fake_cos_val * dist * 0.5\n        fake_prev_cdf = torch.sigmoid(fake_prev_esti_sdf * inv_s)\n        fake_next_cdf = torch.sigmoid(fake_next_esti_sdf * inv_s)\n\n        alpha = ((torch.abs(fake_prev_cdf - fake_next_cdf) + 1e-10) / (torch.abs(fake_prev_cdf) + 1e-10)).clip(0., 1.)\n        weights = alpha * torch.cumprod(\n            torch.cat([torch.ones([batch_size, 1]), 1. - alpha + 1e-7], -1), -1)[:, :-1]\n\n        z_samples = sample_pdf(z_vals, weights, n_importance, det=True).detach()\n        return z_samples\n\n    def up_sample_uniform(self, rays_o, rays_d, z_vals, sdf, n_importance, i):\n        inv_s = 64 * 2 ** i\n        batch_size, n_samples = z_vals.shape\n        pts = rays_o[:, None, :] + rays_d[:, None, :] * z_vals[..., :, None]  # n_rays, n_samples, 3\n        radius = torch.linalg.norm(pts, ord=2, dim=-1, keepdim=False)\n        inside_sphere = (radius[:, :-1] < 1.0) | (radius[:, 1:] < 1.0)\n        sdf = sdf.reshape(batch_size, n_samples)\n        prev_sdf, next_sdf = sdf[:, :-1], sdf[:, 1:]\n        prev_z_vals, next_z_vals = z_vals[:, :-1], z_vals[:, 1:]\n        mid_sdf = (prev_sdf + next_sdf) * 0.5\n        cos_val = (next_sdf - prev_sdf) / (next_z_vals - prev_z_vals + 1e-5)\n\n        cos_val = cos_val * inside_sphere\n\n        dist = (next_z_vals - prev_z_vals)\n\n        prev_esti_sdf = (mid_sdf - cos_val * dist * 0.5).clip(0., 1e6)\n        next_esti_sdf = (mid_sdf + cos_val * dist * 0.5).clip(0., 1e6)\n        prev_cdf = prev_esti_sdf * inv_s / (1 + prev_esti_sdf * inv_s)\n        next_cdf = next_esti_sdf * inv_s / (1 + next_esti_sdf * inv_s)\n        alpha = ((torch.abs(prev_cdf - next_cdf) + 0) / (torch.abs(prev_cdf) + 1e-20)).clip(0., 1.)\n        weights = alpha * torch.cumprod(\n            torch.cat([torch.ones([batch_size, 1]), 1. - alpha + 1e-7], -1), -1)[:, :-1]\n\n        weights = weights / (next_z_vals - prev_z_vals + 1e-5)\n\n        for _ in range(self.up_sample_appr_level):\n            weights_prev = torch.cat([weights[:, :1], weights[:, :-1]], dim=-1)\n            weights_next = torch.cat([weights[:, 1:], weights[:, -1:]], dim=-1)\n            weights = torch.max(weights, weights_prev)\n            weights = torch.max(weights, weights_next)\n\n        weights = weights * inside_sphere\n\n        use_rand_us = ((weights.sum(dim=-1)) < 0.2).float()\n\n        weights = weights / (mid_sdf + 1e-5)\n\n        _, bin_idx = torch.max(weights, dim=-1)\n\n        prev_z_val = z_vals[torch.arange(0, batch_size), (bin_idx - self.up_sample_appr_level).clip(0, n_samples-2)]\n        next_z_val = z_vals[torch.arange(0, batch_size), (bin_idx + self.up_sample_appr_level + 1).clip(0, n_samples-2)]\n        cos_val_mean = torch.abs(cos_val).sum(dim=-1)/(inside_sphere.sum(dim=-1)+1e-5)\n        delta_z_val = (next_z_val - prev_z_val) / (cos_val_mean + 1e-5)\n        delta_z_val = (delta_z_val - (next_z_val - prev_z_val)) / 2\n        prev_z_val = prev_z_val - delta_z_val\n        next_z_val = next_z_val + delta_z_val\n\n        new_z_vals = torch.linspace(0. + 0.5 / n_importance, 1. - 0.5 / n_importance, steps=n_importance)\n        new_z_vals = new_z_vals.expand([batch_size, n_importance])\n        new_z_vals = torch.ones_like(new_z_vals) * prev_z_val[:, None] + new_z_vals * (next_z_val - prev_z_val)[:, None]\n\n        begin_z_vals = z_vals[:, 0]\n        end_z_vals = z_vals[:, -1]\n        rand_z_vals = torch.rand(batch_size, n_importance)\n        rand_z_vals = torch.ones_like(rand_z_vals) * begin_z_vals[:, None] + rand_z_vals * (end_z_vals - begin_z_vals)[:, None]\n\n        new_z_vals = rand_z_vals * use_rand_us[:, None] + new_z_vals * (1 - use_rand_us[:, None])\n\n        return new_z_vals.detach()\n\n    def generate_ray(self, rays_o, rays_d, near, far, perturb_overwrite=-1, background_rgb=None, cos_anneal_ratio=0.0):\n        batch_size = len(rays_o)\n        sample_dist = 2.0 / self.n_samples   # Assuming the region of interest is a unit sphere\n        z_vals = torch.linspace(0.0, 1.0, self.n_samples)\n        z_vals = near + (far - near) * z_vals[None, :]\n\n        z_vals_outside = None\n        if self.n_outside > 0:\n            z_vals_outside = torch.linspace(1e-3, 1.0 - 1.0 / (self.n_outside + 1.0), self.n_outside)\n\n        n_samples = self.n_samples\n        perturb = self.perturb\n\n        if perturb_overwrite >= 0:\n            perturb = perturb_overwrite\n        if perturb > 0:\n            t_rand = (torch.rand([batch_size, 1]) - 0.5)\n            z_vals = z_vals + t_rand * 2.0 / self.n_samples\n\n            if self.n_outside > 0:\n                mids = .5 * (z_vals_outside[..., 1:] + z_vals_outside[..., :-1])\n                upper = torch.cat([mids, z_vals_outside[..., -1:]], -1)\n                lower = torch.cat([z_vals_outside[..., :1], mids], -1)\n                t_rand = torch.rand([batch_size, z_vals_outside.shape[-1]])\n                z_vals_outside = lower[None, :] + (upper - lower)[None, :] * t_rand\n\n        pts = rays_o[:, None, :] + rays_d[:, None, :] * z_vals[..., :, None]\n        sdf = self.sdf_network.sdf(pts.reshape(-1, 3)).reshape(batch_size, self.n_samples)\n\n        # Up sample\n        if self.n_importance > 0:\n            with torch.no_grad():\n                if self.up_sample_mode == 'surface':\n                    max_r = 0.1\n                    min_r = 0.005\n                    beta = 1.5e-5\n                    interval_radius = np.max([max_r * np.exp(-self.iter_step * beta), min_r])\n                    new_z_vals, new_z_vals_inv = self.up_sample_surface(rays_o, rays_d, z_vals, sdf,\n                                                                        self.n_importance // 2, interval_radius)\n                    z_vals, sdf = self.cat_z_vals(rays_o, rays_d, z_vals, new_z_vals, sdf, last=True)\n                    z_vals, sdf = self.cat_z_vals(rays_o, rays_d, z_vals, new_z_vals_inv, sdf, last=True)\n                elif self.up_sample_mode == 'naive':\n                    for i in range(self.up_sample_steps):\n                        new_z_vals = self.up_sample_naive(rays_o,\n                                                          rays_d,\n                                                          z_vals,\n                                                          sdf,\n                                                          self.n_importance // self.up_sample_steps,\n                                                          i)\n\n                        z_vals, sdf = self.cat_z_vals(rays_o,\n                                                      rays_d,\n                                                      z_vals,\n                                                      new_z_vals,\n                                                      sdf,\n                                                      last=False)\n                elif self.up_sample_mode == 'neus':\n                    for i in range(self.up_sample_steps):\n                        new_z_vals = self.up_sample(rays_o,\n                                                    rays_d,\n                                                    z_vals,\n                                                    sdf,\n                                                    self.n_importance // self.up_sample_steps,\n                                                    i)\n\n                        z_vals, sdf = self.cat_z_vals(rays_o,\n                                                      rays_d,\n                                                      z_vals,\n                                                      new_z_vals,\n                                                      sdf,\n                                                      last=False)\n                elif self.up_sample_mode == 'udf':\n                    for i in range(self.up_sample_steps):\n                        new_z_vals = self.up_sample_udf(rays_o,\n                                                        rays_d,\n                                                        z_vals,\n                                                        sdf,\n                                                        self.n_importance // self.up_sample_steps,\n                                                        i)\n\n                        z_vals, sdf = self.cat_z_vals(rays_o,\n                                                      rays_d,\n                                                      z_vals,\n                                                      new_z_vals,\n                                                      sdf,\n                                                      last=False)\n                elif self.up_sample_mode == 'neus_appr':\n                    for i in range(self.up_sample_steps):\n                        new_z_vals = self.up_sample_neus_appr(rays_o,\n                                                          rays_d,\n                                                          z_vals,\n                                                          sdf,\n                                                          self.n_importance // self.up_sample_steps,\n                                                          i)\n\n                        z_vals, sdf = self.cat_z_vals(rays_o,\n                                                      rays_d,\n                                                      z_vals,\n                                                      new_z_vals,\n                                                      sdf,\n                                                      last=False)\n                elif self.up_sample_mode == 'naive_appr':\n                    for i in range(self.up_sample_steps):\n                        new_z_vals = self.up_sample_naive_appr(rays_o,\n                                                          rays_d,\n                                                          z_vals,\n                                                          sdf,\n                                                          self.n_importance // self.up_sample_steps,\n                                                          i)\n\n                        z_vals, sdf = self.cat_z_vals(rays_o,\n                                                      rays_d,\n                                                      z_vals,\n                                                      new_z_vals,\n                                                      sdf,\n                                                      last=False)\n\n        batch_size, n_samples = z_vals.shape\n        pts = rays_o[:, None, :] + rays_d[:, None, :] * z_vals[..., :, None]  # n_rays, n_samples, 3\n        radius = torch.linalg.norm(pts, ord=2, dim=-1, keepdim=False)\n        inside_sphere = (radius[:, :-1] < 1.0) | (radius[:, 1:] < 1.0)\n        sdf = sdf.reshape(batch_size, n_samples)\n        prev_sdf, next_sdf = sdf[:, :-1], sdf[:, 1:]\n        prev_z_vals, next_z_vals = z_vals[:, :-1], z_vals[:, 1:]\n        mid_sdf = (prev_sdf + next_sdf) * 0.5\n        cos_val = (next_sdf - prev_sdf) / (next_z_vals - prev_z_vals + 1e-5)\n\n        prev_cos_val = torch.cat([torch.zeros([batch_size, 1]), cos_val[:, :-1]], dim=-1)\n        cos_val = torch.stack([prev_cos_val, cos_val], dim=-1)\n        cos_val, _ = torch.min(cos_val, dim=-1, keepdim=False)\n        # cos_val = cos_val.clip(-1e3, 0.0) * inside_sphere\n        cos_val = cos_val * inside_sphere\n\n        dist = (next_z_vals - prev_z_vals)\n        prev_esti_sdf = (mid_sdf - cos_val * dist * 0.5).clip(0., 1e6)\n        next_esti_sdf = (mid_sdf + cos_val * dist * 0.5).clip(0., 1e6)\n        inv_s = 64 * 2 ** (self.up_sample_steps - 1)\n        prev_cdf = (prev_esti_sdf * inv_s / (1 + prev_esti_sdf * inv_s)).clip(0., 1e6)\n        next_cdf = (next_esti_sdf * inv_s / (1 + next_esti_sdf * inv_s)).clip(0., 1e6)\n        alpha = ((torch.abs(prev_cdf - next_cdf) + 1e-5) / (prev_cdf + 1e-5)).clip(0., 1.)\n        weights = alpha * torch.cumprod(\n            torch.cat([torch.ones([batch_size, 1]), 1. - alpha + 1e-7], -1), -1)[:, :-1]\n\n        return z_vals.detach().cpu().numpy().flatten(), \\\n               sdf.detach().cpu().numpy().flatten(), \\\n               weights.detach().cpu().numpy().flatten()\n\n    def sample_symmetry(self, rays_o, rays_d, z_vals, sdf, n_importance, interval_radius):\n        batch_size, n_samples = z_vals.shape\n        pts = rays_o[:, None, :] + rays_d[:, None, :] * z_vals[..., :, None]  # n_rays, n_samples, 3\n        radius = torch.linalg.norm(pts, ord=2, dim=-1, keepdim=False)\n        inside_sphere = (radius[:, :-1] < 1.0) | (radius[:, 1:] < 1.0)\n        sdf = sdf.reshape(batch_size, n_samples)\n        prev_sdf, next_sdf = sdf[:, :-1], sdf[:, 1:]\n        prev_z_vals, next_z_vals = z_vals[:, :-1], z_vals[:, 1:]\n        mid_sdf = (prev_sdf + next_sdf) * 0.5\n        cos_val = (next_sdf - prev_sdf) / (next_z_vals - prev_z_vals + 1e-5)\n\n        prev_cos_val = torch.cat([torch.zeros([batch_size, 1]), cos_val[:, :-1]], dim=-1)\n        cos_val = torch.stack([prev_cos_val, cos_val], dim=-1)\n        cos_val, _ = torch.min(cos_val, dim=-1, keepdim=False)\n        cos_val = cos_val * inside_sphere\n\n        dist = (next_z_vals - prev_z_vals)\n\n        inv_s = inv_s = self.deviation_network(torch.zeros([1, 3]))[:, :1].detach()\n        prev_esti_sdf = (mid_sdf - cos_val * dist * 0.5).clip(0., 1e6)\n        next_esti_sdf = (mid_sdf + cos_val * dist * 0.5).clip(0., 1e6)\n        prev_cdf = prev_esti_sdf * inv_s / (1 + prev_esti_sdf * inv_s)\n        next_cdf = next_esti_sdf * inv_s / (1 + next_esti_sdf * inv_s)\n        alpha = ((torch.abs(prev_cdf - next_cdf) + 0) / (torch.abs(prev_cdf) + 1e-20)).clip(0., 1.)\n        weights = alpha * torch.cumprod(\n            torch.cat([torch.ones([batch_size, 1]), 1. - alpha + 1e-7], -1), -1)[:, :-1]\n\n        _, min_weight_idx = torch.max(weights, dim=-1)\n        prev_z_val = z_vals[torch.arange(0, batch_size), (min_weight_idx - 1).clip(0, n_samples - 1)]\n        next_z_val = z_vals[torch.arange(0, batch_size), (min_weight_idx + 1).clip(0, n_samples - 1)]\n\n        new_z_vals = torch.linspace(0. + 0.5 / n_importance, 1. - 0.5 / n_importance, steps=n_importance)\n        new_z_vals = new_z_vals.expand([batch_size, n_importance])\n        new_z_vals = torch.ones_like(new_z_vals) * prev_z_val[:, None] + new_z_vals * (next_z_val - prev_z_val)[:, None]\n\n        new_pts = rays_o[:, None, :] + rays_d[:, None, :] * new_z_vals[..., :, None]\n        new_sdf = self.sdf_network.sdf(new_pts.reshape(-1, 3)).reshape(batch_size, n_importance)\n        _, min_sdf_idx = torch.min(new_sdf, dim=-1)\n        min_sdf_z = new_z_vals[torch.arange(0, batch_size), min_sdf_idx]\n        # sample_distribution = torch.randn(batch_size, n_importance) * interval_radius\n        sample_distribution = torch.linspace(0. + 0.5 / n_importance, 1. - 0.5 / n_importance, steps=n_importance)\n        sample_distribution = (sample_distribution * interval_radius).expand([batch_size, n_importance])\n        sample_z_vals = sample_distribution + min_sdf_z[:, None]\n        sample_z_vals_inv = -sample_distribution + min_sdf_z[:, None]\n\n        return sample_z_vals.detach(), sample_z_vals_inv.detach()\n\n    def approximate_normal(self, pts, dirs, max_delta_z=0.01, min_delta_z=0.001):\n        delta_z = 0\n        steps = int(max_delta_z/min_delta_z)\n\n        is_appr = torch.zeros_like(pts[:, 0])\n        grad_all = torch.zeros_like(pts)\n\n        is_to_appr = torch.ones_like(pts[:, 0]).bool()\n        pts_to_appr = pts\n        dirs_to_appr = dirs\n        for i in range(steps):\n            delta_z = min_delta_z\n            rand_theta = torch.rand(4) * np.pi * 2\n            rand_phi = torch.rand(4) * np.pi\n            rand_pts = torch.zeros(4, 3)\n            rand_pts[:, 0] = torch.cos(rand_phi) * torch.cos(rand_theta)\n            rand_pts[:, 1] = torch.cos(rand_phi) * torch.sin(rand_theta)\n            rand_pts[:, 2] = torch.sin(rand_phi)\n            rand_pts_norm = torch.mm(dirs_to_appr, rand_pts.transpose(0, 1))\n            rand_pts = rand_pts[None, ...] - rand_pts_norm[..., None] * dirs_to_appr[:, None, :]\n            rand_pts = rand_pts * delta_z / 10\n            rand_pts = torch.cat([rand_pts, torch.zeros_like(rand_pts[:, :1, :])], dim=1)\n            rand_pts = rand_pts + pts_to_appr[:, None, :] + dirs_to_appr[:, None, :] * delta_z\n\n            rand_pts_grad = self.sdf_network.gradient(rand_pts.reshape(-1, 3)).reshape(-1, 5, 3)\n            grad_mean = rand_pts_grad.mean(dim=1)\n            grad_norm = torch.linalg.norm(grad_mean, dim=-1)\n            grad_var = rand_pts_grad.var(dim=1).sum(-1)\n\n            if i == steps - 1:\n                grad_all[is_to_appr, :] = grad_mean\n            else:\n                is_norm_reliable = (grad_norm > 0.5) & (grad_var < 0.1)\n                grad_all[is_to_appr, :][is_norm_reliable, :] = grad_mean[is_norm_reliable, :]\n                is_appr[is_to_appr][is_norm_reliable] = 1.\n\n            is_to_appr = (is_appr < 1)\n            pts_to_appr = pts[is_to_appr, :]\n            dirs_to_appr = dirs[is_to_appr, :]\n\n        return grad_all\n\n\n\n\n\n\n\n\n"
  },
  {
    "path": "preprocess_custom_data/aruco_preprocess/CMakeLists.txt",
    "content": "project(PieceSeg)\ncmake_minimum_required(VERSION 3.0)\nset(CMAKE_CXX_STANDARD 14)\nset(CMAKE_BUILD_TYPE Release)\n\nfind_package(OpenCV REQUIRED)\ninclude_directories(${OpenCV_INCLUDE_DIRS})\n\nadd_executable(calibration calibration.cpp)\ntarget_link_libraries(calibration ${OpenCV_LIBS} cnpy)\n"
  },
  {
    "path": "preprocess_custom_data/aruco_preprocess/calibration.cpp",
    "content": "#include <cnpy.h>\n#include <cmath>\n#include <cstring>\n#include <string>\n#include <iostream>\n#include <fstream>\n#include <opencv2/opencv.hpp>\n#include <opencv2/aruco.hpp>\n\n\nvoid Calibrate(std::string work_dir, int n_images, double raw_scale) {\n  std::vector<std::vector<cv::Point3f>> obj_points;\n  std::vector<int> board_ids;\n\n  int n_rows = 20;\n  int n_cols = 20;\n\n  double scale = (n_cols * 8 - 1) / double(std::sqrt(2) * raw_scale);\n\n  // Define the coordinates of markers in the board.\n  for (int x = 0; x < n_rows; x++) {\n    for (int y = 0; y < n_cols; y++) {\n      int a = (x - n_rows / 2) * 8;\n      int b = (y - n_cols / 2) * 8;\n\n      obj_points.emplace_back();\n      board_ids.emplace_back(x * n_cols + y);\n      auto& current_vec = obj_points.back();\n      current_vec.emplace_back(a / scale, b / scale, 0);\n      current_vec.emplace_back((a + 7) / scale, b / scale, 0);\n      current_vec.emplace_back((a + 7) / scale, (b + 7) / scale, 0);\n      current_vec.emplace_back(a / scale, (b + 7) / scale, 0);\n    }\n  }\n\n  // Create ArUco board\n  cv::Ptr<cv::aruco::DetectorParameters> parameters = cv::aruco::DetectorParameters::create();\n  cv::Ptr<cv::aruco::Dictionary> dictionary = cv::aruco::getPredefinedDictionary(cv::aruco::DICT_5X5_1000);\n  cv::Ptr<cv::aruco::Board> board = cv::aruco::Board::create(obj_points, dictionary, board_ids);\n  std::vector<std::vector<cv::Point2f>> all_corners_cated;\n  std::vector<int> all_ids_cated;\n  std::vector<int> marker_count_per_frame;\n\n  cv::Size img_size;\n  for (int i = 0; i < n_images; i++) {\n    std::string idx = std::to_string(i);\n    while (idx.length() < 3) {\n        idx = \"0\" + idx;\n    }\n    cv::Mat img = cv::imread(work_dir + \"/images/\" + idx + \".png\");\n    int height = img.rows;\n    int width = img.cols;\n    uint8_t* data = img.data;\n    for (int k = 0; k < height * width * 3; k += 3) {\n        uint8_t color = 255 - data[k + 1];\n        data[k] = data[k + 1] = data[k + 2] = color;\n    }\n\n    cv::imwrite(work_dir + \"/tmp/image_for_aruco/\" + idx + \".png\", img);\n    img_size = img.size();\n    std::vector<int> marker_ids;\n    std::vector<std::vector<cv::Point2f>> marker_corners, rejected_candidates;\n    cv::aruco::detectMarkers(img, dictionary, marker_corners, marker_ids, parameters, rejected_candidates);\n    std::cout << marker_corners.size() << \" \" << marker_ids.size() << std::endl;\n    for (auto& corner : marker_corners) {\n      all_corners_cated.emplace_back(corner);\n    }\n    for (auto& id : marker_ids) {\n      all_ids_cated.emplace_back(id);\n    }\n    marker_count_per_frame.emplace_back(marker_ids.size());\n  }\n\n  cv::Mat cameraMatrix, distCoeffs;\n  std::vector<cv::Mat> rvecs, tvecs;\n  double repError = cv::aruco::calibrateCameraAruco(all_corners_cated, all_ids_cated, marker_count_per_frame, board, img_size, cameraMatrix, distCoeffs, rvecs, tvecs);\n\n  std::vector<double> poses(n_images * 6);\n  std::vector<double> intrinsic(9);\n  for (int i = 0; i < n_images; i++) {\n    for (int j = 0; j < 3; j++) {\n      poses[i * 6 + j] = rvecs[i].at<double>(j, 0);\n      poses[i * 6 + j + 3] = tvecs[i].at<double>(j, 0);\n    }\n  }\n  for (int i = 0; i < 9; i++) {\n    intrinsic[i] = cameraMatrix.at<double>(i / 3, i % 3);\n  }\n\n\n  cnpy::npy_save(work_dir + \"/tmp/poses.npy\", poses.data(), { (unsigned int) n_images, 2, 3 }, \"w\");\n  cnpy::npy_save(work_dir + \"/tmp/intrinsic.npy\", intrinsic.data(), { 3, 3 }, \"w\");\n  std::cout << \"r_vecs: \" << rvecs.size() << std::endl;\n  std::cout << cameraMatrix << std::endl;\n  std::cout << distCoeffs << std::endl;\n\n  for (int i = 0; i < n_images; i++) {\n    std::string idx = std::to_string(i);\n    while (idx.length() < 3) {\n        idx = \"0\" + idx;\n    }\n    cv::Mat img = cv::imread(work_dir + \"/images/\" + idx + \".png\");\n    cv::Mat new_img;\n    cv::Mat new_mat;\n    cv::undistort(img, new_img, cameraMatrix, distCoeffs, new_mat);\n    cv::imwrite(work_dir + \"/tmp/image_undistort/\" + idx + \".png\", new_img);\n  }\n}\n\n\nint main(int argc, char* argv[]) {\n  Calibrate(std::string(argv[1]), std::stoi(argv[2]), std::stod(argv[3]));\n}\n\n"
  },
  {
    "path": "preprocess_custom_data/aruco_preprocess/gen_cameras.py",
    "content": "import numpy as np\nimport os\nimport sys\nimport cv2 as cv\nfrom glob import glob\nfrom scipy.spatial.transform import Rotation as Rot\nfrom shutil import copytree\nimport trimesh\n\n\ndef convert_cameras(work_dir, crop_pixels):\n    # load cameras\n    poses = np.load(os.path.join(work_dir, './tmp/poses.npy'))\n    intrinsic_raw = np.load(os.path.join(work_dir, './tmp/intrinsic.npy'))\n    n_images = len(poses)\n\n    intrinsic = np.diag([1.0, 1.0, 1.0, 1.0]).astype(np.float32)\n    intrinsic[:3, :3] = intrinsic_raw\n    intrinsic[0, 2] = intrinsic[0, 2] - crop_pixels\n    intrinsic[1, 2] = intrinsic[1, 2] - crop_pixels\n\n    cam_dict = {}\n\n    for i in range(n_images):\n        pe = poses[i]\n        rot = np.zeros([3, 3])\n        cv.Rodrigues(pe[0], rot)\n        trans = pe[1]\n\n        pose = np.diag([1.0, 1.0, 1.0, 1.0])\n        pose[:3, :3] = rot\n        pose[:3, 3] = trans # w2c\n\n        world_mat = intrinsic @ pose\n        world_mat = world_mat.astype(np.float32)\n        cam_dict['camera_mat_{}'.format(i)] = intrinsic\n        cam_dict['camera_mat_inv_{}'.format(i)] = np.linalg.inv(intrinsic)\n        cam_dict['world_mat_{}'.format(i)] = world_mat\n        cam_dict['world_mat_inv_{}'.format(i)] = np.linalg.inv(world_mat)\n\n    scale_mat = np.diag([1.0, 1.0, 1.0, 1.0]).astype(np.float32)\n\n    for i in range(n_images):\n        cam_dict['scale_mat_{}'.format(i)] = scale_mat\n        cam_dict['scale_mat_inv_{}'.format(i)] = np.linalg.inv(scale_mat)\n\n    out_dir = os.path.join(work_dir, 'preprocessed')\n    os.makedirs(out_dir, exist_ok=True)\n\n    np.savez(os.path.join(out_dir, 'cameras_sphere.npz'), **cam_dict)\n\n    # provide images\n    image_list = glob(os.path.join(work_dir, './tmp/image_undistort/*.png'))\n    image_list.sort()\n\n    os.makedirs(os.path.join(out_dir, 'image'), exist_ok=True)\n    os.makedirs(os.path.join(out_dir, 'mask'), exist_ok=True)\n\n    for i, image_path in enumerate(image_list):\n        img = cv.imread(image_path)\n        img = img[crop_pixels: -crop_pixels, crop_pixels: -crop_pixels]    # remove black area of undistorted images\n        cv.imwrite(os.path.join(out_dir, 'image', '{:0>3d}.png'.format(i)), img)\n        cv.imwrite(os.path.join(out_dir, 'mask', '{:0>3d}.png'.format(i)), np.ones_like(img) * 255)\n\n\nif __name__ == '__main__':\n    convert_cameras(sys.argv[1], int(sys.argv[2]))\n"
  },
  {
    "path": "preprocess_custom_data/aruco_preprocess/run.sh",
    "content": "calib_bin=./build/calibration\nwork_dir=../example/thin_rope\nn_images=32\n\n# Define the region of interest (ROI).\n# We assume the center of the ROI is the center of the calibration board.\n# The lower the value, the larger the ROI is. When the value is 1, the ROI is a sphere that exactly bound the calibration board.\nboard_scale=0.9\n\n# Crop the pixels (to remove the black region) after undistortion.\ncrop_pixels=10\n\nmkdir ${work_dir}/tmp\nmkdir ${work_dir}/tmp/image_undistort\nmkdir ${work_dir}/tmp/image_for_aruco\n\n${calib_bin} ${work_dir} ${n_images} ${board_scale}\n\npython gen_cameras.py ${work_dir} ${crop_pixels}\n"
  },
  {
    "path": "preprocess_custom_data/colmap_preprocess/colmap_read_model.py",
    "content": "# Copyright (c) 2018, ETH Zurich and UNC Chapel Hill.\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#\n#     * Redistributions of source code must retain the above copyright\n#       notice, this list of conditions and the following disclaimer.\n#\n#     * Redistributions in binary form must reproduce the above copyright\n#       notice, this list of conditions and the following disclaimer in the\n#       documentation and/or other materials provided with the distribution.\n#\n#     * Neither the name of ETH Zurich and UNC Chapel Hill nor the names of\n#       its contributors may be used to endorse or promote products derived\n#       from this software without specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE\n# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n# POSSIBILITY OF SUCH DAMAGE.\n#\n# Author: Johannes L. Schoenberger (jsch at inf.ethz.ch)\n\nimport os\nimport sys\nimport collections\nimport numpy as np\nimport struct\n\n\nCameraModel = collections.namedtuple(\n    \"CameraModel\", [\"model_id\", \"model_name\", \"num_params\"])\nCamera = collections.namedtuple(\n    \"Camera\", [\"id\", \"model\", \"width\", \"height\", \"params\"])\nBaseImage = collections.namedtuple(\n    \"Image\", [\"id\", \"qvec\", \"tvec\", \"camera_id\", \"name\", \"xys\", \"point3D_ids\"])\nPoint3D = collections.namedtuple(\n    \"Point3D\", [\"id\", \"xyz\", \"rgb\", \"error\", \"image_ids\", \"point2D_idxs\"])\n\nclass Image(BaseImage):\n    def qvec2rotmat(self):\n        return qvec2rotmat(self.qvec)\n\n\nCAMERA_MODELS = {\n    CameraModel(model_id=0, model_name=\"SIMPLE_PINHOLE\", num_params=3),\n    CameraModel(model_id=1, model_name=\"PINHOLE\", num_params=4),\n    CameraModel(model_id=2, model_name=\"SIMPLE_RADIAL\", num_params=4),\n    CameraModel(model_id=3, model_name=\"RADIAL\", num_params=5),\n    CameraModel(model_id=4, model_name=\"OPENCV\", num_params=8),\n    CameraModel(model_id=5, model_name=\"OPENCV_FISHEYE\", num_params=8),\n    CameraModel(model_id=6, model_name=\"FULL_OPENCV\", num_params=12),\n    CameraModel(model_id=7, model_name=\"FOV\", num_params=5),\n    CameraModel(model_id=8, model_name=\"SIMPLE_RADIAL_FISHEYE\", num_params=4),\n    CameraModel(model_id=9, model_name=\"RADIAL_FISHEYE\", num_params=5),\n    CameraModel(model_id=10, model_name=\"THIN_PRISM_FISHEYE\", num_params=12)\n}\nCAMERA_MODEL_IDS = dict([(camera_model.model_id, camera_model) \\\n                         for camera_model in CAMERA_MODELS])\n\n\ndef read_next_bytes(fid, num_bytes, format_char_sequence, endian_character=\"<\"):\n    \"\"\"Read and unpack the next bytes from a binary file.\n    :param fid:\n    :param num_bytes: Sum of combination of {2, 4, 8}, e.g. 2, 6, 16, 30, etc.\n    :param format_char_sequence: List of {c, e, f, d, h, H, i, I, l, L, q, Q}.\n    :param endian_character: Any of {@, =, <, >, !}\n    :return: Tuple of read and unpacked values.\n    \"\"\"\n    data = fid.read(num_bytes)\n    return struct.unpack(endian_character + format_char_sequence, data)\n\n\ndef read_cameras_text(path):\n    \"\"\"\n    see: src/base/reconstruction.cc\n        void Reconstruction::WriteCamerasText(const std::string& path)\n        void Reconstruction::ReadCamerasText(const std::string& path)\n    \"\"\"\n    cameras = {}\n    with open(path, \"r\") as fid:\n        while True:\n            line = fid.readline()\n            if not line:\n                break\n            line = line.strip()\n            if len(line) > 0 and line[0] != \"#\":\n                elems = line.split()\n                camera_id = int(elems[0])\n                model = elems[1]\n                width = int(elems[2])\n                height = int(elems[3])\n                params = np.array(tuple(map(float, elems[4:])))\n                cameras[camera_id] = Camera(id=camera_id, model=model,\n                                            width=width, height=height,\n                                            params=params)\n    return cameras\n\n\ndef read_cameras_binary(path_to_model_file):\n    \"\"\"\n    see: src/base/reconstruction.cc\n        void Reconstruction::WriteCamerasBinary(const std::string& path)\n        void Reconstruction::ReadCamerasBinary(const std::string& path)\n    \"\"\"\n    cameras = {}\n    with open(path_to_model_file, \"rb\") as fid:\n        num_cameras = read_next_bytes(fid, 8, \"Q\")[0]\n        for camera_line_index in range(num_cameras):\n            camera_properties = read_next_bytes(\n                fid, num_bytes=24, format_char_sequence=\"iiQQ\")\n            camera_id = camera_properties[0]\n            model_id = camera_properties[1]\n            model_name = CAMERA_MODEL_IDS[camera_properties[1]].model_name\n            width = camera_properties[2]\n            height = camera_properties[3]\n            num_params = CAMERA_MODEL_IDS[model_id].num_params\n            params = read_next_bytes(fid, num_bytes=8*num_params,\n                                     format_char_sequence=\"d\"*num_params)\n            cameras[camera_id] = Camera(id=camera_id,\n                                        model=model_name,\n                                        width=width,\n                                        height=height,\n                                        params=np.array(params))\n        assert len(cameras) == num_cameras\n    return cameras\n\n\ndef read_images_text(path):\n    \"\"\"\n    see: src/base/reconstruction.cc\n        void Reconstruction::ReadImagesText(const std::string& path)\n        void Reconstruction::WriteImagesText(const std::string& path)\n    \"\"\"\n    images = {}\n    with open(path, \"r\") as fid:\n        while True:\n            line = fid.readline()\n            if not line:\n                break\n            line = line.strip()\n            if len(line) > 0 and line[0] != \"#\":\n                elems = line.split()\n                image_id = int(elems[0])\n                qvec = np.array(tuple(map(float, elems[1:5])))\n                tvec = np.array(tuple(map(float, elems[5:8])))\n                camera_id = int(elems[8])\n                image_name = elems[9]\n                elems = fid.readline().split()\n                xys = np.column_stack([tuple(map(float, elems[0::3])),\n                                       tuple(map(float, elems[1::3]))])\n                point3D_ids = np.array(tuple(map(int, elems[2::3])))\n                images[image_id] = Image(\n                    id=image_id, qvec=qvec, tvec=tvec,\n                    camera_id=camera_id, name=image_name,\n                    xys=xys, point3D_ids=point3D_ids)\n    return images\n\n\ndef read_images_binary(path_to_model_file):\n    \"\"\"\n    see: src/base/reconstruction.cc\n        void Reconstruction::ReadImagesBinary(const std::string& path)\n        void Reconstruction::WriteImagesBinary(const std::string& path)\n    \"\"\"\n    images = {}\n    with open(path_to_model_file, \"rb\") as fid:\n        num_reg_images = read_next_bytes(fid, 8, \"Q\")[0]\n        for image_index in range(num_reg_images):\n            binary_image_properties = read_next_bytes(\n                fid, num_bytes=64, format_char_sequence=\"idddddddi\")\n            image_id = binary_image_properties[0]\n            qvec = np.array(binary_image_properties[1:5])\n            tvec = np.array(binary_image_properties[5:8])\n            camera_id = binary_image_properties[8]\n            image_name = \"\"\n            current_char = read_next_bytes(fid, 1, \"c\")[0]\n            while current_char != b\"\\x00\":   # look for the ASCII 0 entry\n                image_name += current_char.decode(\"utf-8\")\n                current_char = read_next_bytes(fid, 1, \"c\")[0]\n            num_points2D = read_next_bytes(fid, num_bytes=8,\n                                           format_char_sequence=\"Q\")[0]\n            x_y_id_s = read_next_bytes(fid, num_bytes=24*num_points2D,\n                                       format_char_sequence=\"ddq\"*num_points2D)\n            xys = np.column_stack([tuple(map(float, x_y_id_s[0::3])),\n                                   tuple(map(float, x_y_id_s[1::3]))])\n            point3D_ids = np.array(tuple(map(int, x_y_id_s[2::3])))\n            images[image_id] = Image(\n                id=image_id, qvec=qvec, tvec=tvec,\n                camera_id=camera_id, name=image_name,\n                xys=xys, point3D_ids=point3D_ids)\n    return images\n\n\ndef read_points3D_text(path):\n    \"\"\"\n    see: src/base/reconstruction.cc\n        void Reconstruction::ReadPoints3DText(const std::string& path)\n        void Reconstruction::WritePoints3DText(const std::string& path)\n    \"\"\"\n    points3D = {}\n    with open(path, \"r\") as fid:\n        while True:\n            line = fid.readline()\n            if not line:\n                break\n            line = line.strip()\n            if len(line) > 0 and line[0] != \"#\":\n                elems = line.split()\n                point3D_id = int(elems[0])\n                xyz = np.array(tuple(map(float, elems[1:4])))\n                rgb = np.array(tuple(map(int, elems[4:7])))\n                error = float(elems[7])\n                image_ids = np.array(tuple(map(int, elems[8::2])))\n                point2D_idxs = np.array(tuple(map(int, elems[9::2])))\n                points3D[point3D_id] = Point3D(id=point3D_id, xyz=xyz, rgb=rgb,\n                                               error=error, image_ids=image_ids,\n                                               point2D_idxs=point2D_idxs)\n    return points3D\n\n\ndef read_points3d_binary(path_to_model_file):\n    \"\"\"\n    see: src/base/reconstruction.cc\n        void Reconstruction::ReadPoints3DBinary(const std::string& path)\n        void Reconstruction::WritePoints3DBinary(const std::string& path)\n    \"\"\"\n    points3D = {}\n    with open(path_to_model_file, \"rb\") as fid:\n        num_points = read_next_bytes(fid, 8, \"Q\")[0]\n        for point_line_index in range(num_points):\n            binary_point_line_properties = read_next_bytes(\n                fid, num_bytes=43, format_char_sequence=\"QdddBBBd\")\n            point3D_id = binary_point_line_properties[0]\n            xyz = np.array(binary_point_line_properties[1:4])\n            rgb = np.array(binary_point_line_properties[4:7])\n            error = np.array(binary_point_line_properties[7])\n            track_length = read_next_bytes(\n                fid, num_bytes=8, format_char_sequence=\"Q\")[0]\n            track_elems = read_next_bytes(\n                fid, num_bytes=8*track_length,\n                format_char_sequence=\"ii\"*track_length)\n            image_ids = np.array(tuple(map(int, track_elems[0::2])))\n            point2D_idxs = np.array(tuple(map(int, track_elems[1::2])))\n            points3D[point3D_id] = Point3D(\n                id=point3D_id, xyz=xyz, rgb=rgb,\n                error=error, image_ids=image_ids,\n                point2D_idxs=point2D_idxs)\n    return points3D\n\n\ndef read_model(path, ext):\n    if ext == \".txt\":\n        cameras = read_cameras_text(os.path.join(path, \"cameras\" + ext))\n        images = read_images_text(os.path.join(path, \"images\" + ext))\n        points3D = read_points3D_text(os.path.join(path, \"points3D\") + ext)\n    else:\n        cameras = read_cameras_binary(os.path.join(path, \"cameras\" + ext))\n        images = read_images_binary(os.path.join(path, \"images\" + ext))\n        points3D = read_points3d_binary(os.path.join(path, \"points3D\") + ext)\n    return cameras, images, points3D\n\n\ndef qvec2rotmat(qvec):\n    return np.array([\n        [1 - 2 * qvec[2]**2 - 2 * qvec[3]**2,\n         2 * qvec[1] * qvec[2] - 2 * qvec[0] * qvec[3],\n         2 * qvec[3] * qvec[1] + 2 * qvec[0] * qvec[2]],\n        [2 * qvec[1] * qvec[2] + 2 * qvec[0] * qvec[3],\n         1 - 2 * qvec[1]**2 - 2 * qvec[3]**2,\n         2 * qvec[2] * qvec[3] - 2 * qvec[0] * qvec[1]],\n        [2 * qvec[3] * qvec[1] - 2 * qvec[0] * qvec[2],\n         2 * qvec[2] * qvec[3] + 2 * qvec[0] * qvec[1],\n         1 - 2 * qvec[1]**2 - 2 * qvec[2]**2]])\n\n\ndef rotmat2qvec(R):\n    Rxx, Ryx, Rzx, Rxy, Ryy, Rzy, Rxz, Ryz, Rzz = R.flat\n    K = np.array([\n        [Rxx - Ryy - Rzz, 0, 0, 0],\n        [Ryx + Rxy, Ryy - Rxx - Rzz, 0, 0],\n        [Rzx + Rxz, Rzy + Ryz, Rzz - Rxx - Ryy, 0],\n        [Ryz - Rzy, Rzx - Rxz, Rxy - Ryx, Rxx + Ryy + Rzz]]) / 3.0\n    eigvals, eigvecs = np.linalg.eigh(K)\n    qvec = eigvecs[[3, 0, 1, 2], np.argmax(eigvals)]\n    if qvec[0] < 0:\n        qvec *= -1\n    return qvec\n\n\ndef main():\n    if len(sys.argv) != 3:\n        print(\"Usage: python read_model.py path/to/model/folder [.txt,.bin]\")\n        return\n\n    cameras, images, points3D = read_model(path=sys.argv[1], ext=sys.argv[2])\n\n    print(\"num_cameras:\", len(cameras))\n    print(\"num_images:\", len(images))\n    print(\"num_points3D:\", len(points3D))\n\n\nif __name__ == \"__main__\":\n    main()\n"
  },
  {
    "path": "preprocess_custom_data/colmap_preprocess/colmap_wrapper.py",
    "content": "import os\nimport subprocess\n\n\n\n# $ DATASET_PATH=/path/to/dataset\n\n# $ colmap feature_extractor \\\n#    --database_path $DATASET_PATH/database.db \\\n#    --image_path $DATASET_PATH/images\n\n# $ colmap exhaustive_matcher \\\n#    --database_path $DATASET_PATH/database.db\n\n# $ mkdir $DATASET_PATH/sparse\n\n# $ colmap mapper \\\n#     --database_path $DATASET_PATH/database.db \\\n#     --image_path $DATASET_PATH/images \\\n#     --output_path $DATASET_PATH/sparse\n\n# $ mkdir $DATASET_PATH/dense\ndef run_colmap(basedir, match_type):\n    \n    logfile_name = os.path.join(basedir, 'colmap_output.txt')\n    logfile = open(logfile_name, 'w')\n    \n    feature_extractor_args = [\n        'colmap', 'feature_extractor', \n            '--database_path', os.path.join(basedir, 'database.db'), \n            '--image_path', os.path.join(basedir, 'images'),\n            '--ImageReader.single_camera', '1',\n            # '--SiftExtraction.use_gpu', '0',\n    ]\n    feat_output = ( subprocess.check_output(feature_extractor_args, universal_newlines=True) )\n    logfile.write(feat_output)\n    print('Features extracted')\n\n    exhaustive_matcher_args = [\n        'colmap', match_type, \n            '--database_path', os.path.join(basedir, 'database.db'), \n    ]\n\n    match_output = ( subprocess.check_output(exhaustive_matcher_args, universal_newlines=True) )\n    logfile.write(match_output)\n    print('Features matched')\n    \n    p = os.path.join(basedir, 'sparse')\n    if not os.path.exists(p):\n        os.makedirs(p)\n\n    # mapper_args = [\n    #     'colmap', 'mapper', \n    #         '--database_path', os.path.join(basedir, 'database.db'), \n    #         '--image_path', os.path.join(basedir, 'images'),\n    #         '--output_path', os.path.join(basedir, 'sparse'),\n    #         '--Mapper.num_threads', '16',\n    #         '--Mapper.init_min_tri_angle', '4',\n    # ]\n    mapper_args = [\n        'colmap', 'mapper',\n            '--database_path', os.path.join(basedir, 'database.db'),\n            '--image_path', os.path.join(basedir, 'images'),\n            '--output_path', os.path.join(basedir, 'sparse'), # --export_path changed to --output_path in colmap 3.6\n            '--Mapper.num_threads', '16',\n            '--Mapper.init_min_tri_angle', '4',\n            '--Mapper.multiple_models', '0',\n            '--Mapper.extract_colors', '0',\n    ]\n\n    map_output = ( subprocess.check_output(mapper_args, universal_newlines=True) )\n    logfile.write(map_output)\n    logfile.close()\n    print('Sparse map created')\n    \n    print( 'Finished running COLMAP, see {} for logs'.format(logfile_name) )\n\n\n"
  },
  {
    "path": "preprocess_custom_data/colmap_preprocess/gen_cameras.py",
    "content": "import numpy as np\nimport trimesh\nimport cv2 as cv\nimport sys\nimport os\nfrom glob import glob\n\n\nif __name__ == '__main__':\n    work_dir = sys.argv[1]\n    poses_hwf = np.load(os.path.join(work_dir, 'poses.npy')) # n_images, 3, 5\n    poses_raw = poses_hwf[:, :, :4]\n    hwf = poses_hwf[:, :, 4]\n    pose = np.diag([1.0, 1.0, 1.0, 1.0])\n    pose[:3, :4] = poses_raw[0]\n    pts = []\n    pts.append((pose @ np.array([0, 0, 0, 1])[:, None]).squeeze()[:3])\n    pts.append((pose @ np.array([1, 0, 0, 1])[:, None]).squeeze()[:3])\n    pts.append((pose @ np.array([0, 1, 0, 1])[:, None]).squeeze()[:3])\n    pts.append((pose @ np.array([0, 0, 1, 1])[:, None]).squeeze()[:3])\n    pts = np.stack(pts, axis=0)\n    pcd = trimesh.PointCloud(pts)\n    pcd.export(os.path.join(work_dir, 'pose.ply'))\n    #\n\n    cam_dict = dict()\n    n_images = len(poses_raw)\n\n    # Convert space\n    convert_mat = np.zeros([4, 4], dtype=np.float32)\n    convert_mat[0, 1] = 1.0\n    convert_mat[1, 0] = 1.0\n    convert_mat[2, 2] =-1.0\n    convert_mat[3, 3] = 1.0\n\n    for i in range(n_images):\n        pose = np.diag([1.0, 1.0, 1.0, 1.0]).astype(np.float32)\n        pose[:3, :4] = poses_raw[i]\n        pose = pose @ convert_mat\n        h, w, f = hwf[i, 0], hwf[i, 1], hwf[i, 2]\n        intrinsic = np.diag([f, f, 1.0, 1.0]).astype(np.float32)\n        intrinsic[0, 2] = (w - 1) * 0.5\n        intrinsic[1, 2] = (h - 1) * 0.5\n        w2c = np.linalg.inv(pose)\n        world_mat = intrinsic @ w2c\n        world_mat = world_mat.astype(np.float32)\n        cam_dict['camera_mat_{}'.format(i)] = intrinsic\n        cam_dict['camera_mat_inv_{}'.format(i)] = np.linalg.inv(intrinsic)\n        cam_dict['world_mat_{}'.format(i)] = world_mat\n        cam_dict['world_mat_inv_{}'.format(i)] = np.linalg.inv(world_mat)\n\n\n    pcd = trimesh.load(os.path.join(work_dir, 'sparse_points_interest.ply'))\n    vertices = pcd.vertices\n    bbox_max = np.max(vertices, axis=0)\n    bbox_min = np.min(vertices, axis=0)\n    center = (bbox_max + bbox_min) * 0.5\n    radius = np.linalg.norm(vertices - center, ord=2, axis=-1).max()\n    scale_mat = np.diag([radius, radius, radius, 1.0]).astype(np.float32)\n    scale_mat[:3, 3] = center\n\n    for i in range(n_images):\n        cam_dict['scale_mat_{}'.format(i)] = scale_mat\n        cam_dict['scale_mat_inv_{}'.format(i)] = np.linalg.inv(scale_mat)\n\n    out_dir = os.path.join(work_dir, 'preprocessed')\n    os.makedirs(out_dir, exist_ok=True)\n    os.makedirs(os.path.join(out_dir, 'image'), exist_ok=True)\n    os.makedirs(os.path.join(out_dir, 'mask'), exist_ok=True)\n\n    image_list = glob(os.path.join(work_dir, 'images/*.png'))\n    image_list.sort()\n\n    for i, image_path in enumerate(image_list):\n        img = cv.imread(image_path)\n        cv.imwrite(os.path.join(out_dir, 'image', '{:0>3d}.png'.format(i)), img)\n        cv.imwrite(os.path.join(out_dir, 'mask', '{:0>3d}.png'.format(i)), np.ones_like(img) * 255)\n\n    np.savez(os.path.join(out_dir, 'cameras_sphere.npz'), **cam_dict)\n    print('Process done!')\n"
  },
  {
    "path": "preprocess_custom_data/colmap_preprocess/imgs2poses.py",
    "content": "from pose_utils import gen_poses\nimport sys\nimport argparse\nparser = argparse.ArgumentParser()\nparser.add_argument('--match_type', type=str, \n\t\t\t\t\tdefault='exhaustive_matcher', help='type of matcher used.  Valid options: \\\n\t\t\t\t\texhaustive_matcher sequential_matcher.  Other matchers not supported at this time')\nparser.add_argument('scenedir', type=str,\n                    help='input scene directory')\nargs = parser.parse_args()\n\nif args.match_type != 'exhaustive_matcher' and args.match_type != 'sequential_matcher':\n\tprint('ERROR: matcher type ' + args.match_type + ' is not valid.  Aborting')\n\tsys.exit()\n\nif __name__=='__main__':\n    gen_poses(args.scenedir, args.match_type)\n"
  },
  {
    "path": "preprocess_custom_data/colmap_preprocess/pose_utils.py",
    "content": "import numpy as np\nimport os\nimport sys\nimport imageio\nimport skimage.transform\nimport trimesh\n\nfrom colmap_wrapper import run_colmap\nimport colmap_read_model as read_model\n\n\ndef load_colmap_data(realdir):\n    \n    camerasfile = os.path.join(realdir, 'sparse/0/cameras.bin')\n    camdata = read_model.read_cameras_binary(camerasfile)\n    \n    # cam = camdata[camdata.keys()[0]]\n    list_of_keys = list(camdata.keys())\n    cam = camdata[list_of_keys[0]]\n    print( 'Cameras', len(cam))\n\n    h, w, f = cam.height, cam.width, cam.params[0]\n    # w, h, f = factor * w, factor * h, factor * f\n    hwf = np.array([h,w,f]).reshape([3,1])\n    \n    imagesfile = os.path.join(realdir, 'sparse/0/images.bin')\n    imdata = read_model.read_images_binary(imagesfile)\n    \n    w2c_mats = []\n    bottom = np.array([0,0,0,1.]).reshape([1,4])\n    \n    names = [imdata[k].name for k in imdata]\n    print( 'Images #', len(names))\n    perm = np.argsort(names)\n    for k in imdata:\n        im = imdata[k]\n        R = im.qvec2rotmat()\n        t = im.tvec.reshape([3,1])\n        m = np.concatenate([np.concatenate([R, t], 1), bottom], 0)\n        w2c_mats.append(m)\n    \n    w2c_mats = np.stack(w2c_mats, 0)\n    c2w_mats = np.linalg.inv(w2c_mats)\n    \n    poses = c2w_mats[:, :3, :4].transpose([1,2,0])\n    poses = np.concatenate([poses, np.tile(hwf[..., np.newaxis], [1,1,poses.shape[-1]])], 1)\n    \n    points3dfile = os.path.join(realdir, 'sparse/0/points3D.bin')\n    pts3d = read_model.read_points3d_binary(points3dfile)\n    \n    # must switch to [-u, r, -t] from [r, -u, t], NOT [r, u, -t]\n    poses = np.concatenate([poses[:, 1:2, :], poses[:, 0:1, :], -poses[:, 2:3, :], poses[:, 3:4, :], poses[:, 4:5, :]], 1)\n    \n    return poses, pts3d, perm\n\n\ndef save_poses(basedir, poses, pts3d, perm):\n    pts_arr = []\n    vis_arr = []\n    for k in pts3d:\n        pts_arr.append(pts3d[k].xyz)\n        cams = [0] * poses.shape[-1]\n        for ind in pts3d[k].image_ids:\n            if len(cams) < ind - 1:\n                print('ERROR: the correct camera poses for current points cannot be accessed')\n                return\n            cams[ind-1] = 1\n        vis_arr.append(cams)\n\n    pts = np.stack(pts_arr, axis=0)\n    pcd = trimesh.PointCloud(pts)\n    pcd.export(os.path.join(basedir, 'sparse_points.ply'))\n\n    pts_arr = np.array(pts_arr)\n    vis_arr = np.array(vis_arr)\n    print('Points', pts_arr.shape, 'Visibility', vis_arr.shape )\n\n    poses = np.moveaxis(poses, -1, 0)\n    poses = poses[perm]\n    np.save(os.path.join(basedir, 'poses.npy'), poses)\n\n\ndef minify_v0(basedir, factors=[], resolutions=[]):\n    needtoload = False\n    for r in factors:\n        imgdir = os.path.join(basedir, 'images_{}'.format(r))\n        if not os.path.exists(imgdir):\n            needtoload = True\n    for r in resolutions:\n        imgdir = os.path.join(basedir, 'images_{}x{}'.format(r[1], r[0]))\n        if not os.path.exists(imgdir):\n            needtoload = True\n    if not needtoload:\n        return\n    \n    def downsample(imgs, f):\n        sh = list(imgs.shape)\n        sh = sh[:-3] + [sh[-3]//f, f, sh[-2]//f, f, sh[-1]]\n        imgs = np.reshape(imgs, sh)\n        imgs = np.mean(imgs, (-2, -4))\n        return imgs\n    \n    imgdir = os.path.join(basedir, 'images')\n    imgs = [os.path.join(imgdir, f) for f in sorted(os.listdir(imgdir))]\n    imgs = [f for f in imgs if any([f.endswith(ex) for ex in ['JPG', 'jpg', 'png', 'jpeg', 'PNG']])]\n    imgs = np.stack([imageio.imread(img)/255. for img in imgs], 0)\n    \n    for r in factors + resolutions:\n        if isinstance(r, int):\n            name = 'images_{}'.format(r)\n        else:\n            name = 'images_{}x{}'.format(r[1], r[0])\n        imgdir = os.path.join(basedir, name)\n        if os.path.exists(imgdir):\n            continue\n        print('Minifying', r, basedir)\n        \n        if isinstance(r, int):\n            imgs_down = downsample(imgs, r)\n        else:\n            imgs_down = skimage.transform.resize(imgs, [imgs.shape[0], r[0], r[1], imgs.shape[-1]],\n                                                order=1, mode='constant', cval=0, clip=True, preserve_range=False, \n                                                 anti_aliasing=True, anti_aliasing_sigma=None)\n        \n        os.makedirs(imgdir)\n        for i in range(imgs_down.shape[0]):\n            imageio.imwrite(os.path.join(imgdir, 'image{:03d}.png'.format(i)), (255*imgs_down[i]).astype(np.uint8))\n            \n\n\n\ndef minify(basedir, factors=[], resolutions=[]):\n    needtoload = False\n    for r in factors:\n        imgdir = os.path.join(basedir, 'images_{}'.format(r))\n        if not os.path.exists(imgdir):\n            needtoload = True\n    for r in resolutions:\n        imgdir = os.path.join(basedir, 'images_{}x{}'.format(r[1], r[0]))\n        if not os.path.exists(imgdir):\n            needtoload = True\n    if not needtoload:\n        return\n    \n    from shutil import copy\n    from subprocess import check_output\n    \n    imgdir = os.path.join(basedir, 'images')\n    imgs = [os.path.join(imgdir, f) for f in sorted(os.listdir(imgdir))]\n    imgs = [f for f in imgs if any([f.endswith(ex) for ex in ['JPG', 'jpg', 'png', 'jpeg', 'PNG']])]\n    imgdir_orig = imgdir\n    \n    wd = os.getcwd()\n\n    for r in factors + resolutions:\n        if isinstance(r, int):\n            name = 'images_{}'.format(r)\n            resizearg = '{}%'.format(int(100./r))\n        else:\n            name = 'images_{}x{}'.format(r[1], r[0])\n            resizearg = '{}x{}'.format(r[1], r[0])\n        imgdir = os.path.join(basedir, name)\n        if os.path.exists(imgdir):\n            continue\n            \n        print('Minifying', r, basedir)\n        \n        os.makedirs(imgdir)\n        check_output('cp {}/* {}'.format(imgdir_orig, imgdir), shell=True)\n        \n        ext = imgs[0].split('.')[-1]\n        args = ' '.join(['mogrify', '-resize', resizearg, '-format', 'png', '*.{}'.format(ext)])\n        print(args)\n        os.chdir(imgdir)\n        check_output(args, shell=True)\n        os.chdir(wd)\n        \n        if ext != 'png':\n            check_output('rm {}/*.{}'.format(imgdir, ext), shell=True)\n            print('Removed duplicates')\n        print('Done')\n            \n        \n        \n        \ndef load_data(basedir, factor=None, width=None, height=None, load_imgs=True):\n    \n    poses_arr = np.load(os.path.join(basedir, 'poses_bounds.npy'))\n    poses = poses_arr[:, :-2].reshape([-1, 3, 5]).transpose([1,2,0])\n    bds = poses_arr[:, -2:].transpose([1,0])\n    \n    img0 = [os.path.join(basedir, 'images', f) for f in sorted(os.listdir(os.path.join(basedir, 'images'))) \\\n            if f.endswith('JPG') or f.endswith('jpg') or f.endswith('png')][0]\n    sh = imageio.imread(img0).shape\n    \n    sfx = ''\n    \n    if factor is not None:\n        sfx = '_{}'.format(factor)\n        minify(basedir, factors=[factor])\n        factor = factor\n    elif height is not None:\n        factor = sh[0] / float(height)\n        width = int(sh[1] / factor)\n        minify(basedir, resolutions=[[height, width]])\n        sfx = '_{}x{}'.format(width, height)\n    elif width is not None:\n        factor = sh[1] / float(width)\n        height = int(sh[0] / factor)\n        minify(basedir, resolutions=[[height, width]])\n        sfx = '_{}x{}'.format(width, height)\n    else:\n        factor = 1\n    \n    imgdir = os.path.join(basedir, 'images' + sfx)\n    if not os.path.exists(imgdir):\n        print( imgdir, 'does not exist, returning' )\n        return\n    \n    imgfiles = [os.path.join(imgdir, f) for f in sorted(os.listdir(imgdir)) if f.endswith('JPG') or f.endswith('jpg') or f.endswith('png')]\n    if poses.shape[-1] != len(imgfiles):\n        print( 'Mismatch between imgs {} and poses {} !!!!'.format(len(imgfiles), poses.shape[-1]) )\n        return\n    \n    sh = imageio.imread(imgfiles[0]).shape\n    poses[:2, 4, :] = np.array(sh[:2]).reshape([2, 1])\n    poses[2, 4, :] = poses[2, 4, :] * 1./factor\n    \n    if not load_imgs:\n        return poses, bds\n    \n    # imgs = [imageio.imread(f, ignoregamma=True)[...,:3]/255. for f in imgfiles]\n    def imread(f):\n        if f.endswith('png'):\n            return imageio.imread(f, ignoregamma=True)\n        else:\n            return imageio.imread(f)\n        \n    imgs = imgs = [imread(f)[...,:3]/255. for f in imgfiles]\n    imgs = np.stack(imgs, -1)  \n    \n    print('Loaded image data', imgs.shape, poses[:,-1,0])\n    return poses, bds, imgs\n            \n    \ndef gen_poses(basedir, match_type, factors=None):\n    \n    files_needed = ['{}.bin'.format(f) for f in ['cameras', 'images', 'points3D']]\n    if os.path.exists(os.path.join(basedir, 'sparse/0')):\n        files_had = os.listdir(os.path.join(basedir, 'sparse/0'))\n    else:\n        files_had = []\n    if not all([f in files_had for f in files_needed]):\n        print( 'Need to run COLMAP' )\n        run_colmap(basedir, match_type)\n    else:\n        print('Don\\'t need to run COLMAP')\n        \n    print('Post-colmap')\n    \n    poses, pts3d, perm = load_colmap_data(basedir)\n\n\n    save_poses(basedir, poses, pts3d, perm)\n    \n    if factors is not None:\n        print( 'Factors:', factors)\n        minify(basedir, factors)\n    \n    print( 'Done with imgs2poses' )\n    \n    return True\n    \n"
  },
  {
    "path": "preprocess_custom_data/readme.md",
    "content": " \n\n# Training NeuS Using Your Custom Data\n\n\n\n### [Example data link](https://drive.google.com/file/d/1nZBY--rvi3dUKGVz-d1jCpppkeD_tBiB/view?usp=sharing)\n\n\n\n### Option 1. Use ArUco \n\nWe take the images in `examples/thin_catbus` for example. These images were captured with an ArUco board. The pattern image of this board can be found in `./static/aruco_board.png`.\n\n**Step 1. Build the calibration code (c++)**  \n\nDependencies: \n\n- cnpy (https://github.com/rogersce/cnpy)\n- OpenCV\n\nRun commands\n\n```\ncd aruco_preprocess\nmkdir build\ncd build\ncmake .. & make\ncd ..\n```\n\n**Step 2. Get the preprocessed data**\n\nFirst indicate `data_dir`,`n_images` in `run.sh`. For example, `data_dir=./example/thin_catbus`\n\nRun commands\n\n```\nbash run.sh\n```\n\nThen the preprocessed data can be found in `${data_dir}/preprocessed`. Here we define the region of interest as the bounding sphere of the calibration board.\n\n\n\n### Option 2. Use COLMAP\n\n**Step 1. Run COLMAP SfM**\n\nRun  commands\n\n```\ncd colmap_preprocess\npython img2poses.py ${data_dir}\n```\n\nAfter running the commands above, a sparse point cloud is saved in `${data_dir}/sparse_points.ply`.\n\n**Step 2. Define the region of interest**\n\nThe raw sparse point cloud may be noisy and may not be appropriate to define a region of interest (The white frame indicates the bounding box of the point cloud):\n\n![raw_sparse_points](./static/raw_sparse_points.png)\n\nAnd you may need to clean it by yourself (here we use Meshlab to clean it manually). After cleaning:\n\n![interest_sparse_points](./static/interest_sparse_points.png)\n\nSave it as `${data_dir}/sparse_point_interest.ply`.\n\nThen run the commands:\n\n```\npython gen_cameras.py ${data_dir}\n```\n\nThen the preprocessed data can be found in `${data_dir}/preprocessed`.\n\n### Notes\n\nHere we just use the image without undistortion in the second option. To get better results, you may need to undistort your images in advance.\n\n\n\n## Acknowledgement\n\nThe python scripts to run COLMAP SfM are heavily borrowed from LLFF: https://github.com/Fyusion/LLFF\n\n"
  },
  {
    "path": "requirements.txt",
    "content": "trimesh==3.9.8\nnumpy==1.19.2\npyhocon==0.3.57\nicecream==2.1.0\nopencv_python==4.5.2.52\ntqdm==4.50.2\ntorch==1.8.0\nscipy==1.7.0\nPyMCubes==0.1.2\n"
  }
]