|
|
|
@ -115,6 +115,7 @@ def mv_str(mva, delim='\n'):
@@ -115,6 +115,7 @@ def mv_str(mva, delim='\n'):
|
|
|
|
|
"""Renders a given multi-valued array into a string. |
|
|
|
|
""" |
|
|
|
|
sa = np.choose(mva, np.array([*'0X-1PRFN'], dtype=np.unicode_)) |
|
|
|
|
if not hasattr(mva, 'ndim') or mva.ndim == 0: return sa |
|
|
|
|
if mva.ndim == 1: return ''.join(sa) |
|
|
|
|
return delim.join([''.join(c) for c in sa.swapaxes(-1,-2)]) |
|
|
|
|
|
|
|
|
|