cyjax.util.flatten_coord#
- cyjax.util.flatten_coord(zs, zs_c=None, need_c=False)#
Flatten coordinates and return old shape.
- Parameters:
zs (
Union
[Array
,ndarray
,bool_
,number
]) – Array of complex coordinates.zs_c (
Union
[Array
,ndarray
,bool_
,number
,None
]) – Complex conjugate ofzs
.need_c (
bool
) – Whether to return (and compute) the complex conjugate.
- Return type:
tuple
[Union
[Array
,ndarray
,bool_
,number
,tuple
[Union
[Array
,ndarray
,bool_
,number
],Union
[Array
,ndarray
,bool_
,number
]]],tuple
[int
,...
]]- Returns:
Tuple of flattened coordinates and old_shape. If
need_c
is true, coordinates are a tuple of two arrays, otherwise it is one array.