ptypy.utils.array_utils#

utility functions to manipulate/reshape numpy arrays.

This file is part of the PTYPY package.

copyright:

Copyright 2014 by the PTYPY team, see AUTHORS.

license:

see LICENSE for details.

Functions

c_zoom(c, *arg, **kwargs)

Deprecated, kept for backward compatibility only.

crop_pad(A, hplane_list[, axes, cen, ...])

Crops or pads a volume array A with a number of hyperplanes according to parameters in hplanes Wrapper for crop_pad_axis.

crop_pad_axis(A, hplanes[, axis, roll, ...])

Crops or pads a volume array A at beginning and end of axis axis with a number of hyperplanes specified by hplanes

crop_pad_symmetric_2d(A, newshape[, center])

Crops or pads Array A symmetrically along the last two axes (-2,-1) around center center to a new shape newshape.

ellipsis(grids[, dims, ew])

fill3D(A, B[, offset])

Fill 3-dimensional array A with B.

grids(sh[, psize, center, FFTlike])

``q0,q1,.

mirror(A[, axis])

Mirrors array A along one axis axis

pad_lr(A, axis, l, r[, fillpar, filltype])

Pads ndarray A orthogonal to axis with l layers (pixels,lines,planes,...) on low side an r layers on high side.

rebin(a, *args, **kwargs)

Rebin ndarray data into a smaller ndarray of the same rank whose dimensions are factors of the original dimensions.

rebin_2d(A[, rebin])

Rebins array A symmetrically along the last 2 axes with factor rebin.

rectangle(grids[, dims, ew])

shift_zoom(c, zoom, cen_old, cen_new, **kwargs)

Move array from center cen_old to cen_new and perform a zoom zoom.

switch_orientation(A, orientation[, center])

Switches orientation of Array A along the last two axes (-2,-1)

zoom(c, *arg, **kwargs)

Deprecated, kept for backward compatibility only.