Skip to content
Snippets Groups Projects
Commit 370032be authored by jay's avatar jay
Browse files

Fixes missing import in io_json for datetime objs

parent 7ccc3405
No related branches found
No related tags found
No related merge requests found
import json import json
import numpy as np import numpy as np
import datetime
class NumpyEncoder(json.JSONEncoder): class NumpyEncoder(json.JSONEncoder):
def default(self, obj): def default(self, obj):
...@@ -9,7 +9,7 @@ class NumpyEncoder(json.JSONEncoder): ...@@ -9,7 +9,7 @@ class NumpyEncoder(json.JSONEncoder):
elif isinstance(obj, datetime.date): elif isinstance(obj, datetime.date):
return obj.isoformat() return obj.isoformat()
return json.JSONEncoder.default(self, obj) return json.JSONEncoder.default(self, obj)
def read_json(inputfile): def read_json(inputfile):
""" """
Read the input json file into a python dictionary. Read the input json file into a python dictionary.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment