Full Code of IGLICT/NeUDF for AI

main 01fa557958a4 cached
35 files
29.6 MB
668.9k tokens
785 symbols
1 requests
Download .txt
Showing preview only (2,003K chars total). Download the full file or copy to clipboard to get everything.
Repository: IGLICT/NeUDF
Branch: main
Commit: 01fa557958a4
Files: 35
Total size: 29.6 MB

Directory structure:
gitextract_vbzbbjy4/

├── LICENSE
├── README.md
├── confs/
│   ├── wmask_old.conf
│   ├── wmask_open.conf
│   └── womask_open.conf
├── custom_mc/
│   ├── _marching_cubes_lewiner.py
│   ├── _marching_cubes_lewiner_cy.c
│   ├── _marching_cubes_lewiner_cy.pyx
│   ├── _marching_cubes_lewiner_luts.py
│   ├── build/
│   │   ├── temp.linux-x86_64-3.8/
│   │   │   └── _marching_cubes_lewiner_cy.o
│   │   └── temp.linux-x86_64-cpython-38/
│   │       └── _marching_cubes_lewiner_cy.o
│   └── setup.py
├── exp/
│   ├── my_rack_test/
│   │   └── womask_open/
│   │       └── checkpoints/
│   │           └── ckpt_400000.pth
│   └── my_whale_test/
│       └── wmask_open/
│           └── checkpoints/
│               └── ckpt_2000000.pth
├── exp_runner.py
├── lib/
│   ├── __init__.py
│   ├── models/
│   │   └── deep_udf_decoder.py
│   └── workspace.py
├── models/
│   ├── dataset.py
│   ├── embedder.py
│   ├── fields.py
│   └── renderer.py
├── preprocess_custom_data/
│   ├── aruco_preprocess/
│   │   ├── CMakeLists.txt
│   │   ├── calibration.cpp
│   │   ├── gen_cameras.py
│   │   └── run.sh
│   ├── colmap_preprocess/
│   │   ├── colmap_read_model.py
│   │   ├── colmap_wrapper.py
│   │   ├── gen_cameras.py
│   │   ├── imgs2poses.py
│   │   └── pose_utils.py
│   └── readme.md
├── public_data/
│   ├── my_rack_test/
│   │   └── cameras_sphere.npz
│   └── my_whale_test/
│       └── cameras_sphere.npz
└── requirements.txt

================================================
FILE CONTENTS
================================================

================================================
FILE: LICENSE
================================================
MIT License

Copyright (c) 2023 IGLICT

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


================================================
FILE: README.md
================================================
# NeUDF
We present an open surface reconstruction method using UDF, called NeUDF, for reconstructing objects with high-fidelity open surfaces from 2D image inputs.

![](./static/teaser.jpg)

## [Project page](http://geometrylearning.com/neudf/) |  [Paper](http://geometrylearning.com/neudf/paper.pdf)
This is the official repo for the implementation of **NeUDF: Leaning Neural Unsigned Distance Fields with Volume Rendering** (CVPR 2023).

## Usage

### Setup environment

Installing the requirements using:
```shell
pip install -r requirements.txt
```

To compile [MeshUDF](https://github.com/cvlab-epfl/MeshUDF) to extract open mesh from the learned UDF field, please run:
```shell
cd custom_mc
python setup.py build_ext --inplace
cd ..
```

To 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:
```shell
pip install pymeshlab
```
To build PyMeshLab from source, please refer to [PyMeshLab](https://github.com/cnr-isti-vclab/PyMeshLab).

### Running

- **Train without mask**

```shell
python exp_runner.py --mode train --conf ./confs/womask_open.conf --case <case_name>
```

- **Train with mask**

```shell
python exp_runner.py --mode train --conf ./confs/wmask_open.conf --case <case_name>
```

- **Extract surface using MeshUDF** 

```shell
python exp_runner.py --mode validate_mesh_udf --conf <config_file> --case <case_name> --is_continue
```

The corresponding mesh can be found in `exp/<case_name>/<exp_name>/meshes/mu<iter_steps>.ply`.

- **Extract surface using Screened Poisson** 

```shell
python exp_runner.py --mode validate_mesh_spsr --conf <config_file> --case <case_name> --is_continue
```

The corresponding mesh can be found in `exp/<case_name>/<exp_name>/meshes/spsr<iter_steps>.ply`.

- **Extract surface using MarchingCubes** 

```shell
python exp_runner.py --mode validate_mesh --conf <config_file> --case <case_name> --is_continue
```

The corresponding mesh can be found in `exp/<case_name>/<exp_name>/meshes/<iter_steps>.ply`.

### Evaluation using pretrained models

- **Without mask setting** 
```shell
python exp_runner.py --mode validate_mesh_udf --conf ./confs/womask_open.conf --case my_rack_test --is_continue --resolution 512
```

- **With mask setting** 
```shell
python exp_runner.py --mode validate_mesh_udf --conf ./confs/wmask_open.conf --case my_whale_test --is_continue --resolution 512
```

### Datasets and results

You 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.

The data is organized as follows:

```
public_data
|-- <case_name>
    |-- cameras_xxx.npz
    |-- image
        |-- 000.png
        |-- 001.png
        ...
    |-- mask
        |-- 000.png
        |-- 001.png
        ...
exp
|-- <case_name>
    |-- <conf_name>
        |-- checkpoints
            |-- ckpt_400000.pth
```

### Train NeUDF with custom data

Please refer to the  [Data Conversion](https://github.com/Totoro97/NeuS/tree/main/preprocess_custom_data) in NeuS.


## Citation

Cite as below if you find this repository is helpful to your project:

```
@inproceedings{Liu23NeUDF,
    author = {Liu, Yu-Tao and Wang, Li and Yang, Jie and Chen, Weikai and Meng, Xiaoxu and Yang, Bo and Gao, Lin},
    title = {NeUDF: Leaning Neural Unsigned Distance Fields with Volume Rendering},
    booktitle={Computer Vision and Pattern Recognition (CVPR)},
    year = {2023},
}
```

## Acknowledgement

Some 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.


================================================
FILE: confs/wmask_old.conf
================================================
general {
    base_exp_dir = ./exp/CASE_NAME/wmask
    recording = [
        ./,
        ./models
    ]
}

dataset {
    data_dir = ./public_data/CASE_NAME/
    render_cameras_name = cameras_sphere.npz
    object_cameras_name = cameras_sphere.npz
}

train {
    learning_rate = 2e-4
    learning_rate_alpha = 0.05
    end_iter = 400000

    batch_size = 512
    validate_resolution_level = 4
    warm_up_end = 5000
    anneal_end = 0
    use_white_bkgd = False

    save_freq = 10000
    val_freq = 2500
    val_mesh_freq = 5000
    report_freq = 100

    mask_weight = 0.1
    igr_weight = 0.1
    normal_weight = 0.02

    dist_weight = 0.0
    geo_reg_weight = 0.0
    sym_weight = 0.0

    mcube_threshold = 0.005

    up_sample_start = 100000

    perm_num = 8
    
}

model {
    nerf {
        D = 8,
        d_in = 4,
        d_in_view = 3,
        W = 256,
        multires = 10,
        multires_view = 4,
        output_ch = 4,
        skips=[4],
        use_viewdirs=True
    }

    sdf_network {
        d_out = 257
        d_in = 3
        d_hidden = 256
        n_layers = 8
        skip_in = [4]
        multires = 6
        bias = 0.5
        scale = 1.0
        geometric_init = True
        weight_norm = True
    }

    variance_network {
        init_val = 0.3
    }

    rendering_network {
        d_feature = 256
        mode = normal_appr
        d_in = 9
        d_out = 3
        d_hidden = 256
        n_layers = 4
        weight_norm = True
        multires_view = 4
        squeeze_out = True
    }

    neus_renderer {
        n_samples = 64
        n_importance = 64
        n_outside = 0
        perturb = 1.0
        disturb = 0.0
        disturb_end = 0
        up_sample_mode = naive_appr

        up_sample_steps = 2     # 1 for simple coarse-to-fine sampling
        up_sample_appr_level = 3
        up_sample_s = 64

        render_mode = div
    }
}


================================================
FILE: confs/wmask_open.conf
================================================
general {
    base_exp_dir = ./exp/CASE_NAME/wmask_open
    recording = [
        ./,
        ./models
    ]
}

dataset {
    data_dir = ./public_data/CASE_NAME/
    render_cameras_name = cameras_sphere.npz
    object_cameras_name = cameras_sphere.npz
}

train {
    learning_rate = 2e-4
    learning_rate_alpha = 0.05
    end_iter = 400000

    batch_size = 512
    validate_resolution_level = 4
    warm_up_end = 5000
    anneal_end = 0
    use_white_bkgd = False

    save_freq = 10000
    val_freq = 2500
    val_mesh_freq = 5000
    report_freq = 100

    mask_weight = 0.1
    igr_weight = 0.1
    normal_weight = 0.02

    mcube_threshold = 0.005

    up_sample_start = 0

    perm_num = 8
    
}

model {
    nerf {
        D = 8,
        d_in = 4,
        d_in_view = 3,
        W = 256,
        multires = 10,
        multires_view = 4,
        output_ch = 4,
        skips=[4],
        use_viewdirs=True
    }

    sdf_network {
        d_out = 257
        d_in = 3
        d_hidden = 256
        n_layers = 8
        skip_in = [4]
        multires = 6
        bias = 0.5
        scale = 1.0
        geometric_init = True
        weight_norm = True
    }

    variance_network {
        init_val = 0.3
    }

    rendering_network {
        d_feature = 256
        mode = normal_appr
        d_in = 9
        d_out = 3
        d_hidden = 256
        n_layers = 4
        weight_norm = True
        multires_view = 4
        squeeze_out = True
    }

    neus_renderer {
        n_samples = 64
        n_importance = 64
        n_outside = 0
        perturb = 1.0
        disturb = 0.0
        disturb_end = 0
        up_sample_mode = naive_appr

        up_sample_steps = 2     # 1 for simple coarse-to-fine sampling
        up_sample_appr_level = 3
        up_sample_s = 64

        render_mode = div
    }
}


================================================
FILE: confs/womask_open.conf
================================================
general {
    base_exp_dir = ./exp/CASE_NAME/womask_open
    recording = [
        ./,
        ./models
    ]
}

dataset {
    data_dir = ./public_data/CASE_NAME/
    render_cameras_name = cameras_sphere.npz
    object_cameras_name = cameras_sphere.npz
}

train {
    learning_rate = 2e-4
    learning_rate_alpha = 0.05
    end_iter = 400000

    batch_size = 512
    validate_resolution_level = 4
    warm_up_end = 5000
    anneal_end = 10000
    use_white_bkgd = False

    save_freq = 10000
    val_freq = 2500
    val_mesh_freq = 5000
    report_freq = 100

    mask_weight = 0.0
    igr_weight = 0.1
    normal_weight = 0.02

    mcube_threshold = 0.005

    up_sample_start = 100000

    perm_num = 8
    
}

model {
    nerf {
        D = 8,
        d_in = 4,
        d_in_view = 3,
        W = 256,
        multires = 10,
        multires_view = 4,
        output_ch = 4,
        skips=[4],
        use_viewdirs=True
    }

    sdf_network {
        d_out = 257
        d_in = 3
        d_hidden = 256
        n_layers = 8
        skip_in = [4]
        multires = 6
        bias = 0.5
        scale = 1.0
        geometric_init = True
        weight_norm = True
    }

    variance_network {
        init_val = 0.3
    }

    rendering_network {
        d_feature = 256
        mode = normal_appr
        d_in = 9
        d_out = 3
        d_hidden = 256
        n_layers = 4
        weight_norm = True
        multires_view = 4
        squeeze_out = True
    }

    neus_renderer {
        n_samples = 64
        n_importance = 64
        n_outside = 32
        perturb = 1.0
        disturb = 0.0
        disturb_end = 0
        up_sample_mode = naive_appr

        up_sample_steps = 2     # 1 for simple coarse-to-fine sampling
        up_sample_appr_level = 3
        up_sample_s = 64

        render_mode = div
    }
}


================================================
FILE: custom_mc/_marching_cubes_lewiner.py
================================================
import base64
import numpy as np
import _marching_cubes_lewiner_luts as mcluts
import _marching_cubes_lewiner_cy


def marching_cubes_lewiner(volume, level=None, spacing=(1., 1., 1.),
                           gradient_direction='descent', step_size=1,
                           allow_degenerate=True, use_classic=False, mask=None):
    """Lewiner et al. algorithm for marching cubes. See
    marching_cubes_lewiner for documentation.
    """

    # Check volume and ensure its in the format that the alg needs
    if not isinstance(volume, np.ndarray) or (volume.ndim != 3):
        raise ValueError('Input volume should be a 3D numpy array.')
    if volume.shape[0] < 2 or volume.shape[1] < 2 or volume.shape[2] < 2:
        raise ValueError("Input array must be at least 2x2x2.")
    volume = np.ascontiguousarray(volume,
                                  np.float32)  # no copy if not necessary

    # Check/convert other inputs:
    # level
    if level is None:
        level = 0.5 * (volume.min() + volume.max())
    else:
        level = float(level)
        if level < volume.min() or level > volume.max():
            raise ValueError("Surface level must be within volume data range.")
    # spacing
    if len(spacing) != 3:
        raise ValueError("`spacing` must consist of three floats.")
    # step_size
    step_size = int(step_size)
    if step_size < 1:
        raise ValueError('step_size must be at least one.')
    # use_classic
    use_classic = bool(use_classic)

    # Get LutProvider class (reuse if possible)
    L = _get_mc_luts()

    # Check if a mask array is passed
    if mask is not None:
        if not mask.shape == volume.shape:
            raise ValueError('volume and mask must have the same shape.')

    # Apply algorithm
    func = _marching_cubes_lewiner_cy.marching_cubes
    vertices, faces, normals, values = func(volume, level, L,
                                            step_size, use_classic, mask)

    if not len(vertices):
        raise RuntimeError('No surface found at the given iso value.')

    # Output in z-y-x order, as is common in skimage
    vertices = np.fliplr(vertices)
    normals = np.fliplr(normals)

    # Finishing touches to output
    faces.shape = -1, 3
    if gradient_direction == 'descent':
        # MC implementation is right-handed, but gradient_direction is
        # left-handed
        faces = np.fliplr(faces)
    elif not gradient_direction == 'ascent':
        raise ValueError("Incorrect input %s in `gradient_direction`, see "
                         "docstring." % (gradient_direction))
    if not np.array_equal(spacing, (1, 1, 1)):
        vertices = vertices * np.r_[spacing]

    if allow_degenerate:
        return vertices, faces, normals, values
    else:
        fun = _marching_cubes_lewiner_cy.remove_degenerate_faces
        return fun(vertices.astype(np.float32), faces, normals, values)



def udf_mc_lewiner(volume, grads, spacing=(1., 1., 1.),
                           gradient_direction='descent', step_size=1,
                           allow_degenerate=True, use_classic=False, mask=None):
    """Lewiner et al. algorithm for marching cubes. See
    marching_cubes_lewiner for documentation.
    """

    # Check volume and ensure its in the format that the alg needs
    if not isinstance(volume, np.ndarray) or (volume.ndim != 3):
        raise ValueError('Input volume should be a 3D numpy array.')
    if volume.shape[0] < 2 or volume.shape[1] < 2 or volume.shape[2] < 2:
        raise ValueError("Input array must be at least 2x2x2.")
    volume = np.ascontiguousarray(volume,
                                  np.float32)  # no copy if not necessary

    # spacing
    if len(spacing) != 3:
        raise ValueError("`spacing` must consist of three floats.")
    # step_size
    step_size = int(step_size)
    if step_size < 1:
        raise ValueError('step_size must be at least one.')
    # use_classic
    use_classic = bool(use_classic)

    # Get LutProvider class (reuse if possible)
    L = _get_mc_luts()

    # Check if a mask array is passed
    if mask is not None:
        if not mask.shape == volume.shape:
            raise ValueError('volume and mask must have the same shape.')

    # Apply algorithm
    func = _marching_cubes_lewiner_cy.marching_cubes_udf
    vertices, faces, normals, values = func(volume, grads, L,
                                            step_size, use_classic, mask)

    if not len(vertices):
        raise RuntimeError('No surface found at the given iso value.')

    # Output in z-y-x order, as is common in skimage
    vertices = np.fliplr(vertices)
    normals = np.fliplr(normals)

    # Finishing touches to output
    faces.shape = -1, 3
    if gradient_direction == 'descent':
        # MC implementation is right-handed, but gradient_direction is
        # left-handed
        faces = np.fliplr(faces)
    elif not gradient_direction == 'ascent':
        raise ValueError("Incorrect input %s in `gradient_direction`, see "
                         "docstring." % (gradient_direction))
    if not np.array_equal(spacing, (1, 1, 1)):
        vertices = vertices * np.r_[spacing]

    if allow_degenerate:
        return vertices, faces, normals, values
    else:
        fun = _marching_cubes_lewiner_cy.remove_degenerate_faces
        return fun(vertices.astype(np.float32), faces, normals, values)



def _to_array(args):
    shape, text = args
    byts = base64.decodebytes(text.encode('utf-8'))
    ar = np.frombuffer(byts, dtype='int8')
    ar.shape = shape
    return ar

 
# Map an edge-index to two relative pixel positions. The ege index
# represents a point that lies somewhere in between these pixels.
# Linear interpolation should be used to determine where it is exactly.
#   0
# 3   1   ->  0x
#   2         xx
EDGETORELATIVEPOSX = 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')
EDGETORELATIVEPOSY = 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')
EDGETORELATIVEPOSZ = 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')


def _get_mc_luts():
    """ Kind of lazy obtaining of the luts.
    """
    if not hasattr(mcluts, 'THE_LUTS'):

        mcluts.THE_LUTS = _marching_cubes_lewiner_cy.LutProvider(
                EDGETORELATIVEPOSX, EDGETORELATIVEPOSY, EDGETORELATIVEPOSZ,

                _to_array(mcluts.CASESCLASSIC), _to_array(mcluts.CASES),

                _to_array(mcluts.TILING1), _to_array(mcluts.TILING2), _to_array(mcluts.TILING3_1), _to_array(mcluts.TILING3_2),
                _to_array(mcluts.TILING4_1), _to_array(mcluts.TILING4_2), _to_array(mcluts.TILING5), _to_array(mcluts.TILING6_1_1),
                _to_array(mcluts.TILING6_1_2), _to_array(mcluts.TILING6_2), _to_array(mcluts.TILING7_1),
                _to_array(mcluts.TILING7_2), _to_array(mcluts.TILING7_3), _to_array(mcluts.TILING7_4_1),
                _to_array(mcluts.TILING7_4_2), _to_array(mcluts.TILING8), _to_array(mcluts.TILING9),
                _to_array(mcluts.TILING10_1_1), _to_array(mcluts.TILING10_1_1_), _to_array(mcluts.TILING10_1_2),
                _to_array(mcluts.TILING10_2), _to_array(mcluts.TILING10_2_), _to_array(mcluts.TILING11),
                _to_array(mcluts.TILING12_1_1), _to_array(mcluts.TILING12_1_1_), _to_array(mcluts.TILING12_1_2),
                _to_array(mcluts.TILING12_2), _to_array(mcluts.TILING12_2_), _to_array(mcluts.TILING13_1),
                _to_array(mcluts.TILING13_1_), _to_array(mcluts.TILING13_2), _to_array(mcluts.TILING13_2_),
                _to_array(mcluts.TILING13_3), _to_array(mcluts.TILING13_3_), _to_array(mcluts.TILING13_4),
                _to_array(mcluts.TILING13_5_1), _to_array(mcluts.TILING13_5_2), _to_array(mcluts.TILING14),

                _to_array(mcluts.TEST3), _to_array(mcluts.TEST4), _to_array(mcluts.TEST6),
                _to_array(mcluts.TEST7), _to_array(mcluts.TEST10), _to_array(mcluts.TEST12),
                _to_array(mcluts.TEST13), _to_array(mcluts.SUBCONFIG13),
                )

    return mcluts.THE_LUTS


================================================
FILE: custom_mc/_marching_cubes_lewiner_cy.c
================================================
/* Generated by Cython 0.29.30 */

/* BEGIN: Cython Metadata
{
    "distutils": {
        "depends": [],
        "name": "_marching_cubes_lewiner_cy",
        "sources": [
            "_marching_cubes_lewiner_cy.pyx"
        ]
    },
    "module_name": "_marching_cubes_lewiner_cy"
}
END: Cython Metadata */

#ifndef PY_SSIZE_T_CLEAN
#define PY_SSIZE_T_CLEAN
#endif /* PY_SSIZE_T_CLEAN */
#include "Python.h"
#ifndef Py_PYTHON_H
    #error Python headers needed to compile C extensions, please install development version of Python.
#elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
    #error Cython requires Python 2.6+ or Python 3.3+.
#else
#define CYTHON_ABI "0_29_30"
#define CYTHON_HEX_VERSION 0x001D1EF0
#define CYTHON_FUTURE_DIVISION 0
#include <stddef.h>
#ifndef offsetof
  #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
#endif
#if !defined(WIN32) && !defined(MS_WINDOWS)
  #ifndef __stdcall
    #define __stdcall
  #endif
  #ifndef __cdecl
    #define __cdecl
  #endif
  #ifndef __fastcall
    #define __fastcall
  #endif
#endif
#ifndef DL_IMPORT
  #define DL_IMPORT(t) t
#endif
#ifndef DL_EXPORT
  #define DL_EXPORT(t) t
#endif
#define __PYX_COMMA ,
#ifndef HAVE_LONG_LONG
  #if PY_VERSION_HEX >= 0x02070000
    #define HAVE_LONG_LONG
  #endif
#endif
#ifndef PY_LONG_LONG
  #define PY_LONG_LONG LONG_LONG
#endif
#ifndef Py_HUGE_VAL
  #define Py_HUGE_VAL HUGE_VAL
#endif
#ifdef PYPY_VERSION
  #define CYTHON_COMPILING_IN_PYPY 1
  #define CYTHON_COMPILING_IN_PYSTON 0
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #undef CYTHON_USE_TYPE_SLOTS
  #define CYTHON_USE_TYPE_SLOTS 0
  #undef CYTHON_USE_PYTYPE_LOOKUP
  #define CYTHON_USE_PYTYPE_LOOKUP 0
  #if PY_VERSION_HEX < 0x03050000
    #undef CYTHON_USE_ASYNC_SLOTS
    #define CYTHON_USE_ASYNC_SLOTS 0
  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
    #define CYTHON_USE_ASYNC_SLOTS 1
  #endif
  #undef CYTHON_USE_PYLIST_INTERNALS
  #define CYTHON_USE_PYLIST_INTERNALS 0
  #undef CYTHON_USE_UNICODE_INTERNALS
  #define CYTHON_USE_UNICODE_INTERNALS 0
  #undef CYTHON_USE_UNICODE_WRITER
  #define CYTHON_USE_UNICODE_WRITER 0
  #undef CYTHON_USE_PYLONG_INTERNALS
  #define CYTHON_USE_PYLONG_INTERNALS 0
  #undef CYTHON_AVOID_BORROWED_REFS
  #define CYTHON_AVOID_BORROWED_REFS 1
  #undef CYTHON_ASSUME_SAFE_MACROS
  #define CYTHON_ASSUME_SAFE_MACROS 0
  #undef CYTHON_UNPACK_METHODS
  #define CYTHON_UNPACK_METHODS 0
  #undef CYTHON_FAST_THREAD_STATE
  #define CYTHON_FAST_THREAD_STATE 0
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
  #undef CYTHON_PEP489_MULTI_PHASE_INIT
  #define CYTHON_PEP489_MULTI_PHASE_INIT 0
  #undef CYTHON_USE_TP_FINALIZE
  #define CYTHON_USE_TP_FINALIZE 0
  #undef CYTHON_USE_DICT_VERSIONS
  #define CYTHON_USE_DICT_VERSIONS 0
  #undef CYTHON_USE_EXC_INFO_STACK
  #define CYTHON_USE_EXC_INFO_STACK 0
  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
    #define CYTHON_UPDATE_DESCRIPTOR_DOC (PYPY_VERSION_HEX >= 0x07030900)
  #endif
#elif defined(PYSTON_VERSION)
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_PYSTON 1
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #ifndef CYTHON_USE_TYPE_SLOTS
    #define CYTHON_USE_TYPE_SLOTS 1
  #endif
  #undef CYTHON_USE_PYTYPE_LOOKUP
  #define CYTHON_USE_PYTYPE_LOOKUP 0
  #undef CYTHON_USE_ASYNC_SLOTS
  #define CYTHON_USE_ASYNC_SLOTS 0
  #undef CYTHON_USE_PYLIST_INTERNALS
  #define CYTHON_USE_PYLIST_INTERNALS 0
  #ifndef CYTHON_USE_UNICODE_INTERNALS
    #define CYTHON_USE_UNICODE_INTERNALS 1
  #endif
  #undef CYTHON_USE_UNICODE_WRITER
  #define CYTHON_USE_UNICODE_WRITER 0
  #undef CYTHON_USE_PYLONG_INTERNALS
  #define CYTHON_USE_PYLONG_INTERNALS 0
  #ifndef CYTHON_AVOID_BORROWED_REFS
    #define CYTHON_AVOID_BORROWED_REFS 0
  #endif
  #ifndef CYTHON_ASSUME_SAFE_MACROS
    #define CYTHON_ASSUME_SAFE_MACROS 1
  #endif
  #ifndef CYTHON_UNPACK_METHODS
    #define CYTHON_UNPACK_METHODS 1
  #endif
  #undef CYTHON_FAST_THREAD_STATE
  #define CYTHON_FAST_THREAD_STATE 0
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
  #undef CYTHON_PEP489_MULTI_PHASE_INIT
  #define CYTHON_PEP489_MULTI_PHASE_INIT 0
  #undef CYTHON_USE_TP_FINALIZE
  #define CYTHON_USE_TP_FINALIZE 0
  #undef CYTHON_USE_DICT_VERSIONS
  #define CYTHON_USE_DICT_VERSIONS 0
  #undef CYTHON_USE_EXC_INFO_STACK
  #define CYTHON_USE_EXC_INFO_STACK 0
  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
    #define CYTHON_UPDATE_DESCRIPTOR_DOC 0
  #endif
#else
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_PYSTON 0
  #define CYTHON_COMPILING_IN_CPYTHON 1
  #ifndef CYTHON_USE_TYPE_SLOTS
    #define CYTHON_USE_TYPE_SLOTS 1
  #endif
  #if PY_VERSION_HEX < 0x02070000
    #undef CYTHON_USE_PYTYPE_LOOKUP
    #define CYTHON_USE_PYTYPE_LOOKUP 0
  #elif !defined(CYTHON_USE_PYTYPE_LOOKUP)
    #define CYTHON_USE_PYTYPE_LOOKUP 1
  #endif
  #if PY_MAJOR_VERSION < 3
    #undef CYTHON_USE_ASYNC_SLOTS
    #define CYTHON_USE_ASYNC_SLOTS 0
  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
    #define CYTHON_USE_ASYNC_SLOTS 1
  #endif
  #if PY_VERSION_HEX < 0x02070000
    #undef CYTHON_USE_PYLONG_INTERNALS
    #define CYTHON_USE_PYLONG_INTERNALS 0
  #elif !defined(CYTHON_USE_PYLONG_INTERNALS)
    #define CYTHON_USE_PYLONG_INTERNALS 1
  #endif
  #ifndef CYTHON_USE_PYLIST_INTERNALS
    #define CYTHON_USE_PYLIST_INTERNALS 1
  #endif
  #ifndef CYTHON_USE_UNICODE_INTERNALS
    #define CYTHON_USE_UNICODE_INTERNALS 1
  #endif
  #if PY_VERSION_HEX < 0x030300F0 || PY_VERSION_HEX >= 0x030B00A2
    #undef CYTHON_USE_UNICODE_WRITER
    #define CYTHON_USE_UNICODE_WRITER 0
  #elif !defined(CYTHON_USE_UNICODE_WRITER)
    #define CYTHON_USE_UNICODE_WRITER 1
  #endif
  #ifndef CYTHON_AVOID_BORROWED_REFS
    #define CYTHON_AVOID_BORROWED_REFS 0
  #endif
  #ifndef CYTHON_ASSUME_SAFE_MACROS
    #define CYTHON_ASSUME_SAFE_MACROS 1
  #endif
  #ifndef CYTHON_UNPACK_METHODS
    #define CYTHON_UNPACK_METHODS 1
  #endif
  #if PY_VERSION_HEX >= 0x030B00A4
    #undef CYTHON_FAST_THREAD_STATE
    #define CYTHON_FAST_THREAD_STATE 0
  #elif !defined(CYTHON_FAST_THREAD_STATE)
    #define CYTHON_FAST_THREAD_STATE 1
  #endif
  #ifndef CYTHON_FAST_PYCALL
    #define CYTHON_FAST_PYCALL (PY_VERSION_HEX < 0x030A0000)
  #endif
  #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
    #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000)
  #endif
  #ifndef CYTHON_USE_TP_FINALIZE
    #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1)
  #endif
  #ifndef CYTHON_USE_DICT_VERSIONS
    #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX >= 0x030600B1)
  #endif
  #if PY_VERSION_HEX >= 0x030B00A4
    #undef CYTHON_USE_EXC_INFO_STACK
    #define CYTHON_USE_EXC_INFO_STACK 0
  #elif !defined(CYTHON_USE_EXC_INFO_STACK)
    #define CYTHON_USE_EXC_INFO_STACK (PY_VERSION_HEX >= 0x030700A3)
  #endif
  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
    #define CYTHON_UPDATE_DESCRIPTOR_DOC 1
  #endif
#endif
#if !defined(CYTHON_FAST_PYCCALL)
#define CYTHON_FAST_PYCCALL  (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
#endif
#if CYTHON_USE_PYLONG_INTERNALS
  #if PY_MAJOR_VERSION < 3
    #include "longintrepr.h"
  #endif
  #undef SHIFT
  #undef BASE
  #undef MASK
  #ifdef SIZEOF_VOID_P
    enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) };
  #endif
#endif
#ifndef __has_attribute
  #define __has_attribute(x) 0
#endif
#ifndef __has_cpp_attribute
  #define __has_cpp_attribute(x) 0
#endif
#ifndef CYTHON_RESTRICT
  #if defined(__GNUC__)
    #define CYTHON_RESTRICT __restrict__
  #elif defined(_MSC_VER) && _MSC_VER >= 1400
    #define CYTHON_RESTRICT __restrict
  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define CYTHON_RESTRICT restrict
  #else
    #define CYTHON_RESTRICT
  #endif
#endif
#ifndef CYTHON_UNUSED
# if defined(__GNUC__)
#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
#     define CYTHON_UNUSED __attribute__ ((__unused__))
#   else
#     define CYTHON_UNUSED
#   endif
# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
#   define CYTHON_UNUSED __attribute__ ((__unused__))
# else
#   define CYTHON_UNUSED
# endif
#endif
#ifndef CYTHON_MAYBE_UNUSED_VAR
#  if defined(__cplusplus)
     template<class T> void CYTHON_MAYBE_UNUSED_VAR( const T& ) { }
#  else
#    define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x)
#  endif
#endif
#ifndef CYTHON_NCP_UNUSED
# if CYTHON_COMPILING_IN_CPYTHON
#  define CYTHON_NCP_UNUSED
# else
#  define CYTHON_NCP_UNUSED CYTHON_UNUSED
# endif
#endif
#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
#ifdef _MSC_VER
    #ifndef _MSC_STDINT_H_
        #if _MSC_VER < 1300
           typedef unsigned char     uint8_t;
           typedef unsigned int      uint32_t;
        #else
           typedef unsigned __int8   uint8_t;
           typedef unsigned __int32  uint32_t;
        #endif
    #endif
#else
   #include <stdint.h>
#endif
#ifndef CYTHON_FALLTHROUGH
  #if defined(__cplusplus) && __cplusplus >= 201103L
    #if __has_cpp_attribute(fallthrough)
      #define CYTHON_FALLTHROUGH [[fallthrough]]
    #elif __has_cpp_attribute(clang::fallthrough)
      #define CYTHON_FALLTHROUGH [[clang::fallthrough]]
    #elif __has_cpp_attribute(gnu::fallthrough)
      #define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
    #endif
  #endif
  #ifndef CYTHON_FALLTHROUGH
    #if __has_attribute(fallthrough)
      #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
    #else
      #define CYTHON_FALLTHROUGH
    #endif
  #endif
  #if defined(__clang__ ) && defined(__apple_build_version__)
    #if __apple_build_version__ < 7000000
      #undef  CYTHON_FALLTHROUGH
      #define CYTHON_FALLTHROUGH
    #endif
  #endif
#endif

#ifndef CYTHON_INLINE
  #if defined(__clang__)
    #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
  #elif defined(__GNUC__)
    #define CYTHON_INLINE __inline__
  #elif defined(_MSC_VER)
    #define CYTHON_INLINE __inline
  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define CYTHON_INLINE inline
  #else
    #define CYTHON_INLINE
  #endif
#endif

#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
  #define Py_OptimizeFlag 0
#endif
#define __PYX_BUILD_PY_SSIZE_T "n"
#define CYTHON_FORMAT_SSIZE_T "z"
#if PY_MAJOR_VERSION < 3
  #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
          PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
  #define __Pyx_DefaultClassType PyClass_Type
#else
  #define __Pyx_BUILTIN_MODULE_NAME "builtins"
  #define __Pyx_DefaultClassType PyType_Type
#if PY_VERSION_HEX >= 0x030B00A1
    static CYTHON_INLINE PyCodeObject* __Pyx_PyCode_New(int a, int k, int l, int s, int f,
                                                    PyObject *code, PyObject *c, PyObject* n, PyObject *v,
                                                    PyObject *fv, PyObject *cell, PyObject* fn,
                                                    PyObject *name, int fline, PyObject *lnos) {
        PyObject *kwds=NULL, *argcount=NULL, *posonlyargcount=NULL, *kwonlyargcount=NULL;
        PyObject *nlocals=NULL, *stacksize=NULL, *flags=NULL, *replace=NULL, *call_result=NULL, *empty=NULL;
        const char *fn_cstr=NULL;
        const char *name_cstr=NULL;
        PyCodeObject* co=NULL;
        PyObject *type, *value, *traceback;
        PyErr_Fetch(&type, &value, &traceback);
        if (!(kwds=PyDict_New())) goto end;
        if (!(argcount=PyLong_FromLong(a))) goto end;
        if (PyDict_SetItemString(kwds, "co_argcount", argcount) != 0) goto end;
        if (!(posonlyargcount=PyLong_FromLong(0))) goto end;
        if (PyDict_SetItemString(kwds, "co_posonlyargcount", posonlyargcount) != 0) goto end;
        if (!(kwonlyargcount=PyLong_FromLong(k))) goto end;
        if (PyDict_SetItemString(kwds, "co_kwonlyargcount", kwonlyargcount) != 0) goto end;
        if (!(nlocals=PyLong_FromLong(l))) goto end;
        if (PyDict_SetItemString(kwds, "co_nlocals", nlocals) != 0) goto end;
        if (!(stacksize=PyLong_FromLong(s))) goto end;
        if (PyDict_SetItemString(kwds, "co_stacksize", stacksize) != 0) goto end;
        if (!(flags=PyLong_FromLong(f))) goto end;
        if (PyDict_SetItemString(kwds, "co_flags", flags) != 0) goto end;
        if (PyDict_SetItemString(kwds, "co_code", code) != 0) goto end;
        if (PyDict_SetItemString(kwds, "co_consts", c) != 0) goto end;
        if (PyDict_SetItemString(kwds, "co_names", n) != 0) goto end;
        if (PyDict_SetItemString(kwds, "co_varnames", v) != 0) goto end;
        if (PyDict_SetItemString(kwds, "co_freevars", fv) != 0) goto end;
        if (PyDict_SetItemString(kwds, "co_cellvars", cell) != 0) goto end;
        if (PyDict_SetItemString(kwds, "co_linetable", lnos) != 0) goto end;
        if (!(fn_cstr=PyUnicode_AsUTF8AndSize(fn, NULL))) goto end;
        if (!(name_cstr=PyUnicode_AsUTF8AndSize(name, NULL))) goto end;
        if (!(co = PyCode_NewEmpty(fn_cstr, name_cstr, fline))) goto end;
        if (!(replace = PyObject_GetAttrString((PyObject*)co, "replace"))) goto cleanup_code_too;
        if (!(empty = PyTuple_New(0))) goto cleanup_code_too; // unfortunately __pyx_empty_tuple isn't available here
        if (!(call_result = PyObject_Call(replace, empty, kwds))) goto cleanup_code_too;
        Py_XDECREF((PyObject*)co);
        co = (PyCodeObject*)call_result;
        call_result = NULL;
        if (0) {
            cleanup_code_too:
            Py_XDECREF((PyObject*)co);
            co = NULL;
        }
        end:
        Py_XDECREF(kwds);
        Py_XDECREF(argcount);
        Py_XDECREF(posonlyargcount);
        Py_XDECREF(kwonlyargcount);
        Py_XDECREF(nlocals);
        Py_XDECREF(stacksize);
        Py_XDECREF(replace);
        Py_XDECREF(call_result);
        Py_XDECREF(empty);
        if (type) {
            PyErr_Restore(type, value, traceback);
        }
        return co;
    }
#else
  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
          PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
#endif
  #define __Pyx_DefaultClassType PyType_Type
#endif
#ifndef Py_TPFLAGS_CHECKTYPES
  #define Py_TPFLAGS_CHECKTYPES 0
#endif
#ifndef Py_TPFLAGS_HAVE_INDEX
  #define Py_TPFLAGS_HAVE_INDEX 0
#endif
#ifndef Py_TPFLAGS_HAVE_NEWBUFFER
  #define Py_TPFLAGS_HAVE_NEWBUFFER 0
#endif
#ifndef Py_TPFLAGS_HAVE_FINALIZE
  #define Py_TPFLAGS_HAVE_FINALIZE 0
#endif
#ifndef METH_STACKLESS
  #define METH_STACKLESS 0
#endif
#if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL)
  #ifndef METH_FASTCALL
     #define METH_FASTCALL 0x80
  #endif
  typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs);
  typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args,
                                                          Py_ssize_t nargs, PyObject *kwnames);
#else
  #define __Pyx_PyCFunctionFast _PyCFunctionFast
  #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
#endif
#if CYTHON_FAST_PYCCALL
#define __Pyx_PyFastCFunction_Check(func)\
    ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)))))
#else
#define __Pyx_PyFastCFunction_Check(func) 0
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
  #define PyObject_Malloc(s)   PyMem_Malloc(s)
  #define PyObject_Free(p)     PyMem_Free(p)
  #define PyObject_Realloc(p)  PyMem_Realloc(p)
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030400A1
  #define PyMem_RawMalloc(n)           PyMem_Malloc(n)
  #define PyMem_RawRealloc(p, n)       PyMem_Realloc(p, n)
  #define PyMem_RawFree(p)             PyMem_Free(p)
#endif
#if CYTHON_COMPILING_IN_PYSTON
  #define __Pyx_PyCode_HasFreeVars(co)  PyCode_HasFreeVars(co)
  #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno)
#else
  #define __Pyx_PyCode_HasFreeVars(co)  (PyCode_GetNumFree(co) > 0)
  #define __Pyx_PyFrame_SetLineNumber(frame, lineno)  (frame)->f_lineno = (lineno)
#endif
#if !CYTHON_FAST_THREAD_STATE || PY_VERSION_HEX < 0x02070000
  #define __Pyx_PyThreadState_Current PyThreadState_GET()
#elif PY_VERSION_HEX >= 0x03060000
  #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
#elif PY_VERSION_HEX >= 0x03000000
  #define __Pyx_PyThreadState_Current PyThreadState_GET()
#else
  #define __Pyx_PyThreadState_Current _PyThreadState_Current
#endif
#if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT)
#include "pythread.h"
#define Py_tss_NEEDS_INIT 0
typedef int Py_tss_t;
static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) {
  *key = PyThread_create_key();
  return 0;
}
static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) {
  Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t));
  *key = Py_tss_NEEDS_INIT;
  return key;
}
static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) {
  PyObject_Free(key);
}
static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) {
  return *key != Py_tss_NEEDS_INIT;
}
static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) {
  PyThread_delete_key(*key);
  *key = Py_tss_NEEDS_INIT;
}
static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) {
  return PyThread_set_key_value(*key, value);
}
static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) {
  return PyThread_get_key_value(*key);
}
#endif
#if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized)
#define __Pyx_PyDict_NewPresized(n)  ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
#else
#define __Pyx_PyDict_NewPresized(n)  PyDict_New()
#endif
#if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION
  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_TrueDivide(x,y)
  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceTrueDivide(x,y)
#else
  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_Divide(x,y)
  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceDivide(x,y)
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && CYTHON_USE_UNICODE_INTERNALS
#define __Pyx_PyDict_GetItemStr(dict, name)  _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash)
#else
#define __Pyx_PyDict_GetItemStr(dict, name)  PyDict_GetItem(dict, name)
#endif
#if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
  #define CYTHON_PEP393_ENABLED 1
  #if defined(PyUnicode_IS_READY)
  #define __Pyx_PyUnicode_READY(op)       (likely(PyUnicode_IS_READY(op)) ?\
                                              0 : _PyUnicode_Ready((PyObject *)(op)))
  #else
  #define __Pyx_PyUnicode_READY(op)       (0)
  #endif
  #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_LENGTH(u)
  #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u)   PyUnicode_MAX_CHAR_VALUE(u)
  #define __Pyx_PyUnicode_KIND(u)         PyUnicode_KIND(u)
  #define __Pyx_PyUnicode_DATA(u)         PyUnicode_DATA(u)
  #define __Pyx_PyUnicode_READ(k, d, i)   PyUnicode_READ(k, d, i)
  #define __Pyx_PyUnicode_WRITE(k, d, i, ch)  PyUnicode_WRITE(k, d, i, ch)
  #if defined(PyUnicode_IS_READY) && defined(PyUnicode_GET_SIZE)
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000
  #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length))
  #else
  #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
  #endif
  #else
  #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != PyUnicode_GET_LENGTH(u))
  #endif
#else
  #define CYTHON_PEP393_ENABLED 0
  #define PyUnicode_1BYTE_KIND  1
  #define PyUnicode_2BYTE_KIND  2
  #define PyUnicode_4BYTE_KIND  4
  #define __Pyx_PyUnicode_READY(op)       (0)
  #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_SIZE(u)
  #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u)   ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111)
  #define __Pyx_PyUnicode_KIND(u)         (sizeof(Py_UNICODE))
  #define __Pyx_PyUnicode_DATA(u)         ((void*)PyUnicode_AS_UNICODE(u))
  #define __Pyx_PyUnicode_READ(k, d, i)   ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
  #define __Pyx_PyUnicode_WRITE(k, d, i, ch)  (((void)(k)), ((Py_UNICODE*)d)[i] = ch)
  #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != PyUnicode_GET_SIZE(u))
#endif
#if CYTHON_COMPILING_IN_PYPY
  #define __Pyx_PyUnicode_Concat(a, b)      PyNumber_Add(a, b)
  #define __Pyx_PyUnicode_ConcatSafe(a, b)  PyNumber_Add(a, b)
#else
  #define __Pyx_PyUnicode_Concat(a, b)      PyUnicode_Concat(a, b)
  #define __Pyx_PyUnicode_ConcatSafe(a, b)  ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
      PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains)
  #define PyUnicode_Contains(u, s)  PySequence_Contains(u, s)
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check)
  #define PyByteArray_Check(obj)  PyObject_TypeCheck(obj, &PyByteArray_Type)
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format)
  #define PyObject_Format(obj, fmt)  PyObject_CallMethod(obj, "__format__", "O", fmt)
#endif
#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))
#define __Pyx_PyUnicode_FormatSafe(a, b)  ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyString_Format(a, b)  PyUnicode_Format(a, b)
#else
  #define __Pyx_PyString_Format(a, b)  PyString_Format(a, b)
#endif
#if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
  #define PyObject_ASCII(o)            PyObject_Repr(o)
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyBaseString_Type            PyUnicode_Type
  #define PyStringObject               PyUnicodeObject
  #define PyString_Type                PyUnicode_Type
  #define PyString_Check               PyUnicode_Check
  #define PyString_CheckExact          PyUnicode_CheckExact
#ifndef PyObject_Unicode
  #define PyObject_Unicode             PyObject_Str
#endif
#endif
#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
  #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
#else
  #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
  #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
#endif
#ifndef PySet_CheckExact
  #define PySet_CheckExact(obj)        (Py_TYPE(obj) == &PySet_Type)
#endif
#if PY_VERSION_HEX >= 0x030900A4
  #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt)
  #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size)
#else
  #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt)
  #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size)
#endif
#if CYTHON_ASSUME_SAFE_MACROS
  #define __Pyx_PySequence_SIZE(seq)  Py_SIZE(seq)
#else
  #define __Pyx_PySequence_SIZE(seq)  PySequence_Size(seq)
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyIntObject                  PyLongObject
  #define PyInt_Type                   PyLong_Type
  #define PyInt_Check(op)              PyLong_Check(op)
  #define PyInt_CheckExact(op)         PyLong_CheckExact(op)
  #define PyInt_FromString             PyLong_FromString
  #define PyInt_FromUnicode            PyLong_FromUnicode
  #define PyInt_FromLong               PyLong_FromLong
  #define PyInt_FromSize_t             PyLong_FromSize_t
  #define PyInt_FromSsize_t            PyLong_FromSsize_t
  #define PyInt_AsLong                 PyLong_AsLong
  #define PyInt_AS_LONG                PyLong_AS_LONG
  #define PyInt_AsSsize_t              PyLong_AsSsize_t
  #define PyInt_AsUnsignedLongMask     PyLong_AsUnsignedLongMask
  #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
  #define PyNumber_Int                 PyNumber_Long
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyBoolObject                 PyLongObject
#endif
#if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
  #ifndef PyUnicode_InternFromString
    #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
  #endif
#endif
#if PY_VERSION_HEX < 0x030200A4
  typedef long Py_hash_t;
  #define __Pyx_PyInt_FromHash_t PyInt_FromLong
  #define __Pyx_PyInt_AsHash_t   __Pyx_PyIndex_AsHash_t
#else
  #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
  #define __Pyx_PyInt_AsHash_t   __Pyx_PyIndex_AsSsize_t
#endif
#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyMethod_New(func, self, klass) ((self) ? ((void)(klass), PyMethod_New(func, self)) : __Pyx_NewRef(func))
#else
  #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
#endif
#if CYTHON_USE_ASYNC_SLOTS
  #if PY_VERSION_HEX >= 0x030500B1
    #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
    #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
  #else
    #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
  #endif
#else
  #define __Pyx_PyType_AsAsync(obj) NULL
#endif
#ifndef __Pyx_PyAsyncMethodsStruct
    typedef struct {
        unaryfunc am_await;
        unaryfunc am_aiter;
        unaryfunc am_anext;
    } __Pyx_PyAsyncMethodsStruct;
#endif

#if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)
  #if !defined(_USE_MATH_DEFINES)
    #define _USE_MATH_DEFINES
  #endif
#endif
#include <math.h>
#ifdef NAN
#define __PYX_NAN() ((float) NAN)
#else
static CYTHON_INLINE float __PYX_NAN() {
  float value;
  memset(&value, 0xFF, sizeof(value));
  return value;
}
#endif
#if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
#define __Pyx_truncl trunc
#else
#define __Pyx_truncl truncl
#endif

#define __PYX_MARK_ERR_POS(f_index, lineno) \
    { __pyx_filename = __pyx_f[f_index]; (void)__pyx_filename; __pyx_lineno = lineno; (void)__pyx_lineno; __pyx_clineno = __LINE__; (void)__pyx_clineno; }
#define __PYX_ERR(f_index, lineno, Ln_error) \
    { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; }

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

#define __PYX_HAVE___marching_cubes_lewiner_cy
#define __PYX_HAVE_API___marching_cubes_lewiner_cy
/* Early includes */
#include <string.h>
#include <stdio.h>
#include "numpy/arrayobject.h"
#include "numpy/ndarrayobject.h"
#include "numpy/ndarraytypes.h"
#include "numpy/arrayscalars.h"
#include "numpy/ufuncobject.h"

    /* NumPy API declarations from "numpy/__init__.pxd" */
    
#include <stdlib.h>
#include "pythread.h"
#include "pystate.h"
#ifdef _OPENMP
#include <omp.h>
#endif /* _OPENMP */

#if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)
#define CYTHON_WITHOUT_ASSERTIONS
#endif

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

#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
#define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0
#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8)
#define __PYX_DEFAULT_STRING_ENCODING ""
#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
#define __Pyx_uchar_cast(c) ((unsigned char)c)
#define __Pyx_long_cast(x) ((long)x)
#define __Pyx_fits_Py_ssize_t(v, type, is_signed)  (\
    (sizeof(type) < sizeof(Py_ssize_t))  ||\
    (sizeof(type) > sizeof(Py_ssize_t) &&\
          likely(v < (type)PY_SSIZE_T_MAX ||\
                 v == (type)PY_SSIZE_T_MAX)  &&\
          (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
                                v == (type)PY_SSIZE_T_MIN)))  ||\
    (sizeof(type) == sizeof(Py_ssize_t) &&\
          (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
                               v == (type)PY_SSIZE_T_MAX)))  )
static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) {
    return (size_t) i < (size_t) limit;
}
#if defined (__cplusplus) && __cplusplus >= 201103L
    #include <cstdlib>
    #define __Pyx_sst_abs(value) std::abs(value)
#elif SIZEOF_INT >= SIZEOF_SIZE_T
    #define __Pyx_sst_abs(value) abs(value)
#elif SIZEOF_LONG >= SIZEOF_SIZE_T
    #define __Pyx_sst_abs(value) labs(value)
#elif defined (_MSC_VER)
    #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))
#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define __Pyx_sst_abs(value) llabs(value)
#elif defined (__GNUC__)
    #define __Pyx_sst_abs(value) __builtin_llabs(value)
#else
    #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
#endif
static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*);
static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
#define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
#define __Pyx_PyBytes_FromString        PyBytes_FromString
#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
#if PY_MAJOR_VERSION < 3
    #define __Pyx_PyStr_FromString        __Pyx_PyBytes_FromString
    #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
#else
    #define __Pyx_PyStr_FromString        __Pyx_PyUnicode_FromString
    #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
#endif
#define __Pyx_PyBytes_AsWritableString(s)     ((char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsWritableSString(s)    ((signed char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsWritableUString(s)    ((unsigned char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsString(s)     ((const char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsSString(s)    ((const signed char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsUString(s)    ((const unsigned char*) PyBytes_AS_STRING(s))
#define __Pyx_PyObject_AsWritableString(s)    ((char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsWritableSString(s)    ((signed char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsWritableUString(s)    ((unsigned char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsSString(s)    ((const signed char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsUString(s)    ((const unsigned char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_FromCString(s)  __Pyx_PyObject_FromString((const char*)s)
#define __Pyx_PyBytes_FromCString(s)   __Pyx_PyBytes_FromString((const char*)s)
#define __Pyx_PyByteArray_FromCString(s)   __Pyx_PyByteArray_FromString((const char*)s)
#define __Pyx_PyStr_FromCString(s)     __Pyx_PyStr_FromString((const char*)s)
#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) {
    const Py_UNICODE *u_end = u;
    while (*u_end++) ;
    return (size_t)(u_end - u - 1);
}
#define __Pyx_PyUnicode_FromUnicode(u)       PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
#define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
#define __Pyx_PyUnicode_AsUnicode            PyUnicode_AsUnicode
#define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
#define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b);
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*);
static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
#define __Pyx_PySequence_Tuple(obj)\
    (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*);
#if CYTHON_ASSUME_SAFE_MACROS
#define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
#else
#define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
#endif
#define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
#if PY_MAJOR_VERSION >= 3
#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
#else
#define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
#endif
#define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(x))
#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
static int __Pyx_sys_getdefaultencoding_not_ascii;
static int __Pyx_init_sys_getdefaultencoding_params(void) {
    PyObject* sys;
    PyObject* default_encoding = NULL;
    PyObject* ascii_chars_u = NULL;
    PyObject* ascii_chars_b = NULL;
    const char* default_encoding_c;
    sys = PyImport_ImportModule("sys");
    if (!sys) goto bad;
    default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);
    Py_DECREF(sys);
    if (!default_encoding) goto bad;
    default_encoding_c = PyBytes_AsString(default_encoding);
    if (!default_encoding_c) goto bad;
    if (strcmp(default_encoding_c, "ascii") == 0) {
        __Pyx_sys_getdefaultencoding_not_ascii = 0;
    } else {
        char ascii_chars[128];
        int c;
        for (c = 0; c < 128; c++) {
            ascii_chars[c] = c;
        }
        __Pyx_sys_getdefaultencoding_not_ascii = 1;
        ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
        if (!ascii_chars_u) goto bad;
        ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
        if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
            PyErr_Format(
                PyExc_ValueError,
                "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
                default_encoding_c);
            goto bad;
        }
        Py_DECREF(ascii_chars_u);
        Py_DECREF(ascii_chars_b);
    }
    Py_DECREF(default_encoding);
    return 0;
bad:
    Py_XDECREF(default_encoding);
    Py_XDECREF(ascii_chars_u);
    Py_XDECREF(ascii_chars_b);
    return -1;
}
#endif
#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
#else
#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
static char* __PYX_DEFAULT_STRING_ENCODING;
static int __Pyx_init_sys_getdefaultencoding_params(void) {
    PyObject* sys;
    PyObject* default_encoding = NULL;
    char* default_encoding_c;
    sys = PyImport_ImportModule("sys");
    if (!sys) goto bad;
    default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
    Py_DECREF(sys);
    if (!default_encoding) goto bad;
    default_encoding_c = PyBytes_AsString(default_encoding);
    if (!default_encoding_c) goto bad;
    __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1);
    if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
    strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
    Py_DECREF(default_encoding);
    return 0;
bad:
    Py_XDECREF(default_encoding);
    return -1;
}
#endif
#endif


/* Test for GCC > 2.95 */
#if defined(__GNUC__)     && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
  #define likely(x)   __builtin_expect(!!(x), 1)
  #define unlikely(x) __builtin_expect(!!(x), 0)
#else /* !__GNUC__ or GCC < 2.95 */
  #define likely(x)   (x)
  #define unlikely(x) (x)
#endif /* __GNUC__ */
static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }

static PyObject *__pyx_m = NULL;
static PyObject *__pyx_d;
static PyObject *__pyx_b;
static PyObject *__pyx_cython_runtime = NULL;
static PyObject *__pyx_empty_tuple;
static PyObject *__pyx_empty_bytes;
static PyObject *__pyx_empty_unicode;
static int __pyx_lineno;
static int __pyx_clineno = 0;
static const char * __pyx_cfilenm= __FILE__;
static const char *__pyx_filename;

/* Header.proto */
#if !defined(CYTHON_CCOMPLEX)
  #if defined(__cplusplus)
    #define CYTHON_CCOMPLEX 1
  #elif defined(_Complex_I)
    #define CYTHON_CCOMPLEX 1
  #else
    #define CYTHON_CCOMPLEX 0
  #endif
#endif
#if CYTHON_CCOMPLEX
  #ifdef __cplusplus
    #include <complex>
  #else
    #include <complex.h>
  #endif
#endif
#if CYTHON_CCOMPLEX && !defined(__cplusplus) && defined(__sun__) && defined(__GNUC__)
  #undef _Complex_I
  #define _Complex_I 1.0fj
#endif


static const char *__pyx_f[] = {
  "_marching_cubes_lewiner_cy.pyx",
  "stringsource",
  "__init__.pxd",
  "type.pxd",
};
/* MemviewSliceStruct.proto */
struct __pyx_memoryview_obj;
typedef struct {
  struct __pyx_memoryview_obj *memview;
  char *data;
  Py_ssize_t shape[8];
  Py_ssize_t strides[8];
  Py_ssize_t suboffsets[8];
} __Pyx_memviewslice;
#define __Pyx_MemoryView_Len(m)  (m.shape[0])

/* Atomics.proto */
#include <pythread.h>
#ifndef CYTHON_ATOMICS
    #define CYTHON_ATOMICS 1
#endif
#define __pyx_atomic_int_type int
#if CYTHON_ATOMICS && __GNUC__ >= 4 && (__GNUC_MINOR__ > 1 ||\
                    (__GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL >= 2)) &&\
                    !defined(__i386__)
    #define __pyx_atomic_incr_aligned(value, lock) __sync_fetch_and_add(value, 1)
    #define __pyx_atomic_decr_aligned(value, lock) __sync_fetch_and_sub(value, 1)
    #ifdef __PYX_DEBUG_ATOMICS
        #warning "Using GNU atomics"
    #endif
#elif CYTHON_ATOMICS && defined(_MSC_VER) && 0
    #include <Windows.h>
    #undef __pyx_atomic_int_type
    #define __pyx_atomic_int_type LONG
    #define __pyx_atomic_incr_aligned(value, lock) InterlockedIncrement(value)
    #define __pyx_atomic_decr_aligned(value, lock) InterlockedDecrement(value)
    #ifdef __PYX_DEBUG_ATOMICS
        #pragma message ("Using MSVC atomics")
    #endif
#elif CYTHON_ATOMICS && (defined(__ICC) || defined(__INTEL_COMPILER)) && 0
    #define __pyx_atomic_incr_aligned(value, lock) _InterlockedIncrement(value)
    #define __pyx_atomic_decr_aligned(value, lock) _InterlockedDecrement(value)
    #ifdef __PYX_DEBUG_ATOMICS
        #warning "Using Intel atomics"
    #endif
#else
    #undef CYTHON_ATOMICS
    #define CYTHON_ATOMICS 0
    #ifdef __PYX_DEBUG_ATOMICS
        #warning "Not using atomics"
    #endif
#endif
typedef volatile __pyx_atomic_int_type __pyx_atomic_int;
#if CYTHON_ATOMICS
    #define __pyx_add_acquisition_count(memview)\
             __pyx_atomic_incr_aligned(__pyx_get_slice_count_pointer(memview), memview->lock)
    #define __pyx_sub_acquisition_count(memview)\
            __pyx_atomic_decr_aligned(__pyx_get_slice_count_pointer(memview), memview->lock)
#else
    #define __pyx_add_acquisition_count(memview)\
            __pyx_add_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock)
    #define __pyx_sub_acquisition_count(memview)\
            __pyx_sub_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock)
#endif

/* BufferFormatStructs.proto */
#define IS_UNSIGNED(type) (((type) -1) > 0)
struct __Pyx_StructField_;
#define __PYX_BUF_FLAGS_PACKED_STRUCT (1 << 0)
typedef struct {
  const char* name;
  struct __Pyx_StructField_* fields;
  size_t size;
  size_t arraysize[8];
  int ndim;
  char typegroup;
  char is_unsigned;
  int flags;
} __Pyx_TypeInfo;
typedef struct __Pyx_StructField_ {
  __Pyx_TypeInfo* type;
  const char* name;
  size_t offset;
} __Pyx_StructField;
typedef struct {
  __Pyx_StructField* field;
  size_t parent_offset;
} __Pyx_BufFmt_StackElem;
typedef struct {
  __Pyx_StructField root;
  __Pyx_BufFmt_StackElem* head;
  size_t fmt_offset;
  size_t new_count, enc_count;
  size_t struct_alignment;
  int is_complex;
  char enc_type;
  char new_packmode;
  char enc_packmode;
  char is_valid_array;
} __Pyx_BufFmt_Context;

/* ForceInitThreads.proto */
#ifndef __PYX_FORCE_INIT_THREADS
  #define __PYX_FORCE_INIT_THREADS 0
#endif

/* NoFastGil.proto */
#define __Pyx_PyGILState_Ensure PyGILState_Ensure
#define __Pyx_PyGILState_Release PyGILState_Release
#define __Pyx_FastGIL_Remember()
#define __Pyx_FastGIL_Forget()
#define __Pyx_FastGilFuncInit()


/* "../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd":690
 * # in Cython to enable them only on the right systems.
 * 
 * ctypedef npy_int8       int8_t             # <<<<<<<<<<<<<<
 * ctypedef npy_int16      int16_t
 * ctypedef npy_int32      int32_t
 */
typedef npy_int8 __pyx_t_5numpy_int8_t;

/* "../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd":691
 * 
 * ctypedef npy_int8       int8_t
 * ctypedef npy_int16      int16_t             # <<<<<<<<<<<<<<
 * ctypedef npy_int32      int32_t
 * ctypedef npy_int64      int64_t
 */
typedef npy_int16 __pyx_t_5numpy_int16_t;

/* "../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd":692
 * ctypedef npy_int8       int8_t
 * ctypedef npy_int16      int16_t
 * ctypedef npy_int32      int32_t             # <<<<<<<<<<<<<<
 * ctypedef npy_int64      int64_t
 * #ctypedef npy_int96      int96_t
 */
typedef npy_int32 __pyx_t_5numpy_int32_t;

/* "../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd":693
 * ctypedef npy_int16      int16_t
 * ctypedef npy_int32      int32_t
 * ctypedef npy_int64      int64_t             # <<<<<<<<<<<<<<
 * #ctypedef npy_int96      int96_t
 * #ctypedef npy_int128     int128_t
 */
typedef npy_int64 __pyx_t_5numpy_int64_t;

/* "../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd":697
 * #ctypedef npy_int128     int128_t
 * 
 * ctypedef npy_uint8      uint8_t             # <<<<<<<<<<<<<<
 * ctypedef npy_uint16     uint16_t
 * ctypedef npy_uint32     uint32_t
 */
typedef npy_uint8 __pyx_t_5numpy_uint8_t;

/* "../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd":698
 * 
 * ctypedef npy_uint8      uint8_t
 * ctypedef npy_uint16     uint16_t             # <<<<<<<<<<<<<<
 * ctypedef npy_uint32     uint32_t
 * ctypedef npy_uint64     uint64_t
 */
typedef npy_uint16 __pyx_t_5numpy_uint16_t;

/* "../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd":699
 * ctypedef npy_uint8      uint8_t
 * ctypedef npy_uint16     uint16_t
 * ctypedef npy_uint32     uint32_t             # <<<<<<<<<<<<<<
 * ctypedef npy_uint64     uint64_t
 * #ctypedef npy_uint96     uint96_t
 */
typedef npy_uint32 __pyx_t_5numpy_uint32_t;

/* "../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd":700
 * ctypedef npy_uint16     uint16_t
 * ctypedef npy_uint32     uint32_t
 * ctypedef npy_uint64     uint64_t             # <<<<<<<<<<<<<<
 * #ctypedef npy_uint96     uint96_t
 * #ctypedef npy_uint128    uint128_t
 */
typedef npy_uint64 __pyx_t_5numpy_uint64_t;

/* "../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd":704
 * #ctypedef npy_uint128    uint128_t
 * 
 * ctypedef npy_float32    float32_t             # <<<<<<<<<<<<<<
 * ctypedef npy_float64    float64_t
 * #ctypedef npy_float80    float80_t
 */
typedef npy_float32 __pyx_t_5numpy_float32_t;

/* "../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd":705
 * 
 * ctypedef npy_float32    float32_t
 * ctypedef npy_float64    float64_t             # <<<<<<<<<<<<<<
 * #ctypedef npy_float80    float80_t
 * #ctypedef npy_float128   float128_t
 */
typedef npy_float64 __pyx_t_5numpy_float64_t;

/* "../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd":714
 * # The int types are mapped a bit surprising --
 * # numpy.int corresponds to 'l' and numpy.long to 'q'
 * ctypedef npy_long       int_t             # <<<<<<<<<<<<<<
 * ctypedef npy_longlong   long_t
 * ctypedef npy_longlong   longlong_t
 */
typedef npy_long __pyx_t_5numpy_int_t;

/* "../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd":715
 * # numpy.int corresponds to 'l' and numpy.long to 'q'
 * ctypedef npy_long       int_t
 * ctypedef npy_longlong   long_t             # <<<<<<<<<<<<<<
 * ctypedef npy_longlong   longlong_t
 * 
 */
typedef npy_longlong __pyx_t_5numpy_long_t;

/* "../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd":716
 * ctypedef npy_long       int_t
 * ctypedef npy_longlong   long_t
 * ctypedef npy_longlong   longlong_t             # <<<<<<<<<<<<<<
 * 
 * ctypedef npy_ulong      uint_t
 */
typedef npy_longlong __pyx_t_5numpy_longlong_t;

/* "../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd":718
 * ctypedef npy_longlong   longlong_t
 * 
 * ctypedef npy_ulong      uint_t             # <<<<<<<<<<<<<<
 * ctypedef npy_ulonglong  ulong_t
 * ctypedef npy_ulonglong  ulonglong_t
 */
typedef npy_ulong __pyx_t_5numpy_uint_t;

/* "../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd":719
 * 
 * ctypedef npy_ulong      uint_t
 * ctypedef npy_ulonglong  ulong_t             # <<<<<<<<<<<<<<
 * ctypedef npy_ulonglong  ulonglong_t
 * 
 */
typedef npy_ulonglong __pyx_t_5numpy_ulong_t;

/* "../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd":720
 * ctypedef npy_ulong      uint_t
 * ctypedef npy_ulonglong  ulong_t
 * ctypedef npy_ulonglong  ulonglong_t             # <<<<<<<<<<<<<<
 * 
 * ctypedef npy_intp       intp_t
 */
typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t;

/* "../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd":722
 * ctypedef npy_ulonglong  ulonglong_t
 * 
 * ctypedef npy_intp       intp_t             # <<<<<<<<<<<<<<
 * ctypedef npy_uintp      uintp_t
 * 
 */
typedef npy_intp __pyx_t_5numpy_intp_t;

/* "../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd":723
 * 
 * ctypedef npy_intp       intp_t
 * ctypedef npy_uintp      uintp_t             # <<<<<<<<<<<<<<
 * 
 * ctypedef npy_double     float_t
 */
typedef npy_uintp __pyx_t_5numpy_uintp_t;

/* "../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd":725
 * ctypedef npy_uintp      uintp_t
 * 
 * ctypedef npy_double     float_t             # <<<<<<<<<<<<<<
 * ctypedef npy_double     double_t
 * ctypedef npy_longdouble longdouble_t
 */
typedef npy_double __pyx_t_5numpy_float_t;

/* "../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd":726
 * 
 * ctypedef npy_double     float_t
 * ctypedef npy_double     double_t             # <<<<<<<<<<<<<<
 * ctypedef npy_longdouble longdouble_t
 * 
 */
typedef npy_double __pyx_t_5numpy_double_t;

/* "../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd":727
 * ctypedef npy_double     float_t
 * ctypedef npy_double     double_t
 * ctypedef npy_longdouble longdouble_t             # <<<<<<<<<<<<<<
 * 
 * ctypedef npy_cfloat      cfloat_t
 */
typedef npy_longdouble __pyx_t_5numpy_longdouble_t;
/* Declarations.proto */
#if CYTHON_CCOMPLEX
  #ifdef __cplusplus
    typedef ::std::complex< float > __pyx_t_float_complex;
  #else
    typedef float _Complex __pyx_t_float_complex;
  #endif
#else
    typedef struct { float real, imag; } __pyx_t_float_complex;
#endif
static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float, float);

/* Declarations.proto */
#if CYTHON_CCOMPLEX
  #ifdef __cplusplus
    typedef ::std::complex< double > __pyx_t_double_complex;
  #else
    typedef double _Complex __pyx_t_double_complex;
  #endif
#else
    typedef struct { double real, imag; } __pyx_t_double_complex;
#endif
static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double, double);


/*--- Type declarations ---*/
struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell;
struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut;
struct __pyx_obj_26_marching_cubes_lewiner_cy_LutProvider;
struct __pyx_array_obj;
struct __pyx_MemviewEnum_obj;
struct __pyx_memoryview_obj;
struct __pyx_memoryviewslice_obj;

/* "../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd":729
 * ctypedef npy_longdouble longdouble_t
 * 
 * ctypedef npy_cfloat      cfloat_t             # <<<<<<<<<<<<<<
 * ctypedef npy_cdouble     cdouble_t
 * ctypedef npy_clongdouble clongdouble_t
 */
typedef npy_cfloat __pyx_t_5numpy_cfloat_t;

/* "../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd":730
 * 
 * ctypedef npy_cfloat      cfloat_t
 * ctypedef npy_cdouble     cdouble_t             # <<<<<<<<<<<<<<
 * ctypedef npy_clongdouble clongdouble_t
 * 
 */
typedef npy_cdouble __pyx_t_5numpy_cdouble_t;

/* "../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd":731
 * ctypedef npy_cfloat      cfloat_t
 * ctypedef npy_cdouble     cdouble_t
 * ctypedef npy_clongdouble clongdouble_t             # <<<<<<<<<<<<<<
 * 
 * ctypedef npy_cdouble     complex_t
 */
typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t;

/* "../../../../../data/liuyutao/anaconda3/envs/neus/lib/python3.8/site-packages/numpy/__init__.pxd":733
 * ctypedef npy_clongdouble clongdouble_t
 * 
 * ctypedef npy_cdouble     complex_t             # <<<<<<<<<<<<<<
 * 
 * cdef inline object PyArray_MultiIterNew1(a):
 */
typedef npy_cdouble __pyx_t_5numpy_complex_t;

/* "_marching_cubes_lewiner_cy.pyx":83
 * 
 * 
 * cdef class Cell:             # <<<<<<<<<<<<<<
 *     """ Class to keep track of some stuff during the whole cube marching
 *     procedure.
 */
struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell {
  PyObject_HEAD
  struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *__pyx_vtab;
  struct __pyx_obj_26_marching_cubes_lewiner_cy_LutProvider *luts;
  int x;
  int y;
  int z;
  int step;
  double v0;
  double v1;
  double v2;
  double v3;
  double v4;
  double v5;
  double v6;
  double v7;
  double *vv;
  double *vg;
  double vmax;
  double v12_x;
  double v12_y;
  double v12_z;
  double v12_xg;
  double v12_yg;
  double v12_zg;
  int v12_calculated;
  int index;
  int nx;
  int ny;
  int nz;
  int *faceLayer;
  int *faceLayer1;
  int *faceLayer2;
  float *_vertices;
  float *_normals;
  float *_values;
  int _vertexCount;
  int _vertexMaxCount;
  int *_faces;
  int _faceCount;
  int _faceMaxCount;
};


/* "_marching_cubes_lewiner_cy.pyx":747
 * 
 * 
 * cdef class Lut:             # <<<<<<<<<<<<<<
 *     """ Representation of a lookup table.
 *     The tables are initially defined as numpy arrays. On initialization,
 */
struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut {
  PyObject_HEAD
  struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Lut *__pyx_vtab;
  signed char *VALUES;
  int L0;
  int L1;
  int L2;
};


/* "_marching_cubes_lewiner_cy.pyx":799
 * 
 * 
 * cdef class LutProvider:             # <<<<<<<<<<<<<<
 *     """ Class that provides a common interface to the many lookup tables
 *     used by the algorithm.
 */
struct __pyx_obj_26_marching_cubes_lewiner_cy_LutProvider {
  PyObject_HEAD
  struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *EDGESRELX;
  struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *EDGESRELY;
  struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *EDGESRELZ;
  struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *CASESCLASSIC;
  struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *CASES;
  struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *TILING1;
  struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *TILING2;
  struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *TILING3_1;
  struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *TILING3_2;
  struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *TILING4_1;
  struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *TILING4_2;
  struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *TILING5;
  struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *TILING6_1_1;
  struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *TILING6_1_2;
  struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *TILING6_2;
  struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *TILING7_1;
  struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *TILING7_2;
  struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *TILING7_3;
  struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *TILING7_4_1;
  struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *TILING7_4_2;
  struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *TILING8;
  struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *TILING9;
  struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *TILING10_1_1;
  struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *TILING10_1_1_;
  struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *TILING10_1_2;
  struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *TILING10_2;
  struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *TILING10_2_;
  struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *TILING11;
  struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *TILING12_1_1;
  struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *TILING12_1_1_;
  struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *TILING12_1_2;
  struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *TILING12_2;
  struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *TILING12_2_;
  struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *TILING13_1;
  struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *TILING13_1_;
  struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *TILING13_2;
  struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *TILING13_2_;
  struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *TILING13_3;
  struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *TILING13_3_;
  struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *TILING13_4;
  struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *TILING13_5_1;
  struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *TILING13_5_2;
  struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *TILING14;
  struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *TEST3;
  struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *TEST4;
  struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *TEST6;
  struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *TEST7;
  struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *TEST10;
  struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *TEST12;
  struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *TEST13;
  struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *SUBCONFIG13;
};


/* "View.MemoryView":105
 * 
 * @cname("__pyx_array")
 * cdef class array:             # <<<<<<<<<<<<<<
 * 
 *     cdef:
 */
struct __pyx_array_obj {
  PyObject_HEAD
  struct __pyx_vtabstruct_array *__pyx_vtab;
  char *data;
  Py_ssize_t len;
  char *format;
  int ndim;
  Py_ssize_t *_shape;
  Py_ssize_t *_strides;
  Py_ssize_t itemsize;
  PyObject *mode;
  PyObject *_format;
  void (*callback_free_data)(void *);
  int free_data;
  int dtype_is_object;
};


/* "View.MemoryView":279
 * 
 * @cname('__pyx_MemviewEnum')
 * cdef class Enum(object):             # <<<<<<<<<<<<<<
 *     cdef object name
 *     def __init__(self, name):
 */
struct __pyx_MemviewEnum_obj {
  PyObject_HEAD
  PyObject *name;
};


/* "View.MemoryView":330
 * 
 * @cname('__pyx_memoryview')
 * cdef class memoryview(object):             # <<<<<<<<<<<<<<
 * 
 *     cdef object obj
 */
struct __pyx_memoryview_obj {
  PyObject_HEAD
  struct __pyx_vtabstruct_memoryview *__pyx_vtab;
  PyObject *obj;
  PyObject *_size;
  PyObject *_array_interface;
  PyThread_type_lock lock;
  __pyx_atomic_int acquisition_count[2];
  __pyx_atomic_int *acquisition_count_aligned_p;
  Py_buffer view;
  int flags;
  int dtype_is_object;
  __Pyx_TypeInfo *typeinfo;
};


/* "View.MemoryView":965
 * 
 * @cname('__pyx_memoryviewslice')
 * cdef class _memoryviewslice(memoryview):             # <<<<<<<<<<<<<<
 *     "Internal class for passing memoryview slices to Python"
 * 
 */
struct __pyx_memoryviewslice_obj {
  struct __pyx_memoryview_obj __pyx_base;
  __Pyx_memviewslice from_slice;
  PyObject *from_object;
  PyObject *(*to_object_func)(char *);
  int (*to_dtype_func)(char *, PyObject *);
};



/* "_marching_cubes_lewiner_cy.pyx":83
 * 
 * 
 * cdef class Cell:             # <<<<<<<<<<<<<<
 *     """ Class to keep track of some stuff during the whole cube marching
 *     procedure.
 */

struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell {
  void (*_increase_size_vertices)(struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *);
  void (*_increase_size_faces)(struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *);
  int (*add_vertex)(struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *, float, float, float);
  void (*add_gradient)(struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *, int, float, float, float);
  void (*add_gradient_from_index)(struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *, int, int, float);
  PyObject *(*add_face)(struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *, int);
  void (*new_z_value)(struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *);
  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);
  void (*add_triangles)(struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *, struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *, int, int);
  void (*add_triangles2)(struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *, struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *, int, int, int);
  void (*_add_face_from_edge_index)(struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *, int);
  int (*get_index_in_facelayer)(struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *, int);
  void (*prepare_for_adding_triangles)(struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *);
  void (*calculate_center_vertex)(struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *);
};
static struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell *__pyx_vtabptr_26_marching_cubes_lewiner_cy_Cell;


/* "_marching_cubes_lewiner_cy.pyx":747
 * 
 * 
 * cdef class Lut:             # <<<<<<<<<<<<<<
 *     """ Representation of a lookup table.
 *     The tables are initially defined as numpy arrays. On initialization,
 */

struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Lut {
  int (*get1)(struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *, int);
  int (*get2)(struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *, int, int);
  int (*get3)(struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *, int, int, int);
};
static struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Lut *__pyx_vtabptr_26_marching_cubes_lewiner_cy_Lut;


/* "View.MemoryView":105
 * 
 * @cname("__pyx_array")
 * cdef class array:             # <<<<<<<<<<<<<<
 * 
 *     cdef:
 */

struct __pyx_vtabstruct_array {
  PyObject *(*get_memview)(struct __pyx_array_obj *);
};
static struct __pyx_vtabstruct_array *__pyx_vtabptr_array;


/* "View.MemoryView":330
 * 
 * @cname('__pyx_memoryview')
 * cdef class memoryview(object):             # <<<<<<<<<<<<<<
 * 
 *     cdef object obj
 */

struct __pyx_vtabstruct_memoryview {
  char *(*get_item_pointer)(struct __pyx_memoryview_obj *, PyObject *);
  PyObject *(*is_slice)(struct __pyx_memoryview_obj *, PyObject *);
  PyObject *(*setitem_slice_assignment)(struct __pyx_memoryview_obj *, PyObject *, PyObject *);
  PyObject *(*setitem_slice_assign_scalar)(struct __pyx_memoryview_obj *, struct __pyx_memoryview_obj *, PyObject *);
  PyObject *(*setitem_indexed)(struct __pyx_memoryview_obj *, PyObject *, PyObject *);
  PyObject *(*convert_item_to_object)(struct __pyx_memoryview_obj *, char *);
  PyObject *(*assign_item_from_object)(struct __pyx_memoryview_obj *, char *, PyObject *);
};
static struct __pyx_vtabstruct_memoryview *__pyx_vtabptr_memoryview;


/* "View.MemoryView":965
 * 
 * @cname('__pyx_memoryviewslice')
 * cdef class _memoryviewslice(memoryview):             # <<<<<<<<<<<<<<
 *     "Internal class for passing memoryview slices to Python"
 * 
 */

struct __pyx_vtabstruct__memoryviewslice {
  struct __pyx_vtabstruct_memoryview __pyx_base;
};
static struct __pyx_vtabstruct__memoryviewslice *__pyx_vtabptr__memoryviewslice;

/* --- Runtime support code (head) --- */
/* Refnanny.proto */
#ifndef CYTHON_REFNANNY
  #define CYTHON_REFNANNY 0
#endif
#if CYTHON_REFNANNY
  typedef struct {
    void (*INCREF)(void*, PyObject*, int);
    void (*DECREF)(void*, PyObject*, int);
    void (*GOTREF)(void*, PyObject*, int);
    void (*GIVEREF)(void*, PyObject*, int);
    void* (*SetupContext)(const char*, int, const char*);
    void (*FinishContext)(void**);
  } __Pyx_RefNannyAPIStruct;
  static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
  static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
  #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
#ifdef WITH_THREAD
  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
          if (acquire_gil) {\
              PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
              __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
              PyGILState_Release(__pyx_gilstate_save);\
          } else {\
              __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
          }
#else
  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
          __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
#endif
  #define __Pyx_RefNannyFinishContext()\
          __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
  #define __Pyx_INCREF(r)  __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_DECREF(r)  __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_GOTREF(r)  __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_XINCREF(r)  do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)
  #define __Pyx_XDECREF(r)  do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)
  #define __Pyx_XGOTREF(r)  do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)
  #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
#else
  #define __Pyx_RefNannyDeclarations
  #define __Pyx_RefNannySetupContext(name, acquire_gil)
  #define __Pyx_RefNannyFinishContext()
  #define __Pyx_INCREF(r) Py_INCREF(r)
  #define __Pyx_DECREF(r) Py_DECREF(r)
  #define __Pyx_GOTREF(r)
  #define __Pyx_GIVEREF(r)
  #define __Pyx_XINCREF(r) Py_XINCREF(r)
  #define __Pyx_XDECREF(r) Py_XDECREF(r)
  #define __Pyx_XGOTREF(r)
  #define __Pyx_XGIVEREF(r)
#endif
#define __Pyx_XDECREF_SET(r, v) do {\
        PyObject *tmp = (PyObject *) r;\
        r = v; __Pyx_XDECREF(tmp);\
    } while (0)
#define __Pyx_DECREF_SET(r, v) do {\
        PyObject *tmp = (PyObject *) r;\
        r = v; __Pyx_DECREF(tmp);\
    } while (0)
#define __Pyx_CLEAR(r)    do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
#define __Pyx_XCLEAR(r)   do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)

/* PyObjectGetAttrStr.proto */
#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name);
#else
#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
#endif

/* GetBuiltinName.proto */
static PyObject *__Pyx_GetBuiltinName(PyObject *name);

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

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

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

/* PyDictVersioning.proto */
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
#define __PYX_DICT_VERSION_INIT  ((PY_UINT64_T) -1)
#define __PYX_GET_DICT_VERSION(dict)  (((PyDictObject*)(dict))->ma_version_tag)
#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\
    (version_var) = __PYX_GET_DICT_VERSION(dict);\
    (cache_var) = (value);
#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\
    static PY_UINT64_T __pyx_dict_version = 0;\
    static PyObject *__pyx_dict_cached_value = NULL;\
    if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\
        (VAR) = __pyx_dict_cached_value;\
    } else {\
        (VAR) = __pyx_dict_cached_value = (LOOKUP);\
        __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\
    }\
}
static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj);
static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj);
static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version);
#else
#define __PYX_GET_DICT_VERSION(dict)  (0)
#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)
#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP)  (VAR) = (LOOKUP);
#endif

/* GetModuleGlobalName.proto */
#if CYTHON_USE_DICT_VERSIONS
#define __Pyx_GetModuleGlobalName(var, name)  {\
    static PY_UINT64_T __pyx_dict_version = 0;\
    static PyObject *__pyx_dict_cached_value = NULL;\
    (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\
        (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\
        __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
}
#define __Pyx_GetModuleGlobalNameUncached(var, name)  {\
    PY_UINT64_T __pyx_dict_version;\
    PyObject *__pyx_dict_cached_value;\
    (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
}
static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value);
#else
#define __Pyx_GetModuleGlobalName(var, name)  (var) = __Pyx__GetModuleGlobalName(name)
#define __Pyx_GetModuleGlobalNameUncached(var, name)  (var) = __Pyx__GetModuleGlobalName(name)
static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name);
#endif

/* PyObjectCall.proto */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
#else
#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
#endif

/* PyFunctionFastCall.proto */
#if CYTHON_FAST_PYCALL
#define __Pyx_PyFunction_FastCall(func, args, nargs)\
    __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
#if 1 || PY_VERSION_HEX < 0x030600B1
static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs);
#else
#define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs)
#endif
#define __Pyx_BUILD_ASSERT_EXPR(cond)\
    (sizeof(char [1 - 2*!(cond)]) - 1)
#ifndef Py_MEMBER_SIZE
#define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member)
#endif
#if CYTHON_FAST_PYCALL
  static size_t __pyx_pyframe_localsplus_offset = 0;
  #include "frameobject.h"
#if PY_VERSION_HEX >= 0x030b00a6
  #ifndef Py_BUILD_CORE
    #define Py_BUILD_CORE 1
  #endif
  #include "internal/pycore_frame.h"
#endif
  #define __Pxy_PyFrame_Initialize_Offsets()\
    ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\
     (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus)))
  #define __Pyx_PyFrame_GetLocalsplus(frame)\
    (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset))
#endif // CYTHON_FAST_PYCALL
#endif

/* PyObjectCallMethO.proto */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
#endif

/* PyObjectCallNoArg.proto */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);
#else
#define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL)
#endif

/* PyCFunctionFastCall.proto */
#if CYTHON_FAST_PYCCALL
static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs);
#else
#define __Pyx_PyCFunction_FastCall(func, args, nargs)  (assert(0), NULL)
#endif

/* PyObjectCallOneArg.proto */
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);

/* MemviewSliceInit.proto */
#define __Pyx_BUF_MAX_NDIMS %(BUF_MAX_NDIMS)d
#define __Pyx_MEMVIEW_DIRECT   1
#define __Pyx_MEMVIEW_PTR      2
#define __Pyx_MEMVIEW_FULL     4
#define __Pyx_MEMVIEW_CONTIG   8
#define __Pyx_MEMVIEW_STRIDED  16
#define __Pyx_MEMVIEW_FOLLOW   32
#define __Pyx_IS_C_CONTIG 1
#define __Pyx_IS_F_CONTIG 2
static int __Pyx_init_memviewslice(
                struct __pyx_memoryview_obj *memview,
                int ndim,
                __Pyx_memviewslice *memviewslice,
                int memview_is_new_reference);
static CYTHON_INLINE int __pyx_add_acquisition_count_locked(
    __pyx_atomic_int *acquisition_count, PyThread_type_lock lock);
static CYTHON_INLINE int __pyx_sub_acquisition_count_locked(
    __pyx_atomic_int *acquisition_count, PyThread_type_lock lock);
#define __pyx_get_slice_count_pointer(memview) (memview->acquisition_count_aligned_p)
#define __pyx_get_slice_count(memview) (*__pyx_get_slice_count_pointer(memview))
#define __PYX_INC_MEMVIEW(slice, have_gil) __Pyx_INC_MEMVIEW(slice, have_gil, __LINE__)
#define __PYX_XDEC_MEMVIEW(slice, have_gil) __Pyx_XDEC_MEMVIEW(slice, have_gil, __LINE__)
static CYTHON_INLINE void __Pyx_INC_MEMVIEW(__Pyx_memviewslice *, int, int);
static CYTHON_INLINE void __Pyx_XDEC_MEMVIEW(__Pyx_memviewslice *, int, int);

/* PyIntBinop.proto */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_SubtractObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check);
#else
#define __Pyx_PyInt_SubtractObjC(op1, op2, intval, inplace, zerodivision_check)\
    (inplace ? PyNumber_InPlaceSubtract(op1, op2) : PyNumber_Subtract(op1, op2))
#endif

/* PyObjectCall2Args.proto */
static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2);

/* GetItemInt.proto */
#define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\
    (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\
               __Pyx_GetItemInt_Generic(o, to_py_func(i))))
#define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
    (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
                                                              int wraparound, int boundscheck);
#define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
    (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL))
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
                                                              int wraparound, int boundscheck);
static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j);
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
                                                     int is_list, int wraparound, int boundscheck);

/* ObjectGetItem.proto */
#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key);
#else
#define __Pyx_PyObject_GetItem(obj, key)  PyObject_GetItem(obj, key)
#endif

/* ListCompAppend.proto */
#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) {
    PyListObject* L = (PyListObject*) list;
    Py_ssize_t len = Py_SIZE(list);
    if (likely(L->allocated > len)) {
        Py_INCREF(x);
        PyList_SET_ITEM(list, len, x);
        __Pyx_SET_SIZE(list, len + 1);
        return 0;
    }
    return PyList_Append(list, x);
}
#else
#define __Pyx_ListComp_Append(L,x) PyList_Append(L,x)
#endif

/* ArgTypeTest.proto */
#define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\
    ((likely((Py_TYPE(obj) == type) | (none_allowed && (obj == Py_None)))) ? 1 :\
        __Pyx__ArgTypeTest(obj, type, name, exact))
static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact);

/* KeywordStringCheck.proto */
static int __Pyx_CheckKeywordStrings(PyObject *kwdict, const char* function_name, int kw_allowed);

/* PyThreadStateGet.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyThreadState_declare  PyThreadState *__pyx_tstate;
#define __Pyx_PyThreadState_assign  __pyx_tstate = __Pyx_PyThreadState_Current;
#define __Pyx_PyErr_Occurred()  __pyx_tstate->curexc_type
#else
#define __Pyx_PyThreadState_declare
#define __Pyx_PyThreadState_assign
#define __Pyx_PyErr_Occurred()  PyErr_Occurred()
#endif

/* PyErrFetchRestore.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL)
#define __Pyx_ErrRestoreWithState(type, value, tb)  __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
#define __Pyx_ErrFetchWithState(type, value, tb)    __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
#define __Pyx_ErrRestore(type, value, tb)  __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
#define __Pyx_ErrFetch(type, value, tb)    __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL))
#else
#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
#endif
#else
#define __Pyx_PyErr_Clear() PyErr_Clear()
#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
#define __Pyx_ErrRestoreWithState(type, value, tb)  PyErr_Restore(type, value, tb)
#define __Pyx_ErrFetchWithState(type, value, tb)  PyErr_Fetch(type, value, tb)
#define __Pyx_ErrRestoreInState(tstate, type, value, tb)  PyErr_Restore(type, value, tb)
#define __Pyx_ErrFetchInState(tstate, type, value, tb)  PyErr_Fetch(type, value, tb)
#define __Pyx_ErrRestore(type, value, tb)  PyErr_Restore(type, value, tb)
#define __Pyx_ErrFetch(type, value, tb)  PyErr_Fetch(type, value, tb)
#endif

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

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

/* PyErrExceptionMatches.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
#else
#define __Pyx_PyErr_ExceptionMatches(err)  PyErr_ExceptionMatches(err)
#endif

/* GetAttr.proto */
static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *);

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

/* IsLittleEndian.proto */
static CYTHON_INLINE int __Pyx_Is_Little_Endian(void);

/* BufferFormatCheck.proto */
static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const char* ts);
static void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx,
                              __Pyx_BufFmt_StackElem* stack,
                              __Pyx_TypeInfo* type);

/* BufferGetAndValidate.proto */
#define __Pyx_GetBufferAndValidate(buf, obj, dtype, flags, nd, cast, stack)\
    ((obj == Py_None || obj == NULL) ?\
    (__Pyx_ZeroBuffer(buf), 0) :\
    __Pyx__GetBufferAndValidate(buf, obj, dtype, flags, nd, cast, stack))
static int  __Pyx__GetBufferAndValidate(Py_buffer* buf, PyObject* obj,
    __Pyx_TypeInfo* dtype, int flags, int nd, int cast, __Pyx_BufFmt_StackElem* stack);
static void __Pyx_ZeroBuffer(Py_buffer* buf);
static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info);
static Py_ssize_t __Pyx_minusones[] = { -1, -1, -1, -1, -1, -1, -1, -1 };
static Py_ssize_t __Pyx_zeros[] = { 0, 0, 0, 0, 0, 0, 0, 0 };

#define __Pyx_BufPtrStrided3d(type, buf, i0, s0, i1, s1, i2, s2) (type)((char*)buf + i0 * s0 + i1 * s1 + i2 * s2)
/* ExtTypeTest.proto */
static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type);

/* None.proto */
static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname);

/* PySequenceContains.proto */
static CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq, int eq) {
    int result = PySequence_Contains(seq, item);
    return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
}

/* Import.proto */
static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);

/* ImportFrom.proto */
static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name);

/* HasAttr.proto */
static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *);

/* GetTopmostException.proto */
#if CYTHON_USE_EXC_INFO_STACK
static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate);
#endif

/* SaveResetException.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_ExceptionSave(type, value, tb)  __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#define __Pyx_ExceptionReset(type, value, tb)  __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
#else
#define __Pyx_ExceptionSave(type, value, tb)   PyErr_GetExcInfo(type, value, tb)
#define __Pyx_ExceptionReset(type, value, tb)  PyErr_SetExcInfo(type, value, tb)
#endif

/* GetException.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_GetException(type, value, tb)  __Pyx__GetException(__pyx_tstate, type, value, tb)
static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#else
static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
#endif

/* IncludeStringH.proto */
#include <string.h>

/* BytesEquals.proto */
static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals);

/* UnicodeEquals.proto */
static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals);

/* StrEquals.proto */
#if PY_MAJOR_VERSION >= 3
#define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals
#else
#define __Pyx_PyString_Equals __Pyx_PyBytes_Equals
#endif

/* UnaryNegOverflows.proto */
#define UNARY_NEG_WOULD_OVERFLOW(x)\
        (((x) < 0) & ((unsigned long)(x) == 0-(unsigned long)(x)))

static CYTHON_UNUSED int __pyx_array_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *); /*proto*/
/* decode_c_string_utf16.proto */
static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16(const char *s, Py_ssize_t size, const char *errors) {
    int byteorder = 0;
    return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
}
static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16LE(const char *s, Py_ssize_t size, const char *errors) {
    int byteorder = -1;
    return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
}
static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16BE(const char *s, Py_ssize_t size, const char *errors) {
    int byteorder = 1;
    return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
}

/* decode_c_string.proto */
static CYTHON_INLINE PyObject* __Pyx_decode_c_string(
         const char* cstring, Py_ssize_t start, Py_ssize_t stop,
         const char* encoding, const char* errors,
         PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors));

/* RaiseTooManyValuesToUnpack.proto */
static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);

/* RaiseNeedMoreValuesToUnpack.proto */
static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);

/* RaiseNoneIterError.proto */
static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void);

/* SwapException.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_ExceptionSwap(type, value, tb)  __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#else
static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb);
#endif

/* FastTypeChecks.proto */
#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
#else
#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
#define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
#define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2))
#endif
#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)

static CYTHON_UNUSED int __pyx_memoryview_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
/* PyIntBinop.proto */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check);
#else
#define __Pyx_PyInt_AddObjC(op1, op2, intval, inplace, zerodivision_check)\
    (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2))
#endif

/* ListExtend.proto */
static CYTHON_INLINE int __Pyx_PyList_Extend(PyObject* L, PyObject* v) {
#if CYTHON_COMPILING_IN_CPYTHON
    PyObject* none = _PyList_Extend((PyListObject*)L, v);
    if (unlikely(!none))
        return -1;
    Py_DECREF(none);
    return 0;
#else
    return PyList_SetSlice(L, PY_SSIZE_T_MAX, PY_SSIZE_T_MAX, v);
#endif
}

/* ListAppend.proto */
#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) {
    PyListObject* L = (PyListObject*) list;
    Py_ssize_t len = Py_SIZE(list);
    if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) {
        Py_INCREF(x);
        PyList_SET_ITEM(list, len, x);
        __Pyx_SET_SIZE(list, len + 1);
        return 0;
    }
    return PyList_Append(list, x);
}
#else
#define __Pyx_PyList_Append(L,x) PyList_Append(L,x)
#endif

/* PyObject_GenericGetAttrNoDict.proto */
#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name);
#else
#define __Pyx_PyObject_GenericGetAttrNoDict PyObject_GenericGetAttr
#endif

/* PyObject_GenericGetAttr.proto */
#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name);
#else
#define __Pyx_PyObject_GenericGetAttr PyObject_GenericGetAttr
#endif

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

/* PyObjectGetAttrStrNoError.proto */
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name);

/* SetupReduce.proto */
static int __Pyx_setup_reduce(PyObject* type_obj);

/* TypeImport.proto */
#ifndef __PYX_HAVE_RT_ImportType_proto
#define __PYX_HAVE_RT_ImportType_proto
enum __Pyx_ImportType_CheckSize {
   __Pyx_ImportType_CheckSize_Error = 0,
   __Pyx_ImportType_CheckSize_Warn = 1,
   __Pyx_ImportType_CheckSize_Ignore = 2
};
static PyTypeObject *__Pyx_ImportType(PyObject* module, const char *module_name, const char *class_name, size_t size, enum __Pyx_ImportType_CheckSize check_size);
#endif

/* CLineInTraceback.proto */
#ifdef CYTHON_CLINE_IN_TRACEBACK
#define __Pyx_CLineForTraceback(tstate, c_line)  (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
#else
static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);
#endif

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

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

#if PY_MAJOR_VERSION < 3
    static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags);
    static void __Pyx_ReleaseBuffer(Py_buffer *view);
#else
    #define __Pyx_GetBuffer PyObject_GetBuffer
    #define __Pyx_ReleaseBuffer PyBuffer_Release
#endif


/* BufferStructDeclare.proto */
typedef struct {
  Py_ssize_t shape, strides, suboffsets;
} __Pyx_Buf_DimInfo;
typedef struct {
  size_t refcount;
  Py_buffer pybuffer;
} __Pyx_Buffer;
typedef struct {
  __Pyx_Buffer *rcbuffer;
  char *data;
  __Pyx_Buf_DimInfo diminfo[8];
} __Pyx_LocalBuf_ND;

/* MemviewSliceIsContig.proto */
static int __pyx_memviewslice_is_contig(const __Pyx_memviewslice mvs, char order, int ndim);

/* OverlappingSlices.proto */
static int __pyx_slices_overlap(__Pyx_memviewslice *slice1,
                                __Pyx_memviewslice *slice2,
                                int ndim, size_t itemsize);

/* Capsule.proto */
static CYTHON_INLINE PyObject *__pyx_capsule_create(void *p, const char *sig);

/* GCCDiagnostics.proto */
#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
#define __Pyx_HAS_GCC_DIAGNOSTIC
#endif

/* TypeInfoCompare.proto */
static int __pyx_typeinfo_cmp(__Pyx_TypeInfo *a, __Pyx_TypeInfo *b);

/* MemviewSliceValidateAndInit.proto */
static int __Pyx_ValidateAndInit_memviewslice(
                int *axes_specs,
                int c_or_f_flag,
                int buf_flags,
                int ndim,
                __Pyx_TypeInfo *dtype,
                __Pyx_BufFmt_StackElem stack[],
                __Pyx_memviewslice *memviewslice,
                PyObject *original_obj);

/* ObjectToMemviewSlice.proto */
static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dsdsds_float(PyObject *, int writable_flag);

/* ObjectToMemviewSlice.proto */
static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dsdsdsds_float(PyObject *, int writable_flag);

/* ObjectToMemviewSlice.proto */
static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dsds_float(PyObject *, int writable_flag);

/* ObjectToMemviewSlice.proto */
static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dsds_int(PyObject *, int writable_flag);

/* ObjectToMemviewSlice.proto */
static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_int(PyObject *, int writable_flag);

/* ObjectToMemviewSlice.proto */
static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_float(PyObject *, int writable_flag);

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

/* RealImag.proto */
#if CYTHON_CCOMPLEX
  #ifdef __cplusplus
    #define __Pyx_CREAL(z) ((z).real())
    #define __Pyx_CIMAG(z) ((z).imag())
  #else
    #define __Pyx_CREAL(z) (__real__(z))
    #define __Pyx_CIMAG(z) (__imag__(z))
  #endif
#else
    #define __Pyx_CREAL(z) ((z).real)
    #define __Pyx_CIMAG(z) ((z).imag)
#endif
#if defined(__cplusplus) && CYTHON_CCOMPLEX\
        && (defined(_WIN32) || defined(__clang__) || (defined(__GNUC__) && (__GNUC__ >= 5 || __GNUC__ == 4 && __GNUC_MINOR__ >= 4 )) || __cplusplus >= 201103)
    #define __Pyx_SET_CREAL(z,x) ((z).real(x))
    #define __Pyx_SET_CIMAG(z,y) ((z).imag(y))
#else
    #define __Pyx_SET_CREAL(z,x) __Pyx_CREAL(z) = (x)
    #define __Pyx_SET_CIMAG(z,y) __Pyx_CIMAG(z) = (y)
#endif

/* Arithmetic.proto */
#if CYTHON_CCOMPLEX
    #define __Pyx_c_eq_float(a, b)   ((a)==(b))
    #define __Pyx_c_sum_float(a, b)  ((a)+(b))
    #define __Pyx_c_diff_float(a, b) ((a)-(b))
    #define __Pyx_c_prod_float(a, b) ((a)*(b))
    #define __Pyx_c_quot_float(a, b) ((a)/(b))
    #define __Pyx_c_neg_float(a)     (-(a))
  #ifdef __cplusplus
    #define __Pyx_c_is_zero_float(z) ((z)==(float)0)
    #define __Pyx_c_conj_float(z)    (::std::conj(z))
    #if 1
        #define __Pyx_c_abs_float(z)     (::std::abs(z))
        #define __Pyx_c_pow_float(a, b)  (::std::pow(a, b))
    #endif
  #else
    #define __Pyx_c_is_zero_float(z) ((z)==0)
    #define __Pyx_c_conj_float(z)    (conjf(z))
    #if 1
        #define __Pyx_c_abs_float(z)     (cabsf(z))
        #define __Pyx_c_pow_float(a, b)  (cpowf(a, b))
    #endif
 #endif
#else
    static CYTHON_INLINE int __Pyx_c_eq_float(__pyx_t_float_complex, __pyx_t_float_complex);
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex, __pyx_t_float_complex);
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex, __pyx_t_float_complex);
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex, __pyx_t_float_complex);
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex, __pyx_t_float_complex);
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex);
    static CYTHON_INLINE int __Pyx_c_is_zero_float(__pyx_t_float_complex);
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex);
    #if 1
        static CYTHON_INLINE float __Pyx_c_abs_float(__pyx_t_float_complex);
        static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex, __pyx_t_float_complex);
    #endif
#endif

/* Arithmetic.proto */
#if CYTHON_CCOMPLEX
    #define __Pyx_c_eq_double(a, b)   ((a)==(b))
    #define __Pyx_c_sum_double(a, b)  ((a)+(b))
    #define __Pyx_c_diff_double(a, b) ((a)-(b))
    #define __Pyx_c_prod_double(a, b) ((a)*(b))
    #define __Pyx_c_quot_double(a, b) ((a)/(b))
    #define __Pyx_c_neg_double(a)     (-(a))
  #ifdef __cplusplus
    #define __Pyx_c_is_zero_double(z) ((z)==(double)0)
    #define __Pyx_c_conj_double(z)    (::std::conj(z))
    #if 1
        #define __Pyx_c_abs_double(z)     (::std::abs(z))
        #define __Pyx_c_pow_double(a, b)  (::std::pow(a, b))
    #endif
  #else
    #define __Pyx_c_is_zero_double(z) ((z)==0)
    #define __Pyx_c_conj_double(z)    (conj(z))
    #if 1
        #define __Pyx_c_abs_double(z)     (cabs(z))
        #define __Pyx_c_pow_double(a, b)  (cpow(a, b))
    #endif
 #endif
#else
    static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex, __pyx_t_double_complex);
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex, __pyx_t_double_complex);
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex, __pyx_t_double_complex);
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex, __pyx_t_double_complex);
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex, __pyx_t_double_complex);
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex);
    static CYTHON_INLINE int __Pyx_c_is_zero_double(__pyx_t_double_complex);
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex);
    #if 1
        static CYTHON_INLINE double __Pyx_c_abs_double(__pyx_t_double_complex);
        static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex, __pyx_t_double_complex);
    #endif
#endif

/* MemviewSliceCopyTemplate.proto */
static __Pyx_memviewslice
__pyx_memoryview_copy_new_contig(const __Pyx_memviewslice *from_mvs,
                                 const char *mode, int ndim,
                                 size_t sizeof_dtype, int contig_flag,
                                 int dtype_is_object);

/* CIntFromPy.proto */
static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);

/* CIntFromPy.proto */
static CYTHON_INLINE signed char __Pyx_PyInt_As_signed__char(PyObject *);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_npy_bool(npy_bool value);

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

/* CIntFromPy.proto */
static CYTHON_INLINE char __Pyx_PyInt_As_char(PyObject *);

/* CheckBinaryVersion.proto */
static int __Pyx_check_binary_version(void);

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

static 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*/
static 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*/
static 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*/
static 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*/
static 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*/
static 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*/
static 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*/
static 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*/
static 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*/
static 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*/
static 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*/
static 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*/
static 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*/
static 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*/
static 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*/
static 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*/
static 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*/
static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *__pyx_v_self); /* proto*/
static char *__pyx_memoryview_get_item_pointer(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index); /* proto*/
static PyObject *__pyx_memoryview_is_slice(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj); /* proto*/
static PyObject *__pyx_memoryview_setitem_slice_assignment(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_dst, PyObject *__pyx_v_src); /* proto*/
static PyObject *__pyx_memoryview_setitem_slice_assign_scalar(struct __pyx_memoryview_obj *__pyx_v_self, struct __pyx_memoryview_obj *__pyx_v_dst, PyObject *__pyx_v_value); /* proto*/
static PyObject *__pyx_memoryview_setitem_indexed(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /* proto*/
static PyObject *__pyx_memoryview_convert_item_to_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp); /* proto*/
static PyObject *__pyx_memoryview_assign_item_from_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value); /* proto*/
static PyObject *__pyx_memoryviewslice_convert_item_to_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp); /* proto*/
static PyObject *__pyx_memoryviewslice_assign_item_from_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value); /* proto*/

/* Module declarations from 'cpython.buffer' */

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

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

/* Module declarations from '__builtin__' */

/* Module declarations from 'cpython.type' */
static PyTypeObject *__pyx_ptype_7cpython_4type_type = 0;

/* Module declarations from 'cpython' */

/* Module declarations from 'cpython.object' */

/* Module declarations from 'cpython.ref' */

/* Module declarations from 'cpython.mem' */

/* Module declarations from 'numpy' */

/* Module declarations from 'numpy' */
static PyTypeObject *__pyx_ptype_5numpy_dtype = 0;
static PyTypeObject *__pyx_ptype_5numpy_flatiter = 0;
static PyTypeObject *__pyx_ptype_5numpy_broadcast = 0;
static PyTypeObject *__pyx_ptype_5numpy_ndarray = 0;
static PyTypeObject *__pyx_ptype_5numpy_generic = 0;
static PyTypeObject *__pyx_ptype_5numpy_number = 0;
static PyTypeObject *__pyx_ptype_5numpy_integer = 0;
static PyTypeObject *__pyx_ptype_5numpy_signedinteger = 0;
static PyTypeObject *__pyx_ptype_5numpy_unsignedinteger = 0;
static PyTypeObject *__pyx_ptype_5numpy_inexact = 0;
static PyTypeObject *__pyx_ptype_5numpy_floating = 0;
static PyTypeObject *__pyx_ptype_5numpy_complexfloating = 0;
static PyTypeObject *__pyx_ptype_5numpy_flexible = 0;
static PyTypeObject *__pyx_ptype_5numpy_character = 0;
static PyTypeObject *__pyx_ptype_5numpy_ufunc = 0;
static CYTHON_INLINE int __pyx_f_5numpy_import_array(void); /*proto*/

/* Module declarations from 'cython.view' */

/* Module declarations from 'cython' */

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

/* Module declarations from '_marching_cubes_lewiner_cy' */
static PyTypeObject *__pyx_ptype_26_marching_cubes_lewiner_cy_Cell = 0;
static PyTypeObject *__pyx_ptype_26_marching_cubes_lewiner_cy_Lut = 0;
static PyTypeObject *__pyx_ptype_26_marching_cubes_lewiner_cy_LutProvider = 0;
static PyTypeObject *__pyx_array_type = 0;
static PyTypeObject *__pyx_MemviewEnum_type = 0;
static PyTypeObject *__pyx_memoryview_type = 0;
static PyTypeObject *__pyx_memoryviewslice_type = 0;
static double __pyx_v_26_marching_cubes_lewiner_cy_FLT_EPSILON;
static PyObject *generic = 0;
static PyObject *strided = 0;
static PyObject *indirect = 0;
static PyObject *contiguous = 0;
static PyObject *indirect_contiguous = 0;
static int __pyx_memoryview_thread_locks_used;
static PyThread_type_lock __pyx_memoryview_thread_locks[8];
static CYTHON_INLINE double __pyx_f_26_marching_cubes_lewiner_cy_dabs(double); /*proto*/
static CYTHON_INLINE int __pyx_f_26_marching_cubes_lewiner_cy_imin(int, int); /*proto*/
static float __pyx_f_26_marching_cubes_lewiner_cy_my_sign(float); /*proto*/
static int __pyx_f_26_marching_cubes_lewiner_cy_non_zero_norm(__Pyx_memviewslice); /*proto*/
static float __pyx_f_26_marching_cubes_lewiner_cy_avg_cube(float, float, float, float, float, float, float, float); /*proto*/
static float __pyx_f_26_marching_cubes_lewiner_cy_max_cube(float, float, float, float, float, float, float, float); /*proto*/
static float __pyx_f_26_marching_cubes_lewiner_cy_dot3(__Pyx_memviewslice, __Pyx_memviewslice); /*proto*/
static 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*/
static 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*/
static int __pyx_f_26_marching_cubes_lewiner_cy_test_face(struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *, int); /*proto*/
static 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*/
static PyObject *__pyx_f_26_marching_cubes_lewiner_cy___pyx_unpickle_LutProvider__set_state(struct __pyx_obj_26_marching_cubes_lewiner_cy_LutProvider *, PyObject *); /*proto*/
static struct __pyx_array_obj *__pyx_array_new(PyObject *, Py_ssize_t, char *, char *, char *); /*proto*/
static void *__pyx_align_pointer(void *, size_t); /*proto*/
static PyObject *__pyx_memoryview_new(PyObject *, int, int, __Pyx_TypeInfo *); /*proto*/
static CYTHON_INLINE int __pyx_memoryview_check(PyObject *); /*proto*/
static PyObject *_unellipsify(PyObject *, int); /*proto*/
static PyObject *assert_direct_dimensions(Py_ssize_t *, int); /*proto*/
static struct __pyx_memoryview_obj *__pyx_memview_slice(struct __pyx_memoryview_obj *, PyObject *); /*proto*/
static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *, Py_ssize_t, Py_ssize_t, Py_ssize_t, int, int, int *, Py_ssize_t, Py_ssize_t, Py_ssize_t, int, int, int, int); /*proto*/
static char *__pyx_pybuffer_index(Py_buffer *, char *, Py_ssize_t, Py_ssize_t); /*proto*/
static int __pyx_memslice_transpose(__Pyx_memviewslice *); /*proto*/
static PyObject *__pyx_memoryview_fromslice(__Pyx_memviewslice, int, PyObject *(*)(char *), int (*)(char *, PyObject *), int); /*proto*/
static __Pyx_memviewslice *__pyx_memoryview_get_slice_from_memoryview(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/
static void __pyx_memoryview_slice_copy(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/
static PyObject *__pyx_memoryview_copy_object(struct __pyx_memoryview_obj *); /*proto*/
static PyObject *__pyx_memoryview_copy_object_from_slice(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/
static Py_ssize_t abs_py_ssize_t(Py_ssize_t); /*proto*/
static char __pyx_get_best_slice_order(__Pyx_memviewslice *, int); /*proto*/
static void _copy_strided_to_strided(char *, Py_ssize_t *, char *, Py_ssize_t *, Py_ssize_t *, Py_ssize_t *, int, size_t); /*proto*/
static void copy_strided_to_strided(__Pyx_memviewslice *, __Pyx_memviewslice *, int, size_t); /*proto*/
static Py_ssize_t __pyx_memoryview_slice_get_size(__Pyx_memviewslice *, int); /*proto*/
static Py_ssize_t __pyx_fill_contig_strides_array(Py_ssize_t *, Py_ssize_t *, Py_ssize_t, int, char); /*proto*/
static void *__pyx_memoryview_copy_data_to_temp(__Pyx_memviewslice *, __Pyx_memviewslice *, char, int); /*proto*/
static int __pyx_memoryview_err_extents(int, Py_ssize_t, Py_ssize_t); /*proto*/
static int __pyx_memoryview_err_dim(PyObject *, char *, int); /*proto*/
static int __pyx_memoryview_err(PyObject *, char *); /*proto*/
static int __pyx_memoryview_copy_contents(__Pyx_memviewslice, __Pyx_memviewslice, int, int, int); /*proto*/
static void __pyx_memoryview_broadcast_leading(__Pyx_memviewslice *, int, int); /*proto*/
static void __pyx_memoryview_refcount_copying(__Pyx_memviewslice *, int, int, int); /*proto*/
static void __pyx_memoryview_refcount_objects_in_slice_with_gil(char *, Py_ssize_t *, Py_ssize_t *, int, int); /*proto*/
static void __pyx_memoryview_refcount_objects_in_slice(char *, Py_ssize_t *, Py_ssize_t *, int, int); /*proto*/
static void __pyx_memoryview_slice_assign_scalar(__Pyx_memviewslice *, int, size_t, void *, int); /*proto*/
static void __pyx_memoryview__slice_assign_scalar(char *, Py_ssize_t *, Py_ssize_t *, int, size_t, void *); /*proto*/
static PyObject *__pyx_unpickle_Enum__set_state(struct __pyx_MemviewEnum_obj *, PyObject *); /*proto*/
static __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 };
static __Pyx_TypeInfo __Pyx_TypeInfo_float = { "float", NULL, sizeof(float), { 0 }, 0, 'R', 0, 0 };
static __Pyx_TypeInfo __Pyx_TypeInfo_int = { "int", NULL, sizeof(int), { 0 }, 0, IS_UNSIGNED(int) ? 'U' : 'I', IS_UNSIGNED(int), 0 };
#define __Pyx_MODULE_NAME "_marching_cubes_lewiner_cy"
extern int __pyx_module_is_main__marching_cubes_lewiner_cy;
int __pyx_module_is_main__marching_cubes_lewiner_cy = 0;

/* Implementation of '_marching_cubes_lewiner_cy' */
static PyObject *__pyx_builtin_range;
static PyObject *__pyx_builtin_MemoryError;
static PyObject *__pyx_builtin_TypeError;
static PyObject *__pyx_builtin_ImportError;
static PyObject *__pyx_builtin_ValueError;
static PyObject *__pyx_builtin_enumerate;
static PyObject *__pyx_builtin_Ellipsis;
static PyObject *__pyx_builtin_id;
static PyObject *__pyx_builtin_IndexError;
static const char __pyx_k_O[] = "O";
static const char __pyx_k_c[] = "c";
static const char __pyx_k_j[] = "j";
static const char __pyx_k_x[] = "x";
static const char __pyx_k_y[] = "y";
static const char __pyx_k_z[] = "z";
static const char __pyx_k_Nx[] = "Nx";
static const char __pyx_k_Ny[] = "Ny";
static const char __pyx_k_Nz[] = "Nz";
static const char __pyx_k_i1[] = "i1";
static const char __pyx_k_i2[] = "i2";
static const char __pyx_k_i3[] = "i3";
static const char __pyx_k_id[] = "id";
static const char __pyx_k_im[] = "im";
static const char __pyx_k_np[] = "np";
static const char __pyx_k_nt[] = "nt";
static const char __pyx_k_nx[] = "nx";
static const char __pyx_k_ny[] = "ny";
static const char __pyx_k_nz[] = "nz";
static const char __pyx_k_st[] = "st";
static const char __pyx_k_v1[] = "v1";
static const char __pyx_k_v2[] = "v2";
static const char __pyx_k_v3[] = "v3";
static const char __pyx_k_Lut[] = "Lut";
static const char __pyx_k_arr[] = "arr";
static const char __pyx_k_end[] = "end";
static const char __pyx_k_new[] = "__new__";
static const char __pyx_k_obj[] = "obj";
static const char __pyx_k_Cell[] = "Cell";
static const char __pyx_k_base[] = "base";
static const char __pyx_k_case[] = "case";
static const char __pyx_k_cell[] = "cell";
static const char __pyx_k_copy[] = "copy";
static const char __pyx_k_dict[] = "__dict__";
static const char __pyx_k_file[] = "file";
static const char __pyx_k_luts[] = "luts";
static const char __pyx_k_main[] = "__main__";
static const char __pyx_k_mask[] = "mask";
static const char __pyx_k_mode[] = "mode";
static const char __pyx_k_name[] = "name";
static const char __pyx_k_ndim[] = "ndim";
static const char __pyx_k_ones[] = "ones";
static const char __pyx_k_pack[] = "pack";
static const char __pyx_k_size[] = "size";
static const char __pyx_k_step[] = "step";
static const char __pyx_k_stop[] = "stop";
static const char __pyx_k_test[] = "__test__";
static const char __pyx_k_x_st[] = "x_st";
static const char __pyx_k_y_st[] = "y_st";
static const char __pyx_k_z_st[] = "z_st";
static const char __pyx_k_ASCII[] = "ASCII";
static const char __pyx_k_CASES[] = "CASES";
static const char __pyx_k_TEST3[] = "TEST3";
static const char __pyx_k_TEST4[] = "TEST4";
static const char __pyx_k_TEST6[] = "TEST6";
static const char __pyx_k_TEST7[] = "TEST7";
static const char __pyx_k_array[] = "array";
static const char __pyx_k_class[] = "__class__";
static const char __pyx_k_dtype[] = "dtype";
static const char __pyx_k_empty[] = "empty";
static const char __pyx_k_error[] = "error";
static const char __pyx_k_faces[] = "faces";
static const char __pyx_k_flags[] = "flags";
static const char __pyx_k_grads[] = "grads";
static const char __pyx_k_int32[] = "int32";
static const char __pyx_k_numpy[] = "numpy";
static const char __pyx_k_print[] = "print";
static const char __pyx_k_range[] = "range";
static const char __pyx_k_ravel[] = "ravel";
static const char __pyx_k_shape[] = "shape";
static const char __pyx_k_start[] = "start";
static const char __pyx_k_TEST10[] = "TEST10";
static const char __pyx_k_TEST12[] = "TEST12";
static const char __pyx_k_TEST13[] = "TEST13";
static const char __pyx_k_arange[] = "arange";
static const char __pyx_k_arrays[] = "arrays";
static const char __pyx_k_config[] = "config";
static const char __pyx_k_cumsum[] = "cumsum";
static const char __pyx_k_encode[] = "encode";
static const char __pyx_k_faces2[] = "faces2";
static const char __pyx_k_format[] = "format";
static const char __pyx_k_import[] = "__import__";
static const char __pyx_k_name_2[] = "__name__";
static const char __pyx_k_pickle[] = "pickle";
static const char __pyx_k_reduce[] = "__reduce__";
static const char __pyx_k_struct[] = "struct";
static const char __pyx_k_unpack[] = "unpack";
static const char __pyx_k_update[] = "update";
static const char __pyx_k_TILING1[] = "TILING1";
static const char __pyx_k_TILING2[] = "TILING2";
static const char __pyx_k_TILING5[] = "TILING5";
static const char __pyx_k_TILING8[] = "TILING8";
static const char __pyx_k_TILING9[] = "TILING9";
static const char __pyx_k_arrays2[] = "arrays2";
static const char __pyx_k_classic[] = "classic";
static const char __pyx_k_faces_2[] = "faces_";
static const char __pyx_k_float32[] = "float32";
static const char __pyx_k_fortran[] = "fortran";
static const char __pyx_k_memview[] = "memview";
static const char __pyx_k_no_mask[] = "no_mask";
static const char __pyx_k_spacing[] = "spacing";
static const char __pyx_k_Ellipsis[] = "Ellipsis";
static const char __pyx_k_Nx_bound[] = "Nx_bound";
static const char __pyx_k_Ny_bound[] = "Ny_bound";
static const char __pyx_k_Nz_bound[] = "Nz_bound";
static const char __pyx_k_TILING11[] = "TILING11";
static const char __pyx_k_TILING14[] = "TILING14";
static const char __pyx_k_base_vec[] = "base_vec";
static const char __pyx_k_faces_ok[] = "faces_ok";
static const char __pyx_k_getstate[] = "__getstate__";
static const char __pyx_k_isovalue[] = "isovalue";
static const char __pyx_k_itemsize[] = "itemsize";
static const char __pyx_k_pyx_type[] = "__pyx_type";
static const char __pyx_k_setstate[] = "__setstate__";
static const char __pyx_k_vertices[] = "vertices";
static const char __pyx_k_EDGESRELX[] = "EDGESRELX";
static const char __pyx_k_EDGESRELY[] = "EDGESRELY";
static const char __pyx_k_EDGESRELZ[] = "EDGESRELZ";
static const char __pyx_k_TILING3_1[] = "TILING3_1";
static const char __pyx_k_TILING3_2[] = "TILING3_2";
static const char __pyx_k_TILING4_1[] = "TILING4_1";
static const char __pyx_k_TILING4_2[] = "TILING4_2";
static const char __pyx_k_TILING6_2[] = "TILING6_2";
static const char __pyx_k_TILING7_1[] = "TILING7_1";
static const char __pyx_k_TILING7_2[] = "TILING7_2";
static const char __pyx_k_TILING7_3[] = "TILING7_3";
static const char __pyx_k_TypeError[] = "TypeError";
static const char __pyx_k_enumerate[] = "enumerate";
static const char __pyx_k_get_faces[] = "get_faces";
static const char __pyx_k_pyx_state[] = "__pyx_state";
static const char __pyx_k_reduce_ex[] = "__reduce_ex__";
static const char __pyx_k_subconfig[] = "subconfig";
static const char __pyx_k_vertices2[] = "vertices2";
static const char __pyx_k_IndexError[] = "IndexError";
static const char __pyx_k_TILING10_2[] = "TILING10_2";
static const char __pyx_k_TILING12_2[] = "TILING12_2";
static const char __pyx_k_TILING13_1[] = "TILING13_1";
static const char __pyx_k_TILING13_2[] = "TILING13_2";
static const char __pyx_k_TILING13_3[] = "TILING13_3";
static const char __pyx_k_TILING13_4[] = "TILING13_4";
static const char __pyx_k_ValueError[] = "ValueError";
static const char __pyx_k_faces_ok_2[] = "faces_ok_";
static const char __pyx_k_get_values[] = "get_values";
static const char __pyx_k_pyx_result[] = "__pyx_result";
static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__";
static const char __pyx_k_vertices_2[] = "vertices_";
static const char __pyx_k_voxel_size[] = "voxel_size";
static const char __pyx_k_ImportError[] = "ImportError";
static const char __pyx_k_LutProvider[] = "LutProvider";
static const char __pyx_k_MemoryError[] = "MemoryError";
static const char __pyx_k_PickleError[] = "PickleError";
static const char __pyx_k_SUBCONFIG13[] = "SUBCONFIG13";
static const char __pyx_k_TILING6_1_1[] = "TILING6_1_1";
static const char __pyx_k_TILING6_1_2[] = "TILING6_1_2";
static const char __pyx_k_TILING7_4_1[] = "TILING7_4_1";
static const char __pyx_k_TILING7_4_2[] = "TILING7_4_2";
static const char __pyx_k_get_normals[] = "get_normals";
static const char __pyx_k_vertices_ok[] = "vertices_ok";
static const char __pyx_k_CASESCLASSIC[] = "CASESCLASSIC";
static const char __pyx_k_TILING10_1_1[] = "TILING10_1_1";
static const char __pyx_k_TILING10_1_2[] = "TILING10_1_2";
static const char __pyx_k_TILING10_2_2[] = "TILING10_2_";
static const char __pyx_k_TILING12_1_1[] = "TILING12_1_1";
static const char __pyx_k_TILING12_1_2[] = "TILING12_1_2";
static const char __pyx_k_TILING12_2_2[] = "TILING12_2_";
static const char __pyx_k_TILING13_1_2[] = "TILING13_1_";
static const char __pyx_k_TILING13_2_2[] = "TILING13_2_";
static const char __pyx_k_TILING13_3_2[] = "TILING13_3_";
static const char __pyx_k_TILING13_5_1[] = "TILING13_5_1";
static const char __pyx_k_TILING13_5_2[] = "TILING13_5_2";
static const char __pyx_k_avg_cube_val[] = "avg_cube_val";
static const char __pyx_k_get_vertices[] = "get_vertices";
static const char __pyx_k_max_cube_val[] = "max_cube_val";
static const char __pyx_k_pyx_checksum[] = "__pyx_checksum";
static const char __pyx_k_stringsource[] = "stringsource";
static const char __pyx_k_pyx_getbuffer[] = "__pyx_getbuffer";
static const char __pyx_k_reduce_cython[] = "__reduce_cython__";
static const char __pyx_k_vertices_map0[] = "vertices_map0";
static const char __pyx_k_vertices_map1[] = "vertices_map1";
static const char __pyx_k_vertices_map2[] = "vertices_map2";
static const char __pyx_k_Invalid_edge_i[] = "Invalid edge %i.";
static const char __pyx_k_TILING10_1_1_2[] = "TILING10_1_1_";
static const char __pyx_k_TILING12_1_1_2[] = "TILING12_1_1_";
static const char __pyx_k_marching_cubes[] = "marching_cubes";
static const char __pyx_k_View_MemoryView[] = "View.MemoryView";
static const char __pyx_k_allocate_buffer[] = "allocate_buffer";
static const char __pyx_k_dtype_is_object[] = "dtype_is_object";
static const char __pyx_k_pyx_PickleError[] = "__pyx_PickleError";
static const char __pyx_k_setstate_cython[] = "__setstate_cython__";
static const char __pyx_k_vertices_map1_2[] = "vertices_map1_";
static const char __pyx_k_pyx_unpickle_Enum[] = "__pyx_unpickle_Enum";
static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
static const char __pyx_k_marching_cubes_udf[] = "marching_cubes_udf";
static const char __pyx_k_strided_and_direct[] = "<strided and direct>";
static const char __pyx_k_strided_and_indirect[] = "<strided and indirect>";
static const char __pyx_k_contiguous_and_direct[] = "<contiguous and direct>";
static const char __pyx_k_MemoryView_of_r_object[] = "<MemoryView of %r object>";
static const char __pyx_k_MemoryView_of_r_at_0x_x[] = "<MemoryView of %r at 0x%x>";
static const char __pyx_k_contiguous_and_indirect[] = "<contiguous and indirect>";
static const char __pyx_k_remove_degenerate_faces[] = "remove_degenerate_faces";
static const char __pyx_k_Cannot_index_with_type_s[] = "Cannot index with type '%s'";
static const char __pyx_k_Invalid_ambiguous_case_i[] = "Invalid ambiguous case %i.";
static const char __pyx_k_pyx_unpickle_LutProvider[] = "__pyx_unpickle_LutProvider";
static const char __pyx_k_Invalid_shape_in_axis_d_d[] = "Invalid shape in axis %d: %d.";
static const char __pyx_k_marching_cubes_lewiner_cy[] = "_marching_cubes_lewiner_cy";
static const char __pyx_k_inwards_facing_normals_ref[] = "inwards_facing_normals_ref";
static const char __pyx_k_inwards_facing_normals_bool[] = "inwards_facing_normals_bool";
static const char __pyx_k_itemsize_0_for_cython_array[] = "itemsize <= 0 for cython.array";
static const char __pyx_k_marching_cubes_lewiner_cy_pyx[] = "_marching_cubes_lewiner_cy.pyx";
static const char __pyx_k_unable_to_allocate_array_data[] = "unable to allocate array data.";
static const char __pyx_k_strided_and_direct_or_indirect[] = "<strided and direct or indirect>";
static 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";
static const char __pyx_k_numpy_core_multiarray_failed_to[] = "numpy.core.multiarray failed to import";
static const char __pyx_k_Buffer_view_does_not_expose_stri[] = "Buffer view does not expose strides";
static const char __pyx_k_Can_only_create_a_buffer_that_is[] = "Can only create a buffer that is contiguous in memory.";
static const char __pyx_k_Cannot_assign_to_read_only_memor[] = "Cannot assign to read-only memoryview";
static const char __pyx_k_Cannot_create_writable_memory_vi[] = "Cannot create writable memory view from read-only memoryview";
static const char __pyx_k_Empty_shape_tuple_for_cython_arr[] = "Empty shape tuple for cython.array";
static 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))";
static const char __pyx_k_Indirect_dimensions_not_supporte[] = "Indirect dimensions not supported";
static const char __pyx_k_Invalid_mode_expected_c_or_fortr[] = "Invalid mode, expected 'c' or 'fortran', got %s";
static const char __pyx_k_Marching_Cubes_Impossible_case_1[] = "Marching Cubes: Impossible case 13?";
static const char __pyx_k_Out_of_bounds_on_buffer_access_a[] = "Out of bounds on buffer access (axis %d)";
static const char __pyx_k_Unable_to_convert_item_to_object[] = "Unable to convert item to object";
static const char __pyx_k_got_differing_extents_in_dimensi[] = "got differing extents in dimension %d (got %d and %d)";
static const char __pyx_k_no_default___reduce___due_to_non[] = "no default __reduce__ due to non-trivial __cinit__";
static const char __pyx_k_numpy_core_umath_failed_to_impor[] = "numpy.core.umath failed to import";
static const char __pyx_k_unable_to_allocate_shape_and_str[] = "unable to allocate shape and strides.";
static const char __pyx_k_Incompatible_checksums_0x_x_vs_0_2[] = "Incompatible checksums (0x%x vs (0xb068931, 0x82a3537, 0x6ae9995) = (name))";
static PyObject *__pyx_n_s_ASCII;
static PyObject *__pyx_kp_s_Buffer_view_does_not_expose_stri;
static PyObject *__pyx_n_s_CASES;
static PyObject *__pyx_n_s_CASESCLASSIC;
static PyObject *__pyx_kp_s_Can_only_create_a_buffer_that_is;
static PyObject *__pyx_kp_s_Cannot_assign_to_read_only_memor;
static PyObject *__pyx_kp_s_Cannot_create_writable_memory_vi;
static PyObject *__pyx_kp_s_Cannot_index_with_type_s;
static PyObject *__pyx_n_s_Cell;
static PyObject *__pyx_n_s_EDGESRELX;
static PyObject *__pyx_n_s_EDGESRELY;
static PyObject *__pyx_n_s_EDGESRELZ;
static PyObject *__pyx_n_s_Ellipsis;
static PyObject *__pyx_kp_s_Empty_shape_tuple_for_cython_arr;
static PyObject *__pyx_n_s_ImportError;
static PyObject *__pyx_kp_s_Incompatible_checksums_0x_x_vs_0;
static PyObject *__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_2;
static PyObject *__pyx_n_s_IndexError;
static PyObject *__pyx_kp_s_Indirect_dimensions_not_supporte;
static PyObject *__pyx_kp_s_Invalid_ambiguous_case_i;
static PyObject *__pyx_kp_s_Invalid_edge_i;
static PyObject *__pyx_kp_s_Invalid_mode_expected_c_or_fortr;
static PyObject *__pyx_kp_s_Invalid_shape_in_axis_d_d;
static PyObject *__pyx_n_s_Lut;
static PyObject *__pyx_n_s_LutProvider;
static PyObject *__pyx_kp_s_Marching_Cubes_Impossible_case_1;
static PyObject *__pyx_n_s_MemoryError;
static PyObject *__pyx_kp_s_MemoryView_of_r_at_0x_x;
static PyObject *__pyx_kp_s_MemoryView_of_r_object;
static PyObject *__pyx_n_s_Nx;
static PyObject *__pyx_n_s_Nx_bound;
static PyObject *__pyx_n_s_Ny;
static PyObject *__pyx_n_s_Ny_bound;
static PyObject *__pyx_n_s_Nz;
static PyObject *__pyx_n_s_Nz_bound;
static PyObject *__pyx_n_b_O;
static PyObject *__pyx_kp_s_Out_of_bounds_on_buffer_access_a;
static PyObject *__pyx_n_s_PickleError;
static PyObject *__pyx_n_s_SUBCONFIG13;
static PyObject *__pyx_n_s_TEST10;
static PyObject *__pyx_n_s_TEST12;
static PyObject *__pyx_n_s_TEST13;
static PyObject *__pyx_n_s_TEST3;
static PyObject *__pyx_n_s_TEST4;
static PyObject *__pyx_n_s_TEST6;
static PyObject *__pyx_n_s_TEST7;
static PyObject *__pyx_n_s_TILING1;
static PyObject *__pyx_n_s_TILING10_1_1;
static PyObject *__pyx_n_s_TILING10_1_1_2;
static PyObject *__pyx_n_s_TILING10_1_2;
static PyObject *__pyx_n_s_TILING10_2;
static PyObject *__pyx_n_s_TILING10_2_2;
static PyObject *__pyx_n_s_TILING11;
static PyObject *__pyx_n_s_TILING12_1_1;
static PyObject *__pyx_n_s_TILING12_1_1_2;
static PyObject *__pyx_n_s_TILING12_1_2;
static PyObject *__pyx_n_s_TILING12_2;
static PyObject *__pyx_n_s_TILING12_2_2;
static PyObject *__pyx_n_s_TILING13_1;
static PyObject *__pyx_n_s_TILING13_1_2;
static PyObject *__pyx_n_s_TILING13_2;
static PyObject *__pyx_n_s_TILING13_2_2;
static PyObject *__pyx_n_s_TILING13_3;
static PyObject *__pyx_n_s_TILING13_3_2;
static PyObject *__pyx_n_s_TILING13_4;
static PyObject *__pyx_n_s_TILING13_5_1;
static PyObject *__pyx_n_s_TILING13_5_2;
static PyObject *__pyx_n_s_TILING14;
static PyObject *__pyx_n_s_TILING2;
static PyObject *__pyx_n_s_TILING3_1;
static PyObject *__pyx_n_s_TILING3_2;
static PyObject *__pyx_n_s_TILING4_1;
static PyObject *__pyx_n_s_TILING4_2;
static PyObject *__pyx_n_s_TILING5;
static PyObject *__pyx_n_s_TILING6_1_1;
static PyObject *__pyx_n_s_TILING6_1_2;
static PyObject *__pyx_n_s_TILING6_2;
static PyObject *__pyx_n_s_TILING7_1;
static PyObject *__pyx_n_s_TILING7_2;
static PyObject *__pyx_n_s_TILING7_3;
static PyObject *__pyx_n_s_TILING7_4_1;
static PyObject *__pyx_n_s_TILING7_4_2;
static PyObject *__pyx_n_s_TILING8;
static PyObject *__pyx_n_s_TILING9;
static PyObject *__pyx_n_s_TypeError;
static PyObject *__pyx_kp_s_Unable_to_convert_item_to_object;
static PyObject *__pyx_n_s_ValueError;
static PyObject *__pyx_n_s_View_MemoryView;
static PyObject *__pyx_n_s_allocate_buffer;
static PyObject *__pyx_n_s_arange;
static PyObject *__pyx_n_s_arr;
static PyObject *__pyx_n_s_array;
static PyObject *__pyx_n_s_arrays;
static PyObject *__pyx_n_s_arrays2;
static PyObject *__pyx_n_s_avg_cube_val;
static PyObject *__pyx_n_s_base;
static PyObject *__pyx_n_s_base_vec;
static PyObject *__pyx_n_s_c;
static PyObject *__pyx_n_u_c;
static PyObject *__pyx_n_s_case;
static PyObject *__pyx_n_s_cell;
static PyObject *__pyx_n_s_class;
static PyObject *__pyx_n_s_classic;
static PyObject *__pyx_n_s_cline_in_traceback;
static PyObject *__pyx_n_s_config;
static PyObject *__pyx_kp_s_contiguous_and_direct;
static PyObject *__pyx_kp_s_contiguous_and_indirect;
static PyObject *__pyx_n_s_copy;
static PyObject *__pyx_n_s_cumsum;
static PyObject *__pyx_n_s_dict;
static PyObject *__pyx_n_s_dtype;
static PyObject *__pyx_n_s_dtype_is_object;
static PyObject *__pyx_n_s_empty;
static PyObject *__pyx_n_s_encode;
static PyObject *__pyx_n_s_end;
static PyObject *__pyx_n_s_enumerate;
static PyObject *__pyx_n_s_error;
static PyObject *__pyx_n_s_faces;
static PyObject *__pyx_n_s_faces2;
static PyObject *__pyx_n_s_faces_2;
static PyObject *__pyx_n_s_faces_ok;
static PyObject *__pyx_n_s_faces_ok_2;
static PyObject *__pyx_n_s_file;
static PyObject *__pyx_n_s_flags;
static PyObject *__pyx_n_s_float32;
static PyObject *__pyx_n_s_format;
static PyObject *__pyx_n_s_fortran;
static PyObject *__pyx_n_u_fortran;
static PyObject *__pyx_n_s_get_faces;
static PyObject *__pyx_n_s_get_normals;
static PyObject *__pyx_n_s_get_values;
static PyObject *__pyx_n_s_get_vertices;
static PyObject *__pyx_n_s_getstate;
static PyObject *__pyx_kp_s_got_differing_extents_in_dimensi;
static PyObject *__pyx_n_s_grads;
static PyObject *__pyx_n_s_i1;
static PyObject *__pyx_n_s_i2;
static PyObject *__pyx_n_s_i3;
static PyObject *__pyx_n_s_id;
static PyObject *__pyx_n_s_im;
static PyObject *__pyx_n_s_import;
static PyObject *__pyx_n_s_int32;
static PyObject *__pyx_n_s_inwards_facing_normals_bool;
static PyObject *__pyx_n_s_inwards_facing_normals_ref;
static PyObject *__pyx_n_s_isovalue;
static PyObject *__pyx_n_s_itemsize;
static PyObject *__pyx_kp_s_itemsize_0_for_cython_array;
static PyObject *__pyx_n_s_j;
static PyObject *__pyx_n_s_luts;
static PyObject *__pyx_n_s_main;
static PyObject *__pyx_n_s_marching_cubes;
static PyObject *__pyx_n_s_marching_cubes_lewiner_cy;
static PyObject *__pyx_kp_s_marching_cubes_lewiner_cy_pyx;
static PyObject *__pyx_n_s_marching_cubes_udf;
static PyObject *__pyx_n_s_mask;
static PyObject *__pyx_n_s_max_cube_val;
static PyObject *__pyx_n_s_memview;
static PyObject *__pyx_n_s_mode;
static PyObject *__pyx_n_s_name;
static PyObject *__pyx_n_s_name_2;
static PyObject *__pyx_n_s_ndim;
static PyObject *__pyx_n_s_new;
static PyObject *__pyx_kp_s_no_default___reduce___due_to_non;
static PyObject *__pyx_n_s_no_mask;
static PyObject *__pyx_n_s_np;
static PyObject *__pyx_n_s_nt;
static PyObject *__pyx_n_s_numpy;
static PyObject *__pyx_kp_s_numpy_core_multiarray_failed_to;
static PyObject *__pyx_kp_s_numpy_core_umath_failed_to_impor;
static PyObject *__pyx_n_s_nx;
static PyObject *__pyx_n_s_ny;
static PyObject *__pyx_n_s_nz;
static PyObject *__pyx_n_s_obj;
static PyObject *__pyx_n_s_ones;
static PyObject *__pyx_n_s_pack;
static PyObject *__pyx_n_s_pickle;
static PyObject *__pyx_n_s_print;
static PyObject *__pyx_n_s_pyx_PickleError;
static PyObject *__pyx_n_s_pyx_checksum;
static PyObject *__pyx_n_s_pyx_getbuffer;
static PyObject *__pyx_n_s_pyx_result;
static PyObject *__pyx_n_s_pyx_state;
static PyObject *__pyx_n_s_pyx_type;
static PyObject *__pyx_n_s_pyx_unpickle_Enum;
static PyObject *__pyx_n_s_pyx_unpickle_LutProvider;
static PyObject *__pyx_n_s_pyx_vtable;
static PyObject *__pyx_n_s_range;
static PyObject *__pyx_n_s_ravel;
static PyObject *__pyx_n_s_reduce;
static PyObject *__pyx_n_s_reduce_cython;
static PyObject *__pyx_n_s_reduce_ex;
static PyObject *__pyx_n_s_remove_degenerate_faces;
static PyObject *__pyx_n_s_setstate;
static PyObject *__pyx_n_s_setstate_cython;
static PyObject *__pyx_n_s_shape;
static PyObject *__pyx_n_s_size;
static PyObject *__pyx_n_s_spacing;
static PyObject *__pyx_n_s_st;
static PyObject *__pyx_n_s_start;
static PyObject *__pyx_n_s_step;
static PyObject *__pyx_n_s_stop;
static PyObject *__pyx_kp_s_strided_and_direct;
static PyObject *__pyx_kp_s_strided_and_direct_or_indirect;
static PyObject *__pyx_kp_s_strided_and_indirect;
static PyObject *__pyx_kp_s_stringsource;
static PyObject *__pyx_n_s_struct;
static PyObject *__pyx_n_s_subconfig;
static PyObject *__pyx_n_s_test;
static PyObject *__pyx_kp_s_unable_to_allocate_array_data;
static PyObject *__pyx_kp_s_unable_to_allocate_shape_and_str;
static PyObject *__pyx_n_s_unpack;
static PyObject *__pyx_n_s_update;
static PyObject *__pyx_n_s_v1;
static PyObject *__pyx_n_s_v2;
static PyObject *__pyx_n_s_v3;
static PyObject *__pyx_n_s_vertices;
static PyObject *__pyx_n_s_vertices2;
static PyObject *__pyx_n_s_vertices_2;
static PyObject *__pyx_n_s_vertices_map0;
static PyObject *__pyx_n_s_vertices_map1;
static PyObject *__pyx_n_s_vertices_map1_2;
static PyObject *__pyx_n_s_vertices_map2;
static PyObject *__pyx_n_s_vertices_ok;
static PyObject *__pyx_n_s_voxel_size;
static PyObject *__pyx_n_s_x;
static PyObject *__pyx_n_s_x_st;
static PyObject *__pyx_n_s_y;
static PyObject *__pyx_n_s_y_st;
static PyObject *__pyx_n_s_z;
static PyObject *__pyx_n_s_z_st;
static 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 */
static 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 */
static int __pyx_pf_26_marching_cubes_lewiner_cy_4Cell_2__cinit__(struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *__pyx_v_self); /* proto */
static void __pyx_pf_26_marching_cubes_lewiner_cy_4Cell_4__dealloc__(struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_26_marching_cubes_lewiner_cy_4Cell_6get_vertices(struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_26_marching_cubes_lewiner_cy_4Cell_8get_normals(struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_26_marching_cubes_lewiner_cy_4Cell_10get_faces(struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_26_marching_cubes_lewiner_cy_4Cell_12get_values(struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell *__pyx_v_self); /* proto */
static 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 */
static 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 */
static 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 */
static int __pyx_pf_26_marching_cubes_lewiner_cy_3Lut_2__cinit__(struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *__pyx_v_self); /* proto */
static void __pyx_pf_26_marching_cubes_lewiner_cy_3Lut_4__dealloc__(struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut *__pyx_v_self); /* proto */
static 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 */
static 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 */
static 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 */
static 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 */
static 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 */
static 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 */
static 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 */
static 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 */
static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_shape, Py_ssize_t __pyx_v_itemsize, PyObject *__pyx_v_format, PyObject *__pyx_v_mode, int __pyx_v_allocate_buffer); /* proto */
static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(struct __pyx_array_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */
static void __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(struct __pyx_array_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_15View_dot_MemoryView_5array_7memview___get__(struct __pyx_array_obj *__pyx_v_self); /* proto */
static Py_ssize_t __pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__len__(struct __pyx_array_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getattr__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_attr); /* proto */
static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__getitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item); /* proto */
static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_12__setitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf___pyx_array___reduce_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf___pyx_array_2__setstate_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
static PyObject *__pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum_2__repr__(struct __pyx_MemviewEnum_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf___pyx_MemviewEnum___reduce_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf___pyx_MemviewEnum_2__setstate_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_v_flags, int __pyx_v_dtype_is_object); /* proto */
static void __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__dealloc__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4__getitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index); /* proto */
static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_6__setitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /* proto */
static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_8__getbuffer__(struct __pyx_memoryview_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */
static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4base___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_5shape___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static Py_ssize_t __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_10__len__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_12__repr__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_14__str__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_16is_c_contig(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_18is_f_contig(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20copy(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_22copy_fortran(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf___pyx_memoryview___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf___pyx_memoryview_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static void __pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memoryviewslice___dealloc__(struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_15View_dot_MemoryView_16_memoryviewslice_4base___get__(struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf___pyx_memoryviewslice___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf___pyx_memoryviewslice_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_15View_dot_MemoryView___pyx_unpickle_Enum(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_tp_new_26_marching_cubes_lewiner_cy_Cell(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_26_marching_cubes_lewiner_cy_Lut(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_26_marching_cubes_lewiner_cy_LutProvider(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_array(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_Enum(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_memoryview(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new__memoryviewslice(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_float_1_;
static PyObject *__pyx_float_1_0;
static PyObject *__pyx_float_1_05;
static PyObject *__pyx_float_1_74;
static PyObject *__pyx_float_neg_1_;
static PyObject *__pyx_int_0;
static PyObject *__pyx_int_1;
static PyObject *__pyx_int_2;
static PyObject *__pyx_int_3;
static PyObject *__pyx_int_50552520;
static PyObject *__pyx_int_77914546;
static PyObject *__pyx_int_88039365;
static PyObject *__pyx_int_112105877;
static PyObject *__pyx_int_136983863;
static PyObject *__pyx_int_184977713;
static PyObject *__pyx_int_neg_1;
static PyObject *__pyx_tuple_;
static PyObject *__pyx_tuple__2;
static PyObject *__pyx_tuple__3;
static PyObject *__pyx_tuple__4;
static PyObject *__pyx_tuple__5;
static PyObject *__pyx_tuple__6;
static PyObject *__pyx_tuple__7;
static PyObject *__pyx_tuple__8;
static PyObject *__pyx_tuple__9;
static PyObject *__pyx_slice__30;
static PyObject *__pyx_tuple__10;
static PyObject *__pyx_tuple__11;
static PyObject *__pyx_tuple__12;
static PyObject *__pyx_tuple__13;
static PyObject *__pyx_tuple__14;
static PyObject *__pyx_tuple__15;
static PyObject *__pyx_tuple__16;
static PyObject *__pyx_tuple__17;
static PyObject *__pyx_tuple__18;
static PyObject *__pyx_tuple__19;
static PyObject *__pyx_tuple__20;
static PyObject *__pyx_tuple__21;
static PyObject *__pyx_tuple__22;
static PyObject *__pyx_tuple__23;
static PyObject *__pyx_tuple__24;
static PyObject *__pyx_tuple__25;
static PyObject *__pyx_tuple__26;
static PyObject *__pyx_tuple__27;
static PyObject *__pyx_tuple__28;
static PyObject *__pyx_tuple__29;
static PyObject *__pyx_tuple__31;
static PyObject *__pyx_tuple__32;
static PyObject *__pyx_tuple__33;
static PyObject *__pyx_tuple__34;
static PyObject *__pyx_tuple__35;
static PyObject *__pyx_tuple__36;
static PyObject *__pyx_tuple__38;
static PyObject *__pyx_tuple__40;
static PyObject *__pyx_tuple__42;
static PyObject *__pyx_tuple__44;
static PyObject *__pyx_tuple__45;
static PyObject *__pyx_tuple__46;
static PyObject *__pyx_tuple__47;
static PyObject *__pyx_tuple__48;
static PyObject *__pyx_tuple__49;
static PyObject *__pyx_codeobj__37;
static PyObject *__pyx_codeobj__39;
static PyObject *__pyx_codeobj__41;
static PyObject *__pyx_codeobj__43;
static PyObject *__pyx_codeobj__50;
/* Late includes */

/* "_marching_cubes_lewiner_cy.pyx":35
 * 
 * # Define abs function for doubles
 * cdef inline double dabs(double a): return a if a>=0 else -a             # <<<<<<<<<<<<<<
 * cdef inline int imin(int a, int b): return a if a<b else b
 * 
 */

static CYTHON_INLINE double __pyx_f_26_marching_cubes_lewiner_cy_dabs(double __pyx_v_a) {
  double __pyx_r;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  __Pyx_RefNannySetupContext("dabs", 0);
  if (((__pyx_v_a >= 0.0) != 0)) {
    __pyx_t_1 = __pyx_v_a;
  } else {
    __pyx_t_1 = (-__pyx_v_a);
  }
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

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

/* "_marching_cubes_lewiner_cy.pyx":36
 * # Define abs function for doubles
 * cdef inline double dabs(double a): return a if a>=0 else -a
 * cdef inline int imin(int a, int b): return a if a<b else b             # <<<<<<<<<<<<<<
 * 
 * # todo: allow dynamic isovalue?
 */

static CYTHON_INLINE int __pyx_f_26_marching_cubes_lewiner_cy_imin(int __pyx_v_a, int __pyx_v_b) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("imin", 0);
  if (((__pyx_v_a < __pyx_v_b) != 0)) {
    __pyx_t_1 = __pyx_v_a;
  } else {
    __pyx_t_1 = __pyx_v_b;
  }
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

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

/* "_marching_cubes_lewiner_cy.pyx":41
 * # todo: can we disable Cython from checking for zero division? Sometimes we know that it never happens!
 * 
 * def remove_degenerate_faces(vertices, faces, *arrays):             # <<<<<<<<<<<<<<
 * 
 *     vertices_map0 = np.arange(len(vertices), dtype=np.int32)
 */

/* Python wrapper */
static PyObject *__pyx_pw_26_marching_cubes_lewiner_cy_1remove_degenerate_faces(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static 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};
static PyObject *__pyx_pw_26_marching_cubes_lewiner_cy_1remove_degenerate_faces(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_vertices = 0;
  PyObject *__pyx_v_faces = 0;
  PyObject *__pyx_v_arrays = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("remove_degenerate_faces (wrapper)", 0);
  if (PyTuple_GET_SIZE(__pyx_args) > 2) {
    __pyx_v_arrays = PyTuple_GetSlice(__pyx_args, 2, PyTuple_GET_SIZE(__pyx_args));
    if (unlikely(!__pyx_v_arrays)) {
      __Pyx_RefNannyFinishContext();
      return NULL;
    }
    __Pyx_GOTREF(__pyx_v_arrays);
  } else {
    __pyx_v_arrays = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
  }
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_vertices,&__pyx_n_s_faces,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        default:
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_vertices)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_faces)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("remove_degenerate_faces", 0, 2, 2, 1); __PYX_ERR(0, 41, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t used_pos_args = (pos_args < 2) ? pos_args : 2;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "remove_degenerate_faces") < 0)) __PYX_ERR(0, 41, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) < 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_vertices = values[0];
    __pyx_v_faces = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("remove_degenerate_faces", 0, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 41, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_arrays); __pyx_v_arrays = 0;
  __Pyx_AddTraceback("_marching_cubes_lewiner_cy.remove_degenerate_faces", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_26_marching_cubes_lewiner_cy_remove_degenerate_faces(__pyx_self, __pyx_v_vertices, __pyx_v_faces, __pyx_v_arrays);

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

static 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) {
  PyObject *__pyx_v_vertices_map0 = NULL;
  PyObject *__pyx_v_vertices_map1 = NULL;
  PyObject *__pyx_v_faces_ok = NULL;
  __Pyx_memviewslice __pyx_v_vertices_ = { 0, 0, { 0 }, { 0 }, { 0 } };
  __Pyx_memviewslice __pyx_v_v1 = { 0, 0, { 0 }, { 0 }, { 0 } };
  __Pyx_memviewslice __pyx_v_v2 = { 0, 0, { 0 }, { 0 }, { 0 } };
  __Pyx_memviewslice __pyx_v_v3 = { 0, 0, { 0 }, { 0 }, { 0 } };
  __Pyx_memviewslice __pyx_v_faces_ = { 0, 0, { 0 }, { 0 }, { 0 } };
  __Pyx_memviewslice __pyx_v_vertices_map1_ = { 0, 0, { 0 }, { 0 }, { 0 } };
  __Pyx_memviewslice __pyx_v_faces_ok_ = { 0, 0, { 0 }, { 0 }, { 0 } };
  int __pyx_v_j;
  int __pyx_v_i1;
  int __pyx_v_i2;
  int __pyx_v_i3;
  PyObject *__pyx_v_vertices_ok = NULL;
  PyObject *__pyx_v_vertices_map2 = NULL;
  PyObject *__pyx_v_faces2 = NULL;
  PyObject *__pyx_v_vertices2 = NULL;
  PyObject *__pyx_v_arrays2 = NULL;
  PyObject *__pyx_v_arr = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_memviewslice __pyx_t_7 = { 0, 0, { 0 }, { 0 }, { 0 } };
  __Pyx_memviewslice __pyx_t_8 = { 0, 0, { 0 }, { 0 }, { 0 } };
  __Pyx_memviewslice __pyx_t_9 = { 0, 0, { 0 }, { 0 }, { 0 } };
  Py_ssize_t __pyx_t_10;
  int __pyx_t_11;
  Py_ssize_t __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  int __pyx_t_14;
  int __pyx_t_15;
  int __pyx_t_16;
  __Pyx_memviewslice __pyx_t_17 = { 0, 0, { 0 }, { 0 }, { 0 } };
  __Pyx_memviewslice __pyx_t_18 = { 0, 0, { 0 }, { 0 }, { 0 } };
  __Pyx_memviewslice __pyx_t_19 = { 0, 0, { 0 }, { 0 }, { 0 } };
  int __pyx_t_20;
  int __pyx_t_21;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("remove_degenerate_faces", 0);

  /* "_marching_cubes_lewiner_cy.pyx":43
 * def remove_degenerate_faces(vertices, faces, *arrays):
 * 
 *     vertices_map0 = np.arange(len(vertices), dtype=np.int32)             # <<<<<<<<<<<<<<
 *     vertices_map1 = vertices_map0.copy()
 *     faces_ok = np.ones(len(faces), dtype=np.int32)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 43, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __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)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = PyObject_Length(__pyx_v_vertices); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 43, __pyx_L1_error)
  __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 43, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 43, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 43, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 43, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __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)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_t_6) < 0) __PYX_ERR(0, 43, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __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)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_vertices_map0 = __pyx_t_6;
  __pyx_t_6 = 0;

  /* "_marching_cubes_lewiner_cy.pyx":44
 * 
 *     vertices_map0 = np.arange(len(vertices), dtype=np.int32)
 *     vertices_map1 = vertices_map0.copy()             # <<<<<<<<<<<<<<
 *     faces_ok = np.ones(len(faces), dtype=np.int32)
 * 
 */
  __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)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  __pyx_t_6 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 44, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_vertices_map1 = __pyx_t_6;
  __pyx_t_6 = 0;

  /* "_marching_cubes_lewiner_cy.pyx":45
 *     vertices_map0 = np.arange(len(vertices), dtype=np.int32)
 *     vertices_map1 = vertices_map0.copy()
 *     faces_ok = np.ones(len(faces), dtype=np.int32)             # <<<<<<<<<<<<<<
 * 
 *     cdef float [:, :] vertices_ = vertices
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 45, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __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)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_3 = PyObject_Length(__pyx_v_faces); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 45, __pyx_L1_error)
  __pyx_t_6 = PyInt_FromSsize_t(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 45, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 45, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
  __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 45, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 45, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __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)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_dtype, __pyx_t_5) < 0) __PYX_ERR(0, 45, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __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)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_v_faces_ok = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "_marching_cubes_lewiner_cy.pyx":47
 *     faces_ok = np.ones(len(faces), dtype=np.int32)
 * 
 *     cdef float [:, :] vertices_ = vertices             # <<<<<<<<<<<<<<
 *     cdef float [:] v1, v2, v3
 *     cdef int [:, :]  faces_ = faces
 */
  __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)
  __pyx_v_vertices_ = __pyx_t_7;
  __pyx_t_7.memview = NULL;
  __pyx_t_7.data = NULL;

  /* "_marching_cubes_lewiner_cy.pyx":49
 *     cdef float [:, :] vertices_ = vertices
 *     cdef float [:] v1, v2, v3
 *     cdef int [:, :]  faces_ = faces             # <<<<<<<<<<<<<<
 * 
 *     cdef int [:] vertices_map1_ = vertices_map1
 */
  __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)
  __pyx_v_faces_ = __pyx_t_8;
  __pyx_t_8.memview = NULL;
  __pyx_t_8.data = NULL;

  /* "_marching_cubes_lewiner_cy.pyx":51
 *     cdef int [:, :]  faces_ = faces
 * 
 *     cdef int [:] vertices_map1_ = vertices_map1             # <<<<<<<<<<<<<<
 *     cdef int [:] faces_ok_ = faces_ok
 * 
 */
  __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)
  __pyx_v_vertices_map1_ = __pyx_t_9;
  __pyx_t_9.memview = NULL;
  __pyx_t_9.data = NULL;

  /* "_marching_cubes_lewiner_cy.pyx":52
 * 
 *     cdef int [:] vertices_map1_ = vertices_map1
 *     cdef int [:] faces_ok_ = faces_ok             # <<<<<<<<<<<<<<
 * 
 *     cdef int j, i1, i2, i3
 */
  __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)
  __pyx_v_faces_ok_ = __pyx_t_9;
  __pyx_t_9.memview = NULL;
  __pyx_t_9.data = NULL;

  /* "_marching_cubes_lewiner_cy.pyx":58
 *     # Iterate over all faces. When we encounter a degenerate triangle,
 *     # we update the vertex map, i.e. we merge the corresponding vertices.
 *     for j in range(faces_.shape[0]):             # <<<<<<<<<<<<<<
 *         i1, i2, i3 = faces_[j][0], faces_[j][1], faces_[j][2]
 *         v1, v2, v3 = vertices_[i1], vertices_[i2], vertices_[i3]
 */
  __pyx_t_3 = (__pyx_v_faces_.shape[0]);
  __pyx_t_10 = __pyx_t_3;
  for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) {
    __pyx_v_j = __pyx_t_11;

    /* "_marching_cubes_lewiner_cy.pyx":59
 *     # we update the vertex map, i.e. we merge the corresponding vertices.
 *     for j in range(faces_.shape[0]):
 *         i1, i2, i3 = faces_[j][0], faces_[j][1], faces_[j][2]             # <<<<<<<<<<<<<<
 *         v1, v2, v3 = vertices_[i1], vertices_[i2], vertices_[i3]
 *         if v1[0] == v2[0] and v1[1] == v2[1] and v1[2] == v2[2]:
 */
    __pyx_t_12 = __pyx_v_j;
    __pyx_t_13 = 0;
    __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]) )));
    __pyx_t_13 = __pyx_v_j;
    __pyx_t_12 = 1;
    __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]) )));
    __pyx_t_12 = __pyx_v_j;
    __pyx_t_13 = 2;
    __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]) )));
    __pyx_v_i1 = __pyx_t_14;
    __pyx_v_i2 = __pyx_t_15;
    __pyx_v_i3 = __pyx_t_16;

    /* "_marching_cubes_lewiner_cy.pyx":60
 *     for j in range(faces_.shape[0]):
 *         i1, i2, i3 = faces_[j][0], faces_[j][1], faces_[j][2]
 *         v1, v2, v3 = vertices_[i1], vertices_[i2], vertices_[i3]             # <<<<<<<<<<<<<<
 *         if v1[0] == v2[0] and v1[1] == v2[1] and v1[2] == v2[2]:
 *             vertices_map1_[i1] = vertices_map1_[i2] = imin(vertices_map1_[i1], vertices_map1_[i2])
 */
    __pyx_t_17.data = __pyx_v_vertices_.data;
    __pyx_t_17.memview = __pyx_v_vertices_.memview;
    __PYX_INC_MEMVIEW(&__pyx_t_17, 0);
    {
    Py_ssize_t __pyx_tmp_idx = __pyx_v_i1;
    Py_ssize_t __pyx_tmp_stride = __pyx_v_vertices_.strides[0];
        __pyx_t_17.data += __pyx_tmp_idx * __pyx_tmp_stride;
}

