Total Complexity | 2 |
Total Lines | 21 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | from typing import Any |
||
2 | |||
3 | import numpy |
||
4 | |||
5 | from nptyping.types._nptype import NPType |
||
6 | |||
7 | |||
8 | class _ObjectMeta(type): |
||
9 | def __repr__(cls): |
||
10 | return 'Object' |
||
11 | |||
12 | def __subclasscheck__(cls, other: Any) -> bool: |
||
13 | return True |
||
14 | |||
15 | __str__ = __repr__ |
||
16 | __instancecheck__ = __subclasscheck__ |
||
17 | |||
18 | |||
19 | class Object(NPType, numpy.generic, metaclass=_ObjectMeta): |
||
20 | """ |
||
21 | Corresponds to numpy.object. |
||
23 |