mirror of
https://github.com/Telecominfraproject/oopt-gnpy.git
synced 2025-11-02 02:57:52 +00:00
De-JSONify gnpy.core
Change-Id: I2657f3174209bef5912c7d0809fee876830ad11c
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user