Detail: IndexGO: Operator Unary

Overview: IndexGO: Operator Unary

IndexGO.__abs__()
>>> ix = sf.IndexGO((0, 1024, -2048, 4096))
>>> ix
<IndexGO>
0
1024
-2048
4096
<int64>
>>> abs(ix)
[   0 1024 2048 4096]
IndexGO.__invert__()
>>> ix = sf.IndexGO((False, True), name='x')
>>> ix
<IndexGO: x>
False
True
<bool>
>>> ~ix
[ True False]
IndexGO.__neg__()
>>> ix = sf.IndexGO((0, 1024, -2048, 4096))
>>> ix
<IndexGO>
0
1024
-2048
4096
<int64>
>>> -ix
[    0 -1024  2048 -4096]
IndexGO.__pos__()
>>> ix = sf.IndexGO((0, 1024, -2048, 4096))
>>> ix
<IndexGO>
0
1024
-2048
4096
<int64>
>>> +ix
[    0  1024 -2048  4096]

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