__pyx_t_17.shape[0] = __pyx_v_vertices_.shape[1];
__pyx_t_17.strides[0] = __pyx_v_vertices_.strides[1];
    __pyx_t_17.suboffsets[0] = -1;

__pyx_t_18.data = __pyx_v_vertices_.data;
    __pyx_t_18.memview = __pyx_v_vertices_.memview;
    __PYX_INC_MEMVIEW(&__pyx_t_18, 0);
    {
    Py_ssize_t __pyx_tmp_idx = __pyx_v_i2;
    Py_ssize_t __pyx_tmp_stride = __pyx_v_vertices_.strides[0];
        __pyx_t_18.data += __pyx_tmp_idx * __pyx_tmp_stride;
}

__pyx_t_18.shape[0] = __pyx_v_vertices_.shape[1];
__pyx_t_18.strides[0] = __pyx_v_vertices_.strides[1];
    __pyx_t_18.suboffsets[0] = -1;

__pyx_t_19.data = __pyx_v_vertices_.data;
    __pyx_t_19.memview = __pyx_v_vertices_.memview;
    __PYX_INC_MEMVIEW(&__pyx_t_19, 0);
    {
    Py_ssize_t __pyx_tmp_idx = __pyx_v_i3;
    Py_ssize_t __pyx_tmp_stride = __pyx_v_vertices_.strides[0];
        __pyx_t_19.data += __pyx_tmp_idx * __pyx_tmp_stride;
}

__pyx_t_19.shape[0] = __pyx_v_vertices_.shape[1];
__pyx_t_19.strides[0] = __pyx_v_vertices_.strides[1];
    __pyx_t_19.suboffsets[0] = -1;

