IntervalProd.corners

IntervalProd.corners(order='C')[source]

Return the corner points as a single array.

Parameters

order{‘C’, ‘F’}, optional

Ordering of the axes in which the corners appear in the output. 'C' means that the first axis varies slowest and the last one fastest, vice versa in 'F' ordering.

Returns

cornersnumpy.ndarray

Array containing the corner coordinates. The size of the array is 2^m x ndim, where m is the number of non-degenerate axes, i.e. the corners are stored as rows.

Examples

>>> intv = IntervalProd([-1, 2, 0], [-0.5, 3, 0.5])
>>> intv.corners()
array([[-1. ,  2. ,  0. ],
       [-1. ,  2. ,  0.5],
       [-1. ,  3. ,  0. ],
       [-1. ,  3. ,  0.5],
       [-0.5,  2. ,  0. ],
       [-0.5,  2. ,  0.5],
       [-0.5,  3. ,  0. ],
       [-0.5,  3. ,  0.5]])
>>> intv.corners(order='F')
array([[-1. ,  2. ,  0. ],
       [-0.5,  2. ,  0. ],
       [-1. ,  3. ,  0. ],
       [-0.5,  3. ,  0. ],
       [-1. ,  2. ,  0.5],
       [-0.5,  2. ,  0.5],
       [-1. ,  3. ,  0.5],
       [-0.5,  3. ,  0.5]])