Files
scikit-image/skimage/util/__init__.py
T
Josh Warner (Mac) 20ae0a1ca2 FEAT: Generalized n-dimensional array padding
This PR exposes NumPy 1.8+ padding functionality to all
users of scikit-image, regardless of their personal NumPy
version.

The improved (much better scaling with dimensionality)
version introduced in NumPy 1.8 is used.
2013-06-19 09:10:06 -05:00

24 lines
632 B
Python

from .dtype import (img_as_float, img_as_int, img_as_uint, img_as_ubyte,
img_as_bool, dtype_limits)
from .shape import view_as_blocks, view_as_windows
import numpy
ver = numpy.__version__.split('.')
chk = int(ver[0] + ver[1])
if chk < 18: # Use internal version for numpy versions < 1.8.x
from .arraypad import pad
else:
from numpy import pad
del numpy, ver, chk
__all__ = ['img_as_float',
'img_as_int',
'img_as_uint',
'img_as_ubyte',
'img_as_bool',
'dtype_limits',
'view_as_blocks',
'view_as_windows',
'pad']