De-JSONify gnpy.core

Change-Id: I2657f3174209bef5912c7d0809fee876830ad11c
This commit is contained in:
Jan Kundrát
2020-05-23 18:41:18 +02:00
parent 648039521e
commit 9e74e8b0a0
5 changed files with 19 additions and 21 deletions

View File

@@ -9,8 +9,6 @@ This module contains utility functions that are used with gnpy.
'''
import json
from csv import writer
import numpy as np
from numpy import pi, cos, sqrt, log10
@@ -18,17 +16,6 @@ from scipy import constants
from gnpy.core.exceptions import ConfigurationError
def load_json(filename):
with open(filename, 'r', encoding='utf-8') as f:
data = json.load(f)
return data
def save_json(obj, filename):
with open(filename, 'w', encoding='utf-8') as f:
json.dump(obj, f, indent=2, ensure_ascii=False)
def write_csv(obj, filename):
"""
Convert dictionary items to a CSV file the dictionary format: