logger = logging.getLogger(__name__) __author__ = "Doga Gursoy" __copyright__ = "Copyright (c) 2015, UChicago Argonne, LLC." __docformat__ = 'restructuredtext en' __all__ = [ 'downsample', 'upsample', 'pad', 'sino_360_to_180', 'sino_360_t0_180', # For backward compatibility 'trim_sinogram' ] LIB_TOMOPY = extern.c_shared_lib('libtomopy') def pad(arr, axis, npad=None, mode='constant', ncore=None, **kwargs): """ Pad an array along specified axis. Parameters ---------- arr : ndarray Input array. npad : int, optional New dimension after padding. axis : int, optional Axis along which padding will be performed. mode : str or function
import tomopy.util.extern as extern import tomopy.util.dtype as dtype import logging logger = logging.getLogger(__name__) __author__ = "Doga Gursoy" __copyright__ = "Copyright (c) 2015, UChicago Argonne, LLC." __docformat__ = 'restructuredtext en' __all__ = ['pad', 'downsample', 'upsample'] LIB_TOMOPY = extern.c_shared_lib('libtomopy') def pad(arr, axis, npad=None, val=0): """ Pad an array along specified axis. Parameters ---------- arr : ndarray Input array. npad : int, optional New dimension after padding. axis : int, optional Axis along which padding will be performed. val : float, optional