Detail: IndexHierarchyGO: Operator Unary

Overview: IndexHierarchyGO: Operator Unary

IndexHierarchyGO.__abs__()
>>> ih = sf.IndexHierarchyGO.from_labels(((0, 1024, 32), (1, -2048, 32), (1, 1024, 32)), name=('x', 'y', 'z'))
>>> ih
<IndexHierarchyGO: ('x', 'y', 'z')>
0                                   1024    32
1                                   -2048   32
1                                   1024    32
<int64>                             <int64> <int64>
>>> abs(ih)
[[   0 1024   32]
 [   1 2048   32]
 [   1 1024   32]]
IndexHierarchyGO.__invert__()
>>> ih = sf.IndexHierarchyGO.from_labels(((False, True, True), (True, True, True), (False, True, False)), name=('x', 'y', 'z'))
>>> ih
<IndexHierarchyGO: ('x', 'y', 'z')>
False                               True   True
True                                True   True
False                               True   False
<bool>                              <bool> <bool>
>>> ~ih
[[ True False False]
 [False False False]
 [ True False  True]]
IndexHierarchyGO.__neg__()
>>> ih = sf.IndexHierarchyGO.from_labels(((0, 1024, 32), (1, -2048, 32), (1, 1024, 32)), name=('x', 'y', 'z'))
>>> ih
<IndexHierarchyGO: ('x', 'y', 'z')>
0                                   1024    32
1                                   -2048   32
1                                   1024    32
<int64>                             <int64> <int64>
>>> -ih
[[    0 -1024   -32]
 [   -1  2048   -32]
 [   -1 -1024   -32]]
IndexHierarchyGO.__pos__()
>>> ih = sf.IndexHierarchyGO.from_labels(((0, 1024, 32), (1, -2048, 32), (1, 1024, 32)), name=('x', 'y', 'z'))
>>> ih
<IndexHierarchyGO: ('x', 'y', 'z')>
0                                   1024    32
1                                   -2048   32
1                                   1024    32
<int64>                             <int64> <int64>
>>> +ih
[[    0  1024    32]
 [    1 -2048    32]
 [    1  1024    32]]

IndexHierarchyGO: Constructor | Exporter | Attribute | Method | Dictionary-Like | Display | Selector | Iterator | Operator Binary | Operator Unary | Accessor Values | Accessor Datetime | Accessor String | Accessor Transpose | Accessor Regular Expression | Accessor Hashlib | Accessor Type Clinic