import functools
import itertools
import math
import os
import sys

from functools import namedtuple, partial
from pprint import pprint
from time import time, sleep
from timeit import timeit

import numpy as np

from numpy import array, arange, concatenate, ones, ones_like, zeros, zeros_like
from numpy import exp, log, log2, log10, sqrt, ceil, floor
from numpy import pi, sin, cos, tan, arcsin, arccos, arctan, arctan2, degrees, radians
from scipy.constants import *

j = 1.j

np.set_printoptions(precision=3)

def E(x, precision=3):
    return ('{:.' + str(precision) + 'E}').format(x)

def print_reformat(x):
    return (
        "{:.3f}".format(x) if isinstance(x, float)   else
        "{:.3f}".format(x) if isinstance(x, complex) else
        "{:.3f}".format(x) if isinstance(x, np.complex128) else
        str(x))

def print2(*args, **kwargs):
    __builtins__.print(*map(print_reformat, args), **kwargs)

def namestr(obj, namespace):
    return next(name for name in namespace if namespace[name] is obj)

def printn(*args, namespace=globals(), padding=20):
    for x in args:
        print(namestr(x, namespace).ljust(padding - 1),
            print_reformat(x).replace('\n', '\n' + ' ' * padding))

@@ -60,17 +60,16 @@
 ort sys%0A
-%0A
 from fun
@@ -85,20 +85,8 @@
 port
- namedtuple,
  par
@@ -191,17 +191,16 @@
 y as np%0A
-%0A
 from num
@@ -421,38 +421,8 @@
 ians
-%0Afrom scipy.constants import *
 %0A%0Aj 
@@ -465,700 +465,4 @@
 =3)%0A
-%0Adef E(x, precision=3):%0A    return ('%7B:.' + str(precision) + 'E%7D').format(x)%0A%0Adef print_reformat(x):%0A    return (%0A        %22%7B:.3f%7D%22.format(x) if isinstance(x, float)   else%0A        %22%7B:.3f%7D%22.format(x) if isinstance(x, complex) else%0A        %22%7B:.3f%7D%22.format(x) if isinstance(x, np.complex128) else%0A        str(x))%0A%0Adef print2(*args, **kwargs):%0A    __builtins__.print(*map(print_reformat, args), **kwargs)%0A%0Adef namestr(obj, namespace):%0A    return next(name for name in namespace if namespace%5Bname%5D is obj)%0A%0Adef printn(*args, namespace=globals(), padding=20):%0A    for x in args:%0A        print(namestr(x, namespace).ljust(padding - 1),%0A            print_reformat(x).replace('%5Cn', '%5Cn' + ' ' * padding))%0A

Trim PYTHONSTARTUP