3
0
mirror of https://github.com/triqs/dft_tools synced 2024-06-02 11:25:29 +02:00

Fixed import of 'json'

It seems that not all distributions of python come with a 'simplejson' module.
Now, if this module is not found the import falls back to module 'json'.
This commit is contained in:
Oleg.Peil 2015-09-21 11:59:04 +02:00 committed by Michel Ferrero
parent 53de9b3962
commit 2346b43950

View File

@ -3,7 +3,10 @@ import itertools as it
import numpy as np
# 'simplejson' is supposed to be faster than 'json' in stdlib.
import simplejson as json
try:
import simplejson as json
except ImportError:
import json
class Projector:
"""