1from numpy import array, concatenate
2
3def cloneXYZ(x, y, z):
4    """
5    This function is to create a hard copy of vector x, y, z.
6    """
7    x0 = array(x)
8    y0 = array(y)
9    z0 = array(z)
10    return x0, y0, z0
11
12def packXYZ(x, y, z):
13    """
14    This function concatenate x, y, x to one vector and return it.
15    """
16    t = concatenate([x, y, z])
17    return t
18
19
20
21def minIgnoreNone(a,b):
22    if a is None:
23        return b
24    if b is None:
25        return a
26    if a<b:
27        return a
28    return b
29
30def maxIgnoreNone(a,b):
31    if a is None:
32        return b
33    if b is None:
34        return a
35    if a<b:
36        return b
37    return a
38