__PYX_XDEC_MEMVIEW(&__pyx_v_v1, 1);
    __pyx_v_v1 = __pyx_t_17;
    __pyx_t_17.memview = NULL;
    __pyx_t_17.data = NULL;
    __PYX_XDEC_MEMVIEW(&__pyx_v_v2, 1);
    __pyx_v_v2 = __pyx_t_18;
    __pyx_t_18.memview = NULL;
    __pyx_t_18.data = NULL;
    __PYX_XDEC_MEMVIEW(&__pyx_v_v3, 1);
    __pyx_v_v3 = __pyx_t_19;
    __pyx_t_19.memview = NULL;
    __pyx_t_19.data = NULL;

    /* "_marching_cubes_lewiner_cy.pyx":61
 *         i1, i2, i3 = faces_[j][0], faces_[j][1], faces_[j][2]
 *         v1, v2, v3 = vertices_[i1], vertices_[i2], vertices_[i3]
 *         if v1[0] == v2[0] and v1[1] == v2[1] and v1[2] == v2[2]:             # <<<<<<<<<<<<<<
 *             vertices_map1_[i1] = vertices_map1_[i2] = imin(vertices_map1_[i1], vertices_map1_[i2])
 *             faces_ok_[j] = 0
 */
    __pyx_t_13 = 0;
    __pyx_t_12 = 0;
    __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);
    if (__pyx_t_21) {
    } else {
      __pyx_t_20 = __pyx_t_21;
      goto __pyx_L6_bool_binop_done;
    }
    __pyx_t_12 = 1;
    __pyx_t_13 = 1;
    __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);
    if (__pyx_t_21) {
    } else {
      __pyx_t_20 = __pyx_t_21;
      goto __pyx_L6_bool_binop_done;
    }
    __pyx_t_13 = 2;
    __pyx_t_12 = 2;
    __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);
    __pyx_t_20 = __pyx_t_21;
    __pyx_L6_bool_binop_done:;
    if (__pyx_t_20) {

      /* "_marching_cubes_lewiner_cy.pyx":62
 *         v1, v2, v3 = vertices_[i1], vertices_[i2], vertices_[i3]
 *         if v1[0] == v2[0] and v1[1] == v2[1] and v1[2] == v2[2]:
 *             vertices_map1_[i1] = vertices_map1_[i2] = imin(vertices_map1_[i1], vertices_map1_[i2])             # <<<<<<<<<<<<<<
 *             faces_ok_[j] = 0
 *         if v1[0] == v3[0] and v1[1] == v3[1] and v1[2] == v3[2]:
 */
      __pyx_t_12 = __pyx_v_i1;
      __pyx_t_13 = __pyx_v_i2;
      __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]) ))));
      __pyx_t_13 = __pyx_v_i1;
      *((int *) ( /* dim=0 */ (__pyx_v_vertices_map1_.data + __pyx_t_13 * __pyx_v_vertices_map1_.strides[0]) )) = __pyx_t_16;
      __pyx_t_13 = __pyx_v_i2;
      *((int *) ( /* dim=0 */ (__pyx_v_vertices_map1_.data + __pyx_t_13 * __pyx_v_vertices_map1_.strides[0]) )) = __pyx_t_16;

      /* "_marching_cubes_lewiner_cy.pyx":63
 *         if v1[0] == v2[0] and v1[1] == v2[1] and v1[2] == v2[2]:
 *             vertices_map1_[i1] = vertices_map1_[i2] = imin(vertices_map1_[i1], vertices_map1_[i2])
 *             faces_ok_[j] = 0             # <<<<<<<<<<<<<<
 *         if v1[0] == v3[0] and v1[1] == v3[1] and v1[2] == v3[2]:
 *             vertices_map1_[i1] = vertices_map1_[i3] = imin(vertices_map1_[i1], vertices_map1_[i3])
 */
      __pyx_t_13 = __pyx_v_j;
      *((int *) ( /* dim=0 */ (__pyx_v_faces_ok_.data + __pyx_t_13 * __pyx_v_faces_ok_.strides[0]) )) = 0;

      /* "_marching_cubes_lewiner_cy.pyx":61
 *         i1, i2, i3 = faces_[j][0], faces_[j][1], faces_[j][2]
 *         v1, v2, v3 = vertices_[i1], vertices_[i2], vertices_[i3]
 *         if v1[0] == v2[0] and v1[1] == v2[1] and v1[2] == v2[2]:             # <<<<<<<<<<<<<<
 *             vertices_map1_[i1] = vertices_map1_[i2] = imin(vertices_map1_[i1], vertices_map1_[i2])
 *             faces_ok_[j] = 0
 */
    }

    /* "_marching_cubes_lewiner_cy.pyx":64
 *             vertices_map1_[i1] = vertices_map1_[i2] = imin(vertices_map1_[i1], vertices_map1_[i2])
 *             faces_ok_[j] = 0
 *         if v1[0] == v3[0] and v1[1] == v3[1] and v1[2] == v3[2]:             # <<<<<<<<<<<<<<
 *             vertices_map1_[i1] = vertices_map1_[i3] = imin(vertices_map1_[i1], vertices_map1_[i3])
 *             faces_ok_[j] = 0
 */
    __pyx_t_13 = 0;
    __pyx_t_12 = 0;
    __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);
    if (__pyx_t_21) {
    } else {
      __pyx_t_20 = __pyx_t_21;
      goto __pyx_L10_bool_binop_done;
    }
    __pyx_t_12 = 1;
    __pyx_t_13 = 1;
    __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);
    if (__pyx_t_21) {
    } else {
      __pyx_t_20 = __pyx_t_21;
      goto __pyx_L10_bool_binop_done;
    }
    __pyx_t_13 = 2;
    __pyx_t_12 = 2;
    __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);
    __pyx_t_20 = __pyx_t_21;
    __pyx_L10_bool_binop_done:;
    if (__pyx_t_20) {

      /* "_marching_cubes_lewiner_cy.pyx":65
 *             faces_ok_[j] = 0
 *         if v1[0] == v3[0] and v1[1] == v3[1] and v1[2] == v3[2]:
 *             vertices_map1_[i1] = vertices_map1_[i3] = imin(vertices_map1_[i1], vertices_map1_[i3])             # <<<<<<<<<<<<<<
 *             faces_ok_[j] = 0
 *         if v2[0] == v3[0] and v2[1] == v3[1] and v2[2] == v3[2]:
 */
      __pyx_t_12 = __pyx_v_i1;
      __pyx_t_13 = __pyx_v_i3;
      __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]) ))));
      __pyx_t_13 = __pyx_v_i1;
      *((int *) ( /* dim=0 */ (__pyx_v_vertices_map1_.data + __pyx_t_13 * __pyx_v_vertices_map1_.strides[0]) )) = __pyx_t_16;
      __pyx_t_13 = __pyx_v_i3;
      *((int *) ( /* dim=0 */ (__pyx_v_vertices_map1_.data + __pyx_t_13 * __pyx_v_vertices_map1_.strides[0]) )) = __pyx_t_16;

      /* "_marching_cubes_lewiner_cy.pyx":66
 *         if v1[0] == v3[0] and v1[1] == v3[1] and v1[2] == v3[2]:
 *             vertices_map1_[i1] = vertices_map1_[i3] = imin(vertices_map1_[i1], vertices_map1_[i3])
 *             faces_ok_[j] = 0             # <<<<<<<<<<<<<<
 *         if v2[0] == v3[0] and v2[1] == v3[1] and v2[2] == v3[2]:
 *             vertices_map1_[i2] = vertices_map1_[i3] = imin(vertices_map1_[i2], vertices_map1_[i3])
 */
      __pyx_t_13 = __pyx_v_j;
      *((int *) ( /* dim=0 */ (__pyx_v_faces_ok_.data + __pyx_t_13 * __pyx_v_faces_ok_.strides[0]) )) = 0;

      /* "_marching_cubes_lewiner_cy.pyx":64
 *             vertices_map1_[i1] = vertices_map1_[i2] = imin(vertices_map1_[i1], vertices_map1_[i2])
 *             faces_ok_[j] = 0
 *         if v1[0] == v3[0] and v1[1] == v3[1] and v1[2] == v3[2]:             # <<<<<<<<<<<<<<
 *             vertices_map1_[i1] = vertices_map1_[i3] = imin(vertices_map1_[i1], vertices_map1_[i3])
 *             faces_ok_[j] = 0
 */
    }

    /* "_marching_cubes_lewiner_cy.pyx":67
 *             vertices_map1_[i1] = vertices_map1_[i3] = imin(vertices_map1_[i1], vertices_map1_[i3])
 *             faces_ok_[j] = 0
 *         if v2[0] == v3[0] and v2[1] == v3[1] and v2[2] == v3[2]:             # <<<<<<<<<<<<<<
 *             vertices_map1_[i2] = vertices_map1_[i3] = imin(vertices_map1_[i2], vertices_map1_[i3])
 *             faces_ok_[j] = 0
 */
    __pyx_t_13 = 0;
    __pyx_t_12 = 0;
    __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);
    if (__pyx_t_21) {
    } else {
      __pyx_t_20 = __pyx_t_21;
      goto __pyx_L14_bool_binop_done;
    }
    __pyx_t_12 = 1;
    __pyx_t_13 = 1;
    __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);
    if (__pyx_t_21) {
    } else {
      __pyx_t_20 = __pyx_t_21;
      goto __pyx_L14_bool_binop_done;
    }
    __pyx_t_13 = 2;
    __pyx_t_12 = 2;
    __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);
    __pyx_t_20 = __pyx_t_21;
    __pyx_L14_bool_binop_done:;
    if (__pyx_t_20) {

      /* "_marching_cubes_lewiner_cy.pyx":68
 *             faces_ok_[j] = 0
 *         if v2[0] == v3[0] and v2[1] == v3[1] and v2[2] == v3[2]:
 *             vertices_map1_[i2] = vertices_map1_[i3] = imin(vertices_map1_[i2], vertices_map1_[i3])             # <<<<<<<<<<<<<<
 *             faces_ok_[j] = 0
 * 
 */
      __pyx_t_12 = __pyx_v_i2;
      __pyx_t_13 = __pyx_v_i3;
      __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]) ))));
      __pyx_t_13 = __pyx_v_i2;
      *((int *) ( /* dim=0 */ (__pyx_v_vertices_map1_.data + __pyx_t_13 * __pyx_v_vertices_map1_.strides[0]) )) = __pyx_t_16;
      __pyx_t_13 = __pyx_v_i3;
      *((int *) ( /* dim=0 */ (__pyx_v_vertices_map1_.data + __pyx_t_13 * __pyx_v_vertices_map1_.strides[0]) )) = __pyx_t_16;

      /* "_marching_cubes_lewiner_cy.pyx":69
 *         if v2[0] == v3[0] and v2[1] == v3[1] and v2[2] == v3[2]:
 *             vertices_map1_[i2] = vertices_map1_[i3] = imin(vertices_map1_[i2], vertices_map1_[i3])
 *             faces_ok_[j] = 0             # <<<<<<<<<<<<<<
 * 
 *     # Create mask and mapping to new vertex indices
 */
      __pyx_t_13 = __pyx_v_j;
      *((int *) ( /* dim=0 */ (__pyx_v_faces_ok_.data + __pyx_t_13 * __pyx_v_faces_ok_.strides[0]) )) = 0;

      /* "_marching_cubes_lewiner_cy.pyx":67
 *             vertices_map1_[i1] = vertices_map1_[i3] = imin(vertices_map1_[i1], vertices_map1_[i3])
 *             faces_ok_[j] = 0
 *         if v2[0] == v3[0] and v2[1] == v3[1] and v2[2] == v3[2]:             # <<<<<<<<<<<<<<
 *             vertices_map1_[i2] = vertices_map1_[i3] = imin(vertices_map1_[i2], vertices_map1_[i3])
 *             faces_ok_[j] = 0
 */
    }
  }

  /* "_marching_cubes_lewiner_cy.pyx":72
 * 
 *     # Create mask and mapping to new vertex indices
 *     vertices_ok = vertices_map1 == vertices_map0             # <<<<<<<<<<<<<<
 *     vertices_map2 = np.cumsum(vertices_ok) - 1
 * 
 */
  __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)
  __pyx_v_vertices_ok = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "_marching_cubes_lewiner_cy.pyx":73
 *     # Create mask and mapping to new vertex indices
 *     vertices_ok = vertices_map1 == vertices_map0
 *     vertices_map2 = np.cumsum(vertices_ok) - 1             # <<<<<<<<<<<<<<
 * 
 *     # Apply selection and mapping
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 73, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __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)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __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);
  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 73, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __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)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_vertices_map2 = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "_marching_cubes_lewiner_cy.pyx":76
 * 
 *     # Apply selection and mapping
 *     faces2 = vertices_map2[vertices_map1[faces[faces_ok>0]]]             # <<<<<<<<<<<<<<
 *     vertices2 = vertices[vertices_ok]
 *     arrays2 = [arr[vertices_ok] for arr in arrays]
 */
  __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)
  __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_v_faces, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 76, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __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)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __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)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_faces2 = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "_marching_cubes_lewiner_cy.pyx":77
 *     # Apply selection and mapping
 *     faces2 = vertices_map2[vertices_map1[faces[faces_ok>0]]]
 *     vertices2 = vertices[vertices_ok]             # <<<<<<<<<<<<<<
 *     arrays2 = [arr[vertices_ok] for arr in arrays]
 * 
 */
  __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)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_vertices2 = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "_marching_cubes_lewiner_cy.pyx":78
 *     faces2 = vertices_map2[vertices_map1[faces[faces_ok>0]]]
 *     vertices2 = vertices[vertices_ok]
 *     arrays2 = [arr[vertices_ok] for arr in arrays]             # <<<<<<<<<<<<<<
 * 
 *     return (vertices2, faces2) + tuple(arrays2)
 */
  __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 78, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __pyx_v_arrays; __Pyx_INCREF(__pyx_t_4); __pyx_t_3 = 0;
  for (;;) {
    if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __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)
    #else
    __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)
    __Pyx_GOTREF(__pyx_t_6);
    #endif
    __Pyx_XDECREF_SET(__pyx_v_arr, __pyx_t_6);
    __pyx_t_6 = 0;
    __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)
    __Pyx_GOTREF(__pyx_t_6);
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_5, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 78, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_arrays2 = ((PyObject*)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "_marching_cubes_lewiner_cy.pyx":80
 *     arrays2 = [arr[vertices_ok] for arr in arrays]
 * 
 *     return (vertices2, faces2) + tuple(arrays2)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 80, __pyx_L1_error)
  _
Download .txt
gitextract_vbzbbjy4/

├── LICENSE
├── README.md
├── confs/
│   ├── wmask_old.conf
│   ├── wmask_open.conf
│   └── womask_open.conf
├── custom_mc/
│   ├── _marching_cubes_lewiner.py
│   ├── _marching_cubes_lewiner_cy.c
│   ├── _marching_cubes_lewiner_cy.pyx
│   ├── _marching_cubes_lewiner_luts.py
│   ├── build/
│   │   ├── temp.linux-x86_64-3.8/
│   │   │   └── _marching_cubes_lewiner_cy.o
│   │   └── temp.linux-x86_64-cpython-38/
│   │       └── _marching_cubes_lewiner_cy.o
│   └── setup.py
├── exp/
│   ├── my_rack_test/
│   │   └── womask_open/
│   │       └── checkpoints/
│   │           └── ckpt_400000.pth
│   └── my_whale_test/
│       └── wmask_open/
│           └── checkpoints/
│               └── ckpt_2000000.pth
├── exp_runner.py
├── lib/
│   ├── __init__.py
│   ├── models/
│   │   └── deep_udf_decoder.py
│   └── workspace.py
├── models/
│   ├── dataset.py
│   ├── embedder.py
│   ├── fields.py
│   └── renderer.py
├── preprocess_custom_data/
│   ├── aruco_preprocess/
│   │   ├── CMakeLists.txt
│   │   ├── calibration.cpp
│   │   ├── gen_cameras.py
│   │   └── run.sh
│   ├── colmap_preprocess/
│   │   ├── colmap_read_model.py
│   │   ├── colmap_wrapper.py
│   │   ├── gen_cameras.py
│   │   ├── imgs2poses.py
│   │   └── pose_utils.py
│   └── readme.md
├── public_data/
│   ├── my_rack_test/
│   │   └── cameras_sphere.npz
│   └── my_whale_test/
│       └── cameras_sphere.npz
└── requirements.txt
Download .txt
SYMBOL INDEX (785 symbols across 14 files)

