Definition at line 10 of file utils_os.py.
◆ default()
| utils_os.MyEncoder.default |
( |
| self, |
|
|
| obj ) |
Definition at line 11 of file utils_os.py.
11 def default(self, obj):
12 if isinstance(obj, numpy.integer):
13 return int(obj)
14 elif isinstance(obj, numpy.floating):
15 return float(obj)
16 elif isinstance(obj, numpy.ndarray):
17 return obj.tolist()
18 else:
19 return super(MyEncoder, self).default(obj)
20
21
The documentation for this class was generated from the following file: