bug fix: import

This commit is contained in:
Steve Nyemba 2024-04-01 14:09:45 -05:00
parent 6f7d912e20
commit eed612b396
1 changed files with 1 additions and 15 deletions

View File

@ -17,21 +17,7 @@ import sys
import json import json
import re import re
from multiprocessing import Lock, RLock from multiprocessing import Lock, RLock
# from transport.common import IEncoder from transport.common import IEncoder
class IEncoder (json.JSONEncoder):
def default (self,object):
if type(object) == np.integer :
return int(object)
elif type(object) == np.floating:
return float(object)
elif type(object) == np.ndarray :
return object.tolist()
elif type(object) == datetime :
return object.isoformat()
else:
return super(IEncoder,self).default(object)
class Mongo : class Mongo :
lock = RLock() lock = RLock()