ptypy.utils.misc.expect3#

ptypy.utils.misc.expect3(a)#

Generates 1d numpy array with 3 entries generated from multiple inputs (tuples, arrays, scalars). Main puprose of this function is to circumvent debugging of input.

Examples

>>> from ptypy.utils import expect3
>>> expect3( 3.0 )
array([ 3.,  3.,  3.])
>>> expect3( (3.0,4.0) )
array([ 3.,  4.,  4.])
>>> expect3( (1.0, 3.0,4.0) )
array([ 1.,  3.,  4.])