FILE: custom_mc/_marching_cubes_lewiner.py
  function marching_cubes_lewiner (line 7) | def marching_cubes_lewiner(volume, level=None, spacing=(1., 1., 1.),
  function udf_mc_lewiner (line 80) | def udf_mc_lewiner(volume, grads, spacing=(1., 1., 1.),
  function _to_array (line 145) | def _to_array(args):
  function _get_mc_luts (line 164) | def _get_mc_luts():

FILE: custom_mc/_marching_cubes_lewiner_cy.c
  function CYTHON_INLINE (line 347) | static CYTHON_INLINE PyCodeObject* __Pyx_PyCode_New(int a, int k, int l,...
  type PyObject (line 432) | typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *co...
  type PyObject (line 433) | typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, ...
  type Py_tss_t (line 474) | typedef int Py_tss_t;
  function CYTHON_INLINE (line 475) | static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) {
  function CYTHON_INLINE (line 479) | static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) {
  function CYTHON_INLINE (line 484) | static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) {
  function CYTHON_INLINE (line 487) | static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) {
  function CYTHON_INLINE (line 490) | static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) {
  function CYTHON_INLINE (line 494) | static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) {
  function CYTHON_INLINE (line 497) | static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) {
  type Py_hash_t (line 642) | typedef long Py_hash_t;
  type __Pyx_PyAsyncMethodsStruct (line 665) | typedef struct {
  function CYTHON_INLINE (line 681) | static CYTHON_INLINE float __PYX_NAN() {
  type __Pyx_StringTabEntry (line 730) | typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const c...
  function CYTHON_INLINE (line 751) | static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t l...
  function CYTHON_INLINE (line 800) | static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) {
  function __Pyx_init_sys_getdefaultencoding_params (line 833) | static int __Pyx_init_sys_getdefaultencoding_params(void) {
  function __Pyx_init_sys_getdefaultencoding_params (line 883) | static int __Pyx_init_sys_getdefaultencoding_params(void) {
  function CYTHON_INLINE (line 915) | static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void...
  type __pyx_memoryview_obj (line 959) | struct __pyx_memoryview_obj
  type __Pyx_memviewslice (line 960) | typedef struct {
  type __pyx_atomic_int_type (line 1005) | typedef volatile __pyx_atomic_int_type __pyx_atomic_int;
  type __Pyx_StructField_ (line 1020) | struct __Pyx_StructField_
  type __Pyx_TypeInfo (line 1022) | typedef struct {
  type __Pyx_StructField (line 1032) | typedef struct __Pyx_StructField_ {
  type __Pyx_BufFmt_StackElem (line 1037) | typedef struct {
  type __Pyx_BufFmt_Context (line 1041) | typedef struct {
  type npy_int8 (line 1074) | typedef npy_int8 __pyx_t_5numpy_int8_t;
  type npy_int16 (line 1083) | typedef npy_int16 __pyx_t_5numpy_int16_t;
  type npy_int32 (line 1092) | typedef npy_int32 __pyx_t_5numpy_int32_t;
  type npy_int64 (line 1101) | typedef npy_int64 __pyx_t_5numpy_int64_t;
  type npy_uint8 (line 1110) | typedef npy_uint8 __pyx_t_5numpy_uint8_t;
  type npy_uint16 (line 1119) | typedef npy_uint16 __pyx_t_5numpy_uint16_t;
  type npy_uint32 (line 1128) | typedef npy_uint32 __pyx_t_5numpy_uint32_t;
  type npy_uint64 (line 1137) | typedef npy_uint64 __pyx_t_5numpy_uint64_t;
  type npy_float32 (line 1146) | typedef npy_float32 __pyx_t_5numpy_float32_t;
  type npy_float64 (line 1155) | typedef npy_float64 __pyx_t_5numpy_float64_t;
  type npy_long (line 1164) | typedef npy_long __pyx_t_5numpy_int_t;
  type npy_longlong (line 1173) | typedef npy_longlong __pyx_t_5numpy_long_t;
  type npy_longlong (line 1182) | typedef npy_longlong __pyx_t_5numpy_longlong_t;
  type npy_ulong (line 1191) | typedef npy_ulong __pyx_t_5numpy_uint_t;
  type npy_ulonglong (line 1200) | typedef npy_ulonglong __pyx_t_5numpy_ulong_t;
  type npy_ulonglong (line 1209) | typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t;
  type npy_intp (line 1218) | typedef npy_intp __pyx_t_5numpy_intp_t;
  type npy_uintp (line 1227) | typedef npy_uintp __pyx_t_5numpy_uintp_t;
  type npy_double (line 1236) | typedef npy_double __pyx_t_5numpy_float_t;
  type npy_double (line 1245) | typedef npy_double __pyx_t_5numpy_double_t;
  type npy_longdouble (line 1254) | typedef npy_longdouble __pyx_t_5numpy_longdouble_t;
  type std (line 1258) | typedef ::std::complex< float > __pyx_t_float_complex;
  type __pyx_t_float_complex (line 1260) | typedef float _Complex __pyx_t_float_complex;
  type __pyx_t_float_complex (line 1263) | typedef struct { float real, imag; } __pyx_t_float_complex;
  type std (line 1270) | typedef ::std::complex< double > __pyx_t_double_complex;
  type __pyx_t_double_complex (line 1272) | typedef double _Complex __pyx_t_double_complex;
  type __pyx_t_double_complex (line 1275) | typedef struct { double real, imag; } __pyx_t_double_complex;
  type __pyx_obj_26_marching_cubes_lewiner_cy_Cell (line 1281) | struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell
  type __pyx_obj_26_marching_cubes_lewiner_cy_Lut (line 1282) | struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut
  type __pyx_obj_26_marching_cubes_lewiner_cy_LutProvider (line 1283) | struct __pyx_obj_26_marching_cubes_lewiner_cy_LutProvider
  type __pyx_array_obj (line 1284) | struct __pyx_array_obj
  type __pyx_MemviewEnum_obj (line 1285) | struct __pyx_MemviewEnum_obj
  type __pyx_memoryview_obj (line 1286) | struct __pyx_memoryview_obj
  type __pyx_memoryviewslice_obj (line 1287) | struct __pyx_memoryviewslice_obj
  type npy_cfloat (line 1296) | typedef npy_cfloat __pyx_t_5numpy_cfloat_t;
  type npy_cdouble (line 1305) | typedef npy_cdouble __pyx_t_5numpy_cdouble_t;
  type npy_clongdouble (line 1314) | typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t;
  type npy_cdouble (line 1323) | typedef npy_cdouble __pyx_t_5numpy_complex_t;
  type __pyx_obj_26_marching_cubes_lewiner_cy_Cell (line 1332) | struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell {
  type __pyx_obj_26_marching_cubes_lewiner_cy_Lut (line 1383) | struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut {
  type __pyx_obj_26_marching_cubes_lewiner_cy_LutProvider (line 1400) | struct __pyx_obj_26_marching_cubes_lewiner_cy_LutProvider {
  type __pyx_array_obj (line 1463) | struct __pyx_array_obj {
  type __pyx_MemviewEnum_obj (line 1488) | struct __pyx_MemviewEnum_obj {
  type __pyx_memoryview_obj (line 1501) | struct __pyx_memoryview_obj {
  type __pyx_memoryviewslice_obj (line 1524) | struct __pyx_memoryviewslice_obj {
  type __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell (line 1542) | struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell {
  type __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell (line 1558) | struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell
  type __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Lut (line 1569) | struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Lut {
  type __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Lut (line 1574) | struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Lut
  type __pyx_vtabstruct_array (line 1585) | struct __pyx_vtabstruct_array {
  type __pyx_vtabstruct_array (line 1588) | struct __pyx_vtabstruct_array
  type __pyx_vtabstruct_memoryview (line 1599) | struct __pyx_vtabstruct_memoryview {
  type __pyx_vtabstruct_memoryview (line 1608) | struct __pyx_vtabstruct_memoryview
  type __pyx_vtabstruct__memoryviewslice (line 1619) | struct __pyx_vtabstruct__memoryviewslice {
  type __pyx_vtabstruct__memoryviewslice (line 1622) | struct __pyx_vtabstruct__memoryviewslice
  type __Pyx_RefNannyAPIStruct (line 1630) | typedef struct {
  type __pyx_memoryview_obj (line 1828) | struct __pyx_memoryview_obj
  function CYTHON_INLINE (line 1885) | static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject*...
  function CYTHON_INLINE (line 1996) | static CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyO...
  type __pyx_array_obj (line 2055) | struct __pyx_array_obj
  function CYTHON_INLINE (line 2057) | static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16(const char *s...
  function CYTHON_INLINE (line 2061) | static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16LE(const char ...
  function CYTHON_INLINE (line 2065) | static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16BE(const char ...
  function CYTHON_INLINE (line 2116) | static CYTHON_INLINE int __Pyx_PyList_Extend(PyObject* L, PyObject* v) {
  function CYTHON_INLINE (line 2130) | static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) {
  type __Pyx_ImportType_CheckSize (line 2171) | enum __Pyx_ImportType_CheckSize {
  type __Pyx_ImportType_CheckSize (line 2176) | enum __Pyx_ImportType_CheckSize
  type __Pyx_CodeObjectCacheEntry (line 2187) | typedef struct {
  type __Pyx_CodeObjectCache (line 2191) | struct __Pyx_CodeObjectCache {
  type __Pyx_CodeObjectCache (line 2196) | struct __Pyx_CodeObjectCache
  type __Pyx_Buf_DimInfo (line 2215) | typedef struct {
  type __Pyx_Buffer (line 2218) | typedef struct {
  type __Pyx_LocalBuf_ND (line 2222) | typedef struct {
  type __pyx_obj_26_marching_cubes_lewiner_cy_Cell (line 2418) | struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell
  type __pyx_obj_26_marching_cubes_lewiner_cy_Cell (line 2419) | struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell
  type __pyx_obj_26_marching_cubes_lewiner_cy_Cell (line 2420) | struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell
  type __pyx_obj_26_marching_cubes_lewiner_cy_Cell (line 2421) | struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell
  type __pyx_obj_26_marching_cubes_lewiner_cy_Cell (line 2422) | struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell
  type __pyx_obj_26_marching_cubes_lewiner_cy_Cell (line 2423) | struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell
  type __pyx_obj_26_marching_cubes_lewiner_cy_Cell (line 2424) | struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell
  type __pyx_obj_26_marching_cubes_lewiner_cy_Cell (line 2425) | struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell
  type __pyx_obj_26_marching_cubes_lewiner_cy_Cell (line 2426) | struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell
  type __pyx_obj_26_marching_cubes_lewiner_cy_Lut (line 2426) | struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut
  type __pyx_obj_26_marching_cubes_lewiner_cy_Cell (line 2427) | struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell
  type __pyx_obj_26_marching_cubes_lewiner_cy_Lut (line 2427) | struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut
  type __pyx_obj_26_marching_cubes_lewiner_cy_Cell (line 2428) | struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell
  type __pyx_obj_26_marching_cubes_lewiner_cy_Cell (line 2429) | struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell
  type __pyx_obj_26_marching_cubes_lewiner_cy_Cell (line 2430) | struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell
  type __pyx_obj_26_marching_cubes_lewiner_cy_Cell (line 2431) | struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell
  type __pyx_obj_26_marching_cubes_lewiner_cy_Lut (line 2432) | struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut
  type __pyx_obj_26_marching_cubes_lewiner_cy_Lut (line 2433) | struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut
  type __pyx_obj_26_marching_cubes_lewiner_cy_Lut (line 2434) | struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut
  type __pyx_array_obj (line 2435) | struct __pyx_array_obj
  type __pyx_memoryview_obj (line 2436) | struct __pyx_memoryview_obj
  type __pyx_memoryview_obj (line 2437) | struct __pyx_memoryview_obj
  type __pyx_memoryview_obj (line 2438) | struct __pyx_memoryview_obj
  type __pyx_memoryview_obj (line 2439) | struct __pyx_memoryview_obj
  type __pyx_memoryview_obj (line 2439) | struct __pyx_memoryview_obj
  type __pyx_memoryview_obj (line 2440) | struct __pyx_memoryview_obj
  type __pyx_memoryview_obj (line 2441) | struct __pyx_memoryview_obj
  type __pyx_memoryview_obj (line 2442) | struct __pyx_memoryview_obj
  type __pyx_memoryviewslice_obj (line 2443) | struct __pyx_memoryviewslice_obj
  type __pyx_memoryviewslice_obj (line 2444) | struct __pyx_memoryviewslice_obj
  type __pyx_obj_26_marching_cubes_lewiner_cy_LutProvider (line 2515) | struct __pyx_obj_26_marching_cubes_lewiner_cy_LutProvider
  type __pyx_obj_26_marching_cubes_lewiner_cy_Cell (line 2515) | struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell
  type __pyx_obj_26_marching_cubes_lewiner_cy_Cell (line 2516) | struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell
  type __pyx_obj_26_marching_cubes_lewiner_cy_Cell (line 2517) | struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell
  type __pyx_obj_26_marching_cubes_lewiner_cy_LutProvider (line 2517) | struct __pyx_obj_26_marching_cubes_lewiner_cy_LutProvider
  type __pyx_obj_26_marching_cubes_lewiner_cy_LutProvider (line 2518) | struct __pyx_obj_26_marching_cubes_lewiner_cy_LutProvider
  type __pyx_array_obj (line 2519) | struct __pyx_array_obj
  type __pyx_memoryview_obj (line 2525) | struct __pyx_memoryview_obj
  type __pyx_memoryview_obj (line 2525) | struct __pyx_memoryview_obj
  type __pyx_memoryview_obj (line 2530) | struct __pyx_memoryview_obj
  type __pyx_memoryview_obj (line 2531) | struct __pyx_memoryview_obj
  type __pyx_memoryview_obj (line 2532) | struct __pyx_memoryview_obj
  type __pyx_memoryview_obj (line 2533) | struct __pyx_memoryview_obj
  type __pyx_MemviewEnum_obj (line 2551) | struct __pyx_MemviewEnum_obj
  type __pyx_obj_26_marching_cubes_lewiner_cy_Cell (line 3029) | struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell
  type __pyx_obj_26_marching_cubes_lewiner_cy_LutProvider (line 3029) | struct __pyx_obj_26_marching_cubes_lewiner_cy_LutProvider
  type __pyx_obj_26_marching_cubes_lewiner_cy_Cell (line 3030) | struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell
  type __pyx_obj_26_marching_cubes_lewiner_cy_Cell (line 3031) | struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell
  type __pyx_obj_26_marching_cubes_lewiner_cy_Cell (line 3032) | struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell
  type __pyx_obj_26_marching_cubes_lewiner_cy_Cell (line 3033) | struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell
  type __pyx_obj_26_marching_cubes_lewiner_cy_Cell (line 3034) | struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell
  type __pyx_obj_26_marching_cubes_lewiner_cy_Cell (line 3035) | struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell
  type __pyx_obj_26_marching_cubes_lewiner_cy_Lut (line 3038) | struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut
  type __pyx_obj_26_marching_cubes_lewiner_cy_Lut (line 3039) | struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut
  type __pyx_obj_26_marching_cubes_lewiner_cy_Lut (line 3040) | struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut
  type __pyx_obj_26_marching_cubes_lewiner_cy_LutProvider (line 3043) | struct __pyx_obj_26_marching_cubes_lewiner_cy_LutProvider
  type __pyx_obj_26_marching_cubes_lewiner_cy_LutProvider (line 3044) | struct __pyx_obj_26_marching_cubes_lewiner_cy_LutProvider
  type __pyx_obj_26_marching_cubes_lewiner_cy_LutProvider (line 3045) | struct __pyx_obj_26_marching_cubes_lewiner_cy_LutProvider
  type __pyx_obj_26_marching_cubes_lewiner_cy_LutProvider (line 3046) | struct __pyx_obj_26_marching_cubes_lewiner_cy_LutProvider
  type __pyx_obj_26_marching_cubes_lewiner_cy_LutProvider (line 3047) | struct __pyx_obj_26_marching_cubes_lewiner_cy_LutProvider
  type __pyx_array_obj (line 3049) | struct __pyx_array_obj
  type __pyx_array_obj (line 3050) | struct __pyx_array_obj
  type __pyx_array_obj (line 3051) | struct __pyx_array_obj
  type __pyx_array_obj (line 3052) | struct __pyx_array_obj
  type __pyx_array_obj (line 3053) | struct __pyx_array_obj
  type __pyx_array_obj (line 3054) | struct __pyx_array_obj
  type __pyx_array_obj (line 3055) | struct __pyx_array_obj
  type __pyx_array_obj (line 3056) | struct __pyx_array_obj
  type __pyx_MemviewEnum_obj (line 3059) | struct __pyx_MemviewEnum_obj
  type __pyx_MemviewEnum_obj (line 3060) | struct __pyx_MemviewEnum_obj
  type __pyx_MemviewEnum_obj (line 3061) | struct __pyx_MemviewEnum_obj
  type __pyx_MemviewEnum_obj (line 3062) | struct __pyx_MemviewEnum_obj
  type __pyx_memoryview_obj (line 3063) | struct __pyx_memoryview_obj
  type __pyx_memoryview_obj (line 3064) | struct __pyx_memoryview_obj
  type __pyx_memoryview_obj (line 3065) | struct __pyx_memoryview_obj
  type __pyx_memoryview_obj (line 3066) | struct __pyx_memoryview_obj
  type __pyx_memoryview_obj (line 3067) | struct __pyx_memoryview_obj
  type __pyx_memoryview_obj (line 3068) | struct __pyx_memoryview_obj
  type __pyx_memoryview_obj (line 3069) | struct __pyx_memoryview_obj
  type __pyx_memoryview_obj (line 3070) | struct __pyx_memoryview_obj
  type __pyx_memoryview_obj (line 3071) | struct __pyx_memoryview_obj
  type __pyx_memoryview_obj (line 3072) | struct __pyx_memoryview_obj
  type __pyx_memoryview_obj (line 3073) | struct __pyx_memoryview_obj
  type __pyx_memoryview_obj (line 3074) | struct __pyx_memoryview_obj
  type __pyx_memoryview_obj (line 3075) | struct __pyx_memoryview_obj
  type __pyx_memoryview_obj (line 3076) | struct __pyx_memoryview_obj
  type __pyx_memoryview_obj (line 3077) | struct __pyx_memoryview_obj
  type __pyx_memoryview_obj (line 3078) | struct __pyx_memoryview_obj
  type __pyx_memoryview_obj (line 3079) | struct __pyx_memoryview_obj
  type __pyx_memoryview_obj (line 3080) | struct __pyx_memoryview_obj
  type __pyx_memoryview_obj (line 3081) | struct __pyx_memoryview_obj
  type __pyx_memoryview_obj (line 3082) | struct __pyx_memoryview_obj
  type __pyx_memoryview_obj (line 3083) | struct __pyx_memoryview_obj
  type __pyx_memoryviewslice_obj (line 3086) | struct __pyx_memoryviewslice_obj
  type __pyx_memoryviewslice_obj (line 3087) | struct __pyx_memoryviewslice_obj
  function CYTHON_INLINE (line 3174) | static CYTHON_INLINE double __pyx_f_26_marching_cubes_lewiner_cy_dabs(do...
  function CYTHON_INLINE (line 3201) | static CYTHON_INLINE int __pyx_f_26_marching_cubes_lewiner_cy_imin(int _...
  function PyObject (line 3231) | static PyObject *__pyx_pw_26_marching_cubes_lewiner_cy_1remove_degenerat...
  function PyObject (line 3307) | static PyObject *__pyx_pf_26_marching_cubes_lewiner_cy_remove_degenerate...
  function __pyx_pw_26_marching_cubes_lewiner_cy_4Cell_1__init__ (line 3975) | static int __pyx_pw_26_marching_cubes_lewiner_cy_4Cell_1__init__(PyObjec...
  function __pyx_pf_26_marching_cubes_lewiner_cy_4Cell___init__ (line 4064) | static int __pyx_pf_26_marching_cubes_lewiner_cy_4Cell___init__(struct _...
  function __pyx_pw_26_marching_cubes_lewiner_cy_4Cell_3__cinit__ (line 4300) | static int __pyx_pw_26_marching_cubes_lewiner_cy_4Cell_3__cinit__(PyObje...
  function __pyx_pf_26_marching_cubes_lewiner_cy_4Cell_2__cinit__ (line 4314) | static int __pyx_pf_26_marching_cubes_lewiner_cy_4Cell_2__cinit__(struct...
  function __pyx_pw_26_marching_cubes_lewiner_cy_4Cell_5__dealloc__ (line 4528) | static void __pyx_pw_26_marching_cubes_lewiner_cy_4Cell_5__dealloc__(PyO...
  function __pyx_pf_26_marching_cubes_lewiner_cy_4Cell_4__dealloc__ (line 4537) | static void __pyx_pf_26_marching_cubes_lewiner_cy_4Cell_4__dealloc__(str...
  function __pyx_f_26_marching_cubes_lewiner_cy_4Cell__increase_size_vertices (line 4633) | static void __pyx_f_26_marching_cubes_lewiner_cy_4Cell__increase_size_ve...
  function __pyx_f_26_marching_cubes_lewiner_cy_4Cell__increase_size_faces (line 4913) | static void __pyx_f_26_marching_cubes_lewiner_cy_4Cell__increase_size_fa...
  function __pyx_f_26_marching_cubes_lewiner_cy_4Cell_add_vertex (line 5046) | static int __pyx_f_26_marching_cubes_lewiner_cy_4Cell_add_vertex(struct ...
  function __pyx_f_26_marching_cubes_lewiner_cy_4Cell_add_gradient (line 5148) | static void __pyx_f_26_marching_cubes_lewiner_cy_4Cell_add_gradient(stru...
  function __pyx_f_26_marching_cubes_lewiner_cy_4Cell_add_gradient_from_index (line 5203) | static void __pyx_f_26_marching_cubes_lewiner_cy_4Cell_add_gradient_from...
  function PyObject (line 5236) | static PyObject *__pyx_f_26_marching_cubes_lewiner_cy_4Cell_add_face(str...
  function PyObject (line 5344) | static PyObject *__pyx_pw_26_marching_cubes_lewiner_cy_4Cell_7get_vertic...
  function PyObject (line 5355) | static PyObject *__pyx_pf_26_marching_cubes_lewiner_cy_4Cell_6get_vertic...
  function PyObject (line 5556) | static PyObject *__pyx_pw_26_marching_cubes_lewiner_cy_4Cell_9get_normal...
  function PyObject (line 5567) | static PyObject *__pyx_pf_26_marching_cubes_lewiner_cy_4Cell_8get_normal...
  function PyObject (line 5836) | static PyObject *__pyx_pw_26_marching_cubes_lewiner_cy_4Cell_11get_faces...
  function PyObject (line 5847) | static PyObject *__pyx_pf_26_marching_cubes_lewiner_cy_4Cell_10get_faces...
  function PyObject (line 6029) | static PyObject *__pyx_pw_26_marching_cubes_lewiner_cy_4Cell_13get_value...
  function PyObject (line 6040) | static PyObject *__pyx_pf_26_marching_cubes_lewiner_cy_4Cell_12get_value...
  function __pyx_f_26_marching_cubes_lewiner_cy_4Cell_new_z_value (line 6220) | static void __pyx_f_26_marching_cubes_lewiner_cy_4Cell_new_z_value(struc...
  function __pyx_f_26_marching_cubes_lewiner_cy_4Cell_set_cube (line 6284) | static void __pyx_f_26_marching_cubes_lewiner_cy_4Cell_set_cube(struct _...
  function __pyx_f_26_marching_cubes_lewiner_cy_4Cell_add_triangles (line 6541) | static void __pyx_f_26_marching_cubes_lewiner_cy_4Cell_add_triangles(str...
  function __pyx_f_26_marching_cubes_lewiner_cy_4Cell_add_triangles2 (line 6623) | static void __pyx_f_26_marching_cubes_lewiner_cy_4Cell_add_triangles2(st...
  function __pyx_f_26_marching_cubes_lewiner_cy_4Cell__add_face_from_edge_index (line 6705) | static void __pyx_f_26_marching_cubes_lewiner_cy_4Cell__add_face_from_ed...
  function __pyx_f_26_marching_cubes_lewiner_cy_4Cell_get_index_in_facelayer (line 7132) | static int __pyx_f_26_marching_cubes_lewiner_cy_4Cell_get_index_in_facel...
  function __pyx_f_26_marching_cubes_lewiner_cy_4Cell_prepare_for_adding_triangles (line 7489) | static void __pyx_f_26_marching_cubes_lewiner_cy_4Cell_prepare_for_addin...
  function __pyx_f_26_marching_cubes_lewiner_cy_4Cell_calculate_center_vertex (line 7801) | static void __pyx_f_26_marching_cubes_lewiner_cy_4Cell_calculate_center_...
  function PyObject (line 8098) | static PyObject *__pyx_pw_26_marching_cubes_lewiner_cy_4Cell_15__reduce_...
  function PyObject (line 8109) | static PyObject *__pyx_pf_26_marching_cubes_lewiner_cy_4Cell_14__reduce_...
  function PyObject (line 8155) | static PyObject *__pyx_pw_26_marching_cubes_lewiner_cy_4Cell_17__setstat...
  function PyObject (line 8166) | static PyObject *__pyx_pf_26_marching_cubes_lewiner_cy_4Cell_16__setstat...
  function __pyx_pw_26_marching_cubes_lewiner_cy_3Lut_1__init__ (line 8213) | static int __pyx_pw_26_marching_cubes_lewiner_cy_3Lut_1__init__(PyObject...
  function __pyx_pf_26_marching_cubes_lewiner_cy_3Lut___init__ (line 8264) | static int __pyx_pf_26_marching_cubes_lewiner_cy_3Lut___init__(struct __...
  function __pyx_pw_26_marching_cubes_lewiner_cy_3Lut_3__cinit__ (line 8529) | static int __pyx_pw_26_marching_cubes_lewiner_cy_3Lut_3__cinit__(PyObjec...
  function __pyx_pf_26_marching_cubes_lewiner_cy_3Lut_2__cinit__ (line 8543) | static int __pyx_pf_26_marching_cubes_lewiner_cy_3Lut_2__cinit__(struct ...
  function __pyx_pw_26_marching_cubes_lewiner_cy_3Lut_5__dealloc__ (line 8581) | static void __pyx_pw_26_marching_cubes_lewiner_cy_3Lut_5__dealloc__(PyOb...
  function __pyx_pf_26_marching_cubes_lewiner_cy_3Lut_4__dealloc__ (line 8590) | static void __pyx_pf_26_marching_cubes_lewiner_cy_3Lut_4__dealloc__(stru...
  function __pyx_f_26_marching_cubes_lewiner_cy_3Lut_get1 (line 8643) | static int __pyx_f_26_marching_cubes_lewiner_cy_3Lut_get1(struct __pyx_o...
  function __pyx_f_26_marching_cubes_lewiner_cy_3Lut_get2 (line 8680) | static int __pyx_f_26_marching_cubes_lewiner_cy_3Lut_get2(struct __pyx_o...
  function __pyx_f_26_marching_cubes_lewiner_cy_3Lut_get3 (line 8717) | static int __pyx_f_26_marching_cubes_lewiner_cy_3Lut_get3(struct __pyx_o...
  function PyObject (line 8754) | static PyObject *__pyx_pw_26_marching_cubes_lewiner_cy_3Lut_7__reduce_cy...
  function PyObject (line 8765) | static PyObject *__pyx_pf_26_marching_cubes_lewiner_cy_3Lut_6__reduce_cy...
  function PyObject (line 8811) | static PyObject *__pyx_pw_26_marching_cubes_lewiner_cy_3Lut_9__setstate_...
  function PyObject (line 8822) | static PyObject *__pyx_pf_26_marching_cubes_lewiner_cy_3Lut_8__setstate_...
  function __pyx_pw_26_marching_cubes_lewiner_cy_11LutProvider_1__init__ (line 8869) | static int __pyx_pw_26_marching_cubes_lewiner_cy_11LutProvider_1__init__...
  function __pyx_pf_26_marching_cubes_lewiner_cy_11LutProvider___init__ (line 9470) | static int __pyx_pf_26_marching_cubes_lewiner_cy_11LutProvider___init__(...
  function PyObject (line 10272) | static PyObject *__pyx_pw_26_marching_cubes_lewiner_cy_11LutProvider_3__...
  function PyObject (line 10283) | static PyObject *__pyx_pf_26_marching_cubes_lewiner_cy_11LutProvider_2__...
  function PyObject (line 11011) | static PyObject *__pyx_pw_26_marching_cubes_lewiner_cy_11LutProvider_5__...
  function PyObject (line 11022) | static PyObject *__pyx_pf_26_marching_cubes_lewiner_cy_11LutProvider_4__...
  function PyObject (line 11073) | static PyObject *__pyx_pw_26_marching_cubes_lewiner_cy_3marching_cubes(P...
  function PyObject (line 11218) | static PyObject *__pyx_pf_26_marching_cubes_lewiner_cy_2marching_cubes(C...
  function PyObject (line 11855) | static PyObject *__pyx_pw_26_marching_cubes_lewiner_cy_5marching_cubes_u...
  function PyObject (line 12003) | static PyObject *__pyx_pf_26_marching_cubes_lewiner_cy_4marching_cubes_u...
  function __pyx_f_26_marching_cubes_lewiner_cy_my_sign (line 14265) | static float __pyx_f_26_marching_cubes_lewiner_cy_my_sign(float __pyx_v_...
  function __pyx_f_26_marching_cubes_lewiner_cy_non_zero_norm (line 14381) | static int __pyx_f_26_marching_cubes_lewiner_cy_non_zero_norm(__Pyx_memv...
  function __pyx_f_26_marching_cubes_lewiner_cy_avg_cube (line 14424) | static float __pyx_f_26_marching_cubes_lewiner_cy_avg_cube(float __pyx_v...
  function __pyx_f_26_marching_cubes_lewiner_cy_max_cube (line 14461) | static float __pyx_f_26_marching_cubes_lewiner_cy_max_cube(float __pyx_v...
  function __pyx_f_26_marching_cubes_lewiner_cy_dot3 (line 14646) | static float __pyx_f_26_marching_cubes_lewiner_cy_dot3(__Pyx_memviewslic...
  function __pyx_f_26_marching_cubes_lewiner_cy_inwards_facing_normals (line 14695) | static int __pyx_f_26_marching_cubes_lewiner_cy_inwards_facing_normals(P...
  function __pyx_f_26_marching_cubes_lewiner_cy_the_big_switch (line 14876) | static void __pyx_f_26_marching_cubes_lewiner_cy_the_big_switch(struct _...
  function __pyx_f_26_marching_cubes_lewiner_cy_test_face (line 17079) | static int __pyx_f_26_marching_cubes_lewiner_cy_test_face(struct __pyx_o...
  function __pyx_f_26_marching_cubes_lewiner_cy_test_internal (line 17380) | static int __pyx_f_26_marching_cubes_lewiner_cy_test_internal(struct __p...
  function PyObject (line 18619) | static PyObject *__pyx_pw_26_marching_cubes_lewiner_cy_7__pyx_unpickle_L...
  function PyObject (line 18692) | static PyObject *__pyx_pf_26_marching_cubes_lewiner_cy_6__pyx_unpickle_L...
  function PyObject (line 18887) | static PyObject *__pyx_f_26_marching_cubes_lewiner_cy___pyx_unpickle_Lut...
  function CYTHON_INLINE (line 19615) | static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyOb...
  function CYTHON_INLINE (line 19665) | static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyOb...
  function CYTHON_INLINE (line 19715) | static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyOb...
  function CYTHON_INLINE (line 19765) | static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyOb...
  function CYTHON_INLINE (line 19815) | static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyOb...
  function CYTHON_INLINE (line 19865) | static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_D...
  function CYTHON_INLINE (line 19939) | static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *_...
  function CYTHON_INLINE (line 19981) | static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObje...
  function CYTHON_INLINE (line 20062) | static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) {
  function CYTHON_INLINE (line 20194) | static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) {
  function CYTHON_INLINE (line 20326) | static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) {
  function CYTHON_INLINE (line 20458) | static CYTHON_INLINE int __pyx_f_5numpy_is_timedelta64_object(PyObject *...
  function CYTHON_INLINE (line 20495) | static CYTHON_INLINE int __pyx_f_5numpy_is_datetime64_object(PyObject *_...
  function CYTHON_INLINE (line 20532) | static CYTHON_INLINE npy_datetime __pyx_f_5numpy_get_datetime64_value(Py...
  function CYTHON_INLINE (line 20566) | static CYTHON_INLINE npy_timedelta __pyx_f_5numpy_get_timedelta64_value(...
  function CYTHON_INLINE (line 20600) | static CYTHON_INLINE NPY_DATETIMEUNIT __pyx_f_5numpy_get_datetime64_unit...
  function __pyx_array___cinit__ (line 20634) | static int __pyx_array___cinit__(PyObject *__pyx_v_self, PyObject *__pyx...
  function __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__ (line 20762) | static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(s...
  function CYTHON_UNUSED (line 21385) | static CYTHON_UNUSED int __pyx_array_getbuffer(PyObject *__pyx_v_self, P...
  function __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__ (line 21396) | static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffe...
  function __pyx_array___dealloc__ (line 21692) | static void __pyx_array___dealloc__(PyObject *__pyx_v_self) {
  function __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__ (line 21701) | static void __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc...
  function PyObject (line 21823) | static PyObject *__pyx_pw_15View_dot_MemoryView_5array_7memview_1__get__...
  function PyObject (line 21834) | static PyObject *__pyx_pf_15View_dot_MemoryView_5array_7memview___get__(...
  function PyObject (line 21884) | static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *__pyx_v...
  function Py_ssize_t (line 21966) | static Py_ssize_t __pyx_array___len__(PyObject *__pyx_v_self) {
  function Py_ssize_t (line 21977) | static Py_ssize_t __pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__l...
  function PyObject (line 22016) | static PyObject *__pyx_array___getattr__(PyObject *__pyx_v_self, PyObjec...
  function PyObject (line 22027) | static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__ge...
  function PyObject (line 22084) | static PyObject *__pyx_array___getitem__(PyObject *__pyx_v_self, PyObjec...
  function PyObject (line 22095) | static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__g...
  function __pyx_array___setitem__ (line 22152) | static int __pyx_array___setitem__(PyObject *__pyx_v_self, PyObject *__p...
  function __pyx_array___pyx_pf_15View_dot_MemoryView_5array_12__setitem__ (line 22163) | static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_12__setitem...
  function PyObject (line 22212) | static PyObject *__pyx_pw___pyx_array_1__reduce_cython__(PyObject *__pyx...
  function PyObject (line 22223) | static PyObject *__pyx_pf___pyx_array___reduce_cython__(CYTHON_UNUSED st...
  function PyObject (line 22269) | static PyObject *__pyx_pw___pyx_array_3__setstate_cython__(PyObject *__p...
  function PyObject (line 22280) | static PyObject *__pyx_pf___pyx_array_2__setstate_cython__(CYTHON_UNUSED...
  type __pyx_array_obj (line 22325) | struct __pyx_array_obj
  type __pyx_array_obj (line 22326) | struct __pyx_array_obj
  type __pyx_array_obj (line 22327) | struct __pyx_array_obj
  type __pyx_array_obj (line 22379) | struct __pyx_array_obj
  type __pyx_array_obj (line 22443) | struct __pyx_array_obj
  function __pyx_MemviewEnum___init__ (line 22502) | static int __pyx_MemviewEnum___init__(PyObject *__pyx_v_self, PyObject *...
  function __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__ (line 22553) | static int __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init...
  function PyObject (line 22595) | static PyObject *__pyx_MemviewEnum___repr__(PyObject *__pyx_v_self) {
  function PyObject (line 22606) | static PyObject *__pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum_...
  function PyObject (line 22646) | static PyObject *__pyx_pw___pyx_MemviewEnum_1__reduce_cython__(PyObject ...
  function PyObject (line 22657) | static PyObject *__pyx_pf___pyx_MemviewEnum___reduce_cython__(struct __p...
  function PyObject (line 22881) | static PyObject *__pyx_pw___pyx_MemviewEnum_3__setstate_cython__(PyObjec...
  function PyObject (line 22892) | static PyObject *__pyx_pf___pyx_MemviewEnum_2__setstate_cython__(struct ...
  function __pyx_memoryview___cinit__ (line 23024) | static int __pyx_memoryview___cinit__(PyObject *__pyx_v_self, PyObject *...
  function __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit__ (line 23104) | static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_...
  function __pyx_memoryview___dealloc__ (line 23403) | static void __pyx_memoryview___dealloc__(PyObject *__pyx_v_self) {
  function __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__dealloc__ (line 23412) | static void __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview...
  type __pyx_memoryview_obj (line 23632) | struct __pyx_memoryview_obj
  function PyObject (line 23772) | static PyObject *__pyx_memoryview___getitem__(PyObject *__pyx_v_self, Py...
  function PyObject (line 23783) | static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memor...
  function __pyx_memoryview___setitem__ (line 23961) | static int __pyx_memoryview___setitem__(PyObject *__pyx_v_self, PyObject...
  function __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_6__setitem__ (line 23972) | static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_...
  function PyObject (line 24187) | static PyObject *__pyx_memoryview_is_slice(struct __pyx_memoryview_obj *...
  function PyObject (line 24397) | static PyObject *__pyx_memoryview_setitem_slice_assignment(struct __pyx_...
  function PyObject (line 24487) | static PyObject *__pyx_memoryview_setitem_slice_assign_scalar(struct __p...
  function PyObject (line 24777) | static PyObject *__pyx_memoryview_setitem_indexed(struct __pyx_memoryvie...
  function PyObject (line 24838) | static PyObject *__pyx_memoryview_convert_item_to_object(struct __pyx_me...
  function PyObject (line 25115) | static PyObject *__pyx_memoryview_assign_item_from_object(struct __pyx_m...
  function CYTHON_UNUSED (line 25356) | static CYTHON_UNUSED int __pyx_memoryview_getbuffer(PyObject *__pyx_v_se...
  function __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_8__getbuffer__ (line 25367) | static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_...
  function PyObject (line 25700) | static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_1T_1__get__...
  function PyObject (line 25711) | static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(...
  function PyObject (line 25786) | static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4base_1__ge...
  function PyObject (line 25797) | static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4base___get...
  function PyObject (line 25839) | static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_5shape_1__g...
  function PyObject (line 25850) | static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_5shape___ge...
  function PyObject (line 25920) | static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_7strides_1_...
  function PyObject (line 25931) | static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_7strides___...
  function PyObject (line 26034) | static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_10suboffset...
  function PyObject (line 26045) | static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_10suboffset...
  function PyObject (line 26152) | static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4ndim_1__ge...
  function PyObject (line 26163) | static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get...
  function PyObject (line 26215) | static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_8itemsize_1...
  function PyObject (line 26226) | static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize__...
  function PyObject (line 26278) | static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_6nbytes_1__...
  function PyObject (line 26289) | static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___g...
  function PyObject (line 26351) | static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4size_1__ge...
  function PyObject (line 26362) | static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4size___get...
  function Py_ssize_t (line 26492) | static Py_ssize_t __pyx_memoryview___len__(PyObject *__pyx_v_self) {
  function Py_ssize_t (line 26503) | static Py_ssize_t __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memo...
  function PyObject (line 26572) | static PyObject *__pyx_memoryview___repr__(PyObject *__pyx_v_self) {
  function PyObject (line 26583) | static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memor...
  function PyObject (line 26674) | static PyObject *__pyx_memoryview___str__(PyObject *__pyx_v_self) {
  function PyObject (line 26685) | static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memor...
  function PyObject (line 26753) | static PyObject *__pyx_memoryview_is_c_contig(PyObject *__pyx_v_self, CY...
  function PyObject (line 26764) | static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memor...
  function PyObject (line 26829) | static PyObject *__pyx_memoryview_is_f_contig(PyObject *__pyx_v_self, CY...
  function PyObject (line 26840) | static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memor...
  function PyObject (line 26905) | static PyObject *__pyx_memoryview_copy(PyObject *__pyx_v_self, CYTHON_UN...
  function PyObject (line 26916) | static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memor...
  function PyObject (line 26999) | static PyObject *__pyx_memoryview_copy_fortran(PyObject *__pyx_v_self, C...
  function PyObject (line 27010) | static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memor...
  function PyObject (line 27092) | static PyObject *__pyx_pw___pyx_memoryview_1__reduce_cython__(PyObject *...
  function PyObject (line 27103) | static PyObject *__pyx_pf___pyx_memoryview___reduce_cython__(CYTHON_UNUS...
  function PyObject (line 27149) | static PyObject *__pyx_pw___pyx_memoryview_3__setstate_cython__(PyObject...
  function PyObject (line 27160) | static PyObject *__pyx_pf___pyx_memoryview_2__setstate_cython__(CYTHON_U...
  function PyObject (line 27205) | static PyObject *__pyx_memoryview_new(PyObject *__pyx_v_o, int __pyx_v_f...
  function CYTHON_INLINE (line 27296) | static CYTHON_INLINE int __pyx_memoryview_check(PyObject *__pyx_v_o) {
  function PyObject (line 27335) | static PyObject *_unellipsify(PyObject *__pyx_v_index, int __pyx_v_ndim) {
  function PyObject (line 27792) | static PyObject *assert_direct_dimensions(Py_ssize_t *__pyx_v_suboffsets...
  type __pyx_memoryview_obj (line 27880) | struct __pyx_memoryview_obj
  type __pyx_memoryview_obj (line 27880) | struct __pyx_memoryview_obj
  type __pyx_memoryviewslice_obj (line 27887) | struct __pyx_memoryviewslice_obj
  type __pyx_memoryview_obj (line 27897) | struct __pyx_memoryview_obj
  type __pyx_memoryview_obj (line 27902) | struct __pyx_memoryview_obj
  type __pyx_memoryviewslice_obj (line 27972) | struct __pyx_memoryviewslice_obj
  type __pyx_memoryview_obj (line 28384) | struct __pyx_memoryview_obj
  type __pyx_memoryview_obj (line 28425) | struct __pyx_memoryview_obj
  function __pyx_memoryview_slice_memviewslice (line 28460) | static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *__pyx...
  function __pyx_memslice_transpose (line 29553) | static int __pyx_memslice_transpose(__Pyx_memviewslice *__pyx_v_memslice) {
  function __pyx_memoryviewslice___dealloc__ (line 29729) | static void __pyx_memoryviewslice___dealloc__(PyObject *__pyx_v_self) {
  function __pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memoryviewslice___dealloc__ (line 29738) | static void __pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memo...
  function PyObject (line 29771) | static PyObject *__pyx_memoryviewslice_convert_item_to_object(struct __p...
  function PyObject (line 29857) | static PyObject *__pyx_memoryviewslice_assign_item_from_object(struct __...
  function PyObject (line 29942) | static PyObject *__pyx_pw_15View_dot_MemoryView_16_memoryviewslice_4base...
  function PyObject (line 29953) | static PyObject *__pyx_pf_15View_dot_MemoryView_16_memoryviewslice_4base...
  function PyObject (line 29993) | static PyObject *__pyx_pw___pyx_memoryviewslice_1__reduce_cython__(PyObj...
  function PyObject (line 30004) | static PyObject *__pyx_pf___pyx_memoryviewslice___reduce_cython__(CYTHON...
  function PyObject (line 30050) | static PyObject *__pyx_pw___pyx_memoryviewslice_3__setstate_cython__(PyO...
  function PyObject (line 30061) | static PyObject *__pyx_pf___pyx_memoryviewslice_2__setstate_cython__(CYT...
  function PyObject (line 30106) | static PyObject *__pyx_memoryview_fromslice(__Pyx_memviewslice __pyx_v_m...
  function __Pyx_memviewslice (line 30492) | static __Pyx_memviewslice *__pyx_memoryview_get_slice_from_memoryview(st...
  function __pyx_memoryview_slice_copy (line 30595) | static void __pyx_memoryview_slice_copy(struct __pyx_memoryview_obj *__p...
  function PyObject (line 30721) | static PyObject *__pyx_memoryview_copy_object(struct __pyx_memoryview_ob...
  function PyObject (line 30781) | static PyObject *__pyx_memoryview_copy_object_from_slice(struct __pyx_me...
  function Py_ssize_t (line 30907) | static Py_ssize_t abs_py_ssize_t(Py_ssize_t __pyx_v_arg) {
  function __pyx_get_best_slice_order (line 30973) | static char __pyx_get_best_slice_order(__Pyx_memviewslice *__pyx_v_mslic...
  function _copy_strided_to_strided (line 31163) | static void _copy_strided_to_strided(char *__pyx_v_src_data, Py_ssize_t ...
  function copy_strided_to_strided (line 31400) | static void copy_strided_to_strided(__Pyx_memviewslice *__pyx_v_src, __P...
  function Py_ssize_t (line 31430) | static Py_ssize_t __pyx_memoryview_slice_get_size(__Pyx_memviewslice *__...
  function Py_ssize_t (line 31502) | static Py_ssize_t __pyx_fill_contig_strides_array(Py_ssize_t *__pyx_v_sh...
  type __pyx_memoryview_obj (line 31633) | struct __pyx_memoryview_obj
  function __pyx_memoryview_err_extents (line 31879) | static int __pyx_memoryview_err_extents(int __pyx_v_i, Py_ssize_t __pyx_...
  function __pyx_memoryview_err_dim (line 31967) | static int __pyx_memoryview_err_dim(PyObject *__pyx_v_error, char *__pyx...
  function __pyx_memoryview_err (line 32051) | static int __pyx_memoryview_err(PyObject *__pyx_v_error, char *__pyx_v_m...
  function __pyx_memoryview_copy_contents (line 32161) | static int __pyx_memoryview_copy_contents(__Pyx_memviewslice __pyx_v_src...
  function __pyx_memoryview_broadcast_leading (line 32740) | static void __pyx_memoryview_broadcast_leading(__Pyx_memviewslice *__pyx...
  function __pyx_memoryview_refcount_copying (line 32853) | static void __pyx_memoryview_refcount_copying(__Pyx_memviewslice *__pyx_...
  function __pyx_memoryview_refcount_objects_in_slice_with_gil (line 32903) | static void __pyx_memoryview_refcount_objects_in_slice_with_gil(char *__...
  function __pyx_memoryview_refcount_objects_in_slice (line 32942) | static void __pyx_memoryview_refcount_objects_in_slice(char *__pyx_v_dat...
  function __pyx_memoryview_slice_assign_scalar (line 33074) | static void __pyx_memoryview_slice_assign_scalar(__Pyx_memviewslice *__p...
  function __pyx_memoryview__slice_assign_scalar (line 33122) | static void __pyx_memoryview__slice_assign_scalar(char *__pyx_v_data, Py...
  function PyObject (line 33254) | static PyObject *__pyx_pw_15View_dot_MemoryView_1__pyx_unpickle_Enum(PyO...
  function PyObject (line 33327) | static PyObject *__pyx_pf_15View_dot_MemoryView___pyx_unpickle_Enum(CYTH...
  function PyObject (line 33522) | static PyObject *__pyx_unpickle_Enum__set_state(struct __pyx_MemviewEnum...
  type __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell (line 33645) | struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Cell
  function PyObject (line 33647) | static PyObject *__pyx_tp_new_26_marching_cubes_lewiner_cy_Cell(PyTypeOb...
  function __pyx_tp_dealloc_26_marching_cubes_lewiner_cy_Cell (line 33666) | static void __pyx_tp_dealloc_26_marching_cubes_lewiner_cy_Cell(PyObject ...
  function __pyx_tp_traverse_26_marching_cubes_lewiner_cy_Cell (line 33686) | static int __pyx_tp_traverse_26_marching_cubes_lewiner_cy_Cell(PyObject ...
  function __pyx_tp_clear_26_marching_cubes_lewiner_cy_Cell (line 33695) | static int __pyx_tp_clear_26_marching_cubes_lewiner_cy_Cell(PyObject *o) {
  type __pyx_obj_26_marching_cubes_lewiner_cy_Cell (line 33717) | struct __pyx_obj_26_marching_cubes_lewiner_cy_Cell
  type __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Lut (line 33785) | struct __pyx_vtabstruct_26_marching_cubes_lewiner_cy_Lut
  function PyObject (line 33787) | static PyObject *__pyx_tp_new_26_marching_cubes_lewiner_cy_Lut(PyTypeObj...
  function __pyx_tp_dealloc_26_marching_cubes_lewiner_cy_Lut (line 33805) | static void __pyx_tp_dealloc_26_marching_cubes_lewiner_cy_Lut(PyObject *...
  type __pyx_obj_26_marching_cubes_lewiner_cy_Lut (line 33831) | struct __pyx_obj_26_marching_cubes_lewiner_cy_Lut
  function PyObject (line 33900) | static PyObject *__pyx_tp_new_26_marching_cubes_lewiner_cy_LutProvider(P...
  function __pyx_tp_dealloc_26_marching_cubes_lewiner_cy_LutProvider (line 33964) | static void __pyx_tp_dealloc_26_marching_cubes_lewiner_cy_LutProvider(Py...
  function __pyx_tp_traverse_26_marching_cubes_lewiner_cy_LutProvider (line 34026) | static int __pyx_tp_traverse_26_marching_cubes_lewiner_cy_LutProvider(Py...
  function __pyx_tp_clear_26_marching_cubes_lewiner_cy_LutProvider (line 34185) | static int __pyx_tp_clear_26_marching_cubes_lewiner_cy_LutProvider(PyObj...
  type __pyx_obj_26_marching_cubes_lewiner_cy_LutProvider (line 34353) | struct __pyx_obj_26_marching_cubes_lewiner_cy_LutProvider
  type __pyx_vtabstruct_array (line 34421) | struct __pyx_vtabstruct_array
  function PyObject (line 34423) | static PyObject *__pyx_tp_new_array(PyTypeObject *t, PyObject *a, PyObje...
  function __pyx_tp_dealloc_array (line 34443) | static void __pyx_tp_dealloc_array(PyObject *o) {
  function PyObject (line 34462) | static PyObject *__pyx_sq_item_array(PyObject *o, Py_ssize_t i) {
  function __pyx_mp_ass_subscript_array (line 34470) | static int __pyx_mp_ass_subscript_array(PyObject *o, PyObject *i, PyObje...
  function PyObject (line 34481) | static PyObject *__pyx_tp_getattro_array(PyObject *o, PyObject *n) {
  function PyObject (line 34490) | static PyObject *__pyx_getprop___pyx_array_memview(PyObject *o, CYTHON_U...
  type PyGetSetDef (line 34501) | struct PyGetSetDef
  type __pyx_array_obj (line 34545) | struct __pyx_array_obj
  function PyObject (line 34614) | static PyObject *__pyx_tp_new_Enum(PyTypeObject *t, CYTHON_UNUSED PyObje...
  function __pyx_tp_dealloc_Enum (line 34628) | static void __pyx_tp_dealloc_Enum(PyObject *o) {
  function __pyx_tp_traverse_Enum (line 34640) | static int __pyx_tp_traverse_Enum(PyObject *o, visitproc v, void *a) {
  function __pyx_tp_clear_Enum (line 34649) | static int __pyx_tp_clear_Enum(PyObject *o) {
  type __pyx_MemviewEnum_obj (line 34667) | struct __pyx_MemviewEnum_obj
  type __pyx_vtabstruct_memoryview (line 34735) | struct __pyx_vtabstruct_memoryview
  function PyObject (line 34737) | static PyObject *__pyx_tp_new_memoryview(PyTypeObject *t, PyObject *a, P...
  function __pyx_tp_dealloc_memoryview (line 34759) | static void __pyx_tp_dealloc_memoryview(PyObject *o) {
  function __pyx_tp_traverse_memoryview (line 34781) | static int __pyx_tp_traverse_memoryview(PyObject *o, visitproc v, void *...
  function __pyx_tp_clear_memoryview (line 34799) | static int __pyx_tp_clear_memoryview(PyObject *o) {
  function PyObject (line 34814) | static PyObject *__pyx_sq_item_memoryview(PyObject *o, Py_ssize_t i) {
  function __pyx_mp_ass_subscript_memoryview (line 34822) | static int __pyx_mp_ass_subscript_memoryview(PyObject *o, PyObject *i, P...
  function PyObject (line 34833) | static PyObject *__pyx_getprop___pyx_memoryview_T(PyObject *o, CYTHON_UN...
  function PyObject (line 34837) | static PyObject *__pyx_getprop___pyx_memoryview_base(PyObject *o, CYTHON...
  function PyObject (line 34841) | static PyObject *__pyx_getprop___pyx_memoryview_shape(PyObject *o, CYTHO...
  function PyObject (line 34845) | static PyObject *__pyx_getprop___pyx_memoryview_strides(PyObject *o, CYT...
  function PyObject (line 34849) | static PyObject *__pyx_getprop___pyx_memoryview_suboffsets(PyObject *o, ...
  function PyObject (line 34853) | static PyObject *__pyx_getprop___pyx_memoryview_ndim(PyObject *o, CYTHON...
  function PyObject (line 34857) | static PyObject *__pyx_getprop___pyx_memoryview_itemsize(PyObject *o, CY...
  function PyObject (line 34861) | static PyObject *__pyx_getprop___pyx_memoryview_nbytes(PyObject *o, CYTH...
  function PyObject (line 34865) | static PyObject *__pyx_getprop___pyx_memoryview_size(PyObject *o, CYTHON...
  type PyGetSetDef (line 34879) | struct PyGetSetDef
  type __pyx_memoryview_obj (line 34931) | struct __pyx_memoryview_obj
  type __pyx_vtabstruct__memoryviewslice (line 34999) | struct __pyx_vtabstruct__memoryviewslice
  function PyObject (line 35001) | static PyObject *__pyx_tp_new__memoryviewslice(PyTypeObject *t, PyObject...
  function __pyx_tp_dealloc__memoryviewslice (line 35012) | static void __pyx_tp_dealloc__memoryviewslice(PyObject *o) {
  function __pyx_tp_traverse__memoryviewslice (line 35033) | static int __pyx_tp_traverse__memoryviewslice(PyObject *o, visitproc v, ...
  function __pyx_tp_clear__memoryviewslice (line 35043) | static int __pyx_tp_clear__memoryviewslice(PyObject *o) {
  function PyObject (line 35054) | static PyObject *__pyx_getprop___pyx_memoryviewslice_base(PyObject *o, C...
  type PyGetSetDef (line 35064) | struct PyGetSetDef
  type __pyx_memoryviewslice_obj (line 35072) | struct __pyx_memoryviewslice_obj
  type PyModuleDef (line 35164) | struct PyModuleDef
  function CYTHON_SMALL_CODE (line 35427) | static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) {
  function CYTHON_SMALL_CODE (line 35442) | static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
  function CYTHON_SMALL_CODE (line 35928) | static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) {
  function __Pyx_modinit_global_init_code (line 35959) | static int __Pyx_modinit_global_init_code(void) {
  function __Pyx_modinit_variable_export_code (line 35972) | static int __Pyx_modinit_variable_export_code(void) {
  function __Pyx_modinit_function_export_code (line 35980) | static int __Pyx_modinit_function_export_code(void) {
  function __Pyx_modinit_type_init_code (line 35988) | static int __Pyx_modinit_type_init_code(void) {
  function __Pyx_modinit_type_import_code (line 36104) | static int __Pyx_modinit_type_import_code(void) {
  function __Pyx_modinit_variable_import_code (line 36164) | static int __Pyx_modinit_variable_import_code(void) {
  function __Pyx_modinit_function_import_code (line 36172) | static int __Pyx_modinit_function_import_code(void) {
  function __Pyx_PyMODINIT_FUNC (line 36203) | __Pyx_PyMODINIT_FUNC PyInit__marching_cubes_lewiner_cy(void)
  function CYTHON_SMALL_CODE (line 36208) | static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) {
  function CYTHON_SMALL_CODE (line 36231) | static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, P...
  function CYTHON_SMALL_CODE (line 36246) | static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, CY...
  function __Pyx_RefNannyAPIStruct (line 36661) | static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modn...
  function CYTHON_INLINE (line 36678) | static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, ...
  function PyObject (line 36691) | static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
  function __Pyx_RaiseArgtupleInvalid (line 36705) | static void __Pyx_RaiseArgtupleInvalid(
  function __Pyx_RaiseDoubleKeywordsError (line 36731) | static void __Pyx_RaiseDoubleKeywordsError(
  function __Pyx_ParseOptionalKeywords (line 36745) | static int __Pyx_ParseOptionalKeywords(
  function CYTHON_INLINE (line 36848) | static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) {
  function CYTHON_INLINE (line 36852) | static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject ...
  function CYTHON_INLINE (line 36864) | static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj...
  function CYTHON_INLINE (line 36876) | static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name)
  function CYTHON_INLINE (line 36909) | static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObj...
  function PyObject (line 36929) | static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObjec...
  function CYTHON_INLINE (line 37048) | static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, ...
  function CYTHON_INLINE (line 37068) | static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
  function CYTHON_INLINE (line 37090) | static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *fun...
  function PyObject (line 37113) | static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *ar...
  function CYTHON_INLINE (line 37123) | static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func,...
  function CYTHON_INLINE (line 37141) | static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func,...
  function __Pyx_init_memviewslice (line 37152) | static int
  function __pyx_fatalerror (line 37204) | static void __pyx_fatalerror(const char *fmt, ...) Py_NO_RETURN {
  function CYTHON_INLINE (line 37216) | static CYTHON_INLINE int
  function CYTHON_INLINE (line 37226) | static CYTHON_INLINE int
  function CYTHON_INLINE (line 37236) | static CYTHON_INLINE void
  function CYTHON_INLINE (line 37257) | static CYTHON_INLINE void __Pyx_XDEC_MEMVIEW(__Pyx_memviewslice *memslice,
  function PyObject (line 37285) | static PyObject* __Pyx_PyInt_SubtractObjC(PyObject *op1, PyObject *op2, ...
  function CYTHON_UNUSED (line 37408) | static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* functi...
  function PyObject (line 37437) | static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
  function CYTHON_INLINE (line 37444) | static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, P...
  function CYTHON_INLINE (line 37462) | static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, ...
  function CYTHON_INLINE (line 37480) | static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssi...
  function PyObject (line 37525) | static PyObject *__Pyx_PyObject_GetIndex(PyObject *obj, PyObject* index) {
  function PyObject (line 37543) | static PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key) {
  function __Pyx__ArgTypeTest (line 37553) | static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const c...
  function __Pyx_CheckKeywordStrings (line 37574) | static int __Pyx_CheckKeywordStrings(
  function CYTHON_INLINE (line 37615) | static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate,...
  function CYTHON_INLINE (line 37627) | static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, P...
  function __Pyx_WriteUnraisable (line 37638) | static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int cl...
  function __Pyx_Raise (line 37681) | static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
  function __Pyx_Raise (line 37732) | static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, P...
  function __Pyx_PyErr_ExceptionMatchesTuple (line 37840) | static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObjec...
  function CYTHON_INLINE (line 37853) | static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadSta...
  function CYTHON_INLINE (line 37864) | static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) {
  function PyObject (line 37877) | static PyObject *__Pyx_GetAttr3Default(PyObject *d) {
  function CYTHON_INLINE (line 37886) | static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, ...
  function CYTHON_INLINE (line 37892) | static CYTHON_INLINE int __Pyx_Is_Little_Endian(void)
  function __Pyx_BufFmt_Init (line 37903) | static void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx,
  function __Pyx_BufFmt_ParseNumber (line 37930) | static int __Pyx_BufFmt_ParseNumber(const char** ts) {
  function __Pyx_BufFmt_ExpectNumber (line 37945) | static int __Pyx_BufFmt_ExpectNumber(const char **ts) {
  function __Pyx_BufFmt_RaiseUnexpectedChar (line 37952) | static void __Pyx_BufFmt_RaiseUnexpectedChar(char ch) {
  function __Pyx_BufFmt_TypeCharToStandardSize (line 37981) | static size_t __Pyx_BufFmt_TypeCharToStandardSize(char ch, int is_comple...
  function __Pyx_BufFmt_TypeCharToNativeSize (line 37999) | static size_t __Pyx_BufFmt_TypeCharToNativeSize(char ch, int is_complex) {
  type __Pyx_st_short (line 38018) | typedef struct { char c; short x; } __Pyx_st_short;
  type __Pyx_st_int (line 38019) | typedef struct { char c; int x; } __Pyx_st_int;
  type __Pyx_st_long (line 38020) | typedef struct { char c; long x; } __Pyx_st_long;
  type __Pyx_st_float (line 38021) | typedef struct { char c; float x; } __Pyx_st_float;
  type __Pyx_st_double (line 38022) | typedef struct { char c; double x; } __Pyx_st_double;
  type __Pyx_st_longdouble (line 38023) | typedef struct { char c; long double x; } __Pyx_st_longdouble;
  type __Pyx_st_void_p (line 38024) | typedef struct { char c; void *x; } __Pyx_st_void_p;
  type __Pyx_st_longlong (line 38026) | typedef struct { char c; PY_LONG_LONG x; } __Pyx_st_longlong;
  function __Pyx_BufFmt_TypeCharToAlignment (line 38028) | static size_t __Pyx_BufFmt_TypeCharToAlignment(char ch, CYTHON_UNUSED in...
  type __Pyx_pad_short (line 38050) | typedef struct { short x; char c; } __Pyx_pad_short;
  type __Pyx_pad_int (line 38051) | typedef struct { int x; char c; } __Pyx_pad_int;
  type __Pyx_pad_long (line 38052) | typedef struct { long x; char c; } __Pyx_pad_long;
  type __Pyx_pad_float (line 38053) | typedef struct { float x; char c; } __Pyx_pad_float;
  type __Pyx_pad_double (line 38054) | typedef struct { double x; char c; } __Pyx_pad_double;
  type __Pyx_pad_longdouble (line 38055) | typedef struct { long double x; char c; } __Pyx_pad_longdouble;
  type __Pyx_pad_void_p (line 38056) | typedef struct { void *x; char c; } __Pyx_pad_void_p;
  type __Pyx_pad_longlong (line 38058) | typedef struct { PY_LONG_LONG x; char c; } __Pyx_pad_longlong;
  function __Pyx_BufFmt_TypeCharToPadding (line 38060) | static size_t __Pyx_BufFmt_TypeCharToPadding(char ch, CYTHON_UNUSED int ...
  function __Pyx_BufFmt_TypeCharToGroup (line 38078) | static char __Pyx_BufFmt_TypeCharToGroup(char ch, int is_complex) {
  function __Pyx_BufFmt_RaiseExpected (line 38099) | static void __Pyx_BufFmt_RaiseExpected(__Pyx_BufFmt_Context* ctx) {
  function __Pyx_BufFmt_ProcessTypeChunk (line 38123) | static int __Pyx_BufFmt_ProcessTypeChunk(__Pyx_BufFmt_Context* ctx) {
  function PyObject (line 38225) | static PyObject *
  function CYTHON_INLINE (line 38405) | static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info) {
  function __Pyx_ZeroBuffer (line 38410) | static void __Pyx_ZeroBuffer(Py_buffer* buf) {
  function __Pyx__GetBufferAndValidate (line 38417) | static int __Pyx__GetBufferAndValidate(
  function CYTHON_INLINE (line 38452) | static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *typ...
  function CYTHON_INLINE (line 38465) | static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varna...
  function PyObject (line 38470) | static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int l...
  function PyObject (line 38535) | static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) {
  function CYTHON_INLINE (line 38549) | static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) {
  function _PyErr_StackItem (line 38568) | static _PyErr_StackItem *
  function CYTHON_INLINE (line 38583) | static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, Py...
  function CYTHON_INLINE (line 38598) | static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, P...
  function __Pyx_GetException (line 38626) | static int __Pyx_GetException(PyObject **type, PyObject **value, PyObjec...
  function CYTHON_INLINE (line 38697) | static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2...
  function CYTHON_INLINE (line 38744) | static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* ...
  function CYTHON_INLINE (line 38846) | static CYTHON_INLINE PyObject* __Pyx_decode_c_string(
  function CYTHON_INLINE (line 38879) | static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expec...
  function CYTHON_INLINE (line 38885) | static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t inde...
  function CYTHON_INLINE (line 38892) | static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) {
  function CYTHON_INLINE (line 38898) | static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, Py...
  function CYTHON_INLINE (line 38921) | static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject ...
  function __Pyx_InBases (line 38933) | static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
  function CYTHON_INLINE (line 38941) | static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *...
  function __Pyx_inner_PyErr_GivenExceptionMatches2 (line 38957) | static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObj...
  function CYTHON_INLINE (line 38979) | static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObje...
  function __Pyx_PyErr_GivenExceptionMatchesTuple (line 38987) | static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, Py...
  function CYTHON_INLINE (line 39008) | static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err...
  function CYTHON_INLINE (line 39020) | static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *er...
  function PyObject (line 39033) | static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, CYTHO...
  function PyObject (line 39157) | static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, P...
  function CYTHON_INLINE (line 39168) | static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObj...
  function PyObject (line 39197) | static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* ...
  function __Pyx_SetVtable (line 39206) | static int __Pyx_SetVtable(PyObject *dict, void *vtable) {
  function __Pyx_PyObject_GetAttrStr_ClearAttributeError (line 39224) | static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) {
  function CYTHON_INLINE (line 39230) | static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject...
  function __Pyx_setup_reduce_is_named (line 39246) | static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) {
  function __Pyx_setup_reduce (line 39262) | static int __Pyx_setup_reduce(PyObject* type_obj) {
  function PyTypeObject (line 39352) | static PyTypeObject *__Pyx_ImportType(PyObject *module, const char *modu...
  function __Pyx_CLineForTraceback (line 39412) | static int __Pyx_CLineForTraceback(CYTHON_NCP_UNUSED PyThreadState *tsta...
  function __pyx_bisect_code_objects (line 39453) | static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries...
  function PyCodeObject (line 39474) | static PyCodeObject *__pyx_find_code_object(int code_line) {
  function __pyx_insert_code_object (line 39488) | static void __pyx_insert_code_object(int code_line, PyCodeObject* code_o...
  function PyCodeObject (line 39542) | static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
  function __Pyx_AddTraceback (line 39600) | static void __Pyx_AddTraceback(const char *funcname, int c_line,
  function __Pyx_GetBuffer (line 39640) | static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags) {
  function __Pyx_ReleaseBuffer (line 39647) | static void __Pyx_ReleaseBuffer(Py_buffer *view) {
  function __pyx_memviewslice_is_contig (line 39662) | static int
  function __pyx_get_array_memory_extents (line 39684) | static void
  function __pyx_slices_overlap (line 39708) | static int
  function CYTHON_INLINE (line 39720) | static CYTHON_INLINE PyObject *
  function __pyx_typeinfo_cmp (line 39755) | static int
  function __pyx_check_strides (line 39796) | static int
  function __pyx_check_suboffsets (line 39849) | static int
  function __pyx_verify_contig (line 39872) | static int
  function __Pyx_ValidateAndInit_memviewslice (line 39901) | static int __Pyx_ValidateAndInit_memviewslice(
  function CYTHON_INLINE (line 39977) | static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlic...
  function CYTHON_INLINE (line 40000) | static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlic...
  function CYTHON_INLINE (line 40023) | static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlic...
  function CYTHON_INLINE (line 40046) | static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlic...
  function CYTHON_INLINE (line 40069) | static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlic...
  function CYTHON_INLINE (line 40092) | static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlic...
  function PyObject (line 40116) | static PyObject *__Pyx_GetStdout(void) {
  function __Pyx_Print (line 40123) | static int __Pyx_Print(PyObject* f, PyObject *arg_tuple, int newline) {
  function __Pyx_Print (line 40165) | static int __Pyx_Print(PyObject* stream, PyObject *arg_tuple, int newlin...
  function CYTHON_INLINE (line 40223) | static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_pa...
  function CYTHON_INLINE (line 40227) | static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_pa...
  function CYTHON_INLINE (line 40232) | static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_pa...
  function CYTHON_INLINE (line 40243) | static CYTHON_INLINE int __Pyx_c_eq_float(__pyx_t_float_complex a, __pyx...
  function CYTHON_INLINE (line 40246) | static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_flo...
  function CYTHON_INLINE (line 40252) | static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_fl...
  function CYTHON_INLINE (line 40258) | static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_fl...
  function CYTHON_INLINE (line 40265) | static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_fl...
  function CYTHON_INLINE (line 40285) | static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_fl...
  function CYTHON_INLINE (line 40296) | static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_flo...
  function CYTHON_INLINE (line 40302) | static CYTHON_INLINE int __Pyx_c_is_zero_float(__pyx_t_float_complex a) {
  function CYTHON_INLINE (line 40305) | static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_fl...
  function CYTHON_INLINE (line 40312) | static CYTHON_INLINE float __Pyx_c_abs_float(__pyx_t_float_complex z) {
  function CYTHON_INLINE (line 40319) | static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_flo...
  function CYTHON_INLINE (line 40377) | static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_...
  function CYTHON_INLINE (line 40381) | static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_...
  function CYTHON_INLINE (line 40386) | static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_...
  function CYTHON_INLINE (line 40397) | static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex a, __p...
  function CYTHON_INLINE (line 40400) | static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_d...
  function CYTHON_INLINE (line 40406) | static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_...
  function CYTHON_INLINE (line 40412) | static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_...
  function CYTHON_INLINE (line 40419) | static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_...
  function CYTHON_INLINE (line 40439) | static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_...
  function CYTHON_INLINE (line 40450) | static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_d...
  function CYTHON_INLINE (line 40456) | static CYTHON_INLINE int __Pyx_c_is_zero_double(__pyx_t_double_complex a) {
  function CYTHON_INLINE (line 40459) | static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_...
  function CYTHON_INLINE (line 40466) | static CYTHON_INLINE double __Pyx_c_abs_double(__pyx_t_double_complex z) {
  function CYTHON_INLINE (line 40473) | static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_d...
  function __Pyx_memviewslice (line 40529) | static __Pyx_memviewslice
  function CYTHON_INLINE (line 40988) | static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
  function CYTHON_INLINE (line 41026) | static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {
  function __Pyx_PyInt_As_signed__char (line 41064) | static CYTHON_INLINE signed char __Pyx_PyInt_As_signed__char(PyObject *x) {
  function CYTHON_INLINE (line 41260) | static CYTHON_INLINE PyObject* __Pyx_PyInt_From_npy_bool(npy_bool value) {
  function __Pyx_PrintOne (line 41299) | static int __Pyx_PrintOne(PyObject* f, PyObject *o) {
  function __Pyx_PrintOne (line 41323) | static int __Pyx_PrintOne(PyObject* stream, PyObject *o) {
  function __Pyx_check_binary_version (line 41531) | static int __Pyx_check_binary_version(void) {
  function __Pyx_InitStrings (line 41569) | static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
  function CYTHON_INLINE (line 41601) | static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_...
  function CYTHON_INLINE (line 41604) | static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) {
  function CYTHON_INLINE (line 41631) | static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObjec...
  function CYTHON_INLINE (line 41673) | static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
  function CYTHON_INLINE (line 41678) | static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) {
  function PyObject (line 41685) | static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* resul...
  function CYTHON_INLINE (line 41754) | static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
  function CYTHON_INLINE (line 41816) | static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) {
  function CYTHON_INLINE (line 41833) | static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) {
  function CYTHON_INLINE (line 41836) | static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {

FILE: exp_runner.py
  class Runner (line 32) | class Runner:
    method __init__ (line 33) | def __init__(self, conf_path, mode='train', case='CASE_NAME', is_conti...
    method train (line 131) | def train(self):
    method get_image_perm (line 239) | def get_image_perm(self):
    method get_cos_anneal_ratio (line 242) | def get_cos_anneal_ratio(self):
    method get_weight_anneal_ratio (line 248) | def get_weight_anneal_ratio(self):
    method update_learning_rate (line 254) | def update_learning_rate(self):
    method file_backup (line 267) | def file_backup(self):
    method load_checkpoint (line 280) | def load_checkpoint(self, checkpoint_name):
    method save_checkpoint (line 291) | def save_checkpoint(self):
    method validate_image (line 304) | def validate_image(self, idx=-1, resolution_level=-1, up_sample=True):
    method render_novel_image (line 373) | def render_novel_image(self, idx_0, idx_1, ratio, resolution_level):
    method validate_mesh (line 401) | def validate_mesh(self, world_space=False, resolution=64, threshold=0.0):
    method validate_point (line 417) | def validate_point(self, num_steps=10, world_space=True, patch_size=10...
    method interpolate_view (line 442) | def interpolate_view(self, img_idx_0, img_idx_1):
    method validate_mesh_udf_backups (line 467) | def validate_mesh_udf_backups(self, world_space=False, resolution=64, ...
    method validate_ray (line 484) | def validate_ray(self, idx=-1):
    method get_vertices_color (line 512) | def get_vertices_color(self, vertices):
    method get_vertices_normal (line 530) | def get_vertices_normal(self, vertices):
    method get_vertices_sdf (line 534) | def get_vertices_sdf(self, vertices):
    method validate_normal (line 538) | def validate_normal(self, num_steps=10, world_space=True, patch_size=1...
    method validate_udf (line 565) | def validate_udf(self, num_steps=10, world_space=True, patch_size=1000...
    method get_udf_normals_grid_slow (line 589) | def get_udf_normals_grid_slow(self, b_min, b_max, N=56, max_batch=int(...
    method get_mesh_udf_fast (line 683) | def get_mesh_udf_fast(self, b_min, b_max, N_MC=128, fourier=False,
    method validate_mesh_udf (line 873) | def validate_mesh_udf(self, world_space=False, resolution=64, color=Fa...
    method validate_mesh_udf_main (line 890) | def validate_mesh_udf_main(self, b_min, b_max, n, color):

FILE: lib/models/deep_udf_decoder.py
  class Decoder (line 6) | class Decoder(nn.Module):
    method __init__ (line 7) | def __init__(
    method forward (line 88) | def forward(self, input):

FILE: lib/workspace.py
  function load_experiment_specifications (line 10) | def load_experiment_specifications(experiment_directory):
  function load_model_parameters_decoder (line 20) | def load_model_parameters_decoder(experiment_directory, checkpoint, deco...
  function get_latent_codes_dir (line 31) | def get_latent_codes_dir(experiment_dir, create_if_nonexistent=False):
  function load_latent_vectors (line 38) | def load_latent_vectors(experiment_directory, filename):
  function fourier_transform (line 46) | def fourier_transform(x, L=5):

FILE: models/dataset.py
  function load_K_Rt_from_P (line 13) | def load_K_Rt_from_P(filename, P=None):
  class Dataset (line 37) | class Dataset:
    method __init__ (line 38) | def __init__(self, conf):
    method gen_rays_at (line 97) | def gen_rays_at(self, img_idx, resolution_level=1):
    method gen_random_rays_at (line 112) | def gen_random_rays_at(self, img_idx, batch_size):
    method gen_rays_between (line 127) | def gen_rays_between(self, idx_0, idx_1, ratio, resolution_level=1):
    method near_far_from_sphere (line 160) | def near_far_from_sphere(self, rays_o, rays_d):
    method image_at (line 168) | def image_at(self, idx, resolution_level):
    method gen_patch_rays_at (line 172) | def gen_patch_rays_at(self, img_idx, batch_size, patch_size):

FILE: models/embedder.py
  class Embedder (line 6) | class Embedder:
    method __init__ (line 7) | def __init__(self, **kwargs):
    method create_embedding_fn (line 11) | def create_embedding_fn(self):
    method embed (line 35) | def embed(self, inputs):
  function get_embedder (line 39) | def get_embedder(multires, input_dims=3):

FILE: models/fields.py
  class SDFNetwork (line 9) | class SDFNetwork(nn.Module):
    method __init__ (line 10) | def __init__(self,
    method forward (line 75) | def forward(self, inputs):
    method sdf (line 96) | def sdf(self, x):
    method sdf_hidden_appearance (line 99) | def sdf_hidden_appearance(self, x):
    method gradient (line 102) | def gradient(self, x):
  class RenderingNetwork (line 117) | class RenderingNetwork(nn.Module):
    method __init__ (line 118) | def __init__(self,
    method forward (line 153) | def forward(self, points, normals, view_dirs, feature_vectors, sdf=Non...
  class NeRF (line 240) | class NeRF(nn.Module):
    method __init__ (line 241) | def __init__(self,
    method forward (line 293) | def forward(self, input_pts, input_views):
  class SingleVarianceNetwork (line 321) | class SingleVarianceNetwork(nn.Module):
    method __init__ (line 322) | def __init__(self, init_val):
    method forward (line 326) | def forward(self, x):

FILE: models/renderer.py
  function extract_fields (line 12) | def extract_fields(bound_min, bound_max, resolution, query_func):
  function extract_geometry (line 31) | def extract_geometry(bound_min, bound_max, resolution, threshold, query_...
  function sample_pdf (line 57) | def sample_pdf(bins, weights, n_samples, det=False):
  class NeuSRenderer (line 90) | class NeuSRenderer:
    method __init__ (line 91) | def __init__(self,
    method render_core_outside (line 126) | def render_core_outside(self, rays_o, rays_d, z_vals, sample_dist, ner...
    method up_sample (line 164) | def up_sample(self, rays_o, rays_d, z_vals, sdf, n_importance, i):
    method cat_z_vals (line 219) | def cat_z_vals(self, rays_o, rays_d, z_vals, new_z_vals, sdf, last=Fal...
    method render_core (line 237) | def render_core(self,
    method render (line 423) | def render(self, rays_o, rays_d, near, far, perturb_overwrite=-1, back...
    method extract_geometry (line 623) | def extract_geometry(self, bound_min, bound_max, resolution, threshold...
    method generate_point_cloud (line 630) | def generate_point_cloud(self, device, num_steps = 10, num_points = 90...
    method up_sample_uniformity (line 683) | def up_sample_uniformity(self, rays_o, rays_d, z_vals, sdf, n_importan...
    method up_sample_surface (line 702) | def up_sample_surface(self, rays_o, rays_d, z_vals, sdf, n_importance,...
    method up_sample_udf (line 759) | def up_sample_udf(self, rays_o, rays_d, z_vals, sdf, n_importance, i):
    method up_sample_naive (line 779) | def up_sample_naive(self, rays_o, rays_d, z_vals, sdf, n_importance, i):
    method up_sample_naive_appr (line 808) | def up_sample_naive_appr(self, rays_o, rays_d, z_vals, sdf, n_importan...
    method up_sample_neus_appr (line 840) | def up_sample_neus_appr(self, rays_o, rays_d, z_vals, sdf, n_importanc...
    method up_sample_fake_f (line 876) | def up_sample_fake_f(self, rays_o, rays_d, z_vals, sdf, n_importance, i):
    method up_sample_uniform (line 911) | def up_sample_uniform(self, rays_o, rays_d, z_vals, sdf, n_importance,...
    method generate_ray (line 972) | def generate_ray(self, rays_o, rays_d, near, far, perturb_overwrite=-1...
    method sample_symmetry (line 1119) | def sample_symmetry(self, rays_o, rays_d, z_vals, sdf, n_importance, i...
    method approximate_normal (line 1166) | def approximate_normal(self, pts, dirs, max_delta_z=0.01, min_delta_z=...

FILE: preprocess_custom_data/aruco_preprocess/calibration.cpp
  function Calibrate (line 11) | void Calibrate(std::string work_dir, int n_images, double raw_scale) {
  function main (line 111) | int main(int argc, char* argv[]) {

FILE: preprocess_custom_data/aruco_preprocess/gen_cameras.py
  function convert_cameras (line 11) | def convert_cameras(work_dir, crop_pixels):

FILE: preprocess_custom_data/colmap_preprocess/colmap_read_model.py
  class Image (line 48) | class Image(BaseImage):
    method qvec2rotmat (line 49) | def qvec2rotmat(self):
  function read_next_bytes (line 70) | def read_next_bytes(fid, num_bytes, format_char_sequence, endian_charact...
  function read_cameras_text (line 82) | def read_cameras_text(path):
  function read_cameras_binary (line 108) | def read_cameras_binary(path_to_model_file):
  function read_images_text (line 137) | def read_images_text(path):
  function read_images_binary (line 168) | def read_images_binary(path_to_model_file):
  function read_points3D_text (line 203) | def read_points3D_text(path):
  function read_points3d_binary (line 230) | def read_points3d_binary(path_to_model_file):
  function read_model (line 260) | def read_model(path, ext):
  function qvec2rotmat (line 272) | def qvec2rotmat(qvec):
  function rotmat2qvec (line 285) | def rotmat2qvec(R):
  function main (line 299) | def main():

FILE: preprocess_custom_data/colmap_preprocess/colmap_wrapper.py
  function run_colmap (line 23) | def run_colmap(basedir, match_type):

FILE: preprocess_custom_data/colmap_preprocess/pose_utils.py
  function load_colmap_data (line 12) | def load_colmap_data(realdir):
  function save_poses (line 57) | def save_poses(basedir, poses, pts3d, perm):
  function minify_v0 (line 83) | def minify_v0(basedir, factors=[], resolutions=[]):
  function minify (line 132) | def minify(basedir, factors=[], resolutions=[]):
  function load_data (line 186) | def load_data(basedir, factor=None, width=None, height=None, load_imgs=T...
  function gen_poses (line 246) | def gen_poses(basedir, match_type, factors=None):
Condensed preview — 35 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (2,055K chars).
[
  {
    "path": "LICENSE",
    "chars": 1063,
    "preview": "MIT License\n\nCopyright (c) 2023 IGLICT\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof "
  },
  {
    "path": "README.md",
    "chars": 3766,
    "preview": "# NeUDF\nWe present an open surface reconstruction method using UDF, called NeUDF, for reconstructing objects with high-f"
  },
  {
    "path": "confs/wmask_old.conf",
    "chars": 1890,
    "preview": "general {\n    base_exp_dir = ./exp/CASE_NAME/wmask\n    recording = [\n        ./,\n        ./models\n    ]\n}\n\ndataset {\n   "
  },
  {
    "path": "confs/wmask_open.conf",
    "chars": 1821,
    "preview": "general {\n    base_exp_dir = ./exp/CASE_NAME/wmask_open\n    recording = [\n        ./,\n        ./models\n    ]\n}\n\ndataset "
  },
  {
    "path": "confs/womask_open.conf",
    "chars": 1832,
    "preview": "general {\n    base_exp_dir = ./exp/CASE_NAME/womask_open\n    recording = [\n        ./,\n        ./models\n    ]\n}\n\ndataset"
  },
  {
    "path": "custom_mc/_marching_cubes_lewiner.py",
    "chars": 8117,
    "preview": "import base64\nimport numpy as np\nimport _marching_cubes_lewiner_luts as mcluts\nimport _marching_cubes_lewiner_cy\n\n\ndef m"
  },
  {
    "path": "custom_mc/_marching_cubes_lewiner_cy.c",
    "chars": 1707537,
    "preview": "/* Generated by Cython 0.29.30 */\n\n/* BEGIN: Cython Metadata\n{\n    \"distutils\": {\n        \"depends\": [],\n        \"name\":"
  },
  {
    "path": "custom_mc/_marching_cubes_lewiner_cy.pyx",
    "chars": 64471,
    "preview": "#cython: cdivision=True\n#cython: boundscheck=False\n#cython: nonecheck=False\n#cython: wraparound=False\n\n\"\"\"\nThis is an im"
  },
  {
    "path": "custom_mc/_marching_cubes_lewiner_luts.py",
    "chars": 27021,
    "preview": "# -*- coding: utf-8 -*-\n# This file was auto-generated from `mc_meta/LookUpTable.h` by\n# `mc_meta/createluts.py`.\n\n#stat"
  },
  {
    "path": "custom_mc/setup.py",
    "chars": 399,
    "preview": "# python setup.py build_ext --inplace\nfrom setuptools import setup\nfrom Cython.Build import cythonize\nimport numpy as np"
  },
  {
    "path": "exp_runner.py",
    "chars": 49325,
    "preview": "import os\nimport time\nimport logging\nimport argparse\nimport numpy as np\nimport cv2 as cv\nimport trimesh\nimport torch\nimp"
  },
  {
    "path": "lib/__init__.py",
    "chars": 28,
    "preview": "from lib.workspace import *\n"
  },
  {
    "path": "lib/models/deep_udf_decoder.py",
    "chars": 3980,
    "preview": "import torch.nn as nn\nimport torch\nimport torch.nn.functional as F\n\n\nclass Decoder(nn.Module):\n    def __init__(\n       "
  },
  {
    "path": "lib/workspace.py",
    "chars": 1775,
    "preview": "import json\nimport os\nimport torch\n\nmodel_params_subdir = \"ModelParameters\"\nlatent_codes_subdir = \"LatentCodes\"\nspecific"
  },
  {
    "path": "models/dataset.py",
    "chars": 10165,
    "preview": "import torch\nimport torch.nn.functional as F\nimport cv2 as cv\nimport numpy as np\nimport os\nfrom glob import glob\nfrom ic"
  },
  {
    "path": "models/embedder.py",
    "chars": 1528,
    "preview": "import torch\nimport torch.nn as nn\n\n\n# Positional encoding embedding. Code was taken from https://github.com/bmild/nerf."
  },
  {
    "path": "models/fields.py",
    "chars": 13265,
    "preview": "import torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nimport numpy as np\nfrom models.embedder import get_em"
  },
  {
    "path": "models/renderer.py",
    "chars": 60168,
    "preview": "import torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nimport numpy as np\nimport logging\nimport mcubes\nfrom "
  },
  {
    "path": "preprocess_custom_data/aruco_preprocess/CMakeLists.txt",
    "chars": 286,
    "preview": "project(PieceSeg)\ncmake_minimum_required(VERSION 3.0)\nset(CMAKE_CXX_STANDARD 14)\nset(CMAKE_BUILD_TYPE Release)\n\nfind_pac"
  },
  {
    "path": "preprocess_custom_data/aruco_preprocess/calibration.cpp",
    "chars": 4045,
    "preview": "#include <cnpy.h>\n#include <cmath>\n#include <cstring>\n#include <string>\n#include <iostream>\n#include <fstream>\n#include "
  },
  {
    "path": "preprocess_custom_data/aruco_preprocess/gen_cameras.py",
    "chars": 2324,
    "preview": "import numpy as np\nimport os\nimport sys\nimport cv2 as cv\nfrom glob import glob\nfrom scipy.spatial.transform import Rotat"
  },
  {
    "path": "preprocess_custom_data/aruco_preprocess/run.sh",
    "chars": 616,
    "preview": "calib_bin=./build/calibration\nwork_dir=../example/thin_rope\nn_images=32\n\n# Define the region of interest (ROI).\n# We ass"
  },
  {
    "path": "preprocess_custom_data/colmap_preprocess/colmap_read_model.py",
    "chars": 13273,
    "preview": "# Copyright (c) 2018, ETH Zurich and UNC Chapel Hill.\n# All rights reserved.\n#\n# Redistribution and use in source and bi"
  },
  {
    "path": "preprocess_custom_data/colmap_preprocess/colmap_wrapper.py",
    "chars": 2573,
    "preview": "import os\nimport subprocess\n\n\n\n# $ DATASET_PATH=/path/to/dataset\n\n# $ colmap feature_extractor \\\n#    --database_path $D"
  },
  {
    "path": "preprocess_custom_data/colmap_preprocess/gen_cameras.py",
    "chars": 2993,
    "preview": "import numpy as np\nimport trimesh\nimport cv2 as cv\nimport sys\nimport os\nfrom glob import glob\n\n\nif __name__ == '__main__"
  },
  {
    "path": "preprocess_custom_data/colmap_preprocess/imgs2poses.py",
    "chars": 682,
    "preview": "from pose_utils import gen_poses\nimport sys\nimport argparse\nparser = argparse.ArgumentParser()\nparser.add_argument('--ma"
  },
  {
    "path": "preprocess_custom_data/colmap_preprocess/pose_utils.py",
    "chars": 9182,
    "preview": "import numpy as np\nimport os\nimport sys\nimport imageio\nimport skimage.transform\nimport trimesh\n\nfrom colmap_wrapper impo"
  },
  {
    "path": "preprocess_custom_data/readme.md",
    "chars": 2029,
    "preview": " \n\n# Training NeuS Using Your Custom Data\n\n\n\n### [Example data link](https://drive.google.com/file/d/1nZBY--rvi3dUKGVz-d"
  },
  {
    "path": "requirements.txt",
    "chars": 140,
    "preview": "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."
  }
]

// ... and 6 more files (download for full content)

About this extraction

This page contains the full source code of the IGLICT/NeUDF GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 35 files (29.6 MB), approximately 668.9k tokens, and a symbol index with 785 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!