| Home | Trees | Indices | Help |
|
|---|
|
|
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
_frame_dispatch = {"nearest": frame_nearest, "reflect": frame_
|
|||
__package__ =
|
|||
Imports: num
|
|||
frame_nearest creates an oversized copy of 'a' with new 'shape' and the contents of 'a' in the center. The boundary pixels are copied from the nearest edge pixel in 'a'. >>> a = num.arange(16) >>> a.shape=(4,4) >>> frame_nearest(a, (8,8)) array([[ 0, 0, 0, 1, 2, 3, 3, 3], [ 0, 0, 0, 1, 2, 3, 3, 3], [ 0, 0, 0, 1, 2, 3, 3, 3], [ 4, 4, 4, 5, 6, 7, 7, 7], [ 8, 8, 8, 9, 10, 11, 11, 11], [12, 12, 12, 13, 14, 15, 15, 15], [12, 12, 12, 13, 14, 15, 15, 15], [12, 12, 12, 13, 14, 15, 15, 15]]) |
frame_reflect creates an oversized copy of 'a' with new 'shape' and the contents of 'a' in the center. The boundary pixels are reflected from the nearest edge pixels in 'a'. >>> a = num.arange(16) >>> a.shape = (4,4) >>> frame_reflect(a, (8,8)) array([[ 5, 4, 4, 5, 6, 7, 7, 6], [ 1, 0, 0, 1, 2, 3, 3, 2], [ 1, 0, 0, 1, 2, 3, 3, 2], [ 5, 4, 4, 5, 6, 7, 7, 6], [ 9, 8, 8, 9, 10, 11, 11, 10], [13, 12, 12, 13, 14, 15, 15, 14], [13, 12, 12, 13, 14, 15, 15, 14], [ 9, 8, 8, 9, 10, 11, 11, 10]]) |
frame_wrap creates an oversized copy of 'a' with new 'shape' and the contents of 'a' in the center. The boundary pixels are wrapped around to the opposite edge pixels in 'a'. >>> a = num.arange(16) >>> a.shape=(4,4) >>> frame_wrap(a, (8,8)) array([[10, 11, 8, 9, 10, 11, 8, 9], [14, 15, 12, 13, 14, 15, 12, 13], [ 2, 3, 0, 1, 2, 3, 0, 1], [ 6, 7, 4, 5, 6, 7, 4, 5], [10, 11, 8, 9, 10, 11, 8, 9], [14, 15, 12, 13, 14, 15, 12, 13], [ 2, 3, 0, 1, 2, 3, 0, 1], [ 6, 7, 4, 5, 6, 7, 4, 5]]) |
frame_nearest creates an oversized copy of 'a' with new 'shape' and the contents of 'a' in the center. The boundary pixels are copied from the nearest edge pixel in 'a'. >>> a = num.arange(16) >>> a.shape=(4,4) >>> frame_constant(a, (8,8), cval=42) array([[42, 42, 42, 42, 42, 42, 42, 42], [42, 42, 42, 42, 42, 42, 42, 42], [42, 42, 0, 1, 2, 3, 42, 42], [42, 42, 4, 5, 6, 7, 42, 42], [42, 42, 8, 9, 10, 11, 42, 42], [42, 42, 12, 13, 14, 15, 42, 42], [42, 42, 42, 42, 42, 42, 42, 42], [42, 42, 42, 42, 42, 42, 42, 42]]) |
|
|||
_frame_dispatch
|
| Home | Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Mon Aug 22 15:20:58 2011 | http://epydoc.sourceforge.net |