Closed magsol closed 8 years ago
Import statements in Python files need to follow three guidelines:
For example:
import numpy as np import numpy.testing import numpy.linalg as sla import argparse
is incorrect. The correct ordering would be:
import argparse import numpy as np import numpy.linalg as sla import numpy.testing
from package import function
import package.subpackage as alias
from numpy import linalg as sla
is incorrect. Rather, use this formulation:
import numpy.linalg as sla
Thanks for elaborating such technical issues. It's already done.
Import statements in Python files need to follow three guidelines:
For example:
is incorrect. The correct ordering would be:
from package import function
, as this creates potential namespace collisions. Rather, use theimport package.subpackage as alias
syntax.For example:
is incorrect. Rather, use this formulation: