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