From 22403c81f7433ed0341ce95e139d055c342dd539 Mon Sep 17 00:00:00 2001 From: Pavel Komarov Date: Wed, 2 Oct 2024 22:44:39 -0700 Subject: [PATCH] we're on python3, so importing from future should no longer be necessary (#726) * we're on python3, so importing from future should no longer be necessary * we're on python3, so importing from future should no longer be necessary removed __future__ from many files * somehow deleted a whole file * misrenamed the undeleted file --- development/DMPFOR/dmpfor_test.py | 3 --- development/advect.py | 2 -- development/advect_annotated.py | 2 -- development/clawdata2pyclaw.py | 2 -- development/driver.py | 2 -- development/fPyWrapperExample.py | 5 ----- .../pyWrapperForRiemannSolver/RiemannSolver.py | 3 --- .../pyWrapperForRiemannSolver/riemannSolverAssertion.py | 3 --- .../pyWrapperForRiemannSolver/riemannSolverDemo.py | 2 -- .../pyWrapperForRiemannSolver/riemannSolverSerialTimer.py | 6 ------ development/rp_approaches/setplot.py | 1 - development/rp_approaches/shockbubble.py | 2 -- development/test_mpi4py.py | 3 --- development/test_rescale.py | 2 -- fvmbook/chap11/burgers/burgers1D.py | 1 - fvmbook/chap22/inclusion/inclusion.py | 1 - fvmbook/chap3/acousimple/acoustics_simple_waves.py | 3 +-- fvmbook/chap6/advection.py | 1 - fvmbook/chap6/setplot.py | 3 +-- fvmbook/chap7/standing/acoustics.py | 3 +-- fvmbook/chap9/acoustics/interface/acoustics.py | 3 +-- fvmbook/chap9/acoustics/interface/setplot.py | 1 - src/forestclaw/__init__.py | 2 -- src/forestclaw/fileio/__init__.py | 2 -- src/forestclaw/fileio/ascii.py | 4 ---- src/forestclaw/fileio/test.py | 3 --- src/forestclaw/geometry.py | 3 --- src/forestclaw/setup.py | 1 - src/forestclaw/test.py | 3 --- src/petclaw/__init__.py | 2 -- src/petclaw/cfl.py | 5 +---- src/petclaw/classic/setup.py | 1 - src/petclaw/classic/solver.py | 2 -- src/petclaw/controller.py | 2 -- src/petclaw/fileio/__init__.py | 2 -- src/petclaw/fileio/hdf5.py | 2 -- src/petclaw/fileio/petsc.py | 3 --- src/petclaw/geometry.py | 1 - src/petclaw/limiters/__init__.py | 2 -- src/petclaw/plot.py | 1 - src/petclaw/setup.py | 1 - src/petclaw/sharpclaw/setup.py | 2 -- src/petclaw/sharpclaw/solver.py | 1 - src/petclaw/solution.py | 3 --- src/petclaw/state.py | 1 - src/petclaw/tests/test_io.py | 1 - src/pyclaw/build/fcompiler.py | 5 +---- 47 files changed, 6 insertions(+), 103 deletions(-) diff --git a/development/DMPFOR/dmpfor_test.py b/development/DMPFOR/dmpfor_test.py index c3c3b0fef..83faadf48 100644 --- a/development/DMPFOR/dmpfor_test.py +++ b/development/DMPFOR/dmpfor_test.py @@ -1,12 +1,9 @@ -from __future__ import absolute_import -from __future__ import print_function from petsc4py import PETSc import numpy as np import DMPFOR from six.moves import range - global_nx =3 global_ny =2 dof=4 diff --git a/development/advect.py b/development/advect.py index 5fcc3f4be..fa6c70d5b 100755 --- a/development/advect.py +++ b/development/advect.py @@ -1,6 +1,4 @@ #!/usr/bin/env python -from __future__ import absolute_import -from __future__ import print_function import sys from six.moves import range diff --git a/development/advect_annotated.py b/development/advect_annotated.py index 7cc762998..be6067924 100644 --- a/development/advect_annotated.py +++ b/development/advect_annotated.py @@ -1,6 +1,4 @@ #!/usr/bin/env python -from __future__ import absolute_import -from __future__ import print_function import numpy as np from petsc4py import PETSc from six.moves import range diff --git a/development/clawdata2pyclaw.py b/development/clawdata2pyclaw.py index a2075d7ea..0e4405f4d 100644 --- a/development/clawdata2pyclaw.py +++ b/development/clawdata2pyclaw.py @@ -8,8 +8,6 @@ If you try this out, please raise issues in the PyClaw tracker for anything that doesn't work. """ -from __future__ import absolute_import -from __future__ import print_function import setrun import six diff --git a/development/driver.py b/development/driver.py index bbbe585dc..145adf7d5 100755 --- a/development/driver.py +++ b/development/driver.py @@ -1,6 +1,4 @@ #!/usr/bin/env python -from __future__ import absolute_import -from __future__ import print_function from petsc4py import PETSc from six.moves import range diff --git a/development/fPyWrapperExample.py b/development/fPyWrapperExample.py index 093d4408b..778a83d23 100644 --- a/development/fPyWrapperExample.py +++ b/development/fPyWrapperExample.py @@ -1,5 +1,3 @@ -from __future__ import absolute_import -from __future__ import print_function from numpy import * from FRS import vec_rp q = random.random((2,800)) @@ -7,6 +5,3 @@ waves, s = vec_rp(2,q[:,0:799],q[:,1:800],aux[:,0:799],aux[:,1:800]) print(waves) print(s) - - - diff --git a/development/point_wise_rs/pyWrapperForRiemannSolver/RiemannSolver.py b/development/point_wise_rs/pyWrapperForRiemannSolver/RiemannSolver.py index a727a7dcd..1c0078a74 100644 --- a/development/point_wise_rs/pyWrapperForRiemannSolver/RiemannSolver.py +++ b/development/point_wise_rs/pyWrapperForRiemannSolver/RiemannSolver.py @@ -1,5 +1,3 @@ -from __future__ import absolute_import -from __future__ import print_function from numpy import random, empty,zeros #from numpy import * from FRS import vec_rp, pw_rp @@ -9,7 +7,6 @@ - class RiemannSolver: diff --git a/development/point_wise_rs/pyWrapperForRiemannSolver/riemannSolverAssertion.py b/development/point_wise_rs/pyWrapperForRiemannSolver/riemannSolverAssertion.py index 38400c22a..89e5f877a 100644 --- a/development/point_wise_rs/pyWrapperForRiemannSolver/riemannSolverAssertion.py +++ b/development/point_wise_rs/pyWrapperForRiemannSolver/riemannSolverAssertion.py @@ -1,5 +1,3 @@ -from __future__ import absolute_import -from __future__ import print_function import RiemannSolver from RiemannSolver import * from numpy import load, absolute @@ -23,4 +21,3 @@ assert (absolute(wavesRead - waves1)< tolerance).all() assert (absolute(sRead -s1)< tolerance).all() - diff --git a/development/point_wise_rs/pyWrapperForRiemannSolver/riemannSolverDemo.py b/development/point_wise_rs/pyWrapperForRiemannSolver/riemannSolverDemo.py index 224059924..3c1578301 100644 --- a/development/point_wise_rs/pyWrapperForRiemannSolver/riemannSolverDemo.py +++ b/development/point_wise_rs/pyWrapperForRiemannSolver/riemannSolverDemo.py @@ -1,5 +1,3 @@ - -from __future__ import absolute_import import RiemannSolver from RiemannSolver import * from pylab import plot, figure, suptitle diff --git a/development/point_wise_rs/pyWrapperForRiemannSolver/riemannSolverSerialTimer.py b/development/point_wise_rs/pyWrapperForRiemannSolver/riemannSolverSerialTimer.py index 35b8a8234..a4f0d9c9d 100644 --- a/development/point_wise_rs/pyWrapperForRiemannSolver/riemannSolverSerialTimer.py +++ b/development/point_wise_rs/pyWrapperForRiemannSolver/riemannSolverSerialTimer.py @@ -1,5 +1,3 @@ -from __future__ import absolute_import -from __future__ import print_function import RiemannSolver from RiemannSolver import * from numpy import empty @@ -122,7 +120,3 @@ #figure(4) #suptitle("Figure 4 shows the the execution time for different mx values\n for the pointwize solver, timeSteps = {0}".format(max_timeSteps)) plot(mxValues, timeResultsPointwise, "bo-") - - - - diff --git a/development/rp_approaches/setplot.py b/development/rp_approaches/setplot.py index 1cb85a548..239724467 100644 --- a/development/rp_approaches/setplot.py +++ b/development/rp_approaches/setplot.py @@ -8,7 +8,6 @@ """ #-------------------------- -from __future__ import absolute_import def setplot(plotdata): #-------------------------- diff --git a/development/rp_approaches/shockbubble.py b/development/rp_approaches/shockbubble.py index d8c42a012..18521e4cf 100755 --- a/development/rp_approaches/shockbubble.py +++ b/development/rp_approaches/shockbubble.py @@ -1,7 +1,5 @@ #!/usr/bin/env python # encoding: utf-8 - -from __future__ import absolute_import import numpy as np from scipy import integrate from six.moves import range diff --git a/development/test_mpi4py.py b/development/test_mpi4py.py index bffcbfa51..6d832b469 100644 --- a/development/test_mpi4py.py +++ b/development/test_mpi4py.py @@ -1,5 +1,3 @@ -from __future__ import absolute_import -from __future__ import print_function from mpi4py import MPI comm = MPI.COMM_WORLD size = comm.Get_size() @@ -9,4 +7,3 @@ max_x =comm.reduce( sendobj=x, op=MPI.MAX, root=0) x = comm.bcast(max_x, root=0) print('x after', x) - diff --git a/development/test_rescale.py b/development/test_rescale.py index 2f5182342..b536a7b6e 100644 --- a/development/test_rescale.py +++ b/development/test_rescale.py @@ -1,6 +1,4 @@ #!/usr/bin/env python -from __future__ import absolute_import -from __future__ import print_function import sys try: diff --git a/fvmbook/chap11/burgers/burgers1D.py b/fvmbook/chap11/burgers/burgers1D.py index 7ece1e6a5..b9e6df50f 100755 --- a/fvmbook/chap11/burgers/burgers1D.py +++ b/fvmbook/chap11/burgers/burgers1D.py @@ -1,7 +1,6 @@ #!/usr/bin/env python # encoding: utf-8 -from __future__ import absolute_import def burgers(): """ Example from Chapter 11 of LeVeque, Figure 11.8. diff --git a/fvmbook/chap22/inclusion/inclusion.py b/fvmbook/chap22/inclusion/inclusion.py index 1882f612e..bb3489be0 100644 --- a/fvmbook/chap22/inclusion/inclusion.py +++ b/fvmbook/chap22/inclusion/inclusion.py @@ -3,7 +3,6 @@ r""" Variable-coefficient elasticity example. """ -from __future__ import absolute_import import numpy as np from six.moves import range t0wall = 0.025 diff --git a/fvmbook/chap3/acousimple/acoustics_simple_waves.py b/fvmbook/chap3/acousimple/acoustics_simple_waves.py index affc03883..79fe3cb13 100755 --- a/fvmbook/chap3/acousimple/acoustics_simple_waves.py +++ b/fvmbook/chap3/acousimple/acoustics_simple_waves.py @@ -1,7 +1,6 @@ #!/usr/bin/env python # encoding: utf-8 - -from __future__ import absolute_import + def fig_31_38(iplot=False,htmlplot=False,outdir='./_output'): r"""Produces the output shown in Figures 3.1 and 3.8 of the FVM book. These involve simple waves in the acoustics system.""" diff --git a/fvmbook/chap6/advection.py b/fvmbook/chap6/advection.py index 759a7da62..2c7de8d16 100755 --- a/fvmbook/chap6/advection.py +++ b/fvmbook/chap6/advection.py @@ -1,6 +1,5 @@ #!/usr/bin/env python # encoding: utf-8 -from __future__ import absolute_import IC='gauss_square' if IC=='gauss_square': beta=200.; x0=0.3; mx=100 diff --git a/fvmbook/chap6/setplot.py b/fvmbook/chap6/setplot.py index c461aff44..5a583fc74 100644 --- a/fvmbook/chap6/setplot.py +++ b/fvmbook/chap6/setplot.py @@ -5,8 +5,7 @@ This module is imported by the plotting routines and then the function setplot is called to set the plot parameters. -""" -from __future__ import absolute_import +""" from advection import beta, x0, IC #-------------------------- diff --git a/fvmbook/chap7/standing/acoustics.py b/fvmbook/chap7/standing/acoustics.py index 439641c57..eefbf14b4 100755 --- a/fvmbook/chap7/standing/acoustics.py +++ b/fvmbook/chap7/standing/acoustics.py @@ -1,7 +1,6 @@ #!/usr/bin/env python # encoding: utf-8 - -from __future__ import absolute_import + def acoustics(iplot=False,htmlplot=False,outdir='./_output'): """ This example solves the 1-dimensional acoustics equations in a homogeneous diff --git a/fvmbook/chap9/acoustics/interface/acoustics.py b/fvmbook/chap9/acoustics/interface/acoustics.py index 007eb797b..32436ea5d 100755 --- a/fvmbook/chap9/acoustics/interface/acoustics.py +++ b/fvmbook/chap9/acoustics/interface/acoustics.py @@ -1,7 +1,6 @@ #!/usr/bin/env python # encoding: utf-8 - -from __future__ import absolute_import + def acoustics(problem='figure 9.4'): """ This example solves the 1-dimensional variable-coefficient acoustics diff --git a/fvmbook/chap9/acoustics/interface/setplot.py b/fvmbook/chap9/acoustics/interface/setplot.py index 27dcd5d58..ca7c7a0a1 100644 --- a/fvmbook/chap9/acoustics/interface/setplot.py +++ b/fvmbook/chap9/acoustics/interface/setplot.py @@ -8,7 +8,6 @@ """ #-------------------------- -from __future__ import absolute_import def setplot(plotdata): #-------------------------- diff --git a/src/forestclaw/__init__.py b/src/forestclaw/__init__.py index e3b86281e..5b8237a73 100644 --- a/src/forestclaw/__init__.py +++ b/src/forestclaw/__init__.py @@ -1,6 +1,4 @@ """Additions for ForestClaw support""" - -from __future__ import absolute_import import os import logging import logging.config diff --git a/src/forestclaw/fileio/__init__.py b/src/forestclaw/fileio/__init__.py index 0378d360e..42fbfe767 100644 --- a/src/forestclaw/fileio/__init__.py +++ b/src/forestclaw/fileio/__init__.py @@ -2,8 +2,6 @@ # encoding: utf-8 """I/O support for ForestClaw""" - -from __future__ import absolute_import import logging logger = logging.getLogger('pyclaw.fileio') diff --git a/src/forestclaw/fileio/ascii.py b/src/forestclaw/fileio/ascii.py index b1abe7a73..8464f7308 100644 --- a/src/forestclaw/fileio/ascii.py +++ b/src/forestclaw/fileio/ascii.py @@ -3,10 +3,6 @@ r""" Routines for reading and writing an ascii output file from ForestClaw """ - -from __future__ import absolute_import -from __future__ import print_function - import logging import numpy as np # import clawpack.forestclaw as forestclaw diff --git a/src/forestclaw/fileio/test.py b/src/forestclaw/fileio/test.py index 2ec8ce0ea..b96e3d3f0 100644 --- a/src/forestclaw/fileio/test.py +++ b/src/forestclaw/fileio/test.py @@ -4,9 +4,6 @@ Test suite for forestclaw.io """ -from __future__ import absolute_import -from __future__ import print_function - import os import shutil import tempfile diff --git a/src/forestclaw/geometry.py b/src/forestclaw/geometry.py index a5320de4c..36df2186a 100644 --- a/src/forestclaw/geometry.py +++ b/src/forestclaw/geometry.py @@ -4,9 +4,6 @@ Module containing forestclaw.geometry. All we do here is override the pyclaw.Patch class to add a block_number and mpi_rank. """ - -from __future__ import absolute_import - from clawpack import pyclaw from clawpack.pyclaw import geometry as pyclaw_geometry from clawpack.pyclaw.geometry import Dimension diff --git a/src/forestclaw/setup.py b/src/forestclaw/setup.py index bd211efcd..133a8afe6 100644 --- a/src/forestclaw/setup.py +++ b/src/forestclaw/setup.py @@ -1,6 +1,5 @@ #!/usr/bin/env python -from __future__ import absolute_import def configuration(parent_package='',top_path=None): from numpy.distutils.misc_util import Configuration diff --git a/src/forestclaw/test.py b/src/forestclaw/test.py index cef703756..79f8d02d5 100644 --- a/src/forestclaw/test.py +++ b/src/forestclaw/test.py @@ -3,9 +3,6 @@ r""" Test suite for forestclaw """ - -from __future__ import absolute_import - from .geometry import Patch from clawpack.pyclaw.geometry import Dimension diff --git a/src/petclaw/__init__.py b/src/petclaw/__init__.py index 879298ecd..f6012efc3 100644 --- a/src/petclaw/__init__.py +++ b/src/petclaw/__init__.py @@ -1,6 +1,4 @@ """Main petclaw package""" - -from __future__ import absolute_import import os import logging, logging.config diff --git a/src/petclaw/cfl.py b/src/petclaw/cfl.py index fc21c35d9..10be35f66 100644 --- a/src/petclaw/cfl.py +++ b/src/petclaw/cfl.py @@ -1,7 +1,6 @@ r""" Module for the CFL object. """ -from __future__ import absolute_import class CFL(object): """ Parallel CFL object, responsible for computing the Courant-Friedrichs-Lewy condition across all processes. @@ -12,11 +11,10 @@ def __init__(self, global_max): self._local_max = global_max self._global_max = global_max self._reduce_vec = PETSc.Vec().createWithArray([0]) - + def get_global_max(self): r""" Compute the maximum CFL number over all processes for the current step. - This is used to determine whether the CFL condition was violated and adjust the timestep. """ @@ -36,4 +34,3 @@ def set_global_max(self,new_global_max): def update_global_max(self,new_local_max): self._reduce_vec.array = new_local_max self._global_max = max(self._global_max,self._reduce_vec.max()[1]) - diff --git a/src/petclaw/classic/setup.py b/src/petclaw/classic/setup.py index 243e7ae70..0ad8018ba 100644 --- a/src/petclaw/classic/setup.py +++ b/src/petclaw/classic/setup.py @@ -1,6 +1,5 @@ #!/usr/bin/env python -from __future__ import absolute_import def configuration(parent_package='',top_path=None): from numpy.distutils.misc_util import Configuration config = Configuration('classic', parent_package, top_path) diff --git a/src/petclaw/classic/solver.py b/src/petclaw/classic/solver.py index 34a37ae38..b56636ec5 100644 --- a/src/petclaw/classic/solver.py +++ b/src/petclaw/classic/solver.py @@ -5,8 +5,6 @@ __module__ property, used by pyclaw.solver.Solver.__init__ to determine the containing claw_package to use. """ - -from __future__ import absolute_import from clawpack import pyclaw class ClawSolver1D(pyclaw.ClawSolver1D): diff --git a/src/petclaw/controller.py b/src/petclaw/controller.py index d3c9c3287..75b8fc6ed 100644 --- a/src/petclaw/controller.py +++ b/src/petclaw/controller.py @@ -1,8 +1,6 @@ """ Module for PetClaw controller class. """ - -from __future__ import absolute_import from clawpack import pyclaw class Controller(pyclaw.controller.Controller): diff --git a/src/petclaw/fileio/__init__.py b/src/petclaw/fileio/__init__.py index 25698f3b4..f233e4cd9 100644 --- a/src/petclaw/fileio/__init__.py +++ b/src/petclaw/fileio/__init__.py @@ -1,8 +1,6 @@ #!/usr/bin/env python # encoding: utf-8 """Output package for PetClaw""" - -from __future__ import absolute_import import logging from clawpack.pyclaw.fileio import ascii __all__ = ['ascii.read','ascii.write'] diff --git a/src/petclaw/fileio/hdf5.py b/src/petclaw/fileio/hdf5.py index cb306eaf5..8fdf612d4 100644 --- a/src/petclaw/fileio/hdf5.py +++ b/src/petclaw/fileio/hdf5.py @@ -9,8 +9,6 @@ To install h5py, you must also install the hdf5 library from the website: http://www.hdfgroup.org/HDF5/release/obtain5.html """ - -from __future__ import absolute_import from mpi4py import MPI import os import logging diff --git a/src/petclaw/fileio/petsc.py b/src/petclaw/fileio/petsc.py index 6a69e04c2..e0f9251c2 100644 --- a/src/petclaw/fileio/petsc.py +++ b/src/petclaw/fileio/petsc.py @@ -7,9 +7,6 @@ PETSc's parallel i/o capabilities to allow for parallel reads and writes of frame data. """ - -from __future__ import absolute_import -from __future__ import print_function from petsc4py import PETSc import pickle import os diff --git a/src/petclaw/geometry.py b/src/petclaw/geometry.py index 55637059e..35d98bf5b 100755 --- a/src/petclaw/geometry.py +++ b/src/petclaw/geometry.py @@ -4,7 +4,6 @@ Module containing petclaw.geometry. """ -from __future__ import absolute_import from clawpack import pyclaw from clawpack.pyclaw import geometry as pyclaw_geometry diff --git a/src/petclaw/limiters/__init__.py b/src/petclaw/limiters/__init__.py index 277e85cb2..c28a0bb62 100644 --- a/src/petclaw/limiters/__init__.py +++ b/src/petclaw/limiters/__init__.py @@ -8,8 +8,6 @@ # This __init__ script only imports common utilities, most of the import # should be done depending on the solver needed - -from __future__ import absolute_import from clawpack.riemann import * __all__ = ['tvd'] diff --git a/src/petclaw/plot.py b/src/petclaw/plot.py index eb96d5bd0..1eb4ded60 100644 --- a/src/petclaw/plot.py +++ b/src/petclaw/plot.py @@ -1,4 +1,3 @@ -from __future__ import absolute_import from six.moves import range def interactive_plot(outdir='./_output',file_format='petsc',setplot=None): """ diff --git a/src/petclaw/setup.py b/src/petclaw/setup.py index d4d341869..d5ef2215d 100644 --- a/src/petclaw/setup.py +++ b/src/petclaw/setup.py @@ -1,6 +1,5 @@ #!/usr/bin/env python -from __future__ import absolute_import def configuration(parent_package='',top_path=None): from numpy.distutils.misc_util import Configuration diff --git a/src/petclaw/sharpclaw/setup.py b/src/petclaw/sharpclaw/setup.py index a2472e907..c43695f58 100644 --- a/src/petclaw/sharpclaw/setup.py +++ b/src/petclaw/sharpclaw/setup.py @@ -1,6 +1,4 @@ #!/usr/bin/env python - -from __future__ import absolute_import import os def configuration(parent_package='',top_path=None): diff --git a/src/petclaw/sharpclaw/solver.py b/src/petclaw/sharpclaw/solver.py index b3c3f4b51..2cb307f1a 100755 --- a/src/petclaw/sharpclaw/solver.py +++ b/src/petclaw/sharpclaw/solver.py @@ -4,7 +4,6 @@ Module containing SharpClaw solvers for PetClaw """ -from __future__ import absolute_import from clawpack import pyclaw class SharpClawSolver1D(pyclaw.SharpClawSolver1D): diff --git a/src/petclaw/solution.py b/src/petclaw/solution.py index 1afbebfc6..ec461c464 100644 --- a/src/petclaw/solution.py +++ b/src/petclaw/solution.py @@ -1,4 +1,3 @@ -from __future__ import absolute_import from clawpack import pyclaw from clawpack.pyclaw.solution import Solution @@ -33,5 +32,3 @@ def get_write_func(self, file_format): return fileio.hdf5.write else: raise ValueError("File format %s not supported." % file_format) - - diff --git a/src/petclaw/state.py b/src/petclaw/state.py index 2b8648b8c..1809b97b5 100644 --- a/src/petclaw/state.py +++ b/src/petclaw/state.py @@ -1,4 +1,3 @@ -from __future__ import absolute_import import clawpack.pyclaw class State(clawpack.pyclaw.State): diff --git a/src/petclaw/tests/test_io.py b/src/petclaw/tests/test_io.py index 1ed8f97fd..2503bb4e5 100644 --- a/src/petclaw/tests/test_io.py +++ b/src/petclaw/tests/test_io.py @@ -1,4 +1,3 @@ -from __future__ import absolute_import from clawpack import pyclaw from clawpack import petclaw import os diff --git a/src/pyclaw/build/fcompiler.py b/src/pyclaw/build/fcompiler.py index bbb12bd55..298de2171 100644 --- a/src/pyclaw/build/fcompiler.py +++ b/src/pyclaw/build/fcompiler.py @@ -1,6 +1,3 @@ - -from __future__ import absolute_import -from __future__ import print_function def get_fcompiler(): import numpy.distutils.fcompiler numpy.distutils.log.set_verbosity(-1) @@ -8,7 +5,7 @@ def get_fcompiler(): fc.customize() return fc -if __name__=="__main__": +if __name__ == "__main__": fc = get_fcompiler() import sys if sys.argv[1] == 'get_compiler':