mirror of
https://github.com/wassname/scikit-image.git
synced 2026-07-29 11:26:57 +08:00
unwrap: rename cython functions.
This commit is contained in:
@@ -4,7 +4,7 @@ cdef extern void unwrap2D(float* wrapped_image,
|
||||
int image_width, int image_height,
|
||||
int wrap_around_x, int wrap_around_y)
|
||||
|
||||
def _unwrap2D(float[:,::1] array,
|
||||
def unwrap_2d(float[:,::1] array,
|
||||
unsigned char[:,::1] mask,
|
||||
float[:,::1] unwrapped_array,
|
||||
wrap_around):
|
||||
|
||||
@@ -4,7 +4,7 @@ cdef extern void unwrap3D(float* wrapped_volume,
|
||||
int image_width, int image_height, int volume_depth,
|
||||
int wrap_around_x, int wrap_around_y, int wrap_around_z)
|
||||
|
||||
def _unwrap3D(float[:,:,::1] array,
|
||||
def unwrap_3d(float[:,:,::1] array,
|
||||
unsigned char[:,:,::1] mask,
|
||||
float[:,:,::1] unwrapped_array,
|
||||
wrap_around):
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import numpy as np
|
||||
|
||||
from . import _unwrap_2d
|
||||
from . import _unwrap_3d
|
||||
from ._unwrap_2d import unwrap_2d
|
||||
from ._unwrap_3d import unwrap_3d
|
||||
|
||||
|
||||
def unwrap(image, wrap_around=False):
|
||||
@@ -61,10 +61,10 @@ def unwrap(image, wrap_around=False):
|
||||
image_unwrapped = np.empty(image.shape, dtype=np.float32)
|
||||
|
||||
if image.ndim == 2:
|
||||
_unwrap_2d._unwrap2D(image_not_masked, mask, image_unwrapped,
|
||||
unwrap_2d(image_not_masked, mask, image_unwrapped,
|
||||
wrap_around)
|
||||
elif image.ndim == 3:
|
||||
_unwrap_3d._unwrap3D(image_not_masked, mask, image_unwrapped,
|
||||
unwrap_3d(image_not_masked, mask, image_unwrapped,
|
||||
wrap_around)
|
||||
|
||||
if np.ma.isMaskedArray(image):
|
||||
|
||||
Reference in New Issue
Block a user