<86>May 1 14:38:20 userdel[530912]: delete user 'rooter' <86>May 1 14:38:20 userdel[530912]: removed group 'rooter' owned by 'rooter' <86>May 1 14:38:20 userdel[530912]: removed shadow group 'rooter' owned by 'rooter' <86>May 1 14:38:20 groupadd[530924]: group added to /etc/group: name=rooter, GID=693 <86>May 1 14:38:20 groupadd[530924]: group added to /etc/gshadow: name=rooter <86>May 1 14:38:20 groupadd[530924]: new group: name=rooter, GID=693 <86>May 1 14:38:20 useradd[530928]: new user: name=rooter, UID=693, GID=693, home=/root, shell=/bin/bash <86>May 1 14:38:20 userdel[530937]: delete user 'builder' <86>May 1 14:38:20 userdel[530937]: removed group 'builder' owned by 'builder' <86>May 1 14:38:20 userdel[530937]: removed shadow group 'builder' owned by 'builder' <86>May 1 14:38:20 groupadd[530943]: group added to /etc/group: name=builder, GID=694 <86>May 1 14:38:20 groupadd[530943]: group added to /etc/gshadow: name=builder <86>May 1 14:38:20 groupadd[530943]: new group: name=builder, GID=694 <86>May 1 14:38:20 useradd[530954]: new user: name=builder, UID=694, GID=694, home=/usr/src, shell=/bin/bash <13>May 1 14:38:24 rpmi: libgdbm-1.8.3-alt10 1454943334 installed <13>May 1 14:38:24 rpmi: libexpat-2.2.4-alt1 1503305345 installed <13>May 1 14:38:24 rpmi: libp11-kit-0.23.15-alt1 sisyphus+226408.100.2.1 1554288204 installed <13>May 1 14:38:24 rpmi: libtasn1-4.16.0-alt1 sisyphus+245480.100.1.1 1580825062 installed <13>May 1 14:38:24 rpmi: rpm-macros-alternatives-0.5.1-alt1 sisyphus+226946.100.1.1 1554830426 installed <13>May 1 14:38:24 rpmi: alternatives-0.5.1-alt1 sisyphus+226946.100.1.1 1554830426 installed <13>May 1 14:38:24 rpmi: ca-certificates-2020.01.23-alt1 sisyphus+244791.300.2.1 1580285500 installed <13>May 1 14:38:24 rpmi: ca-trust-0.1.2-alt1 sisyphus+233348.100.1.1 1561653823 installed <13>May 1 14:38:24 rpmi: p11-kit-trust-0.23.15-alt1 sisyphus+226408.100.2.1 1554288204 installed <13>May 1 14:38:24 rpmi: libcrypto1.1-1.1.1g-alt1 sisyphus+249982.60.8.1 1587743711 installed <13>May 1 14:38:24 rpmi: libssl1.1-1.1.1g-alt1 sisyphus+249982.60.8.1 1587743711 installed <13>May 1 14:38:24 rpmi: python3-3.8.2-alt1 sisyphus+244999.100.3.1 1585218480 installed <13>May 1 14:38:25 rpmi: python3-base-3.8.2-alt1 sisyphus+244999.100.3.1 1585218480 installed <13>May 1 14:38:25 rpmi: libpython3-3.8.2-alt1 sisyphus+244999.100.3.1 1585218480 installed <13>May 1 14:38:25 rpmi: tests-for-installed-python3-pkgs-0.1.13.1-alt2 1535450458 installed <13>May 1 14:38:25 rpmi: rpm-build-python3-0.1.13.1-alt2 1535450458 installed <13>May 1 14:38:27 rpmi: libverto-0.3.0-alt1_7 sisyphus+225932.100.1.1 1553994919 installed <13>May 1 14:38:27 rpmi: libkeyutils-1.6-alt2 sisyphus+226520.100.2.1 1554512089 installed <13>May 1 14:38:27 rpmi: libcom_err-1.44.6-alt1 sisyphus+224154.100.1.1 1552091678 installed <86>May 1 14:38:27 groupadd[537598]: group added to /etc/group: name=_keytab, GID=499 <86>May 1 14:38:27 groupadd[537598]: group added to /etc/gshadow: name=_keytab <86>May 1 14:38:27 groupadd[537598]: new group: name=_keytab, GID=499 <13>May 1 14:38:28 rpmi: libkrb5-1.17.1-alt1 sisyphus+242784.100.1.1 1576137330 installed <13>May 1 14:38:28 rpmi: libtirpc-1.2.6-alt1 sisyphus+250076.100.1.1 1587038270 installed <13>May 1 14:38:28 rpmi: libnsl2-1.1.0-alt1_1 1511548749 installed <13>May 1 14:38:28 rpmi: python-modules-encodings-2.7.17-alt4 sisyphus+244873.100.2.1 1581419544 installed <13>May 1 14:38:28 rpmi: python-modules-compiler-2.7.17-alt4 sisyphus+244873.100.2.1 1581419544 installed <13>May 1 14:38:28 rpmi: python-modules-email-2.7.17-alt4 sisyphus+244873.100.2.1 1581419544 installed <13>May 1 14:38:28 rpmi: python-modules-unittest-2.7.17-alt4 sisyphus+244873.100.2.1 1581419544 installed <13>May 1 14:38:28 rpmi: python-modules-2.7.17-alt4 sisyphus+244873.100.2.1 1581419544 installed <13>May 1 14:38:28 rpmi: python-modules-nis-2.7.17-alt4 sisyphus+244873.100.2.1 1581419544 installed <13>May 1 14:38:28 rpmi: python-modules-ctypes-2.7.17-alt4 sisyphus+244873.100.2.1 1581419544 installed <13>May 1 14:38:28 rpmi: python-modules-multiprocessing-2.7.17-alt4 sisyphus+244873.100.2.1 1581419544 installed <13>May 1 14:38:28 rpmi: python-modules-logging-2.7.17-alt4 sisyphus+244873.100.2.1 1581419544 installed <13>May 1 14:38:28 rpmi: python-tools-2to3-2.7.17-alt4 sisyphus+244873.100.2.1 1581419544 installed Building target platforms: i586 Building for target i586 Wrote: /usr/src/in/nosrpm/python3-module-PyDSTool-0.88.121202-alt4.nosrc.rpm Installing python3-module-PyDSTool-0.88.121202-alt4.src.rpm Building target platforms: i586 Building for target i586 Executing(%install): /bin/sh -e /usr/src/tmp/rpm-tmp.22121 + umask 022 + /bin/mkdir -p /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + /bin/chmod -Rf u+rwX -- /usr/src/tmp/python3-module-PyDSTool-buildroot + : + /bin/rm -rf -- /usr/src/tmp/python3-module-PyDSTool-buildroot + install -d /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages + pushd /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages ~/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages ~/RPM/BUILD + tar -xzf /usr/src/RPM/SOURCES/PyDSTool-0.88.121202.tar.gz + rm -fR .gear ++ find ./ -name '*.py' + sed -i 's|#!/usr/bin/env python|#!/usr/bin/env python3|' ./PyDSTool/utils.py ./PyDSTool/tests/vode_withJac_test.py ./PyDSTool/tests/vode_event_test2.py ./PyDSTool/tests/vode_event_test1.py ./PyDSTool/tests/traj_gt0_test.py ./PyDSTool/tests/test_variable_traj.py ./PyDSTool/tests/test_pointsets.py ./PyDSTool/tests/test_interval.py ./PyDSTool/tests/test_hybrid_extinputs_Cintegrator.py ./PyDSTool/tests/test_hybrid_extinputs.py ./PyDSTool/tests/test_find_nearby_ball.py ./PyDSTool/tests/test_context_spikes.py ./PyDSTool/tests/test_bd_containment.py ./PyDSTool/tests/splinetest.py ./PyDSTool/tests/sloppycell_example.py ./PyDSTool/tests/saveload_test.py ./PyDSTool/tests/run_all_tests.py ./PyDSTool/tests/radau_event_test.py ./PyDSTool/tests/poly_interp_test.py ./PyDSTool/tests/phaseplane_HHtest.py ./PyDSTool/tests/pest_test4_Cintegrator.py ./PyDSTool/tests/pest_test3_Cintegrator.py ./PyDSTool/tests/pest_test3.py ./PyDSTool/tests/pest_test2.py ./PyDSTool/tests/pest_test1.py ./PyDSTool/tests/objectdelete_test.py ./PyDSTool/tests/numeric_diff_test.py ./PyDSTool/tests/mapsystem_test.py ./PyDSTool/tests/joe_pest.py ./PyDSTool/tests/interp_vode_test.py ./PyDSTool/tests/interp_piecewise_test.py ./PyDSTool/tests/interp_dopri_test.py ./PyDSTool/tests/imprecise_event_test.py ./PyDSTool/tests/impfn_test.py ./PyDSTool/tests/imp_load_test.py ./PyDSTool/tests/funcspec_tests.py ./PyDSTool/tests/freefinger_noforce_radau.py ./PyDSTool/tests/forced_spring.py ./PyDSTool/tests/fingermodel_vode.py ./PyDSTool/tests/fingermodel_auxvartest.py ./PyDSTool/tests/expfn_test.py ./PyDSTool/tests/embedded_map_test.py ./PyDSTool/tests/dopri_event_test.py ./PyDSTool/tests/basic_gen_tests_C.py ./PyDSTool/tests/basic_gen_tests.py ./PyDSTool/tests/Tutorial_linear.py ./PyDSTool/tests/Tutorial_compneuro.py ./PyDSTool/tests/Tutorial_VdP.py ./PyDSTool/tests/Tutorial_SymbolicJac.py ./PyDSTool/tests/Tutorial_PredatorPrey.py ./PyDSTool/tests/Tutorial_LorenzMap.py ./PyDSTool/tests/Tutorial_Calcium.py ./PyDSTool/tests/Symbolic_test.py ./PyDSTool/tests/Symbolic_Diff_test.py ./PyDSTool/tests/SLIP_plot.py ./PyDSTool/tests/SLIP_2D_pdc.py ./PyDSTool/tests/SLIP_2D_maps.py ./PyDSTool/tests/SLIP_2D.py ./PyDSTool/tests/PySCes_import_test.py ./PyDSTool/tests/PyCont_vanDerPol.py ./PyDSTool/tests/PyCont_hybrid_osc.py ./PyDSTool/tests/PyCont_SaddleNode.py ./PyDSTool/tests/PyCont_PredPrey.py ./PyDSTool/tests/PyCont_NewLorenz.py ./PyDSTool/tests/PyCont_MorrisLecar_TypeII.py ./PyDSTool/tests/PyCont_MorrisLecar_TypeI.py ./PyDSTool/tests/PyCont_Lorenz.py ./PyDSTool/tests/PyCont_Logistic.py ./PyDSTool/tests/PyCont_LevelCurve.py ./PyDSTool/tests/PyCont_LPNeuron.py ./PyDSTool/tests/PyCont_Hopfield.py ./PyDSTool/tests/PyCont_HindmarshRose.py ./PyDSTool/tests/PyCont_Hamiltonian.py ./PyDSTool/tests/PyCont_DiscPredPrey.py ./PyDSTool/tests/PyCont_Catalytic_demo.py ./PyDSTool/tests/PyCont_Catalytic.py ./PyDSTool/tests/PyCont_Brusselator.py ./PyDSTool/tests/PyCont_ABReaction.py ./PyDSTool/tests/PyCont_ABCReaction.py ./PyDSTool/tests/PointInfo_test.py ./PyDSTool/tests/NineML_import_test.py ./PyDSTool/tests/MultiCompartments2.py ./PyDSTool/tests/MultiCompartments.py ./PyDSTool/tests/ModelSpec_test.py ./PyDSTool/tests/ML_adjointPRC.py ./PyDSTool/tests/IF_squarespike_model.py ./PyDSTool/tests/IF_model_test.py ./PyDSTool/tests/IF_delaynet_syn.py ./PyDSTool/tests/IF_delaynet.py ./PyDSTool/tests/HH_model_testbounds.py ./PyDSTool/tests/HH_model_Cintegrator_testbounds.py ./PyDSTool/tests/HH_model_Cintegrator.py ./PyDSTool/tests/HH_model.py ./PyDSTool/tests/HH_loaded_Cintegrator.py ./PyDSTool/tests/HH_loaded.py ./PyDSTool/tests/HH_adjointPRC.py ./PyDSTool/tests/HH_DSSRTtest.py ./PyDSTool/tests/Dopri_backwards_test.py ./PyDSTool/tests/DAE_example.py ./PyDSTool/tests/CIN.py ./PyDSTool/scipy_ode.py ./PyDSTool/parseUtils.py ./PyDSTool/matplotlib_import.py ./PyDSTool/integrator.py ./PyDSTool/fixedpickle.py ./PyDSTool/errors.py ./PyDSTool/conf.py ./PyDSTool/common.py ./PyDSTool/__init__.py ./PyDSTool/Variable.py ./PyDSTool/Trajectory.py ./PyDSTool/Toolbox/test_protocols.py ./PyDSTool/Toolbox/syntheticdata.py ./PyDSTool/Toolbox/synthetic_data.py ./PyDSTool/Toolbox/prep_boxplot.py ./PyDSTool/Toolbox/phaseplane.py ./PyDSTool/Toolbox/optimizers/tests/test_rosenbrock.py ./PyDSTool/Toolbox/optimizers/tests/test_quadratic.py ./PyDSTool/Toolbox/optimizers/tests/test_powell.py ./PyDSTool/Toolbox/optimizers/tests/__init__.py ./PyDSTool/Toolbox/optimizers/step/tests/test_restart_conjugate_gradient.py ./PyDSTool/Toolbox/optimizers/step/tests/test_quasi_newton_step.py ./PyDSTool/Toolbox/optimizers/step/tests/test_partial_step.py ./PyDSTool/Toolbox/optimizers/step/tests/test_newton_step.py ./PyDSTool/Toolbox/optimizers/step/tests/test_marquardt_step.py ./PyDSTool/Toolbox/optimizers/step/tests/test_gradient_step.py ./PyDSTool/Toolbox/optimizers/step/tests/test_goldstein_price_step.py ./PyDSTool/Toolbox/optimizers/step/tests/test_conjugate_gradient_step.py ./PyDSTool/Toolbox/optimizers/step/restart_conjugate_gradient.py ./PyDSTool/Toolbox/optimizers/step/quasi_newton_step.py ./PyDSTool/Toolbox/optimizers/step/partial_step.py ./PyDSTool/Toolbox/optimizers/step/newton_step.py ./PyDSTool/Toolbox/optimizers/step/marquardt_step.py ./PyDSTool/Toolbox/optimizers/step/local_brute_force_1dstep.py ./PyDSTool/Toolbox/optimizers/step/gradient_step.py ./PyDSTool/Toolbox/optimizers/step/goldstein_price_step.py ./PyDSTool/Toolbox/optimizers/step/goldfeld_step.py ./PyDSTool/Toolbox/optimizers/step/conjugate_gradient_step.py ./PyDSTool/Toolbox/optimizers/step/__init__.py ./PyDSTool/Toolbox/optimizers/optimizer/standard_optimizer_modifying.py ./PyDSTool/Toolbox/optimizers/optimizer/standard_optimizer.py ./PyDSTool/Toolbox/optimizers/optimizer/optimizer.py ./PyDSTool/Toolbox/optimizers/optimizer/__init__.py ./PyDSTool/Toolbox/optimizers/line_search/wolfe_powell_rule.py ./PyDSTool/Toolbox/optimizers/line_search/tests/test_wolfe_powell_rule.py ./PyDSTool/Toolbox/optimizers/line_search/tests/test_strong_wolfe_powell_rule.py ./PyDSTool/Toolbox/optimizers/line_search/tests/test_simple_line_search.py ./PyDSTool/Toolbox/optimizers/line_search/tests/test_quadratic_interpolation.py ./PyDSTool/Toolbox/optimizers/line_search/tests/test_goldstein_rule.py ./PyDSTool/Toolbox/optimizers/line_search/tests/test_golden_section.py ./PyDSTool/Toolbox/optimizers/line_search/tests/test_fixed_last_step_modifier.py ./PyDSTool/Toolbox/optimizers/line_search/tests/test_fibonacci_section.py ./PyDSTool/Toolbox/optimizers/line_search/tests/test_damped_line_search.py ./PyDSTool/Toolbox/optimizers/line_search/tests/test_cubic_interpolation.py ./PyDSTool/Toolbox/optimizers/line_search/tests/test_backtracking_search.py ./PyDSTool/Toolbox/optimizers/line_search/tests/test_adaptive_last_step_modifier.py ./PyDSTool/Toolbox/optimizers/line_search/strong_wolfe_powell_rule.py ./PyDSTool/Toolbox/optimizers/line_search/simple_line_search.py ./PyDSTool/Toolbox/optimizers/line_search/scaled_line_search.py ./PyDSTool/Toolbox/optimizers/line_search/quadratic_interpolation.py ./PyDSTool/Toolbox/optimizers/line_search/hyperbolic_line_search.py ./PyDSTool/Toolbox/optimizers/line_search/goldstein_rule.py ./PyDSTool/Toolbox/optimizers/line_search/golden_section.py ./PyDSTool/Toolbox/optimizers/line_search/fixed_last_step_modifier.py ./PyDSTool/Toolbox/optimizers/line_search/fibonacci_section.py ./PyDSTool/Toolbox/optimizers/line_search/damped_line_search.py ./PyDSTool/Toolbox/optimizers/line_search/cubic_interpolation.py ./PyDSTool/Toolbox/optimizers/line_search/barzilai_borwein_search.py ./PyDSTool/Toolbox/optimizers/line_search/barzilai_borwein_non_monotone_search.py ./PyDSTool/Toolbox/optimizers/line_search/backtracking_search.py ./PyDSTool/Toolbox/optimizers/line_search/adaptive_last_step_modifier.py ./PyDSTool/Toolbox/optimizers/line_search/__init__.py ./PyDSTool/Toolbox/optimizers/helpers/tests/test_quadratic.py ./PyDSTool/Toolbox/optimizers/helpers/tests/test_levenberg_marquardt.py ./PyDSTool/Toolbox/optimizers/helpers/tests/test_finite_difference.py ./PyDSTool/Toolbox/optimizers/helpers/quadratic.py ./PyDSTool/Toolbox/optimizers/helpers/levenberg_marquardt.py ./PyDSTool/Toolbox/optimizers/helpers/finite_difference.py ./PyDSTool/Toolbox/optimizers/helpers/__init__.py ./PyDSTool/Toolbox/optimizers/defaults.py ./PyDSTool/Toolbox/optimizers/criterion/tests/test_information_criteria.py ./PyDSTool/Toolbox/optimizers/criterion/tests/test_facilities.py ./PyDSTool/Toolbox/optimizers/criterion/tests/test_criteria.py ./PyDSTool/Toolbox/optimizers/criterion/tests/test_composite_criteria.py ./PyDSTool/Toolbox/optimizers/criterion/information_criteria.py ./PyDSTool/Toolbox/optimizers/criterion/facilities.py ./PyDSTool/Toolbox/optimizers/criterion/criteria.py ./PyDSTool/Toolbox/optimizers/criterion/composite_criteria.py ./PyDSTool/Toolbox/optimizers/criterion/__init__.py ./PyDSTool/Toolbox/optimizers/__init__.py ./PyDSTool/Toolbox/neuro_data.py ./PyDSTool/Toolbox/neuralcomp.py ./PyDSTool/Toolbox/model_primitives.py ./PyDSTool/Toolbox/mechmatlib.py ./PyDSTool/Toolbox/makeSloppyModel.py ./PyDSTool/Toolbox/fracdim.py ./PyDSTool/Toolbox/event_driven_simulator.py ./PyDSTool/Toolbox/dssrt.py ./PyDSTool/Toolbox/data_analysis.py ./PyDSTool/Toolbox/adjointPRC.py ./PyDSTool/Toolbox/__init__.py ./PyDSTool/Toolbox/PySCes_SBML.py ./PyDSTool/Toolbox/ParamEst.py ./PyDSTool/Toolbox/PRCtools.py ./PyDSTool/Toolbox/NineML.py ./PyDSTool/Toolbox/ModelHelper.py ./PyDSTool/Toolbox/ModelEst.py ./PyDSTool/Toolbox/InputProfile.py ./PyDSTool/Toolbox/FSM.py ./PyDSTool/Toolbox/FR.py ./PyDSTool/Toolbox/DSSRT_tools.py ./PyDSTool/Toolbox/ActivationFuncs.py ./PyDSTool/Symbolic.py ./PyDSTool/Redirector.py ./PyDSTool/PyCont/misc.py ./PyDSTool/PyCont/auto/dev/setup.py ./PyDSTool/PyCont/__init__.py ./PyDSTool/PyCont/TestFunc.py ./PyDSTool/PyCont/Plotting.py ./PyDSTool/PyCont/Continuation.py ./PyDSTool/PyCont/ContClass.py ./PyDSTool/PyCont/BifPoint.py ./PyDSTool/Points.py ./PyDSTool/ModelSpec.py ./PyDSTool/ModelConstructor.py ./PyDSTool/Model.py ./PyDSTool/MProject.py ./PyDSTool/Interval.py ./PyDSTool/Generator/messagecodes.py ./PyDSTool/Generator/baseclasses.py ./PyDSTool/Generator/allimports.py ./PyDSTool/Generator/__init__.py ./PyDSTool/Generator/Vode_ODEsystem.py ./PyDSTool/Generator/Radau_ODEsystem.py ./PyDSTool/Generator/ODEsystem.py ./PyDSTool/Generator/MapSystem.py ./PyDSTool/Generator/LookupTable.py ./PyDSTool/Generator/InterpolateTable.py ./PyDSTool/Generator/ImplicitFnGen.py ./PyDSTool/Generator/ExtrapolateTable.py ./PyDSTool/Generator/ExplicitFnGen.py ./PyDSTool/Generator/Euler_ODEsystem.py ./PyDSTool/Generator/EmbeddedSysGen.py ./PyDSTool/Generator/Dopri_ODEsystem.py ./PyDSTool/Generator/DDEsystem.py ./PyDSTool/Generator/ADMC_ODEsystem.py ./PyDSTool/FuncSpec.py ./PyDSTool/Events.py + find -type f -name '*.py' -exec 2to3 -w -n '{}' + RefactoringTool: Skipping optional fixer: buffer RefactoringTool: Skipping optional fixer: idioms RefactoringTool: Skipping optional fixer: set_literal RefactoringTool: Skipping optional fixer: ws_comma RefactoringTool: Refactored ./PyDSTool/Events.py --- ./PyDSTool/Events.py (original) +++ ./PyDSTool/Events.py (refactored) @@ -9,20 +9,21 @@ """ # PyDSTool imports -from Variable import * -from utils import * -from common import * -from parseUtils import * -from errors import * -from Interval import * -from utils import info as utils_info -from Symbolic import QuantSpec, Var, ensureStrArgDict -import FuncSpec +from .Variable import * +from .utils import * +from .common import * +from .parseUtils import * +from .errors import * +from .Interval import * +from .utils import info as utils_info +from .Symbolic import QuantSpec, Var, ensureStrArgDict +from . import FuncSpec # Other imports import scipy, numpy, scipy, scipy.special import math, random import copy, types +from functools import reduce __all__ = ['EventStruct', 'Event', 'HighLevelEvent', 'LowLevelEvent', 'MatlabEvent', @@ -110,7 +111,7 @@ if ev.name not in self.events: self.events[ev.name] = ev else: - print self + print(self) raise ValueError("Event name '"+ev.name+"' already present " "in database") elif isinstance(ev,list): @@ -139,65 +140,65 @@ def getHighLevelEvents(self): hlList = [] - for epair in self.events.items(): + for epair in list(self.events.items()): if isinstance(epair[1], HighLevelEvent): hlList.append(epair) return hlList def getLowLevelEvents(self): llList = [] - for epair in self.events.items(): + for epair in list(self.events.items()): if isinstance(epair[1], LowLevelEvent): llList.append(epair) return llList def getAllEvents(self): - return self.events.items() + return list(self.events.items()) def getTermEvents(self): teList = [] - for epair in self.events.items(): + for epair in list(self.events.items()): if epair[1].termFlag: teList.append(epair) return teList def getNonTermEvents(self): neList = [] - for epair in self.events.items(): + for epair in list(self.events.items()): if not epair[1].termFlag: neList.append(epair) return neList def getActiveEvents(self): neList = [] - for epair in self.events.items(): + for epair in list(self.events.items()): if epair[1].activeFlag: neList.append(epair) return neList def getNonActiveEvents(self): neList = [] - for epair in self.events.items(): + for epair in list(self.events.items()): if not epair[1].activeFlag: neList.append(epair) return neList def getNonPreciseEvents(self): neList = [] - for epair in self.events.items(): + for epair in list(self.events.items()): if not epair[1].preciseFlag: neList.append(epair) return neList def getPreciseEvents(self): neList = [] - for epair in self.events.items(): + for epair in list(self.events.items()): if epair[1].preciseFlag: neList.append(epair) return neList def setglobalt0(self, t0): - for epair in self.events.items(): + for epair in list(self.events.items()): epair[1].globalt0 = t0 def query(self, keylist, eventlist=None): @@ -216,11 +217,11 @@ if self.events == {}: return [] else: - eventlist = self.events.items() + eventlist = list(self.events.items()) if filterFuncs == []: return [] for f in filterFuncs: - eventlist = filter(f, eventlist) + eventlist = list(filter(f, eventlist)) return eventlist @@ -235,7 +236,7 @@ utils_info(self.__dict__, "EventStruct", recurseDepthLimit=1+verboselevel) else: - print self.__repr__() + print(self.__repr__()) def __contains__(self, evname): @@ -250,8 +251,8 @@ eventlist=None): if eventlist is None: eventlist = self.query(['highlevel', 'active', 'notvarlinked']) - return filter(lambda (n,e): e(t=tval, varDict=varDict, - parDict=parDict), eventlist) + return [n_e for n_e in eventlist if n_e[1](t=tval, varDict=varDict, + parDict=parDict)] def resetHighLevelEvents(self, t0, eventlist=None, state=None): @@ -273,9 +274,9 @@ for ev in eventlist: if isinstance(ev[1], HighLevelEvent): if not reduce(bool.__and__, [key in database for key in \ - ev[1].vars.keys()]): - ek = ev[1].vars.keys() - print "Missing keys: ", remain(ek, database) + list(ev[1].vars.keys())]): + ek = list(ev[1].vars.keys()) + print("Missing keys: ", remain(ek, database)) raise RuntimeError("Invalid keys in event '%s'" % ev[0]) #else: # print "Warning: Low level events should not be passed to " \ @@ -286,10 +287,10 @@ def setTermFlag(self, eventTarget, flagval): if isinstance(flagval, bool): if isinstance(eventTarget, list): - for evTarg in intersect(eventTarget, self.events.keys()): + for evTarg in intersect(eventTarget, list(self.events.keys())): self.events[evTarg].termFlag = flagval else: - if eventTarget in self.events.keys(): + if eventTarget in list(self.events.keys()): self.events[eventTarget].termFlag = flagval else: raise TypeError("Invalid flag type") @@ -298,10 +299,10 @@ def setActiveFlag(self, eventTarget, flagval): if isinstance(flagval, bool): if isinstance(eventTarget, list): - for evTarg in intersect(eventTarget, self.events.keys()): + for evTarg in intersect(eventTarget, list(self.events.keys())): self.events[evTarg].activeFlag = flagval else: - if eventTarget in self.events.keys(): + if eventTarget in list(self.events.keys()): self.events[eventTarget].activeFlag = flagval else: raise TypeError("Invalid flag type") @@ -309,10 +310,10 @@ def setPreciseFlag(self, eventTarget, flagval): if isinstance(flagval, bool): if isinstance(eventTarget, list): - for evTarg in intersect(eventTarget, self.events.keys()): + for evTarg in intersect(eventTarget, list(self.events.keys())): self.events[evTarg].preciseFlag = flagval else: - if eventTarget in self.events.keys(): + if eventTarget in list(self.events.keys()): self.events[eventTarget].preciseFlag = flagval else: raise TypeError("Invalid flag type") @@ -320,14 +321,14 @@ def setEventICs(self, eventTarget, val): if isinstance(val, dict): if isinstance(eventTarget, list): - for evTarg in intersect(eventTarget, self.events.keys()): - for name in val.keys(): - if name in self.events[evTarg].initialconditions.keys(): + for evTarg in intersect(eventTarget, list(self.events.keys())): + for name in list(val.keys()): + if name in list(self.events[evTarg].initialconditions.keys()): self.events[evTarg].initialconditions[name] = val[name] else: - if eventTarget in self.events.keys(): - for name in val.keys(): - if name in self.events[eventTarget].initialconditions.keys(): + if eventTarget in list(self.events.keys()): + for name in list(val.keys()): + if name in list(self.events[eventTarget].initialconditions.keys()): self.events[eventTarget].initialconditions[name] = val[name] else: raise TypeError("Invalid ICs type -- must be dict of varname, value pairs") @@ -336,10 +337,10 @@ def setEventDelay(self, eventTarget, val): if isinstance(val, int) or isinstance(val, float): if isinstance(eventTarget, list): - for evTarg in intersect(eventTarget, self.events.keys()): + for evTarg in intersect(eventTarget, list(self.events.keys())): self.events[evTarg].eventdelay = val else: - if eventTarget in self.events.keys(): + if eventTarget in list(self.events.keys()): self.events[eventTarget].eventdelay = val else: raise TypeError("Invalid eventdelay type/value") @@ -347,10 +348,10 @@ def setEventInterval(self, eventTarget, val): if isinstance(val, int) or isinstance(val, float): if isinstance(eventTarget, list): - for evTarg in intersect(eventTarget, self.events.keys()): + for evTarg in intersect(eventTarget, list(self.events.keys())): self.events[evTarg].eventinterval = val else: - if eventTarget in self.events.keys(): + if eventTarget in list(self.events.keys()): self.events[eventTarget].eventinterval = val else: raise TypeError("Invalid eventinterval type/value") @@ -358,10 +359,10 @@ def setEventTol(self, eventTarget, val): if val > 0: if isinstance(eventTarget, list): - for evTarg in intersect(eventTarget, self.events.keys()): + for evTarg in intersect(eventTarget, list(self.events.keys())): self.events[evTarg].eventtol = val else: - if eventTarget in self.events.keys(): + if eventTarget in list(self.events.keys()): self.events[eventTarget].eventtol = val else: raise TypeError("Invalid eventtol type/value") @@ -369,10 +370,10 @@ def setEventDir(self, eventTarget, val): if val in [-1,0,1] and isinstance(val, int): if isinstance(eventTarget, list): - for evTarg in intersect(eventTarget, self.events.keys()): + for evTarg in intersect(eventTarget, list(self.events.keys())): self.events[evTarg].dircode = val else: - if eventTarget in self.events.keys(): + if eventTarget in list(self.events.keys()): self.events[eventTarget].dircode = val else: raise TypeError("Invalid eventdir type/value") @@ -380,10 +381,10 @@ def setStartTime(self, eventTarget, val): if isinstance(val, int) or isinstance(val, float): if isinstance(eventTarget, list): - for evTarg in intersect(eventTarget, self.events.keys()): + for evTarg in intersect(eventTarget, list(self.events.keys())): self.events[evTarg].starttime = val else: - if eventTarget in self.events.keys(): + if eventTarget in list(self.events.keys()): self.events[eventTarget].starttime = val else: raise TypeError("Invalid starttime type") @@ -392,10 +393,10 @@ def setBisect(self, eventTarget, val): if isinstance(val, int) and val > 0: if isinstance(eventTarget, list): - for evTarg in intersect(eventTarget, self.events.keys()): + for evTarg in intersect(eventTarget, list(self.events.keys())): self.events[evTarg].bisectlimit = val else: - if eventTarget in self.events.keys(): + if eventTarget in list(self.events.keys()): self.events[eventTarget].bisectlimit = val else: raise TypeError("Invalid bisectlimit type/value") @@ -463,7 +464,7 @@ self.dircode = kw['dircode'] assert self.dircode in [-1, 0, 1] # direction codes except AssertionError: - print 'invalid value for direction code -- must be -1, 0, or 1' + print('invalid value for direction code -- must be -1, 0, or 1') raise except KeyError: self.dircode = 0 @@ -492,7 +493,7 @@ self.vars = kw['vars'] assert len(self.vars) > 0, 'vars dictionary must be non-empty' if reduce(bool.__and__, [isinstance(var, Variable) for \ - var in self.vars.itervalues()]): + var in self.vars.values()]): self.varlinked = True # doesn't check that only argument is spec'd for _fn method else: @@ -605,7 +606,7 @@ def info(self, verboselevel=1): - print self._infostr(verboselevel) + print(self._infostr(verboselevel)) def __repr__(self): @@ -618,37 +619,37 @@ # clean up FuncSpec usage of parsinps and x for pars/inputs and # variables try: - exec self._funcstr + exec(self._funcstr) except: - print 'Invalid event function definition:' - print self._funcstr + print('Invalid event function definition:') + print(self._funcstr) raise try: setattr(self, '_fn', types.MethodType(locals()[self._funcname], self, self.__class__)) except KeyError: - print 'Must pass objective function for event at initialization' + print('Must pass objective function for event at initialization') raise if '_fn' not in self._funcreg: self._funcreg.append('_fn') # _fnspecs keys are convenient, user-readable, short-hand names # for the functions, whose actual function names are the second entry # of the pair funcstr - for funcpair in self._fnspecs.values(): + for funcpair in list(self._fnspecs.values()): # clean up FuncSpec usage of parsinps and x for pars/inputs and # variables try: - exec funcpair[0] + exec(funcpair[0]) except: - print 'Invalid auxiliary function definition:' - print funcpair[0] + print('Invalid auxiliary function definition:') + print(funcpair[0]) raise try: setattr(self, funcpair[1], types.MethodType(locals()[funcpair[1]], self, self.__class__)) except KeyError: - print 'Must pass objective function for event at initialization' + print('Must pass objective function for event at initialization') raise if funcpair[1] not in self._funcreg: self._funcreg.append(funcpair[1]) @@ -690,7 +691,7 @@ try: self.fval = self._fn(t, parDict) except: - print "Error in event", self.name + print("Error in event", self.name) info(parDict, "Parameters") raise self.prevsign = scipy.sign(self.fval) @@ -700,7 +701,7 @@ try: self.fval = self._fn(t, parDict) except: - print "Error in event", self.name + print("Error in event", self.name) info(parDict, "Parameters") raise sval = scipy.sign(self.fval) @@ -729,9 +730,9 @@ try: self.fval = self._fn(varDict_temp, parDict) except: - print "Error in event", self.name + print("Error in event", self.name) info(parDict, "Parameters") - print "\n" + print("\n") info(varDict_temp, "Variables") raise self.prevsign = scipy.sign(self.fval) @@ -741,9 +742,9 @@ try: self.fval = self._fn(varDict_temp, parDict) except: - print "Error in event", self.name + print("Error in event", self.name) info(parDict, "Parameters") - print "\n" + print("\n") info(varDict_temp, "Variables") raise sval = scipy.sign(self.fval) @@ -790,7 +791,7 @@ varDict = vars precise = self.preciseFlag try: - for var in varDict.itervalues(): + for var in varDict.values(): if isdiscrete(var): discretevars = True elif iscontinuous(var): @@ -798,23 +799,23 @@ else: raise TypeError('varDict must consist of Variable objects') except AttributeError: - print 'event must contain a dictionary of vars' + print('event must contain a dictionary of vars') raise if discretevars and continuousvars: raise TypeError('Cannot mix discrete and continuous Variable types') if discretevars: if precise: - print 'argument precise cannot be used for discrete Variable objects' + print('argument precise cannot be used for discrete Variable objects') precise = False - varnames = varDict.keys() + varnames = list(varDict.keys()) if dt is not None: - print 'argument dt is unused for discrete Variable objects' + print('argument dt is unused for discrete Variable objects') if trange is not None: # trange had better be contained in all var.indepdomain ranges assert len(varDict) > 0, 'varDict was empty!' if not reduce(bool.__and__, [trange[0] in var.indepdomain \ and trange[1] in var.indepdomain for var \ - in varDict.itervalues()]): + in varDict.values()]): raise ValueError('trange not contained in all var ranges') else: raise ValueError('trange must be defined for discrete' @@ -824,7 +825,7 @@ elif continuousvars: # trange had better be contained in all var.indepdomain ranges tlimits = None # initial value - for var in varDict.itervalues(): + for var in varDict.values(): if tlimits is None: tlimits = var.indepdomain.get() else: @@ -863,7 +864,7 @@ pidict = copy.copy(ps) try: for t in ts: - idict = dict([(n,i(t+globalt0)) for n,i in inputs.iteritems()]) + idict = dict([(n,i(t+globalt0)) for n,i in inputs.items()]) pidict.update(idict) fvals.append(self._fn(t, pidict)) except TypeError: @@ -872,18 +873,18 @@ try: tvals = array(ts)+globalt0 except: - print "\n Found type", type(ts) + print("\n Found type", type(ts)) raise TypeError("t values invalid") - idict = dict([(n,i(tvals)) for n,i in inputs.iteritems()]) + idict = dict([(n,i(tvals)) for n,i in inputs.items()]) pidict.update(idict) fvals = self._fn(ts, pidict) return fvals def self_caller(t=None, varDict=None, parDict=None): if parDict is None: - pidict = dict([(n,i(t+globalt0)) for n,i in inputs.iteritems()]) + pidict = dict([(n,i(t+globalt0)) for n,i in inputs.items()]) else: pidict = copy.copy(parDict) - pidict.update(dict([(n,i(t+globalt0)) for n,i in inputs.iteritems()])) + pidict.update(dict([(n,i(t+globalt0)) for n,i in inputs.items()])) return self(t, varDict=varDict, parDict=pidict) # before search, check that start after 'eventdelay', if option set if eventdelay: @@ -928,11 +929,11 @@ restore_val = self.eventdelay self.eventdelay = 0. boollist = [] - for tix in xrange(len(tlist)): + for tix in range(len(tlist)): boollist.append(self_caller(t=tlist[tix], - varDict=dict(zip(varnames, + varDict=dict(list(zip(varnames, [vallist[i][tix] for\ - i in range(len(vallist))])), + i in range(len(vallist))]))), parDict=parDict)) # first bool may be True because event hasn't been called # before and has prevsign unset (or mis-set)... @@ -942,12 +943,12 @@ if not eventdelay: # restore value for future use self.eventdelay = restore_val - except KeyError, e: + except KeyError as e: # for discretevars if not all var.indepdomains equal over trange if discretevars: - print 'Note: All discrete Variables must have identical ' \ - 'independent variable domains over trange' - print "Check that all variable references in events are legitimate" + print('Note: All discrete Variables must have identical ' \ + 'independent variable domains over trange') + print("Check that all variable references in events are legitimate") raise # loop through boollist and find all events unless terminating at tpos! tpos = -1 @@ -1045,7 +1046,7 @@ necessary temporary variable declarations and a return statement.""" def __init__(self, kw): if 'vars' in kw: - for v in kw['vars'].itervalues(): + for v in kw['vars'].values(): if v is not None: raise TypeError("Low level events cannot be linked to a" " variable") @@ -1056,8 +1057,8 @@ dummyQ = QuantSpec('dummy', LLfuncstr, preserveSpace=True) dummyQ.mapNames({'abs': 'fabs', 'sign': 'signum', 'mod': 'fmod'}) if dummyQ[0] != 'return': - print "Found: ", dummyQ[0] - print "in event specification: ", dummyQ() + print("Found: ", dummyQ[0]) + print("in event specification: ", dummyQ()) raise ValueError("'return' must be first token in low level " "event specification") # take out 'return' from tokenized because whitespace will be lost @@ -1076,7 +1077,7 @@ necessary temporary variable declarations.""" def __init__(self, kw): if 'vars' in kw: - for v in kw['vars'].itervalues(): + for v in kw['vars'].values(): if v is not None: raise TypeError("Low level events cannot be linked to a variable") kw['noHighLevel'] = True @@ -1086,8 +1087,8 @@ LLfuncstr = kw['Matlabfuncspec'] dummyQ = QuantSpec('dummy', LLfuncstr, preserveSpace=True) if dummyQ[0] != 'return': - print "Found: ", dummyQ[0] - print "in event specification: ", dummyQ() + print("Found: ", dummyQ[0]) + print("in event specification: ", dummyQ()) raise ValueError("'return' must be first token in low level " "event specification") # take out 'return' from tokenized because whitespace will be lost @@ -1337,8 +1338,8 @@ expr = dummyfuncspec._processSpecialC(expr) for arg in newargs: if arg in argDict: - print 'Warning: `' + arg + '` already appears in argDict!' - print ' This value will be overwritten.' + print('Warning: `' + arg + '` already appears in argDict!') + print(' This value will be overwritten.') argDict_out = copy.copy(argDict) funcname = "_f_"+exprname+"_ud" if parnames == []: @@ -1402,8 +1403,8 @@ newargs = ['dircode', 'funcspec', 'vars'] for arg in newargs: if arg in argDict: - print 'Warning: `' + arg + '` already appears in argDict!' - print ' This value will be overwritten.' + print('Warning: `' + arg + '` already appears in argDict!') + print(' This value will be overwritten.') if isinstance(varname, Var): # supporting a Variable object varname = varname.name @@ -1491,10 +1492,10 @@ dopars=dopars, doinps=doinps, illegal=illegal) reusedefs = {}.fromkeys(new_protected) - for vname, deflist in reusedParsed.iteritems(): + for vname, deflist in reusedParsed.items(): for d in deflist: reusedefs[d[2]] = d - return (concatStrDict(reusedefs, intersect(order,reusedefs.keys())), + return (concatStrDict(reusedefs, intersect(order,list(reusedefs.keys()))), specupdated) @@ -1507,10 +1508,10 @@ reuseterms, '', 'double', ';') reusedefs = {}.fromkeys(new_protected) - for vname, deflist in reused.iteritems(): + for vname, deflist in reused.items(): for d in deflist: reusedefs[d[2]] = d - return (concatStrDict(reusedefs, intersect(order, reusedefs.keys())), + return (concatStrDict(reusedefs, intersect(order, list(reusedefs.keys()))), specupdated) @@ -1523,10 +1524,10 @@ reuseterms, '', '', ';') reusedefs = {}.fromkeys(new_protected) - for vname, deflist in reused.iteritems(): + for vname, deflist in reused.items(): for d in deflist: reusedefs[d[2]] = d - return (concatStrDict(reusedefs, intersect(order, reusedefs.keys())), + return (concatStrDict(reusedefs, intersect(order, list(reusedefs.keys()))), specupdated) @@ -1568,10 +1569,10 @@ else: def test_fn(x, p): if p is None: - pidict = dict([(n,i(t+globalt0)) for n,i in inputs.iteritems()]) + pidict = dict([(n,i(t+globalt0)) for n,i in inputs.items()]) else: pidict = copy.copy(p) - pidict.update(dict([(n,i(t+globalt0)) for n,i in inputs.iteritems()])) + pidict.update(dict([(n,i(t+globalt0)) for n,i in inputs.items()])) return ev._fn(t, pidict) else: if quadratic_interp is not None: @@ -1579,16 +1580,16 @@ else: def test_fn(x, p): if p is None: - pidict = dict([(n,i(x['t']+globalt0)) for n,i in inputs.iterRefactoringTool: Refactored ./PyDSTool/FuncSpec.py items()]) + pidict = dict([(n,i(x['t']+globalt0)) for n,i in inputs.items()]) else: pidict = copy.copy(p) - pidict.update(dict([(n,i(x['t']+globalt0)) for n,i in inputs.iteritems()])) + pidict.update(dict([(n,i(x['t']+globalt0)) for n,i in inputs.items()])) return ev._fn(x, pidict) if ev.varlinked: assert vars is None, ("Only pass vars argument when event is not " "linked to a variable") assert reduce(bool.__and__, [iscontinuous(var) \ - for var in ev.vars.itervalues()]), \ + for var in ev.vars.values()]), \ 'Only pass continously-defined Variables in event' elo = test_fn(tlo, parDict) ehi = test_fn(thi, parDict) @@ -1624,11 +1625,11 @@ assert vars is not None, ("vars argument is required when event is not" " linked to a variable") assert reduce(bool.__and__, [iscontinuous(var) \ - for var in vars.itervalues()]), \ + for var in vars.values()]), \ 'Only pass continously-defined Variables' varnames = sortedDictKeys(vars)+['t'] - dlo = dict(zip(varnames, [v(tlo) for v in sortedDictValues(vars)]+[tlo])) - dhi = dict(zip(varnames, [v(thi) for v in sortedDictValues(vars)]+[thi])) + dlo = dict(list(zip(varnames, [v(tlo) for v in sortedDictValues(vars)]+[tlo]))) + dhi = dict(list(zip(varnames, [v(thi) for v in sortedDictValues(vars)]+[thi]))) elo = test_fn(dlo, parDict) ehi = test_fn(dhi, parDict) if elo == 0: @@ -1641,14 +1642,14 @@ a = tlo b = thi i = 1 - da = dict(zip(varnames, [v(a) for v in sortedDictValues(vars)]+[a])) - db = dict(zip(varnames, [v(b) for v in sortedDictValues(vars)]+[b])) + da = dict(list(zip(varnames, [v(a) for v in sortedDictValues(vars)]+[a]))) + db = dict(list(zip(varnames, [v(b) for v in sortedDictValues(vars)]+[b]))) eva = test_fn(da, parDict) rootival = (a,b) while i <= ev.bisectlimit: d = (b-a)/2.0 p = a + d - dp = dict(zip(varnames, [v(p) for v in sortedDictValues(vars)]+[p])) + dp = dict(list(zip(varnames, [v(p) for v in sortedDictValues(vars)]+[p]))) evp = test_fn(dp, parDict) if abs(evp-eva) < ev.eventtol or evp == 0: return (p, rootival) --- ./PyDSTool/FuncSpec.py (original) +++ ./PyDSTool/FuncSpec.py (refactored) @@ -8,13 +8,13 @@ """ # PyDSTool imports -from __future__ import division -from utils import * -from common import * -from parseUtils import * -from errors import * -from utils import info as utils_info -from Symbolic import QuantSpec + +from .utils import * +from .common import * +from .parseUtils import * +from .errors import * +from .utils import info as utils_info +from .Symbolic import QuantSpec # Other imports from copy import copy, deepcopy @@ -146,7 +146,7 @@ raise ValueError('reuseterms must be a dictionary of strings ->' ' replacement strings') ignore_list = [] - for term, repterm in self.reuseterms.iteritems(): + for term, repterm in self.reuseterms.items(): assert isinstance(term, str), \ "terms in 'reuseterms' dictionary must be strings" ## if term[0] in num_chars+['.']: @@ -159,32 +159,32 @@ # not sure about the next check any more... # what is the point of not allowing subs terms to begin with op? if term[0] in '+/*': - print "Error in term:", term + print("Error in term:", term) raise ValueError('terms to be substituted must not begin ' 'with arithmetic operators') if term[0] == '-': term = '(' + term + ')' if term[-1] in '+-/*': - print "Error in term:", term + print("Error in term:", term) raise ValueError('terms to be substituted must not end with ' 'arithmetic operators') for s in term: if self.targetlang == 'python': if s in '[]{}~@#$%&\|?^': # <>! now OK, e.g. for "if" statements - print "Error in term:", term + print("Error in term:", term) raise ValueError('terms to be substituted must be ' 'alphanumeric or contain arithmetic operators ' '+ - / *') else: if s in '[]{}~!@#$%&\|?><': # removed ^ from this list - print "Error in term:", term + print("Error in term:", term) raise ValueError('terms to be substituted must be alphanumeric or contain arithmetic operators + - / *') if repterm[0] in num_chars: - print "Error in replacement term:", repterm + print("Error in replacement term:", repterm) raise ValueError('replacement terms must not begin with numbers') for s in repterm: if s in '+-/*.()[]{}~!@#$%^&\|?><,': - print "Error in replacement term:", repterm + print("Error in replacement term:", repterm) raise ValueError('replacement terms must be alphanumeric') for t in ignore_list: del self.reuseterms[t] @@ -235,9 +235,9 @@ num_varspecs = numaux + len(vars) if len(kw['varspecs']) != len(self._varsbyforspec) and \ len(kw['varspecs']) != num_varspecs: - print "# state variables: ", len(vars) - print "# auxiliary variables: ", numaux - print "# of variable specs: ", len(kw['varspecs']) + print("# state variables: ", len(vars)) + print("# auxiliary variables: ", numaux) + print("# of variable specs: ", len(kw['varspecs'])) raise ValueError('Incorrect size of varspecs') self.varspecs = deepcopy(kw['varspecs']) foundKeys += 1 # for varspecs @@ -280,8 +280,7 @@ # can be user-defined or generated from generateSpec if 'spec' in kw: if 'varspecs' in kw: - raise PyDSTool_KeyError, \ - "Cannot provide both 'spec' and 'varspecs' keys" + raise PyDSTool_KeyError("Cannot provide both 'spec' and 'varspecs' keys") assert isinstance(kw['spec'], tuple), ("'spec' must be a pair:" " (spec body, spec name)") assert len(kw['spec'])==2, ("'spec' must be a pair:" @@ -303,7 +302,7 @@ if len(kw) > foundKeys: raise PyDSTool_KeyError('Invalid keys passed in argument dict') self.defined = False # initial value - self.validateDef(vars, pars, inputs, auxvars, self._auxfnspecs.keys()) + self.validateDef(vars, pars, inputs, auxvars, list(self._auxfnspecs.keys())) # ... exception if not valid # Fine to do the following if we get this far: # sort for final order that will be used for determining array indices @@ -354,10 +353,10 @@ new_args = deepcopy(self._initargs) if self.codeinserts['start'] != '': del new_args['codeinsert_start'] - print "Warning: code insert (start) ignored for new target" + print("Warning: code insert (start) ignored for new target") if self.codeinserts['end'] != '': del new_args['codeinsert_end'] - print "Warning: code insert (end) ignored for new target" + print("Warning: code insert (end) ignored for new target") new_args['targetlang'] = targetlang fs.__init__(new_args) return fs @@ -427,13 +426,13 @@ first_char_check = [alphabet_chars_RE.match(n[0]) \ is not None for n in allnames] if not all(first_char_check): - print "Offending names:", [n for i, n in enumerate(allnames) \ - if not first_char_check[i]] + print("Offending names:", [n for i, n in enumerate(allnames) \ + if not first_char_check[i]]) raise ValueError('Variable, parameter, and input names must not ' 'begin with non-alphabetic chars') protected_overlap = intersect(allnames, allprotectednames) if protected_overlap != []: - print "Overlapping names:", protected_overlap + print("Overlapping names:", protected_overlap) raise ValueError('Variable, parameter, and input names must not ' 'overlap with protected math / aux function names') ## Not yet implemented ? @@ -506,7 +505,7 @@ """Pre-process any macro spec definitions (e.g. `for` loops).""" assert self.varspecs != {}, 'varspecs attribute must be defined' - specnames_unsorted = self.varspecs.keys() + specnames_unsorted = list(self.varspecs.keys()) _vbfs_inv = invertMap(self._varsbyforspec) # Process state variable specifications if len(_vbfs_inv) > 0: @@ -580,7 +579,7 @@ expr = arglist[3] # add macro text varspecs = self._macroFor(rootstr, istr, ilo, ihi, expr) - specnames_gen = varspecs.keys() + specnames_gen = list(varspecs.keys()) # now we update the dictionary of specnames with the # processed, expanded versions specnames.remove(specname) @@ -628,7 +627,7 @@ eval_pieces[ix] = eval_str # otherwise may be a different, embedded temp index for another # sum, etc., so don't touch it - keys = eval_pieces.keys() + keys = list(eval_pieces.keys()) keys.sort() ranges = remove_indices_from_range(keys, len(q.parser.tokenized)-1) # By virtue of this syntax, the first [] cannot be before some other text @@ -663,7 +662,7 @@ def _macroSum(self, istr, ilo, ihi, expr_in_i): def_dict = self._macroFor('', istr, int(ilo), int(ihi), expr_in_i) - retstr = '(' + "+".join([term.strip() for term in def_dict.values()]) + ')' + retstr = '(' + "+".join([term.strip() for term in list(def_dict.values())]) + ')' return retstr # ----------------- Python specifications ---------------- @@ -672,7 +671,7 @@ if pytarget: assert self.targetlang == 'python', \ 'Wrong target language for this call' - auxnames = self._auxfnspecs.keys() + auxnames = list(self._auxfnspecs.keys()) # User aux fn interface uafi = {} ## protectednames = auxnames + self._protected_mathnames + \ @@ -765,8 +764,8 @@ # Process Jacobian functions, etc., specially, if present if auxname == 'Jacobian': if not compareList(auxinfo[0],['t']+self.vars): - print ['t']+self.vars - print "Auxinfo =", auxinfo[0] + print(['t']+self.vars) + print("Auxinfo =", auxinfo[0]) raise ValueError("Invalid argument list given in Jacobian.") auxparlist = ["t","x","parsinps"] # special symbols to allow in parsing function body @@ -804,13 +803,13 @@ body_processed = "" for row in range(m): if specdict_check[specvars[row]] != n: - print "Row %i: "%m, specdict[specvars[row]] - print "Found length %i"%specdict_check[specvars[row]] + print("Row %i: "%m, specdict[specvars[row]]) + print("Found length %i"%specdict_check[specvars[row]]) raise ValueError("Jacobian should be %sx%s"%(m,n)) elif auxname == 'Jacobian_pars': if not compareList(auxinfo[0],['t']+self.vars): - print ['t']+self.vars - print "Auxinfo =", auxinfo[0] + print(['t']+self.vars) + print("Auxinfo =", auxinfo[0]) raise ValueError("Invalid argument list given in Jacobian.") auxparlist = ["t","x","parsinps"] # special symbols to allow in parsing function body @@ -850,17 +849,17 @@ for row in range(m): try: if specdict_check[self.vars[row]] != n: - print "Row %i: "%m, specdict[self.vars[row]] - print "Found length %i"%specdict_check[self.vars[row]] + print("Row %i: "%m, specdict[self.vars[row]]) + print("Found length %i"%specdict_check[self.vars[row]]) raise ValueError("Jacobian w.r.t. pars should be %sx%s"%(m,n)) except IndexError: - print "\nFound:\n" + print("\nFound:\n") info(specdict) raise ValueError("Jacobian w.r.t. pars should be %sx%s"%(m,n)) elif auxname == 'massMatrix': if not compareList(auxinfo[0],['t']+self.vars): - print ['t']+self.vars - print "Auxinfo =", auxinfo[0] + print(['t']+self.vars) + print("Auxinfo =", auxinfo[0]) raise ValueError("Invalid argument list given in Mass Matrix.") auxparlist = ["t","x","parsinps"] # special symbols to allow in parsing function body @@ -876,7 +875,7 @@ "'[' character invalid in mass matrix for 1D system" assert ']' not in auxstr, \ "']' character invalid in mass matrix for 1D system" - specdict[specvars.values()[0]] = auxstr + specdict[list(specvars.values())[0]] = auxstr else: specdict = parseMatrixStrToDictStr(auxstr, specvars) reusestr, body_processed_dict = self._processReusedPy(specvars, @@ -897,8 +896,8 @@ body_processed = "" for row in range(m): if specdict_check[specvars[row]] != n: - print "Row %i: "%m, specdict[specvars[row]] - print "Found length %i"%specdict_check[specvars[row]] + print("Row %i: "%m, specdict[specvars[row]]) + print("Found length %i"%specdict_check[specvars[row]]) raise ValueError("Mass matrix should be %sx%s"%(m,n)) else: user_parstr = makeParList(auxinfo[0]) @@ -915,8 +914,8 @@ badparnames = intersect(auxparlist, remain(protectednames,auxnames)) if badparnames != []: - print "Bad parameter names in auxiliary function", \ - auxname, ":", badparnames + print("Bad parameter names in auxiliary function", \ + auxname, ":", badparnames) #print auxinfo[0] #print auxparlist raise ValueError("Cannot use protected names (including" \ @@ -947,7 +946,7 @@ auxfns[auxname] = makeUniqueFn(auxstr_py) # Note: this automatically updates self._pyauxfns too except: - print 'Error in supplied auxiliary spec dictionary code' + print('Error in supplied auxiliary spec dictionary code') raise auxfn_namemap['ds.'+auxname] = 'ds.'+auxfns[auxname][1] # prepare user-interface wrapper function (not method) @@ -962,7 +961,7 @@ '(__parsinps__', fn_args, ')\n'] uafi[auxname] = ''.join(fn_elts) # resolve inter-auxiliary function references - for auxname, auxspec in auxfns.iteritems(): + for auxname, auxspec in auxfns.items(): dummyQ = QuantSpec('dummy', auxspec[0], preserveSpace=True, treatMultiRefs=False) dummyQ.mapNames(auxfn_namemap) @@ -1011,7 +1010,7 @@ retstr += _indentstr + 'return array([' + resname + '0])\n' else: retstr += _indentstr + 'return array([' \ - + makeParList(range(len(specnames)), resname) + '])\n' + + makeParList(list(range(len(specnames))), resname) + '])\n' return retstr @@ -1019,7 +1018,7 @@ assert self.targetlang == 'python', ('Wrong target language for this' ' call') assert self.varspecs != {}, 'varspecs attribute must be defined' - specnames_unsorted = self.varspecs.keys() + specnames_unsorted = list(self.varspecs.keys()) _vbfs_inv = invertMap(self._varsbyforspec) # Process state variable specifications if len(_vbfs_inv) > 0: @@ -1039,7 +1038,7 @@ specname_vars = intersect(self.vars, specnames_unsorted) specname_auxvars = intersect(self.auxvars, specnames_unsorted) specname_vars.sort() - for vn, vs in self.varspecs.items(): + for vn, vs in list(self.varspecs.items()): if any([pt in vs for pt in ('^', '**')]): self.varspecs[vn] = convertPowers(vs, 'pow') self.vars.sort() @@ -1064,12 +1063,12 @@ try: spec_info = makeUniqueFn(specstr_py) except SyntaxError: - print "Syntax error in specification:\n", specstr_py + print("Syntax error in specification:\n", specstr_py) raise try: auxspec_info = makeUniqueFn(auxspecstr_py) except SyntaxError: - print "Syntax error in auxiliary spec:\n", auxspecstr_py + print("Syntax error in auxiliary spec:\n", auxspecstr_py) raise self.spec = spec_info self.auxspec = auxspec_info @@ -1090,10 +1089,10 @@ dopars=dopars, doinps=doinps, illegal=illegal) reusedefs = {}.fromkeys(new_protected) - for vname, deflist in reusedParsed.iteritems(): + for vname, deflist in reusedParsed.items(): for d in deflist: reusedefs[d[2]] = d - return (concatStrDict(reusedefs, intersect(order,reusedefs.keys())), + return (concatStrDict(reusedefs, intersect(order,list(reusedefs.keys()))), specupdated) @@ -1110,10 +1109,8 @@ + self._protected_randomnames + self._protected_reusenames allnames = remain(allnames, illegal) if dovars: - var_arrayixstr = dict(zip(self.vars, map(lambda i: str(i), \ - range(len(self.vars))) )) - aux_arrayixstr = dict(zip(self.auxvars, map(lambda i: str(i), \ - range(len(self.auxvars))) )) + var_arrayixstr = dict(list(zip(self.vars, [str(i) for i in range(len(self.vars))] ))) + aux_arrayixstr = dict(list(zip(self.auxvars, [str(i) for i in range(len(self.auxvars))] ))) else: var_arrayixstr = {} aux_arrayixstr = {} @@ -1124,14 +1121,13 @@ parsinps_names = self.pars+self.inputs else: parsinps_names = self.pars - parsinps_arrayixstr = dict(zip(parsinps_names, - map(lambda i: str(i), \ - range(len(parsinps_names))) )) + parsinps_arrayixstr = dict(list(zip(parsinps_names, + [str(i) for i in range(len(parsinps_names))] ))) else: parsinps_names = [] parsinps_arrayixstr = {} specialtokens = remain(allnames,specials) + ['(', 't'] + specials - for specname, itemlist in d.iteritems(): + for specname, itemlist in d.items(): listix = -1 for strlist in itemlist: listix += 1 @@ -1172,15 +1168,13 @@ allnames = remain(allnames, illegal) if dovars: if forexternal: - var_arrayixstr = dict(zip(self.vars, - ["'"+v+"'" for v in self.vars])) - aux_arrayixstr = dict(zip(self.auxvars, - ["'"+v+"'" for v in self.auxvars])) - else: - var_arrayixstr = dict(zip(self.vars, map(lambda i: str(i), \ - range(len(self.vars))) )) - aux_arrayixstr = dict(zip(self.auxvars, map(lambda i: str(i),\ - range(len(self.auxvars))) )) + var_arrayixstr = dict(list(zip(self.vars, + ["'"+v+"'" for v in self.vars]))) + aux_arrayixstr = dict(list(zip(self.auxvars, + ["'"+v+"'" for v in self.auxvars]))) + else: + var_arrayixstr = dict(list(zip(self.vars, [str(i) for i in range(len(self.vars))] ))) + aux_arrayixstr = dict(list(zip(self.auxvars, [str(i) for i in range(len(self.auxvars))] ))) else: var_arrayixstr = {} aux_arrayixstr = {} @@ -1196,8 +1190,8 @@ else: parsinps_names = self.pars # for external calls we want parname -> 'parname' - parsinps_arrayixstr = dict(zip(parsinps_names, - ["'"+pn+"'" for pn in parsinps_names])) + parsinps_arrayixstr = dict(list(zip(parsinps_names, + ["'"+pn+"'" for pn in parsinps_names]))) else: if doinps: # parsinps_names is pars and inputs, each sorted @@ -1205,9 +1199,8 @@ parsinps_names = self.pars+self.inputs else: parsinps_names = self.pars - parsinps_arrayixstr = dict(zip(parsinps_names, - map(lambda i: str(i), \ - range(len(parsinps_names))) )) + parsinps_arrayixstr = dict(list(zip(parsinps_names, + [str(i) for i in range(len(parsinps_names))] ))) else: parsinps_names = [] parsinps_arrayixstr = {} @@ -1268,8 +1261,8 @@ # adding allnames catches var names etc. that are valid # in auxiliary functions but are not special tokens # and must be left alone - print "Error in specification `" + specname + \ - "` with token `"+s+"` :\n", specstr + print("Error in specification `" + specname + \ + "` with token `"+s+"` :\n", specstr) raise ValueError('Undeclared or illegal token `'+s+'` in' ' spec string `'+specname+'`') if stemp == '^' and self.targetlang == 'python': @@ -1336,9 +1329,9 @@ returnstr += "'"+s+"'" strname_arg_imminent = False else: - print "Spec name:", specname - print "Spec string:", specstr - print "Problem symbol:", s + print("Spec name:", specname) + print("Spec string:", specstr) + print("Problem symbol:", s) raise NameError('auxiliary variables cannot ' 'appear on any right-hand side ' 'except their initial value') @@ -1390,8 +1383,8 @@ returnstr += 'scipy.'+s elif s in self._protected_specialfns: if self.targetlang != 'python': - print "Function %s is currently not supported "%s, \ - "outside of python target language definitions" + print("Function %s is currently not supported "%s, \ + "outside of python target language definitions") raise ValueError("Invalid special function for " "non-python target definition") # replace the underscore in the name with a dot @@ -1407,8 +1400,8 @@ # remove vars, auxs, inputs to_remove = self.vars + self.auxvars + self.inputs filtfunc = lambda n: n not in to_remove - specialtokens_temp = filter(filtfunc, - specialtokens+self._ignorespecial) + specialtokens_temp = list(filter(filtfunc, + specialtokens+self._ignorespecial)) else: specialtokens_temp = specialtokens+self._ignorespecial if s == 'if': @@ -1512,7 +1505,7 @@ if self.auxfns: def addParToCall(s): return addArgToCalls(self._processSpecialC(s), - self.auxfns.keys(), "p_, wk_, xv_") + list(self.auxfns.keys()), "p_, wk_, xv_") parseFunc = addParToCall else: parseFunc = self._processSpecialC @@ -1523,15 +1516,15 @@ parseFunc) self._protected_reusenames = new_protected reusedefs = {}.fromkeys(new_protected) - for vname, deflist in reused.iteritems(): + for vname, deflist in reused.items(): for d in deflist: reusedefs[d[2]] = d - return (concatStrDict(reusedefs, intersect(order, reusedefs.keys())), + return (concatStrDict(reusedefs, intersect(order, list(reusedefs.keys()))), specupdated) def _genAuxFnC(self): - auxnames = self._auxfnspecs.keys() + auxnames = list(self._auxfnspecs.keys()) # parameter and variable definitions # sorted version of var and par names sorted version of par # names (vars not #define'd in aux functions unless Jacobian) @@ -1553,21 +1546,21 @@ auxspec = self._auxfnspecs[auxname] assert len(auxspec) == 2, 'auxspec tuple must be of length 2' if not isinstance(auxspec[0], list): - print "Found type ", type(auxspec[0]) - print "Containing: ", auxspec[0] + print("Found type ", type(auxspec[0])) + print("Containing: ", auxspec[0]) raise TypeError('aux function arguments ' 'must be given as a list') if not isinstance(auxspec[1], str): - print "Found type ", type(auxspec[1]) - print "Containing: ", auxspec[1] + print("Found type ", type(auxspec[1])) + print("Containing: ", auxspec[1]) raise TypeError('aux function specification ' 'must be a string of the function code') # Process Jacobian functions specially, if present if auxname == 'Jacobian': sig = "void jacobian(" if not compareList(auxspec[0],['t']+self.vars): - print ['t']+self.vars - print "Auxspec =", auxspec[0] + print(['t']+self.vars) + print("Auxspec =", auxspec[0]) raise ValueError("Invalid argument list given in Jacobian.") if any([pt in auxspec[1] for pt in ('^', '**')]): auxstr = convertPowers(auxspec[1], 'pow') @@ -1609,8 +1602,8 @@ elif auxname == 'Jacobian_pars': sig = "void jacobianParam(" if not compareList(auxspec[0],['t']+self.vars): - print ['t']+self.vars - print "Auxspec =", auxspec[0] + print(['t']+self.vars) + print("Auxspec =", auxspec[0]) raise ValueError("Invalid argument list given in Jacobian.") parlist = "unsigned n_, unsigned np_, double t, double *Y_," if any([pt in auxspec[1] for pt in ('^', '**')]): @@ -1633,7 +1626,7 @@ "'[' character invalid in Jacobian for 1D system" assert ']' not in auxstr, \ "']' character invalid in Jacobian for 1D system" - specdict_temp[self.vars.values()[0]] = auxstr + specdict_temp[list(self.vars.values())[0]] = auxstr else: specdict_temp = parseMatrixStrToDictStr(auxstr, self.vars, m) reusestr, body_processed_dict = self._processReusedC(self.vars, @@ -1650,7 +1643,7 @@ body_processed += "f_[" + str(col) + "][" + str(row) \ + "] = " + specdict[self.vars[row]][col] + ";\n" except (IndexError, KeyError): - print "\nFound matrix:\n" + print("\nFound matrix:\n") info(specdict) raise ValueError("Jacobian should be %sx%s"%(m,n)) body_processed += "\n" @@ -1677,7 +1670,7 @@ "'[' character invalid in mass matrix for 1D system" assert ']' not in auxstr, \ "']' character invalid in mass matrix for 1D system" - specdict_temp[specvars.values()[0]] = auxstr + specdict_temp[list(specvars.values())[0]] = auxstr else: specdict_temp = parseMatrixStrToDictStr(auxstr, specvars, m) reusestr, body_processed_dict = self._processReusedC(specvars, @@ -1790,7 +1783,7 @@ # temporary placeholders for these built-ins... cases_ic = "" cases_index = "" - for i in xrange(len(self.vars)): + for i in range(len(self.vars)): if i == 0: command = 'if' else: @@ -1801,7 +1794,7 @@ cases_index += " " + command + " (strcmp(name, " + '"' + vname + '"'\ + ")==0)\n\treturn " + str(i) + ";\n" # add remaining par names for getindex - for i in xrange(len(self.pars)): + for i in range(len(self.pars)): pname = self.pars[i] cases_index += " else if" + " (strcmp(name, " + '"' + pname + '"'\ +")==0)\n\treturn " + str(i+len(self.vars)) + ";\n" @@ -1828,7 +1821,7 @@ assert self.targetlang == 'c', ('Wrong target language for this' ' call') assert self.varspecs != {}, 'varspecs attribute must be defined' - specnames_unsorted = self.varspecs.keys() + specnames_unsorted = list(self.varspecs.keys()) _vbfs_inv = invertMap(self._varsbyforspec) # Process state variable specifications if len(_vbfs_inv) > 0: @@ -1864,7 +1857,7 @@ assert self.vars == specname_vars, ('Mismatch between declared ' ' variable names and varspecs keys') valid_depTargNames = self.inputs+self.vars+self.auxvars - for specname, specstr in self.varspecs.iteritems(): + for specname, specstr in self.varspecs.items(): assert type(specstr)==str, "Specification for %s was not a string"%specname if any([pt in specstr for pt in ('^', '**')]): specstr = convertPowers(specstr, 'pow') @@ -1921,13 +1914,13 @@ + reusestr + "\n" auxdefs_parsed = {} # add function body - for i in xrange(len(specnames)): + for i in range(len(specnames)): xname = specnames[i] fbody = self.varspecs[xname] fbody_parsed = self._processSpecialC(fbody) if self.auxfns: fbody_parsed = addArgToCalls(fbody_parsed, - self.auxfns.keys(), + list(self.auxfns.keys()), "p_, wk_, xv_") if 'initcond' in self.auxfns: # convert 'initcond(x)' to 'initcond("x")' for @@ -2024,7 +2017,7 @@ # ------------ Matlab code specifications ----------------------- def _genAuxFnMatlab(self): - auxnames = self.auxfns.keys() + auxnames = list(self.auxfns.keys()) # parameter and variable definitions # sorted version of var and par names sorted version of par @@ -2044,16 +2037,16 @@ # else we add these extra pars automatically to # every call found in the .c code (as is done currently. # this is still an untidy solution, but there you go...) - for auxname, auxspec in self._auxfnspecs.iteritems(): + for auxname, auxspec in self._auxfnspecs.items(): assert len(auxspec) == 2, 'auxspec tuple must be of length 2' if not isinstance(auxspec[0], list): - print "Found type ", type(auxspec[0]) - print "Containing: ", auxspec[0] + print("Found type ", type(auxspec[0])) + print("Containing: ", auxspec[0]) raise TypeError('aux function arguments ' 'must be given as a list') if not isinstance(auxspec[1], str): - print "Found type ", type(auxspec[1]) - print "Containing: ", auxspec[1] + print("Found type ", type(auxspec[1])) + print("Containing: ", auxspec[1]) raise TypeError('aux function specification ' 'must be a string of the function code') ## assert auxspec[1].find('^') == -1, ('carat character ^ is not ' @@ -2105,7 +2098,7 @@ assert self.targetlang == 'matlab', ('Wrong target language for this' ' call') assert self.varspecs != {}, 'varspecs attribute must be defined' - specnames_unsorted = self.varspecs.keys() + specnames_unsorted = list(self.varspecs.keys()) specname_vars = intersect(self.vars, specnames_unsorted) specname_vars.sort() # parameter and variable definitions @@ -2119,7 +2112,7 @@ assert self.vars == specname_vars, ('Mismatch between declared ' ' variable names and varspecs keys') valid_depTargNames = self.inputs+self.vars+self.auxvars - for specname, specstr in self.varspecs.iteritems(): + for specname, specstr in self.varspecs.items(): assert type(specstr)==str, "Specification for %s was not a string"%specname if any([pt in specstr for pt in ('pow', '**')]): specstr = convertPowers(specstr, '^') @@ -2152,13 +2145,13 @@ specstr += (len(reusestr)>0)*"% reused term definitions \n" \ + reusestr + "\n" # add function body - for i in xrange(len(specnames)): + for i in range(len(specnames)): xname = specnames[i] fbody = self.varspecs[xname] fbody_parsed = self._processIfMatlab(fbody) if self.auxfns: fbody_parsed = addArgToCalls(fbody_parsed, - self.auxfns.keys(), + list(self.auxfns.keys()), "p_") # if 'initcond' in self.auxfns: # convert 'initcond(x)' to 'initcond("x")' for @@ -2179,7 +2172,7 @@ if self.auxfns: def addParToCall(s): - return addArgToCalls(s, self.auxfns.keys(), "p_") + return addArgToCalls(s, list(self.auxfns.keys()), "p_") parseFunc = addParToCall else: parseFunc = idfn @@ -2190,10 +2183,10 @@ parseFunc) self._protected_reusenames = new_protected reusedefs = {}.fromkeys(new_protected) - for vname, deflist in reused.iteritems(): + for vname, deflist in reused.items(): for d in deflist: reusedefs[d[2]] = d - return (concatStrDict(reusedefs, intersect(order, reusedefs.keys())), + return (concatStrDict(reusedefs, intersect(order, list(reusedefs.keys()))), specupdated) # NEED TO CHECK WHETHER THIS IS NECESSARY AND WORKS # IF STATEMENTS LOOK DIFFERENT IN MATLAB @@ -2209,7 +2202,7 @@ def _prepareMatlabPDefines(self, pnames): pardefines = "" - for i in xrange(len(pnames)): + for i in range(len(pnames)): p = pnames[i] pardefines += "\t" + p + " = p_(" + str(i+1) + ");\n" @@ -2219,7 +2212,7 @@ def _prepareMatlabVDefines(self, vnames): vardefines = "" - for i in xrange(len(vnames)): + for i in range(len(vnames)): v = vnames[i] vardefines += "\t" + v + " = x_(" + str(i+1) + ");\n" alldefines = "\n% Variable definitions\n\n" + vardefines @@ -2274,7 +2267,7 @@ return outputStr def info(self, verbose=0): - print self._infostr(verbose) + print(self._infostr(verbose)) def __repr__(self): return self._infostr(verbose=0) @@ -2332,8 +2325,8 @@ # establish order for reusable terms, in case of inter-dependencies are_dependent = [] deps = {} - for origterm, rterm in reuseterms.iteritems(): - for ot, rt in reuseterms.iteritems(): + for origterm, rterm in reuseterms.items(): + for ot, rt in reuseterms.items(): if proper_match(origterm, rt): if rterm not in are_dependent: are_dependent.append(rterm) @@ -2342,12 +2335,12 @@ except KeyError: # new list deps[rterm] = [rt] - order = remain(reuseterms.values(), are_dependent) + are_dependent + order = remain(list(reuseterms.values()), are_dependent) + are_dependent for specname in specnames: reused[specname] = [] specstr = specdict[specname] repeatkeys = [] - for origterm, repterm in reuseterms.iteritems(): + for origterm, repterm in reuseterms.items(): # only add definitions if string found if proper_match(specstr, origterm): specstr = specstr.replace(origterm, repterm) @@ -2380,7 +2373,7 @@ # just log the definitions that will be needed without replacing # any strings. if reused[specname] == [] and len(reuseterms) > 0: - for origterm, repterm in reuseterms.iteritems(): + for origterm, repterm in reuseterms.items(): # add definition if *replacement* string found in specs if proper_matchRefactoringTool: Refactored ./PyDSTool/Interval.py (specstr, repterm) and repterm not in seenrepterms: reused[specname].append([indentstr, @@ -2471,10 +2464,10 @@ """ changed_fns = [] new_fnspecs = {} - for fname, (fargs, fspec) in fnspecs.iteritems(): + for fname, (fargs, fspec) in fnspecs.items(): common_names = intersect(fargs, parnames) if fname in parnames: - print "Problem with function definition", fname + print("Problem with function definition", fname) raise ValueError("Unrecoverable clash between parameter names and aux fn name") if common_names == []: new_fnspecs[fname] = (fargs, fspec) @@ -2483,7 +2476,7 @@ new_fnspecs[fname] = (remain(fargs, parnames), fspec) new_varspecs = {} - for vname, vspec in varspecs.iteritems(): + for vname, vspec in varspecs.items(): q = QuantSpec('__temp__', vspec) # only update use of functions both changed and used in the varspecs used_fns = intersect(q.parser.tokenized, changed_fns) @@ -2507,7 +2500,7 @@ if any([p in qarg for p in parnames]): # do not put raw parameter name arguments into new arg list #raise ValueError("Cannot process argument to aux fn %s"%f) - print "Warning: some auxiliary function parameters clash in function %s" %f + print("Warning: some auxiliary function parameters clash in function %s" %f) new_args_list.append(arg) elif arg not in parnames: # do not put raw parameter name arguments into new arg list @@ -2526,8 +2519,8 @@ try: f = open(specfilename, 'r') s = f.read() - except IOError, e: - print 'File error:', str(e) + except IOError as e: + print('File error:', str(e)) raise f.close() return s --- ./PyDSTool/Interval.py (original) +++ ./PyDSTool/Interval.py (refactored) @@ -17,9 +17,9 @@ # supporting finitely-sampled real ranges. ## PyDSTool imports -from utils import * -from common import * -from errors import * +from .utils import * +from .common import * +from .errors import * ## Other imports from numpy import Inf, NaN, isfinite, isinf, isnan, array, sign, linspace, arange @@ -141,7 +141,7 @@ info(self.__dict__, "Interval " + self.name, recurseDepthLimit=1+verboselevel) else: - print self.__repr__() + print(self.__repr__()) # Return all the interval's relevant data in a tuple @@ -503,7 +503,7 @@ intervalsize = self._hival - self._loval assert isfinite(intervalsize), "Interval must be finite" if dt > intervalsize: - print "Interval size = %f, dt = %f"%(intervalsize, dt) + print("Interval size = %f, dt = %f"%(intervalsize, dt)) raise ValueError('dt must be smaller than size of interval') if dt <= 0: raise ValueError('Must pass dt >= 0') @@ -526,8 +526,8 @@ raise ValueError("dt must be an integer for integer " "intervals") if strict: - print "Warning: 'strict' option is invalid for integer " + \ - "interval types" + print("Warning: 'strict' option is invalid for integer " + \ + "interval types") if avoidendpoints: loval = self._loval+1 hival = self._hival-1 @@ -536,7 +536,7 @@ else: loval = self._loval hival = self._hival - samplelist = range(loval, hival+1, dt) + samplelist = list(range(loval, hival+1, dt)) # extra +1 on hival because of python range() policy! else: raise TypeError("Unsupported value type") @@ -560,8 +560,8 @@ #assert not isnan(loval) and not isnan(hival), \ # "Cannot specify NaN as interval endpoiRefactoringTool: Refactored ./PyDSTool/MProject.py nt" if not loval < hival: - print "set() was passed loval = ", loval, \ - " and hival = ", hival + print("set() was passed loval = ", loval, \ + " and hival = ", hival) raise PyDSTool_ValueError('Interval endpoints must be ' 'given in order of increasing size') self._intervalstr = '['+str(loval)+',' \ @@ -600,7 +600,7 @@ self._hival = arg self.defined = True else: - print "Error in argument: ", arg, "of type", type(arg) + print("Error in argument: ", arg, "of type", type(arg)) raise PyDSTool_TypeError('Interval spec must be a numeric or ' 'a length-2 sequence type') @@ -676,7 +676,7 @@ def info(self, verboselevel=1): - print self._infostr(verboselevel) + print(self._infostr(verboselevel)) def __copy__(self): --- ./PyDSTool/MProject.py (original) +++ ./PyDSTool/MProject.py (refactored) @@ -10,10 +10,10 @@ import numpy as npy # PyDSTool imports -import Model, Generator, Events, ModelSpec, ModelConstructor, Symbolic, \ +from . import Model, Generator, Events, ModelSpec, ModelConstructor, Symbolic, \ Trajectory -import utils, common, parseUtils -from errors import * +from . import utils, common, parseUtils +from .errors import * # -------------------- @@ -300,7 +300,7 @@ self.trans_gen.changelog = copy.copy(self.changelog) return self.trans_gen else: - print "Remaining free symbols: ", freeSymbols + print("Remaining free symbols: ", freeSymbols) raise PyDSTool_ValueError("New Generator spec cannot be committed") @@ -382,7 +382,7 @@ self.trans_model.changelog = copy.copy(self.changelog) return self.trans_model else: - print "Internal interface inconsistencies: ", inconsistencies + print("Internal interface inconsistencies: ", inconsistencies) raise PyDSTool_ValueError("New Model spec cannot be committed") @@ -458,7 +458,7 @@ mdesc = copy.deepcopy(self._mReg[name]) except KeyError: raise KeyError("No such model description") - for gd in mdesc.generatorspecs.values(): + for gd in list(mdesc.generatorspecs.values()): gd.modelspec.flattenSpec(ignoreInputs=True, force=True) filt_keys = ('userevents', 'userfns', 'unravelInfo', 'inputs', 'checklevel', 'activateAllBounds', @@ -484,7 +484,7 @@ mc = ModelConstructor.ModelConstructor(mdesc.name, **common.filteredDict(dict(mdesc), filt_keys)) assert len(mdesc.generatorspecs) > 0, "No Generator descriptions found" - for gdname, gd in mdesc.generatorspecs.iteritems(): + for gdname, gd in mdesc.generatorspecs.items(): if gd.userEvents is not None: mc.addEvents(gdname, gd.userEvents) if gd.userFunctions is not None: @@ -522,7 +522,7 @@ __str__ = __repr__ def info(self, verboselevel=1): - print self._infostr(verboselevel) + print(self._infostr(verboselevel)) # ----------------------------------------------------------------------------- @@ -599,16 +599,16 @@ display_error = self.pars.verbose_level > 0 or self.pars.debug if display_error: exceptionType, exceptionValue, exceptionTraceback = sys.exc_info() - print "******************************************" - print "Problem evaluating feature:", self.name - print " ", exceptionType, exceptionValue + print("******************************************") + print("Problem evaluating feature:", self.name) + print(" ", exceptionType, exceptionValue) for line in traceback.format_exc().splitlines()[-12:-1]: - print " " + line - print " originally on line:", traceback.tb_lineno(exceptionTraceback) + print(" " + line) + print(" originally on line:", traceback.tb_lineno(exceptionTraceback)) if self.pars.debug: #and self.pars.verbose_level > 1: raise else: - print "(Proceeding as 'unsatisfied')\n" + print("(Proceeding as 'unsatisfied')\n") satisfied = False if hasattr(self, 'metric'): self.metric.results = self.pars.penalty * \ @@ -708,10 +708,10 @@ assert isinstance(sf, feature), \ "Only define quantitative or qualitative features" self.subfeatures = subfeatures - self._namemap = dict(zip([sf.name for sf in subfeatures], - subfeatures)) + self._namemap = dict(list(zip([sf.name for sf in subfeatures], + subfeatures))) elif isinstance(subfeatures, dict): - for sfname, sf in subfeatures.items(): + for sfname, sf in list(subfeatures.items()): assert isinstance(sf, feature), \ "Only define quantitative or qualitative features" self.subfeatures = subfeatures @@ -733,13 +733,13 @@ else: feats.append(self) # continue gathering from sub-features - for sf in self._namemap.values(): + for sf in list(self._namemap.values()): sf._residual_info(feats, sizes) def __str__(self): s = "Feature %s "%self.name - if len(self._namemap.keys()) > 0: - s += "- " + str(self._namemap.keys()) + if len(list(self._namemap.keys())) > 0: + s += "- " + str(list(self._namemap.keys())) return s __repr__ = __str__ @@ -790,7 +790,7 @@ sf.super_results.update(self.results) sf.reset_metric() if self.pars.verbose_level > 1: - print "feature_node.evaluate: sf=", sf + print("feature_node.evaluate: sf=", sf) error_raised = False try: new_result = sf(target) @@ -807,7 +807,7 @@ # for potential use by a residual function satisfied = satisfied and new_result if error_raised: - print " ... error raised" + print(" ... error raised") if hasattr(self, 'metric'): # kludgy penalty function in lieu of something smarter if sf.metric.results is None: @@ -823,7 +823,7 @@ self.ref_traj = ref_traj self.postprocess_ref_traj() if isinstance(self.subfeatures, dict): - sfs = self.subfeatures.values() + sfs = list(self.subfeatures.values()) else: sfs = self.subfeatures for sf in sfs: @@ -892,7 +892,7 @@ # False (unwanted feature) self.namemap = {} try: - for f, c in feature_composition_dict.iteritems(): + for f, c in feature_composition_dict.items(): assert isinstance(c, bool), \ "Feature composition dictionary requires boolean values" assert isinstance(f, (ql_feature_leaf, qt_feature_leaf, @@ -917,13 +917,13 @@ return True def keys(self): - return self.namemap.keys() + return list(self.namemap.keys()) def values(self): - return self.namemap.values() + return list(self.namemap.values()) def items(self): - return self.namemap.items() + return list(self.namemap.items()) def __getitem__(self, name): return self.namemap[name] @@ -935,14 +935,14 @@ """Set reference trajectory for the features (if used, otherwise will be ignored or overridden in feature _local_init methods). """ - for f,c in self.fcd.iteritems(): + for f,c in self.fcd.items(): f.set_ref_traj(ref_traj) def evaluate(self, target): """Apply conditions to trajectory segments and returns True if all are satisfied.""" satisfied = True - for f,c in self.fcd.iteritems(): + for f,c in self.fcd.items(): # have to call new separately to ensure f calcs its residual new = f(target) == c satisfied = satisfied and new @@ -953,15 +953,15 @@ def __str__(self): s = "Condition " - if len(self.namemap.keys()) > 0: - s += "- " + str(self.namemap.keys()) + if len(list(self.namemap.keys())) > 0: + s += "- " + str(list(self.namemap.keys())) return s __repr__ = __str__ def _find_idx(self): min_ix = npy.Inf - for f in self.fcd.keys(): + for f in list(self.fcd.keys()): f_ix = f._find_idx() if f_ix is not None and f_ix < min_ix: min_ix = f_ix @@ -976,16 +976,16 @@ #feats and sizes updated in place feats = [] sizes = [] - for f in self.fcd.keys(): + for f in list(self.fcd.keys()): f._residual_info(feats, sizes) - return {'features': dict(zip(feats,sizes)), + return {'features': dict(list(zip(feats,sizes))), 'total_size': sum(sizes)} def collate_results(self, result_name, merge_lists=False, feature_names=None): res = [] if feature_names is None: - feature_list = self.fcd.keys() + feature_list = list(self.fcd.keys()) else: feature_list = [self.namemap[f] for f in feature_names] for f in feature_list: @@ -1020,12 +1020,12 @@ metric_features = {} res_feature_list = [] tot_size = 0 - for test_mi, ref_mi_class in self.interfaces.iteritems(): + for test_mi, ref_mi_class in self.interfaces.items(): # list of suitable features for each test_mi metric_features[test_mi] = test_mi.conditions._residual_info() tot_size += metric_features[test_mi]['total_size'] res_feature_list.extend([(test_mi, f) for f in \ - metric_features[test_mi]['features'].keys()]) + list(metric_features[test_mi]['features'].keys())]) self.metric_features = metric_features self.res_feature_list = res_feature_list self.res_len = tot_size @@ -1045,9 +1045,9 @@ self.weight_index_mapping = {} self.feat_weights = {} ix = 0 - for test_mi, feat_dict in self.metric_features.iteritems(): + for test_mi, feat_dict in self.metric_features.items(): self.weight_index_mapping[test_mi] = {} - for f, size in feat_dict['features'].iteritems(): + for f, size in feat_dict['features'].items(): self.weight_index_mapping[test_mi][f] = (ix, ix+size) # weights are constant for a given feature self.feat_weights[(test_mi, f)] = self.weights[ix] @@ -1057,10 +1057,10 @@ """Set weights for a single feature given as an (interface, feature) pair, setting all others to zero.""" wdict = {} - for test_mi, feat_dict in self.metric_features.iteritems(): + for test_mi, feat_dict in self.metric_features.items(): if test_mi != feat[0]: continue - w = {}.fromkeys(feat_dict['features'].keys(), 0) + w = {}.fromkeys(list(feat_dict['features'].keys()), 0) if feat[1] in w: w[feat[1]] = weight wdict[test_mi] = w @@ -1074,20 +1074,20 @@ Features and model interfaces must correspond to those declared for the context. """ - for test_mi, fs in weight_dict.iteritems(): + for test_mi, fs in weight_dict.items(): try: - flist = self.metric_features[test_mi]['features'].keys() + flist = list(self.metric_features[test_mi]['features'].keys()) except KeyError: raise AssertionError("Invalid test model interface") if isinstance(fs, common._num_types): feat_dict = {}.fromkeys(flist, fs) elif isinstance(fs, dict): assert npy.alltrue([isinstance(w, common._num_types) for \ - w in fs.values()]), "Invalid scalar weight" - assert npy.alltrue([f in flist for f in fs.keys()]), \ + w in list(fs.values())]), "Invalid scalar weight" + assert npy.alltrue([f in flist for f in list(fs.keys())]), \ "Invalid features given for this test model interface" feat_dict = fs - for f, w in feat_dict.iteritems(): + for f, w in feat_dict.items(): self.feat_weights[(test_mi, f)] = w # update weight value start_ix, end_ix = self.weight_index_mapping[test_mi][f] @@ -1097,8 +1097,8 @@ """Show detail of feature -> residual mapping for a given residual vector.""" i = 0 - for test_mi, feat_dict in self.metric_features.iteritems(): - print "Test model interface:", test_mi + for test_mi, feat_dict in self.metric_features.items(): + print("Test model interface:", test_mi) for f in feat_dict['features']: if self.feat_weights[(test_mi, f)] == 0: continue @@ -1108,12 +1108,12 @@ # ' unweighted:' is 13 chars long extra_space_w = " "*max([0, 13-len(f_str)]) extra_space_unw = " "*max([0, len(f_str)-13]) - print f_str + extra_space_w , resvec[i:i+len_w] + print(f_str + extra_space_w , resvec[i:i+len_w]) try: - print " unweighted:" + extra_space_unw, \ - resvec[i:i+len_w]/self.weights[ix0:ix1] + print(" unweighted:" + extra_space_unw, \ + resvec[i:i+len_w]/self.weights[ix0:ix1]) except ZeroDivisionError: - print " (unweighted values unavailable)" + print(" (unweighted values unavailable)") i += len_w def _map_to_features(self, x): @@ -1124,7 +1124,7 @@ """ out = {} i = 0 - for test_mi, feat_dict in self.metric_features.iteritems(): + for test_mi, feat_dict in self.metric_features.items(): for f in feat_dict['features']: if self.feat_weights[(test_mi, f)] == 0: continue @@ -1157,9 +1157,9 @@ if self.debug_mode: raise else: - print "******************************************" - print "Problem evaluating interface", test_mi, "on ", ref_mi - print " ", sys.exc_info()[0], sys.exc_info()[1] + print("******************************************") + print("Problem evaluating interface", test_mi, "on ", ref_mi) + print(" ", sys.exc_info()[0], sys.exc_info()[1]) new_result = False # must create new_res first, to ensure all interfaces are # evaluated (to create their results for possible post-processing) @@ -1218,7 +1218,7 @@ except KeyboardInterrupt: raise except: - print "Failed to find trajectory values for given variable name: %s"%self.pars.varname + print("Failed to find trajectory values for given variable name: %s"%self.pars.varname) raise self.results.output = pts return all(self.results.output==1) @@ -1536,9 +1536,9 @@ except KeyboardInterrupt: raise except: - print "RefactoringTool: Refactored ./PyDSTool/Model.py Model interface compute_traj method for model " + \ - "'%s' failed" % self.model.name - print sys.exc_info()[0], sys.exc_info()[1] + print("Model interface compute_traj method for model " + \ + "'%s' failed" % self.model.name) + print(sys.exc_info()[0], sys.exc_info()[1]) return False else: return True @@ -1687,17 +1687,17 @@ ("Query argument must be a single string") _keylist = ['orig_name', 'in_description'] if querykey not in _keylist: - print 'Valid query keys are:', _keylist + print('Valid query keys are:', _keylist) raise TypeError('Query key '+querykey+' is not valid') if querykey == 'orig_name': res = [] - for name, regentry in self.descs.iteritems(): + for name, regentry in self.descs.items(): if regentry.orig_name == value: res.append(name) return res if querykey == 'in_description': res = [] - for name, regentry in self.descs.iteritems(): + for name, regentry in self.descs.items(): if value in regentry.description: res.append(name) return res --- ./PyDSTool/Model.py (original) +++ ./PyDSTool/Model.py (refactored) @@ -36,17 +36,17 @@ # ---------------------------------------------------------------------------- ## PyDSTool imports -import Generator, Events, MProject -from utils import * -from common import * -from errors import * -from Interval import * -from Trajectory import * -from Variable import * -from Points import * -from ModelSpec import * -from Symbolic import isMultiRef -from parseUtils import isHierarchicalName, NAMESEP, mapNames, symbolMapClass +from . import Generator, Events, MProject +from .utils import * +from .common import * +from .errors import * +from .Interval import * +from .Trajectory import * +from .Variable import * +from .Points import * +from .ModelSpec import * +from .Symbolic import isMultiRef +from .parseUtils import isHierarchicalName, NAMESEP, mapNames, symbolMapClass ## Other imports import math, sys @@ -119,8 +119,8 @@ # verify whether event exists and was flagged in associated model try: evpts = traj.getEvents(self.pars.bd_eventname) - except ValueError, errinfo: - print errinfo + except ValueError as errinfo: + print(errinfo) raise RuntimeError("Could not find flagged events for this trajectory") try: evpt = evpts[self.pars.coordname] @@ -132,8 +132,8 @@ if self.pars.abseps > 0: # would like to re-evaluate event at its threshold+abseps, but # leave for now - print "Warning -- Boundary containment feature %s:"%self.name - print " Check for uncertain case using events not implemented" + print("Warning -- Boundary containment feature %s:"%self.name) + print(" Check for uncertain case using events not implemented") self.results.output = None self.results.uncertain = False else: @@ -145,8 +145,8 @@ if self.pars.abseps > 0: # would like to re-evaluate event at its threshold+abseps, but # leave for now - print "Warning -- Boundary containment feature %s:"%self.name - print " Check for uncertain case using events not implemented" + print("Warning -- Boundary containment feature %s:"%self.name) + print(" Check for uncertain case using events not implemented") self.results.output = evpt[0] # only use first event (in case not Terminal) self.results.uncertain = False else: @@ -168,7 +168,7 @@ diffs = [p - self.pars.thresh for p in \ traj.sample(coords=self.pars.coordname)] if self.pars.verbose_level > 1: - print "%s diffs in coord %s ="%(self.name,self.pars.coordname), diffs + print("%s diffs in coord %s ="%(self.name,self.pars.coordname), diffs) res_strict = array([sign(d) \ == self.pars.interior_dirn for d in diffs]) satisfied_strict = alltrue(res_strict) @@ -281,7 +281,7 @@ def evaluate(self, traj): # Arg is a traj! - for sf in self.subfeatures.values(): + for sf in list(self.subfeatures.values()): self.propagate_verbosity(sf) sf.super_pars = self.pars sf.super_results = self.results @@ -289,7 +289,7 @@ xlo_test = xlo_bc(traj) if xlo_bc.results.uncertain: if self.pars.verbose_level > 0: - print "Lo bd uncertain" + print("Lo bd uncertain") if self.isdiscrete: # accept uncertain case for discrete domain xlo_test = True @@ -300,14 +300,14 @@ xhi_test = xhi_bc(traj) if xhi_bc.results.uncertain: if self.pars.verbose_level > 0: - print "Hi bd uncertain" + print("Hi bd uncertain") if self.isdiscrete: # accept uncertain case for discrete domain xhi_test = True else: # check transversality at critical (boundary) value of domain xhi_test = self.subfeatures['dx_test_hi'](traj) - for sf in self.subfeatures.values(): + for sf in list(self.subfeatures.values()): self.results[sf.name] = sf.results return xlo_test and xhi_test @@ -318,9 +318,9 @@ # Trajectory satified domain conditions! return None lowest_idx = Inf - for sfname, sf in self.subfeatures.items(): + for sfname, sf in list(self.subfeatures.items()): if self.pars.verbose_level > 0: - print "\n", sfname, sf.results + print("\n", sfname, sf.results) try: res = list(self.results[sfname].output) except AttributeError: @@ -329,7 +329,7 @@ if sf.results.satisfied: continue if self.pars.verbose_level > 0: - print res + print(res) # Find first index at which value is non-zero. # Will not raise ValueError because test satisfaction # was already checked, so must have a zero crossing @@ -369,7 +369,7 @@ raise RuntimeError("Only use HybridModel or NonHybridModel classes") if len(a) > 0: if len(a) == 1 and isinstance(a[0], dict): - if intersect(a[0].keys(),kw.keys()) != []: + if intersect(list(a[0].keys()),list(kw.keys())) != []: raise ValueError("Cannot have initialization keys " "common to both dictionary and keyword arguments") kw.update(a[0]) @@ -404,7 +404,7 @@ # Using registry provides a shortcut for accessing a sub-model regardless # of whether it's a Generator or a Model class self.registry = {} - for name, infodict in self.modelInfo.iteritems(): + for name, infodict in self.modelInfo.items(): # set super model tag of ds object (which is either a # ModelInterface or Generator) try: @@ -477,7 +477,7 @@ def sub_models(self): """Return a list of all sub-model instances (model interfaces or generators)""" - return self.registry.values() + return list(self.registry.values()) def _makeDefaultVarNames(self): """Return default observable, internal, and auxiliary variable names @@ -485,7 +485,7 @@ obsvars = [] auxvars = [] all_known_varnames = [] - for infodict in self.modelInfo.values(): + for infodict in list(self.modelInfo.values()): varnames = infodict['dsi'].query('variables') all_known_varnames.extend(varnames) auxvarnames = infodict['dsi'].query('auxvariables') @@ -510,7 +510,7 @@ # that uses _ versions of hierarchical names that are used natively # here. self.pars = {} - for model in self.registry.values(): + for model in list(self.registry.values()): try: self.pars.update(model.query('pars')) except AttributeError: @@ -525,7 +525,7 @@ target language code for the specifications. 'modelspec' refers to the pre-compiled abstract specifications of the model.""" if target is None: - print "Use showInfo() to find names of defined sub-models" + print("Use showInfo() to find names of defined sub-models") return else: showAll = type=='' @@ -548,19 +548,19 @@ raise ValueError("Model named %s is not known"%target) def showSpec(self): - for ds in self.registry.values(): + for ds in list(self.registry.values()): ds.showSpec() def showAuxSpec(self): - for ds in self.registry.values(): + for ds in list(self.registry.values()): ds.showAuxSpec() def showAuxFnSpec(self): - for ds in self.registry.values(): + for ds in list(self.registry.values()): ds.showAuxFnSpec() def showEventSpec(self): - for ds in self.registry.values(): + for ds in list(self.registry.values()): ds.showEventSpec() def current_defining_args(self): @@ -634,9 +634,9 @@ assert isinstance(querykey, str), \ ("Query argument must be a single string") if querykey not in self._querykeys: - print 'Valid query keys are:', self._querykeys - print "('events' key only queries model-level events, not those" - print " inside sub-models)" + print('Valid query keys are:', self._querykeys) + print("('events' key only queries model-level events, not those") + print(" inside sub-models)") if querykey != '': raise TypeError('Query key '+querykey+' is not valid') if querykey in ['pars', 'parameters']: @@ -645,7 +645,7 @@ result = copy.copy(self.icdict) elif querykey == 'events': result = {} - for dsName, model in self.registry.iteritems(): + for dsName, model in self.registry.items(): try: result.update(model.eventstruct.events) except AttributeError: @@ -658,12 +658,12 @@ elif querykey in ['vardomains', 'xdomains']: result = {} # accumulate domains from each sub-model for regular variables - for model in self.registry.values(): + for model in list(self.registry.values()): vardoms = model.query('vardomains') if len(result)==0: result.update(vardoms) else: - for vname, vdom in result.iteritems(): + for vname, vdom in result.items(): if vdom.issingleton: # singleton vdom_lo = vdom.get() @@ -682,17 +682,17 @@ result[vname]._abseps = vdom._abseps result[vname] = vdom # remaining vars are promoted aux vars - for vname in remain(self.allvars, result.keys()): + for vname in remain(self.allvars, list(result.keys())): result[vname] = Interval(vname, float, [-Inf, Inf]) elif querykey in ['pardomains', 'pdomains']: result = {} # accumulate domains from each sub-model for regular variables - for model in self.registry.values(): + for model in list(self.registry.values()): pardoms = model.query('pardomains') if len(result)==0: result.update(pardoms) else: - for pname, pdom in result.iteritems(): + for pname, pdom in result.items(): if pdom.issingleton: # singleton pdom_lo = pdom.get() @@ -713,7 +713,7 @@ elif querykey in ['auxvars', 'auxvariables']: result = copy.copy(self.auxvars) elif querykey == 'abseps': - result = min([ds.query('abseps') for ds in self.registry.values()]) + result = min([ds.query('abseps') for ds in list(self.registry.values())]) return result def getEventMappings(self, dsName): @@ -758,7 +758,7 @@ # find out: is root of p a valid 'type' in model spec? # find all occurrences of last p allFoundNames = [] - for mspecinfo in self._mspecdict.values(): + for mspecinfo in list(self._mspecdict.values()): foundNames = searchModelSpec(mspecinfo['modelspec'], p) # don't add duplicates allFoundNames.extend(remain(foundNames,allFoundNames)) @@ -810,7 +810,7 @@ # find out: is root of p a valid 'type' in model spec? # find all occurrences of last p allFoundNames = [] - for mspecinfo in self._mspecdict.values(): + for mspecinfo in list(self._mspecdict.values()): foundNames = searchModelSpec(mspecinfo['modelspec'], p) # don't add duplicates allFoundNames.extend(remain(foundNames,allFoundNames)) @@ -847,19 +847,19 @@ # Handle initial conditions here, because compute will pass # the values on to the appropriate sub-models when they are called. if 'ics' in kw: - self.icdict.update(filteredDict(dict(kw['ics']), self.icdict.keys())) + self.icdict.update(filteredDict(dict(kw['ics']), list(self.icdict.keys()))) if 'tdata' in kw: self.tdata = kw['tdata'] if 'abseps' in kw: self._abseps = kw['abseps'] if 'inputs_t0' in kw: - for model in self.registry.values(): + for model in list(self.registry.values()): # Propagate values to sub-models. # If any values are strings they must refer to a parameter, so # here we evaluate them. We keep a record of these for later # automated updating. t0val_dict = kw['inputs_t0'] - for inp, val in t0val_dict.items(): + for inp, val in list(t0val_dict.items()): if isinstance(val, str): try: new_val = self.pars[val] @@ -884,7 +884,7 @@ self.verboselevel = kw['verboselevel'] else: raise ValueError("Verbosity level value must be 0, 1, or 2") - for model in self.registry.values(): + for model in list(self.registry.values()): # propagate to sub-models try: model.set(verboselevel=self.verboselevel) @@ -892,24 +892,24 @@ # generator doesn't support verboselevel pass if restrictDSlist == []: - restrictDSlist = self.registry.keys() + restrictDSlist = list(self.registry.keys()) # For the remaining keys, must propagate parameter changes to all # sub-models throughout modelInfo structure. # # Changed by WES 10FEB06 to handle problem of 'new' pars being # added if the parameter names do not exist in any generators - dsis = self.modelInfo.values() + dsis = list(self.modelInfo.values()) numDSs = len(dsis) # loop over keywords for key, value in filteredDict(kw, ['ics', 'tdata', 'inputs_t0', 'restrictDSlist', 'globalt0'], - neg=True).iteritems(): + neg=True).items(): # keep track of the number of errors on this keyword if isinstance(value, dict): # keep track of entry errors for this key entry_err_attr = {} entry_err_val = {} - for entrykey, entryval in value.iteritems(): + for entrykey, entryval in value.items(): entry_err_attr[entrykey] = 0 entry_err_val[entrykey] = 0 else: @@ -930,7 +930,7 @@ # only apply these keys to the restricted list continue if isinstance(value, dict): - for entrykey, entryval in value.iteritems(): + for entrykey, entryval in value.items(): try: ds.set(**{key:{entrykey:entryval}}) except PyDSTool_AttributeError: @@ -953,7 +953,7 @@ # Check that none of the entries in the dictionary caused errors # in each sub-model if isinstance(value, dict): - for entrykey, entryval in value.iteritems(): + for entrykey, entryval in value.items(): if entry_err_attr[entrykey] == numDSs: raise PyDSTool_AttributeError('Parameter does not' +\ ' exist in any sub-model: %s = %f'%(entrykey, @@ -994,9 +994,9 @@ # (e.g. after an unxpected error or ^C interruption) ##raise ValueError('No such trajectory.') l = len(trajname) - for m in self.registry.values(): + for m in list(self.registry.values()): # delete all matching pieces (of form trajname + '_' + ) - for n in m.trajectories.keys(): + for n in list(m.trajectories.keys()): if n[:l] == trajname and n[l] == '_' and n[l+1:].isdigit(): m._delTraj(trajname) else: @@ -1046,8 +1046,8 @@ xdict[endtraj._FScompatibleNamesInv(xname)] = \ endtraj.variables[xname](tend) except PyDSTool_BoundsError: - print "Value out of bounds in variable call:" - print " variable '%s' was called at time %f"%(xname, tend) + print("Value out of bounds in variable call:") + print(" variable '%s' was called at time %f"%(xname, tend)) raise return Point({'coorddict': xdict, 'coordnames': endtraj._FScompatibleNamesInv(endtraj.coordnames), @@ -1137,7 +1137,7 @@ def info(self, verboselevel=1): - print self._infostr(verboselevel) + print(self._infostr(verboselevel)) def __repr__(self): @@ -1251,9 +1251,9 @@ idx -- (optional) index into value if algorithmic parameter val is a list of values. """ - if target in self.registry.keys(): + if target in list(self.registry.keys()): algpars = self.registry[target].get('algparams') - if par in algpars.keys(): + if par in list(algpars.keys()): if isinstance(algpars[par], list): if idx is not None: if isinstance(idx, list): @@ -1291,13 +1291,13 @@ subModelList = [target] for dsName in subModelList: algpars = self.registry[dsName].get('algparams') - if par in algpars.keys(): + if par in list(algpars.keys()): # If target is a list, make sure that the input list is of the # appropriate length, otherwise warn and skip if isinstance(algpars[par], list): if isinstance(val, list): if len(algpars[par]) != len(val): - print "Warning: par %s list len (%d) in generator %s doesn't match val list len (%d). Skipping."%(par, len(algpars[par]), dsName, len(val)) + print("Warning: par %s list len (%d) in generator %s doesn't match val list len (%d). Skipping."%(par, len(algpars[par]), dsName, len(val))) continue else: algpars[par] = val @@ -1307,7 +1307,7 @@ algpars[par][x] = val else: if isinstance(val, list): - print "Warning: par %s type (%s) in generator %s doesn't match val type (%s). Skipping."%(par, type(algpars[par]), dsName, type(val)) + print("Warning: par %s type (%s) in generator %s doesn't match val type (%s). Skipping."%(par, type(algpars[par]), dsName, type(val))) else: algpars[par] = val else: @@ -1348,7 +1348,7 @@ if dsName is None: result = {} res_str = "Sub-models defined in model %s:\n" % self.name - for name, infodict in self.modelInfo.iteritems(): + for name, infodict in self.modelInfo.items(): result[name] = infodict['dsi'].model._infostr(verbosity) return res_str + pp.pprint(result) else: @@ -1600,7 +1600,7 @@ def resetEventTimes(self): """Internal method""" - for ds in self.registry.values(): + for ds in list(self.registry.values()): ds.resetEventTimes() def _set_for_hybrid_DS(self, state): @@ -1608,7 +1608,7 @@ trajectory computation. Useful to indicate that high level events should not be reset when a Generator is reused between hybrid trajectory segments.""" - for ds in self.registry.values(): + for ds in list(self.registry.values()): ds._set_for_hybrid_DS(state) def searchForNames(self, template): @@ -1618,7 +1618,7 @@ raise PyDSTool_ExistError("Cannot use this function for models" " not defined through ModelSpec") result = {} - for modelName, mspecinfo in self._mspecdict.iteritems(): + for modelName, mspecinfo in self._mspecdict.items(): # HACK to force compatibility of mspecinfo being a dict/args vs. a GDescriptor if isinstance(mspecinfo, dict): foundNames = searchModelSpec(mspecinfo['modelspec'], template) @@ -1637,14 +1637,14 @@ " not defined through ModelSpec") # all sub-models must define the same variables, so need only # to look at one - a_ds_name = self._mspecdict.keys()[0] + a_ds_name = list(self._mspecdict.keys())[0] a_ds_mspec = self._mspecdict[a_ds_name]['modelspec'] foundNames = searchModelSpec(a_ds_mspec, template) try: fspec = self.registry[a_ds_name].get('funcspec') except AttributeError: # for non-hybrid models - fspec = self.registry[a_ds_name].registry.values()[0].get('funcspec') + fspec = list(self.registry[a_ds_name].registry.values())[0].get('funcspec') # funcspec won't have its internal names converted to # hierarchical form, so do it here on the attributes we # need @@ -1667,7 +1667,7 @@ # elements for compatibility with HybridModel._findTrajInitiator: # swRules, globalConRules, nextModelName, reused (True b/c always same), # epochStateMaps, notDone - infodict = self.modelInfo.values()[0] + infodict = list(self.modelInfo.values())[0] return infodict['dsi'], infodict['swRules'], \ infodict['globalConRules'], infodict['dsi'].model.name, \ True, None, True @@ -1676,17 +1676,17 @@ """Clean up memory usage from past runs of a solver that is interfaced through a dynamic link library. This will prevent the 'continue' integration option from being accessible and will delete other data about the last integration run.""" - self.registry.values()[0].cleanupMemory() + list(self.registry.values())[0].cleanupMemory() def haveJacobian(self): """Returns True iff all objects in modelInfo have defined Jacobians.""" - return self.registry.values()[0].haveJacobian() + return list(self.registry.values())[0].haveJacobian() def haveJacobian_pars(self): """Returns True iff all objects in modelInfo have defined Jacobians.""" - return self.registry.values()[0].haveJacobian_pars() + return list(self.registry.values())[0].haveJacobian_pars() def Rhs(self, t, xdict, pdict=None, asarray=False): """Direct access to a generator's Rhs function. @@ -1700,7 +1700,7 @@ in state name alphabetical order, else a Point """ # get Generator as 'ds' - ds = self.registry.values()[0] + ds = list(self.registry.values())[0] fscm = ds._FScompatibleNames fscmInv = ds._FScompatibleNamesInv vars = ds.get('funcspec').vars # FS compatible @@ -1717,8 +1717,8 @@ # re-ordered according to alphabetical order of non-FS compatible names rhsval = array(ds.Rhs(t, x_fs, pdict))[fscm.reorder()] else: - rhsval = Point({'coorddict': dict(zip(fscmInv(vars), - ds.Rhs(t, x_fs, pdict))), + rhsval = Point({'coorddict': dict(list(zip(fscmInv(vars), + ds.Rhs(t, x_fs, pdict)))), 'coordtype': float, 'norm': self._normord}) ds.initialconditions.update(old_ics) @@ -1736,7 +1736,7 @@ asarray (Bool, optional, default False) If true, will return an array in state name alphabetical order, else a Point """ - ds = self.registry.values()[0] + ds = list(self.registry.values())[0] if not ds.haveJacobian(): raise PyDSTool_ExistError("Jacobian not defined") fscm = ds._FScompatibleNames @@ -1753,8 +1753,8 @@ if asarray: J = array(ds.Jacobian(t, x_fs, pdict))[fscm.reorder()] else: - J = Pointset({'coorddict': dict(zip(fscmInv(vars), - ds.Jacobian(t, x_fs, pdict))), + J = Pointset({'coorddict': dict(list(zip(fscmInv(vars), + ds.Jacobian(t, x_fs, pdict)))), 'coordtype': float, 'norm': self._normord}) ds.initialconditions.update(old_ics) @@ -1772,7 +1772,7 @@ asarray (Bool, optional, default False) If true, will return an array in state name alphabetical order, else a Point """ - ds = self.registry.values()[0] + ds = list(self.registry.values())[0] if not ds.haveJacobian_pars(): raise PyDSTool_ExistError("Jacobian w.r.t. pars not defined") fscm = ds._FScompatibleNames @@ -1788,8 +1788,8 @@ if asarray: Jp = array(ds.JacobianP(t, x_fs, pdict))[fscm.reorder()] else: - Jp = Pointset({'coorddict': dict(zip(fscmInv(ds.get('funcspec').pars), - ds.JacobianP(t, x_fs, pdict))), + Jp = Pointset({'coorddict': dict(list(zip(fscmInv(ds.get('funcspec').pars), + ds.JacobianP(t, x_fs, pdict)))), 'coordtype': float, 'norm': self._normord}) ds.initialconditions.update(old_ics) @@ -1807,7 +1807,7 @@ asarray (Bool, optional, default False) If true, will return an array in state name alphabetical order, else a Point """ - ds = self.registry.values()[0] + ds = list(self.registry.values())[0] if not ds.haveMass(): raise PyDSTool_ExistError("Mass matrix not defined") fscm = ds._FScompatibleNames @@ -1824,8 +1824,8 @@ if asarray: M = array(ds.MassMatrix(t, x_fs, pdict))[fscm.reorder()] else: - M = Point({'coorddict': dict(zip(fscmInv(vars), - ds.MassMatrix(t, x_fs, pdict))), + M = Point({'coorddict': dict(list(zip(fscmInv(vars), + ds.MassMatrix(t, x_fs, pdict)))), 'coordtype': float, 'norm': self._normord}) ds.initialconditions.update(old_ics) @@ -1857,8 +1857,8 @@ if asarray: A = array(ds.AuxVars(t, x_fs, pdict))[fscm.reorder()] else: - A = Point({'coorddict': dict(zip(fscmInv(ds.get('funcspec').auxvars), - ds.AuxVars(t, x_fs, pdict))), + A = Point({'coorddict': dict(list(zip(fscmInv(ds.get('funcspec').auxvars), + ds.AuxVars(t, x_fs, pdict)))), 'coordtype': float, 'norm': self._normord}) ds.initialconditions.update(old_ics) @@ -1884,12 +1884,12 @@ if self.icdict == {}: # just get i.c. from the single generator, # making sure it's non-empty - self.icdict = self.registry.values()[0].get('initialconditions') + self.icdict = list(self.registry.values())[0].get('initialconditions') if self.icdict == {}: # gen's i.c.s were empty too raise PyDSTool_ExistError("No initial conditions specified") xdict = {} - for xname, value in self.icdict.iteritems(): + for xname, value in self.icdict.items(): #if xname not in self.obsvars+self.intvars: # raise ValueError("Invalid variable name in initial " # "conditions: " + xname) @@ -1898,7 +1898,7 @@ self.icdict = xdict.copy() ## compute trajectory segment until an event or t1 is reached - gen = self.registry.values()[0] # sole entry, a Generator + gen = list(self.registry.values())[0] # sole entry, a Generator # print "N-h model before fiddling: t0_global =", t0_global, "t1_global =", t1_global t0_global += gen.globalt0 t1_global += gen.globalt0 @@ -1906,7 +1906,7 @@ if t1_global > gen.indepvariable.indepdomain[1]+t0: if isfinite(gen.indepvariable.indepdomain[1]): if self.verboselevel > 0: - print "Warning: end time was truncated to max size of specified independent variable domain" + print("Warning: end time was truncated to max size of specified independent variable domain") t1 = gen.indepvariable.indepdomain[1]+t0 else: t1 = t1_global @@ -1931,9 +1931,9 @@ try: if gen.algparams['init_step'] > t1-t0: if self.verboselevel > 0: - print "Warning: time step too large for remaining time"\ + print("Warning: time step too large for remaining time"\ + " interval. Temporarily reducing time step to " \ - + "1/10th of its previous value" + + "1/10th of its previous value") setup_pars['algparams'].update({'init_step': (t1-t0)/10}) except (AttributeError, KeyError): # system does not support this integration parameter @@ -1942,7 +1942,7 @@ # global t0 offsets are updated in case epoch state map changed them if self._inputt0_par_links != {}: t0val_dict = {} - for inp, val in self._inputt0_par_links.items(): + for inp, val in list(self._inputt0_par_links.items()): t0val_dict[inp] = self.pars[val] gen.set(inputs_t0=t0val_dict) gen.set(**setup_pars) @@ -1953,37 +1953,37 @@ #print "Entering generator %s at t0=%f, t1=%f"%(gen.name, t0, t1) try: traj = gen.compute(trajname+'_0') - except PyDSTool_ValueError, e: - print "\nError in Generator:", gen.name + except PyDSTool_ValueError as e: + print("\nError in Generator:", gen.name) gen.diagnostics.showWarnings() gen.diagnostics.showErrors() - print "Are the constituent generator absolute epsilon " - print " tolerances too small? -- this abseps =", gen._abseps + print("Are the constituent generator absolute epsilon ") + print(" tolerances too small? -- this abseps =", gen._abseps) raise except KeyboardInterrupt: raise except: - print "\nError in Generator:", gen.name + print("\nError in Generator:", gen.name) gen.diagnostics.showWarnings() gen.diagnostics.showErrors() self.diagnostics.traceback = {} - for k,v in gen.diagnostics.traceback.iteritems(): + for k,v in gen.diagnostics.traceback.items(): if isinstance(v, dict): dentry = {} - for vk, vv in v.iteritems(): + for vk, vv in v.items(): dentry[gen._FScompatibleNamesInv(vk)] = vv else: dentry = v self.diagnostics.traceback[k] = dentry if self.diagnostics.traceback != {}: - print "Traceback dictionary copied to model" + print("Traceback dictionary copied to model") raise if traj is None: raise ValueError("Generator %s failed to create a trajectory"%gen.name) else: if self._abseps is not None: assert traj.indepdomain._abseps == self._abseps - for v in traj.depdomain.values(): + for v in list(traj.depdomain.values()): assert v._abseps == self._abseps if not isparameterized(traj): raise ValueError("Generator " + gen.name + " produced a " \ @@ -1998,8 +1998,8 @@ # look at warnings etc. for any terminating events that occurred if gen.diagnostics.hasErrors() and self.verboselevel > 0: for e in gen.diagnostics.errors: - print 'Generator ' + gen.name + \ - ' in trajectory segment had errors' + print('Generator ' + gen.name + \ + ' in trajectory segment had errors') gen.diagnostics.showErrors() end_reasons = ['time'] # NB. end reason will always be 'time' for ExplicitFnGen @@ -2014,18 +2014,18 @@ if w[0] == Generator.W_TERMEVENT or \ w[0] == Generator.W_TERMSTATEBD: if self.verboselevel > 1: - print "Time:", ti_1+t0 - print 'Generator ' + gen.name + \ + print("Time:", ti_1+t0) + print('Generator ' + gen.name + \ ' had a terminal event. Details (in local ' + \ - 'system time) ...\n ' + str(w[1]) + 'system time) ...\n ' + str(w[1])) # w[1] always has t as first entry, and # either a state variable name # or a list of terminal event names as second. if isinstance(w[1][1], list): if len(w[1][1]) > 1: if self.verboselevel > 0: - print 'Warning: More than one terminal event found.' - print ' Consider altering event pars.' + print('Warning: More than one terminal event found.') + print(' Consider altering event pars.') end_reasons = [w[1][1][ri] \ for ri in range(len(w[1][1]))] else: @@ -2041,8 +2041,8 @@ # rejected. global_end_reasons = {} global_end_ixs = [] - dsi = self.modelInfo.values()[0]['dsi'] - for globalDS in self.modelInfo.values()[0]['globalConRules']: + dsi = list(self.modelInfo.values())[0]['dsi'] + for globalDS in list(self.modelInfo.values())[0]['globalConRules']: if globalDS(dsi): global_end_reasons[Inf] = \ globalDS.conditions.collate_results('reasons', @@ -2055,7 +2055,7 @@ try: final_ok_idx = globalDS.conditions._find_idx() except (AttributeError, RuntimeError): - print "Trajectory creation failed..." + print("Trajectory creation failed...") globalDS.conditions.results.info() raise PyDSTool_ExistError("Global consistency checks failed for" " model interface %s for trajectory %s"%(str(globalDS), @@ -2076,15 +2076,15 @@ # overwrite current end reason end_reasons = global_end_reasons[smallest_ok_idx] if self.verboselevel > 1: - print "End reason in %s was %s"%(self.name,str(end_reasons)) + print("End reason in %s was %s"%(self.name,str(end_reasons))) # DEBUG # print "Nonhybrid traj info:", traj.indepdomain.get(), traj.globalt0, type(traj) # print "traj vars:", traj.variables.keys(), "\n" #### Clean up if ti_1 > t1_global-t0: - print "Warning: Generator time interval exceeds prescribed limits:" - print " ... ", ti_1, " > ", t1_global-t0 + print("Warning: Generator time interval exceeds prescribed limits:") + print(" ... ", ti_1, " > ", t1_global-t0) epochEvents = {} try: epochEvents.update(gen.getEvents(asGlobalTime=True)) @@ -2108,7 +2108,7 @@ # ensure that modelInfo is a single Generator object only assert len(self.modelInfo) == 1, \ "Non-hybrid model must contain a single Generator" - infodict = self.modelInfo.values()[0] + infodict = list(self.modelInfo.values())[0] if not isinstance(infodict['dsi'], MProject.GeneratorInterface): raise TypeError("Must provide a single Generator object" " wrapped in a GeneratorInterface") @@ -2116,10 +2116,10 @@ def _infostr(self, verbose=1): if verbose > 0: outputStr = 'Non-Hybrid Model '+self.name+" containing components:" - print "Observable variables:", self.obsvars - print "Internal variables:", self.intvars - print "Auxiliary variables:", self.auxvars - name, infodict = self.modelInfo.items()[0] + print("Observable variables:", self.obsvars) + print("Internal variables:", self.intvars) + print("Auxiliary variables:", self.auxvars) + name, infodict = list(self.modelInfo.items())[0] outputStr += "\n--- Generator: "+name outputStr += "\n "+infodict['dsi'].model._infostr(verbose-1) else: @@ -2174,22 +2174,22 @@ xdict[xname] = traj.variables[xname_compat](ti_1) except RuntimeError: # traj is a hybrid traj - print "**********" - print xname, " dep domain:", traj.variables[xname_compat].depdomain.get() - print traj.depdomain[xname_compat].get() - print "indep domain:", traj.variables[xname_compat].indepdomain.get() - print "Var val at t-eps %f = "%(ti_1-1e-4), \ - traj.variables[xname_compat](ti_1-1e-4) + print("**********") + print(xname, " dep domain:", traj.variables[xname_compat].depdomain.get()) + print(traj.depdomain[xname_compat].get()) + print("indep domain:", traj.variables[xname_compat].indepdomain.get()) + print("Var val at t-eps %f = "%(ti_1-1e-4), \ + traj.variables[xname_compat](ti_1-1e-4)) raise except: - print "**********" - print xname, " dep domain:", traj.variables[xname_compat].depdomain.get() - print traj.depdomain[xname_compat].get() - print traj.trajSeq[-1].variables[xname_compat].depdomain.get() + print("**********") + print(xname, " dep domain:", traj.variables[xname_compat].depdomain.get()) + print(traj.depdomain[xname_compat].get()) + print(traj.trajSeq[-1].variables[xname_compat].depdomain.get()) raise except PyDSTool_BoundsError: - print "Value out of bounds in variable call:" - print " variable '%s' was called at time %f"%(xname, ti_1) + print("Value out of bounds in variable call:") + print(" variable '%s' was called at time %f"%(xname, ti_1)) raise @@ -2220,9 +2220,9 @@ for k in extinputs_ic: extinputs_ic[k] = dsinps[k](t0) except PyDSTool_BoundsError: - print "Cannot proceed - sub-model '" + model_interface.model.name \ + print("Cannot proceed - sub-model '" + model_interface.model.name \ + "' had an external input undefined " \ - + "at t =", t0 + + "at t =", t0) raise else: extinputs_ic = {} @@ -2258,7 +2258,7 @@ integration option from being accessible and will delete other data about the last integration run. """ - for MI in self.registry.values(): + for MI in list(self.registry.values()): MI.model.cleanupMemory() def _findTrajInitiator(self, end_reasons, partition_num, t0, xdict, @@ -2271,33 +2271,33 @@ # first time in the while loop, so set up xnames assert partition_num == 0, ("end_reasons was None on a " "non-initial epoch") - xnames = self.icdict.keys() + xnames = list(self.icdict.keys()) xnames.sort() # only for the initial Generator of a trajectory try: infodict = findTrajInitiator(self.modelInfo, t0, xdict, self.pars, self.intvars, self.verboselevel) - except PyDSTool_ValueError, errinfo: - print errinfo + except PyDSTool_ValueError as errinfo: + print(errinfo) raise PyDSTool_ExistError('No unique eligible Model found:' ' cannot continue (check active terminal event definitions' ' or error message above)') mi = infodict['dsi'] swRules = infodict['swRules'] globalConRules = infodict['globalConRules'] - missing = remain(mi.get('variables', ics=xdict, t0=t0).keys(), + missing = remain(list(mi.get('variables', ics=xdict, t0=t0).keys()), xnames+self.auxvars+self.intvars) if missing != []: raise AssertionError('Missing initial condition specifications' ' for %s' % str(missing)) - for entry, val in xdict.iteritems(): + for entry, val in xdict.items(): if not isfinite(val): - print "Warning: %s initial condition for "%mi.model.name \ - + str(entry) + " = " + str(val) + print("Warning: %s initial condition for "%mi.model.name \ + + str(entry) + " = " + str(val)) if self.verboselevel > 1: - print "\nStarting partition 0" - print "Chose initiator '%s'"%mi.model.name + print("\nStarting partition 0") + print("Chose initiator '%s'"%mi.model.name) nextModelName = None else: # find new Generator using switching rules @@ -2338,9 +2338,9 @@ epochStateMaps = None # will not be needed if nextModelName == 'terminate': if self.verboselevel > 0: - print 'Trajectory calculation for Model `'+mi.model.name\ + print('Trajectory calculation for Model `'+mi.model.name\ +'` terminated without a DS specified in switch'\ - +' rules with which to continue.' + +' rules with which to continue.') globalConRules = None notDone = False # terminates compute method elif nextModelName == mi.model.name: @@ -2361,8 +2361,8 @@ swRules = next['swRules'] globalConRules = next['globalConRules'] if self.verboselevel > 1: - print "\nStarting partition #%i"%partition_num - print "Chose model '%s'"%mi.model.name + print("\nStarting partition #%i"%partition_num) + print("Chose model '%s'"%mi.model.name) return mi, swRules, globalConRules, nextModelName, reused, \ epochStateMaps, notDone @@ -2378,9 +2378,9 @@ # for gn in modelNames])) # TEMP #print "Model: avoid copying eventstructs?" - genEvStructs = dict(zip(modelNames, + genEvStructs = dict(list(zip(modelNames, [self.modelInfo[gn]['dsi'].eventstruct \ - for gn in modelNames])) + for gn in modelNames]))) # time_range is whole time range over sequence time_range = [None, None] indepvarname = '' @@ -2444,7 +2444,7 @@ DS_t_typestr = 'discrete' # discrete time can be floats or ints traj_vars = traj._FScompatibleNamesInv(traj.variables) - assert intersect(self.allvars, traj_vars.keys()), \ + assert intersect(self.allvars, list(traj_vars.keys())), \ "variable name for traj not present in sub-model's variables" # Pick one observable variable ('varname') to test with -- they # must all have the same type. This variable must be present in @@ -2524,7 +2524,7 @@ """Returns True iff all objects in modelInfo have defined Jacobians.""" result = True - for model in self.registry.values(): + for model in list(self.registry.values()): result = result and model.haveJacobian() return result @@ -2532,7 +2532,7 @@ """Returns True iff all objects in modelInfo have defined Jacobians.""" result = True - for model in self.registry.values(): + for model in list(self.registry.values()): result = result and model.haveJacobian_pars() return result @@ -2559,8 +2559,8 @@ else: # get returns FS compatible names varnames = dsi.get('funcspec', xdict, t).vars - return Point({'coorddict': dict(zip(varnames, - dsi.Rhs(t, xdict, pdict))), + return Point({'coorddict': dict(list(zip(varnames, + dsi.Rhs(t, xdict, pdict)))), 'coordtype': float, 'norm': self._normord}) @@ -2587,8 +2587,8 @@ return dsi.Jacobian(t, xdict, pdict, asarray=True) else: varnames = dsi.get('funcspec', xdict, t).vars - return Pointset({'coorddict': dict(zip(varnames, - dsi.Jacobian(t, xdict, pdict))), + return Pointset({'coorddict': dict(list(zip(varnames, + dsi.Jacobian(t, xdict, pdict)))), 'coordtype': float, 'norm': self._normord}) else: @@ -2617,8 +2617,8 @@ return dsi.JacobianP(t, xdict, pdict, asarray=True) else: parnames = dsi.get('funcspec', xdict, t).pars - return Pointset({'coorddict': dict(zip(parnames, - dsi.JacobianP(t, xdict, pdict))), + return Pointset({'coorddict': dict(list(zip(parnames, + dsi.JacobianP(t, xdict, pdict)))), 'coordtype': float, 'norm': self._normord}) else: @@ -2646,8 +2646,8 @@ dsi.MassMatrix(t, xdict, pdict, asarray=True) else: varnames = dsi.get('funcspec', xdict, t).vars - return Point({'coorddict': dict(zip(varnames, - dsi.MassMatrix(t, xdict, pdict))), + return Point({'coorddict': dict(list(zip(varnames, + dsi.MassMatrix(t, xdict, pdict)))), 'coordtype': float, 'norm': self._normord}) @@ -2675,8 +2675,8 @@ return dsi.AuxVars(t, xdict, pdict, asarray=True) else: auxvarnames = dsi.get('funcspec', xdict, t).auxvars - return Point({'coorddict': dict(zip(auxvarnames, - dsi.AuxVars(t, xdict, pdict))), + return Point({'coorddict': dict(list(zip(auxvarnames, + dsi.AuxVars(t, xdict, pdict)))), 'coordtype': float, 'norm': self._normord}) @@ -2710,7 +2710,7 @@ raise PyDSTool_ExistError("No initial conditions specified") xdict = {} - for xname, value in self.icdict.iteritems(): + for xname, value in self.icdict.items(): if xname not in self.allvars: raise ValueError("Invalid variable name in initial " "conditions: " + xname) @@ -2760,7 +2760,7 @@ pars_copy = copy.copy(self.pars) self._applyStateMap(epochStateMaps, MI_prev, MI, traj, xdict, t0) ## if changed last MI's event delay, then change it back. - for event, delay in event_delay_record.items(): + for event, delay in list(event_delay_record.items()): event.eventdelay = delay ## temporarily set terminal events from previous in this MI to have @@ -2790,7 +2790,7 @@ # global t0 offsets are updated in case epoch state map changed them if self._inputt0_par_links != {} and pars_copy != self.pars: t0val_dict = {} - for inp, val in self._inputt0_par_links.items(): + for inp, val in list(self._inputt0_par_links.items()): t0val_dict[inp] = self.pars[val] model.set(inputs_t0=t0val_dict) @@ -2799,8 +2799,8 @@ if t1_global > indepvar.indepdomain[1]+t0: if isfinite(indepvar.indepdomain[1]): if self.verboselevel > 0: - print "Warning: end time was truncated to max size " + \ - "of specified independent variable domain" + print("Warning: end time was truncated to max size " + \ + "of specified independent variable domain") t1 = indepvar.indepdomain[1]+t0 else: t1 = t1_global @@ -2826,9 +2826,9 @@ try: if MI.get('algparams', xdict, t0)['init_step'] > t1-t0: if self.verboselevel > 0: - print "Warning: time step too large for remaining time"\ + print("Warning: time step too large for remaining time"\ + " interval. Temporarily reducing time step to " \ - + "1/10th of its previous value" + + "1/10th of its previous value") setup_pars['algparams'].update({'init_step': (t1-t0)/10}) except (AttributeError, KeyError, ValueError): # system does not support this integration parameter @@ -2855,28 +2855,28 @@ # print "DEBUG: Entering model %s at t0=%f, t1=%f"%(model.name, t0, t1) try: traj = MI.get_test_traj(force=True) - except PyDSTool_ValueError, e: - print "\nError in Model:", model.name + except PyDSTool_ValueError as e: + print("\nError in Model:", model.name) model.diagnostics.showWarnings() model.diagnostics.showErrors() - print "Are the constituent generator absolute epsilon " - print " tolerances too small? -- this abseps =", model._abseps + print("Are the constituent generator absolute epsilon ") + print(" tolerances too small? -- this abseps =", model._abseps) raise except KeyboardInterrupt: raise except: - print "\nError in Model:", model.name + print("\nError in Model:", model.name) self.diagnostics.traceback = {} - for k,v in model.diagnostics.traceback.iteritems(): + for k,v in model.diagnostics.traceback.items(): if isinstance(v, dict): dentry = {} - for vk, vv in v.iteritems(): + for vk, vv in v.items(): dentry[traj._FScompatibleNamesInv(vk)] = vv else: dentry = v self.diagnostics.traceback[k] = dentry if self.diagnostics.traceback != {}: - print "Traceback dictionary copied to model" + print("Traceback dictionary copied to model") raise # ensure this is reset to False model._set_for_hybrid_DS(False) @@ -2899,11 +2899,11 @@ # this is a local time ti_1 = time_interval[1] if self.verboselevel > 1: - print "\nt0=", t0, "traj.globalt0=", traj.globalt0 - print "traj.indepdomain = ", traj.indepdomain.get() - for vn, v in traj.variables.items(): - print vn + ":", v.trajirange, v.indepdomain.get() - print "Last point of traj %s was: "%traj.name, traj(ti_1) + print("\nt0=", t0, "traj.globalt0=", traj.globalt0) + print("traj.indepdomain = ", traj.indepdomain.get()) + for vn, v in list(traj.variables.items()): + print(vn + ":", v.trajirange, v.indepdomain.get()) + print("Last point of traj %s was: "%traj.name, traj(ti_1)) # update original copy of the model with new event times during # this trajectory, for high level event detection to be able to check # eventinterval for terminal events between hybrid steps @@ -2917,8 +2917,8 @@ # look at warnings etc. for any terminating events that occurred if model.diagnostics.hasErrors() and self.verboselevel > 0: for e in model.diagnostics.errors: - print 'Model ' + model.name + \ - ' in trajectory segment had errors' + print('Model ' + model.name + \ + ' in trajectory segment had errors') model.diagnostics.showErrors() # default end reason is time (may be overwritten) end_reasons = ['time'] @@ -2933,18 +2933,18 @@ if w[0] == Generator.W_TERMEVENT or \ w[0] == Generator.W_TERMSTATEBD: if self.verboselevel > 1: - print "Time:", ti_1+t0 - print 'Model ' + model.name + \ + print("Time:", ti_1+t0) + print('Model ' + model.name + \ ' had a terminal event. Details (in local ' + \ - 'system time) ...\n ' + str(w[1]) + 'system time) ...\n ' + str(w[1])) # w[1] always has t as first entry, and # either a state variable name # or a list of terminal event names as second. if isinstance(w[1][1], list): if len(w[1][1]) > 1: if self.verboselevel > 0: - print 'Warning: More than one terminal event found.' - print ' Consider altering event pars.' + print('Warning: More than one terminal event found.') + print(' Consider altering event pars.') end_reasons = [w[1][1][ri] \ for ri in range(len(w[1][1]))] else: @@ -2973,7 +2973,7 @@ try: final_ok_idx = globalDS.conditions._find_idx() except (AttributeError, RuntimeError): - print "Trajectory creation failed..." + print("Trajectory creation failed...") globalDS.conditions.results.info() raise PyDSTool_ExistError("Global consistency checks failed for" " model interface %s for trajectory %s"%(str(globalDS), @@ -2997,7 +2997,7 @@ if new_reason != []: end_reasons = new_reason if self.verboselevel > 1: - print "End reason in %s was %s"%(self.name,str(end_reasons)) + print("End reason in %s was %s"%(self.name,str(end_reasons))) # DEBUG # print "\nTraj segment %i info:"%partition_num, traj.indepdomain.get(), traj.globalt0, type(traj) @@ -3010,8 +3010,8 @@ notDone = False if ti_1 > t1_global-t0: # We computed too far for the time interval - print "Warning: Segment time interval exceeds prescribed limits:" - print " ... ", ti_1, " > ", t1_global-t0 + print("Warning: Segment time interval exceeds prescribed limits:") + print(" ... ", ti_1, " > ", t1_global-t0) notDone = False # last Model's time == t1 should hold after successful traj computation # otherwise t1 needs to be updated according to last terminating @@ -3020,22 +3020,22 @@ if end_reasons[0] not in swRules: # there's prescribed time left to compute but no # eligible DS to transfer control to - print 'Trajectory calculation for Model `'+model.name+'` ' \ + print('Trajectory calculation for Model `'+model.name+'` ' \ +'terminated without a DS specified in the ' \ - +'switching rules from which to continue.' - print 'Perhaps a variable went out of bounds:' + +'switching rules from which to continue.') + print('Perhaps a variable went out of bounds:') model.diagnostics.showWarnings() - print 'Last reasons for stopping were: ', end_reasons - print "Trajectory calculated: " + print('Last reasons for stopping were: ', end_reasons) + print("Trajectory calculated: ") dt_sample = (ti_1-time_interval[0])/10. - print traj.sample(dt=dt_sample) + print(traj.sample(dt=dt_sample)) notDone = False raise PyDSTool_ValueError("Premature termination of " "trajectory calculation") elif swRules[end_reasons[0]][0] == 'terminate': if self.verboselevel > 0: - print 'Trajectory calculation for Model `'+model.name+'` ' \ - +'terminated.' + print('Trajectory calculation for Model `'+model.name+'` ' \ + +'terminated.') notDone = False t1 = ti_1+t0 else: @@ -3132,24 +3132,24 @@ def _validateParameters(self): pars_found = {} - for infodict in self.modelInfo.values(): + for infodict in list(self.modelInfo.values()): try: - pars_recognized = intersect(pars_found.keys(), + pars_recognized = intersect(list(pars_found.keys()), infodict['dsi'].pars) except AttributeError: # gen doesn't have any pars continue # for loop - pars_unknown = remain(infodict['dsi'].pars, pars_found.keys()) + pars_unknown = remain(infodict['dsi'].pars, list(pars_found.keys())) for parname in pars_recognized: if infodict['dsi'].pars[parname] != pars_found[parname]: - print "Inconsistent parameter values between model objects inside model" - print "probably means that they were changed during trajectory computation" - print "at discrete events: you should reset the pars when calling compute()" + print("Inconsistent parameter values between model objects inside model") + print("probably means that they were changed during trajectory computation") + print("at discrete events: you should reset the pars when calling compute()") raise ValueError("Inconsistency between parameter values" " of same name ('%s') in different constiutent Generator"%parname +\ " objects: reset during call to compute") - new_vals = dict(zip(pars_unknown, [infodict['dsi'].pars[p] \ - for p in pars_unknown])) + new_vals = dict(list(zip(pars_unknown, [infodict['dsi'].pars[p] \ + for p in pars_unknown]))) pars_found.update(new_vals) @@ -3159,7 +3159,7 @@ outputStr += "Observable variables: " + ",".join(self.obsvars) outputStr += "Internal variables: " + ",".join(self.intvars) outputStr += "Auxiliary variables: " + ",".join(self.auxvars) - for name, infodict in self.modelInfo.iteritems(): + for name, infodict in self.modelInfo.items(): outputStr += "\n--- Sub-model: "+name outputStr += "\n "+infodict['dsi'].model._infostr(verbose-1) else: @@ -3188,9 +3188,8 @@ auxdict = {} else: try: - auxdict = dict(zip(fspec.auxvars, - apply(dsi.get('AuxVars', icdict, t), - (t, icdict_local, pardict)) )) + auxdict = dict(list(zip(fspec.auxvars, + dsi.get('AuxVars', icdict, t)(*(t, icdict_local, pardict)) ))) except (ValueError, TypeError): # no auxiliary variables for this model # e.g. ExplicitFnGen has its auxvars defined through the @@ -3209,13 +3208,13 @@ """ eligibleMI = [] if len(modelInfo) == 1: - return modelInfo.values()[0] + return list(modelInfo.values())[0] outcome = {} - for infodict in modelInfo.values(): + for infodict in list(modelInfo.values()): MI = infodict['dsi'] MI_vars = MI.query('vars') xdict = filteredDict(vardict, MI_vars) - dxdt_zeros = dict(zip(xdict.keys(),[0.]*len(xdict))) + dxdt_zeros = dict(list(zip(list(xdict.keys()),[0.]*len(xdict)))) domtests = infodict['domainTests'] globalConRules = infodict['globalConRules'] model = MI.model @@ -3228,18 +3227,18 @@ dsinps = MI.get('inputs', xdict, t) if dsinps != {}: try: - input_ics = [dsinps[in_name](t) for in_name in dsinps.keys()] + input_ics = [dsinps[in_name](t) for in_name in list(dsinps.keys())] except KeyboardInterrupt: raise except: raise RuntimeError("Error in evaluating inputs for generator at" " initial condition") - pardict.update(dict(zip(dsinps.keys(), input_ics))) + pardict.update(dict(list(zip(list(dsinps.keys()), input_ics)))) icdict = copy.copy(xdict) # don't overwrite any aux vars that are treated as regular variables # at this level, but fetch other aux vars and external inputs icdict.update(filteredDict(getAuxVars(MI, t, icdict, pardict), - icdict.keys(), neg=True)) + list(icdict.keys()), neg=True)) # override icdict with any finite-valued generator # initial condition (deliberately preset in generator definition) # for non-internal variables, and any auxiliary variables that aren't @@ -3270,7 +3269,7 @@ # no Rhs for the underlying generator dxdt = dxdt_zeros else: - for vname, val in dxdt.items(): + for vname, val in list(dxdt.items()): # hack to fix NaNs showing up for VODE Rhs function # but very large finite values come back from Dopri/Radau # and Nan's mess up call to numeric_to_traj below @@ -3282,7 +3281,7 @@ # print "Temp in findTrajInitiator for %s: x, dxdt ="%MI.model.name # print icdict # print dxdt - for xname, x in icdict.iteritems(): + for xname, x in icdict.items(): # don't count time 't' or any internal variables if xname == 't' or xname in intvars or xname not in domtests: # 't' is a special value inserted into icdict, for use @@ -3294,14 +3293,14 @@ # print " discrete? ", domtests[xname].isdiscrete newtest = domtests[xname](xtraj) if verboselevel >=2: - print "\nstate dom test for '%s' @ value %f:"%(xname, icdict[xname]) - print "depdomain is ", MI.get('variables', xdict, t)[xname].depdomain.get() - print "-> test result is ", newtest + print("\nstate dom test for '%s' @ value %f:"%(xname, icdict[xname])) + print("depdomain is ", MI.get('variables', xdict, t)[xname].depdomain.get()) + print("-> test result is ", newtest) x_test = x_test and newtest g_test = True # initial value xdict = filteredDict(icdict, intvars, neg=True) - MI.test_traj = numeric_to_traj(array([xdict.values()]).T, 'ic_trajpt', - xdict.keys(), t) + MI.test_traj = numeric_to_traj(array([list(xdict.values())]).T, 'ic_trajpt', + list(xdict.keys()), t) # ensure that events are cleared in case global con rules in a MI # check for events (for when used after trajectories computed) # don't use MI.get('diagnostics', xdict, t) as that will return a copy @@ -3326,14 +3325,14 @@ globtest = False else: if verboselevel >= 2: - print "\nglobal con test for '%s' @ value %f:"%(str(gc), icdict[xname]) - print "-> test result is ", globtest + print("\nglobal con test for '%s' @ value %f:"%(str(gc), icdict[xname])) + print("-> testRefactoringTool: Refactored ./PyDSTool/ModelConstructor.py result is ", globtest) g_test = g_test and globtest if verboselevel >= 1: - print "\nModel '%s' tests..."%model.name - print " ...for initial time: " + str(t_test) - print " ...for initial state: " + str(x_test) - print " ...for global conditions: " + str(g_test) + print("\nModel '%s' tests..."%model.name) + print(" ...for initial time: " + str(t_test)) + print(" ...for initial state: " + str(x_test)) + print(" ...for global conditions: " + str(g_test)) outcome[model.name]['time dom. test'] = t_test outcome[model.name]['state dom. test'] = x_test outcome[model.name]['global con. test'] = g_test --- ./PyDSTool/ModelConstructor.py (original) +++ ./PyDSTool/ModelConstructor.py (refactored) @@ -33,11 +33,11 @@ """ # PyDSTool imports -from errors import * -from common import * -from utils import info, remain, intersect -import Model, Generator, ModelSpec, Symbolic, Events, MProject -from parseUtils import symbolMapClass, NAMESEP, isNumericToken +from .errors import * +from .common import * +from .utils import info, remain, intersect +from . import Model, Generator, ModelSpec, Symbolic, Events, MProject +from .parseUtils import symbolMapClass, NAMESEP, isNumericToken # Other imports from numpy import Inf, NaN, isfinite, array, \ @@ -53,8 +53,8 @@ # ----------------------------------------------------------------------------- -mathNameMap = dict(zip(Symbolic.allmathnames_symbolic, - Symbolic.allmathnames)) +mathNameMap = dict(list(zip(Symbolic.allmathnames_symbolic, + Symbolic.allmathnames))) class Descriptor(args): @@ -65,15 +65,15 @@ def __init__(self, **kw): self.__dict__ = filteredDict(kw, self._validKeys) - if remain(kw.keys(), self._validKeys) != []: - print "Valid keys: ", self._validKeys + if remain(list(kw.keys()), self._validKeys) != []: + print("Valid keys: ", self._validKeys) raise ValueError("Invalid keys provided for Model Descriptor") done_defs = [] - for def_key in remain(self._defaults.keys(), kw.keys()): + for def_key in remain(list(self._defaults.keys()), list(kw.keys())): def_value = self._defaults[def_key] done_defs.append(def_key) self.__dict__[def_key] = def_value - for key in remain(self._validKeys, kw.keys()+done_defs): + for key in remain(self._validKeys, list(kw.keys())+done_defs): self.__dict__[key] = None def validate(self): @@ -148,7 +148,7 @@ assert hasattr(self.generatorspecs, 'values') and \ hasattr(self.generatorspecs, 'keys') validated = alltrue([isinstance(gd, GDescriptor) for \ - gd in self.generatorspecs.values()]) + gd in list(self.generatorspecs.values())]) # !!!TO DO!!! # Check for consistency of any internal interfaces defined inconsistencies = [] @@ -159,23 +159,23 @@ vars_i_all = True pars_i_all = True inps_i_all = True - for ms in self.generatorspecs.values(): + for ms in list(self.generatorspecs.values()): all_vars = ms.modelspec.search('Var') dyn_vars = [v for v in all_vars if ms.modelspec._registry[v].obj.specType == 'RHSfuncSpec'] vars_i = alltrue([varname in self.icvalues for \ varname in dyn_vars]) pars_i = alltrue([(parname in self.parvalues or \ par.spec.specStr !='') \ - for parname, par in ms.modelspec.pars.items()]) + for parname, par in list(ms.modelspec.pars.items())]) inps_i = alltrue([inpname in self.inputs for \ inpname in ms.modelspec.inputs]) if verbose: if not vars_i: - print ms.modelspec.name, "Some ICs missing" + print(ms.modelspec.name, "Some ICs missing") if not pars_i: - print ms.modelspec.name, "Some param values missing" + print(ms.modelspec.name, "Some param values missing") if not inps_i: - print ms.modelspec.name, "Some input values missing" + print(ms.modelspec.name, "Some input values missing") vars_i_all = vars_i_all and vars_i pars_i_all = pars_i_all and pars_i inps_i_all = inps_i_all and inps_i @@ -350,7 +350,7 @@ ### Instantiate (flatten) target model structured specification ## Flatten ModelSpec self.mspec using indepvarname global and inputs # and using connectivity bindings (latter not yet implemented) - globalRefs = [self.indepvarname] + self.inputs.keys() + globalRefs = [self.indepvarname] + list(self.inputs.keys()) self.mspec.eventPars = copy.copy(self.eventPars) if not self.preFlat: @@ -361,8 +361,8 @@ except KeyboardInterrupt: raise except: - print "Problem flattening Model Spec '%s'"%self.mspec.name - print "Global refs: ", globalRefs + print("Problem flattening Model Spec '%s'"%self.mspec.name) + print("Global refs: ", globalRefs) raise else: flatspec = self.mspec.flatSpec @@ -377,17 +377,17 @@ raise ValueError("Incompatible target language between supplied" " ModelSpec and target Generator") else: - print "ModelSpec's compatible Generators:", \ - ", ".join(self.mspec.compatibleGens) - print "ModelConstructor target Generator:", self.targetGen + print("ModelSpec's compatible Generators:", \ + ", ".join(self.mspec.compatibleGens)) + print("ModelConstructor target Generator:", self.targetGen) raise ValueError("Target Generator mismatch during generator " "construction") self.targetLang = gsh.lang ## Make Generator initialization argument dictionary a = args(abseps=self.abseps) a.pars = {} - parnames = flatspec['pars'].keys() - for p, valstr in flatspec['pars'].iteritems(): + parnames = list(flatspec['pars'].keys()) + for p, valstr in flatspec['pars'].items(): if valstr == '': if FScompatibleNamesInv(p) not in self.parvalues: raise ValueError("Parameter %s is missing a value"%FScompatibleNamesInv(p)) @@ -404,7 +404,7 @@ " for '%s', value: %s"%(p,valstr)) # override any par vals set in ModelSpec with those explicitly set # here - for p, val in self.parvalues.iteritems(): + for p, val in self.parvalues.items(): try: pr = FScompatibleNames(p) except KeyError: @@ -414,7 +414,7 @@ a.pars[pr] = val if self.icvalues != {}: a.ics = {} - for v, val in self.icvalues.iteritems(): + for v, val in self.icvalues.items(): try: vr = FScompatibleNames(v) except KeyError: @@ -431,7 +431,7 @@ xdomain = {} xtype = {} pdomain = {} - for k, d in flatspec['domains'].iteritems(): + for k, d in flatspec['domains'].items(): # e.g. d == (float, Continuous, [-Inf, Inf]) if k in flatspec['vars']: if isinstance(d[2], _num_types): @@ -451,11 +451,11 @@ a.xdomain = xdomain a.pdomain = pdomain a.xtype = xtype - exp_vars = [v for (v,t) in flatspec['spectypes'].items() \ + exp_vars = [v for (v,t) in list(flatspec['spectypes'].items()) \ if t == 'ExpFuncSpec'] - rhs_vars = [v for (v,t) in flatspec['spectypes'].items() \ + rhs_vars = [v for (v,t) in list(flatspec['spectypes'].items()) \ if t == 'RHSfuncSpec'] - imp_vars = [v for (v,t) in flatspec['spectypes'].items() \ + imp_vars = [v for (v,t) in list(flatspec['spectypes'].items()) \ if t == 'ImpFuncSpec'] if gsh.specType == 'RHSfuncSpec': assert imp_vars == [], "Cannot use implicitly defined variables" @@ -473,8 +473,8 @@ varnames = remain(varnames, self.forcedAuxVars) auxvarnames = self.forcedAuxVars else: - print "Invalid auxiliary variable names:" - print invalid_auxvars + print("Invalid auxiliary variable names:") + print(invalid_auxvars) # raise ValueError("Forced auxiliary variable names were invalid") elif gsh.specType == 'ImpFuncSpec': assert rhs_vars == [], "Cannot use RHS-type variables" @@ -504,9 +504,9 @@ flatspec, self.mspec._registry, FScompatibleNames, FScompatibleNamesInv) - clash_reused = intersect(reuseTerms.keys(), self.reuseTerms.keys()) + clash_reused = intersect(list(reuseTerms.keys()), list(self.reuseTerms.keys())) if clash_reused != []: - print "Clashing terms:", clash_reused + print("Clashing terms:", clash_reused) raise ValueError("User-supplied reused terms clash with auto-" "generated terms") # second pass, this time to actually make the substitutions @@ -518,8 +518,8 @@ else: a.reuseterms = self.preReuseTerms - a.varspecs = dict(zip(varnames+auxvarnames, [flatspec['vars'][v] \ - for v in varnames+auxvarnames])) + a.varspecs = dict(list(zip(varnames+auxvarnames, [flatspec['vars'][v] \ + for v in varnames+auxvarnames]))) a.auxvars = auxvarnames a.fnspecs = self.userfns try: @@ -560,7 +560,7 @@ a.events = events # Add any additional special options (e.g. 'nobuild' directive) - for k,v in self.optDict.iteritems(): + for k,v in self.optDict.items(): if hasattr(a, k): raise KeyError("'%s' already exists as a Generator argument"%k) a.k = v @@ -581,7 +581,7 @@ return gsh.genClass(args(**filteredDict(a.__dict__, gsh.genClass._needKeys+gsh.genClass._optionalKeys))) except: - print "Problem initializing target Generator '%s'"%self.targetGen + print("Problem initializing target Generator '%s'"%self.targetGen) raise @@ -732,7 +732,7 @@ return "ModelConstructor %s"%self.name def preprocessFlatten(self): - globalRefs = [self.indepvarname] + self.inputs.keys() + globalRefs = [self.indepvarname] + list(self.inputs.keys()) for g in self._generators: gspec = self._generators[g]['modelspec'] try: @@ -741,8 +741,8 @@ except KeyboardInterrupt: raise except: - print "Problem flattening Model Spec %s"%self.mspec.name - print "Global refs: ", globalRefs + print("Problem flattening Model Spec %s"%self.mspec.name) + print("Global refs: ", globalRefs) raise self.preFlat[g] = True @@ -756,11 +756,11 @@ FScompatibleNames = flatspec['FScompatibleNames'] FScompatibleNamesInv = flatspec['FScompatibleNamesInv'] - exp_vars = [v for (v,t) in flatspec['spectypes'].items() \ + exp_vars = [v for (v,t) in list(flatspec['spectypes'].items()) \ if t == 'ExpFuncSpec'] - rhs_vars = [v for (v,t) in flatspec['spectypes'].items() \ + rhs_vars = [v for (v,t) in list(flatspec['spectypes'].items()) \ if t == 'RHSfuncSpec'] - imp_vars = [v for (v,t) in flatspec['spectypes'].items() \ + imp_vars = [v for (v,t) in list(flatspec['spectypes'].items()) \ if t == 'ImpFuncSpec'] if gsh.specType == 'RHSfuncSpec': assert imp_vars == [], "Cannot use implicitly defined variables" @@ -790,9 +790,9 @@ flatspec, gspec._registry, FScompatibleNames, FScompatibleNamesInv) - clash_reused = intersect(reuseTerms.keys(), self.reuseTerms.keys()) + clash_reused = intersect(list(reuseTerms.keys()), list(self.reuseTerms.keys())) if clash_reused != []: - print "Clashing terms:", clash_reused + print("Clashing terms:", clash_reused) raise ValueError("User-supplied reused terms clash with auto-" "generated terms") @@ -848,7 +848,7 @@ if makeEvts: gspec = self._generators[g]['modelspec'] if not self.preFlat[g]: - print "Flattening" + print("Flattening") gspec.flattenSpec() fspec = gspec.flatSpec # name maps @@ -865,7 +865,7 @@ # Make event functions for auxfns evtTypeList = expEvtTypeList for s in specList: - if s not in fspec.keys(): + if s not in list(fspec.keys()): continue # auxfns are only explicit types @@ -876,7 +876,7 @@ evtTypeList = [] checkEvtType = True - for f in fspec[s].keys(): + for f in list(fspec[s].keys()): if checkEvtType: if fspec['spectypes'][f] == 'ExpFuncSpec': evtTypeList = expEvtTypeList @@ -935,7 +935,7 @@ targetlang=targetLang, flatspec=fspec, reuseterms=reuseterms) - except ValueError, errinfo: + except ValueError as errinfo: evtSuccess = False #print "Warning: Could not make standard event " + evtName + " with definition " + evtStr #print " Original problem: ", errinfo @@ -957,7 +957,7 @@ # add event par name mappings FScNM.update(FSc_update_dict) FScNMInv.update(FScInv_update_dict) - if g in self._eventPars.keys(): + if g in list(self._eventPars.keys()): self._eventPars[g].extend(evtParList) else: self._eventPars[g] = evtParList @@ -977,7 +977,7 @@ vars[vname] = gspec.flatSpec['vars'][vname] elif v.specType == 'ExpFuncSpec': auxvars[vname] = gspec.flatSpec['vars'][vname] - varnames = vars.keys() + varnames = list(vars.keys()) varnames.sort() # RHS specs may contain aux vars, so need to substitute their # definitions from flatSpec @@ -1023,7 +1023,7 @@ vars[vname] = gspec.flatSpec['vars'][vname] elif v.specType == 'ExpFuncSpec': auxvars[vname] = gspec.flatSpec['vars'][vname] - varnames = vars.keys() + varnames = list(vars.keys()) varnames.sort() # RHS specs may contain aux vars, so need to substitute their # definitions from flatSpec @@ -1048,7 +1048,7 @@ FScompatibleNamesInv = {} genObjs = {} assert len(self._generators) > 0, "No Generator descriptions found" - for gname, geninfo in self._generators.iteritems(): + for gname, geninfo in self._generators.items(): if isinstance(geninfo, args): if isinstance(geninfo.modelspec, args): # assume geninfo is traditional string definition @@ -1062,13 +1062,13 @@ # GDescriptor already gen = self._genFromMSpec(geninfo) if gname != gen.name: - print gname, " vs.", gen.name + print(gname, " vs.", gen.name) raise ValueError("Generator name mismatch in gen descriptor") genObjs[gen.name] = gen # assume that there won't be any name clashes (there shouldn't be) FScompatibleNames.update(gen._FScompatibleNames.lookupDict) FScompatibleNamesInv.update(gen._FScompatibleNamesInv.lookupDict) - return genObjs, genObjs.keys(), FScompatibleNames, FScompatibleNamesInv + return genObjs, list(genObjs.keys()), FScompatibleNames, FScompatibleNamesInv def _genFromStrings(self, geninfodesc): genStrings = geninfodesc['modelspec'] @@ -1130,14 +1130,14 @@ # extract par values and ic values relevant to this generator genPars = {} - for p, val in self.parvalues.iteritems(): + for p, val in self.parvalues.items(): # don't bother to check that p is a valid param name # for this generator -- that will be checked by # GeneratorConstructor if p in genSpec._registry: genPars[p] = val genICs = {} - for v, val in self.icvalues.iteritems(): + for v, val in self.icvalues.items(): # don't bother to check that v is a valid variable name # for this generator -- that will be checked by # GeneratorConstructor @@ -1182,13 +1182,13 @@ # hack to allow test trajectories for one-gen models to avoid needing # pre-computation in order to test a trivial condition test_trajs = {} - for genname, gen in genObjs.iteritems(): + for genname, gen in genObjs.items(): test_trajs[genname] = None if len(genObjs)==1: # singleton generator may need non-hybrid Model class unless # it contains discrete event state changes that map to itself useMI = False # initial value - genname = genObjs.keys()[0] + genname = list(genObjs.keys())[0] if genname in self.eventmaps: for emap in self.eventmaps[genname]: if emap[1] != 'terminate': @@ -1205,7 +1205,7 @@ test_trajs[genname] = 1 else: useMI = True - for hostGen, genObj in genObjs.iteritems(): + for hostGen, genObj in genObjs.items(): if useMI: m = embed(genObj, tdata=genObj.indepvariable.depdomain.get()) @@ -1244,12 +1244,12 @@ for evname in allGenTermEvNames: genMaps.append((evname, 'terminate')) if not isfinite(genObj.indepvariable.depdomain[1]): - print "Warning: Generator %s has no termination event"%genObj.name - print "because it has an non-finite end computation time..." + print("Warning: Generator %s has no termination event"%genObj.name) + print("because it has an non-finite end computation time...") modelInfoEntries[hostGen] = makeModelInfoEntry(DSi, allDSnames, genMaps) - modelInfoDict = makeModelInfo(modelInfoEntries.values()) + modelInfoDict = makeModelInfo(list(modelInfoEntries.values())) # 3. build model mod_args = {'name': self.name, 'modelInfo': modelInfoDict, @@ -1311,7 +1311,7 @@ elif isinstance(fnTarg, dict): # for compatibility with list style of _funcs for symbolic Fun # objects, convert the string defs to symbolic form - for k, v in fnTarg.items(): + for k, v in list(fnTarg.items()): self._funcs[hostGen].append(Symbolic.Fun(v[1], v[0], k)) else: self._funcs[hostGen].append(fnTarg) @@ -1347,7 +1347,7 @@ You must have declared all generators before calling this function! """ allGenNames = [] - for gname, geninfo in self._generators.iteritems(): + for gname, geninfo in self._generators.items(): # geninfo may be an args(dict) type or a GDescriptor if isinstance(geninfo, GDescriptor): allGenNames.append(geninfo.modelspec.name) @@ -1429,7 +1429,7 @@ for infodict in dsList: assert len(infodict) == 1, \ "Incorrect length of info dictionary" - dsName = infodict.keys()[0] + dsName = list(infodict.keys())[0] if dsName not in allDSNames: allDSNames.append(dsName) returnDict.update(infodict) @@ -1437,7 +1437,7 @@ raise ValueError("clashing DS names in info " "dictionaries") try: - assert remain(infodict.values()[0].keys(), ['dsi', + assert remain(list(infodict.values())[0].keys(), ['dsi', 'swRules', 'globalConRules', 'domainTests']) == [] except AttributeError: raise TypeError("Expected dictionary in modelInfo entry") @@ -1500,7 +1500,7 @@ pars = model.query('pars') except: raise ValueError("Must pass instantiated Model") - for key, value in assignDict.items(): + for key, value in list(assignDict.items()): rhs = ModelSpec.QuantSpec('rhs', value) rhs_str = '' for tok in rhs.parser.tokenized: @@ -1547,29 +1547,29 @@ fnString = self.defString else: if len(self.assignDict) > 0: - for lhs, rhs in self.assignDict.iteritems(): + for lhs, rhs in self.assignDict.items(): if not(type(lhs)==type(rhs)==str): raise TypeError("Assignment dictionary for event " "mapping must consist of strings for " "both keys and values") fnString += "\n" + indent + ("\n"+indent).join(["%s = %s"%(l,r) \ - for l, r in self.assignDict.items()]) + for l, r in list(self.assignDict.items())]) if len(self.defString) > 0: fnString += "\n" + indent + ("\n"+indent).join(self.defString.split("\n")) if len(self.activeDict) > 0: - for evname, state in self.activeDict.iteritems(): + for evname, state in self.activeDict.items(): if not(type(evname)==str and type(state)==bool): raise TypeError("Invalid types given for setting " "active events") fnString += "\n" + indent + \ ("\n"+indent).join(["estruct.setActiveFlag('%s',%s)"%(evname,str(state)) \ - for evname, state in self.activeDict.items()]) + for evname, state in list(self.activeDict.items())]) self.defString = fnString try: - exec fnString + exec(fnString) except: - print 'Invalid function definition for event mapping:' - print fnString + print('Invalid function definition for event mapping:') + print(fnString) raise setattr(self, 'evmapping', types.MethodType(locals()['evmapping'], self, self.__class__)) @@ -1579,7 +1579,7 @@ try: del d['evmapping'] except KeyError: - print "'evmapping' local function not in self.__dict__" + print("'evmapping' local function not in self.__dict__") return d def __setstate__(self, state): @@ -1638,7 +1638,7 @@ for (name, target) in swmap_list: if isinstance(target, str): if target != 'terminate': - print name, target + print(name, target) raise AssertionError("Generators can only be used " "directly for non-hybrid systems") else: @@ -1647,10 +1647,10 @@ assert target[0] != name except (TypeError, AssertionError): # type error if not subscriptable - print name, target + print(name, target) raise AssertionError("Generators can only be used " "directly for non-hybrid systems") - for vname, var in dsi.model.variables.iteritems(): + for vname, var in dsi.model.variables.items(): if alltrue(var.depdomain.isfinite()): doms[vname] = Model.domain_test(vname+'_domtest', pars=args(coordname=vname, @@ -1665,7 +1665,7 @@ raise TypeError("Invalid type for DS interface: " "must be a GeneratorInterface or ModelInterface") # continue here only for ModelInterface - for vname, dom in model.query('vardomains').iteritems(): + for vname, dom in model.query('vardomains').items(): if alltrue(dom.isfinite()): #vname_compat = model._FScompatibleNames(vname) doms[vname] = Model.domain_test(vname+'_domtest', @@ -1677,17 +1677,17 @@ validateTransitionName(model.name, special_reasons) try: # BUG !!! should only collect terminal events - allEndReasonNames = model.query('events').keys() \ + allEndReasonNames = list(model.query('events').keys()) \ + special_reasons except AttributeError: # no events associated with the model allEndReasonNames = special_reasons if model.name not in allModelNames: - print model.name, allModelNames + print(model.name, allModelNames) raise ValueError('Sub-model`s name not in list of all ' 'available names!') if not alltrue([name not in allEndReasonNames for name in allModelNames]): - print model.name, allModelNames + print(model.name, allModelNames) raise ValueError('Sub-model names overlapped with event or ' 'variable names') allTargNames = allModelNames + ['terminate'] @@ -1728,13 +1728,13 @@ ' once in map domain') seenReasons.append(reason) if reason not in allEndReasonNames: - print "Model %s:"%model.name - print allEndReasonNames + print("Model %s:"%model.name) + print(allEndReasonNames) raise ValueError("name '"+reason+"' in map " "domain is missing") if targetName not in allTargNames: - print "Model %s:"%model.name - print allTargNames + print("Model %s:"%model.name) + print(allTargNames) raise ValueError("name '"+targetName+"' in " "map range is missing") unseen_sr = remain(allEndReasonNames, seenReasons) @@ -1746,11 +1746,11 @@ swmap_pairs.append((r, ('terminate', EvMapping()))) if len(swmap_RefactoringTool: Refactored ./PyDSTool/ModelSpec.py pairs) != len(allEndReasonNames): info(dict(swmap_pairs)) - print "(%i in total), versus:"%len(swmap_pairs) - print allEndReasonNames, "(%i in total)"%len(allEndReasonNames) - sw_keys = dict(swmap_pairs).keys() - print remain(sw_keys, allEndReasonNames) - print remain(allEndReasonNames, sw_keys) + print("(%i in total), versus:"%len(swmap_pairs)) + print(allEndReasonNames, "(%i in total)"%len(allEndReasonNames)) + sw_keys = list(dict(swmap_pairs).keys()) + print(remain(sw_keys, allEndReasonNames)) + print(remain(allEndReasonNames, sw_keys)) raise ValueError('Incorrect number of map pairs given in argument') return {model.name: {'dsi': dsi, 'domainTests': doms, 'swRules': dict(swmap_pairs), 'globalConRules': globcon_list}} @@ -1789,7 +1789,7 @@ loopCount += 1 # print "Loop count: ", loopCount tempMap = {} - for auxtok, sx in u_subsMap.iteritems(): + for auxtok, sx in u_subsMap.items(): # print "** ", auxtok if purgeDone[auxtok]: # print " Continue 1" @@ -1809,7 +1809,7 @@ u_subsMap.update(tempMap) if not purgeDone and len(auxvarnames)>0: # then must have maxed out - print "Declared auxilary variables:", auxvarnames + print("Declared auxilary variables:", auxvarnames) raise RuntimeError("You probably have an infinite loop of auxiliary " "variable inter-dependencies: recursion depth of " "more than %i encountered during model build"%loopCount) @@ -1823,7 +1823,7 @@ for u in dummyQ.usedSymbols: if u in auxvarnames: new_reusedname = "__"+u - if new_reusedname in reuseTerms.values(): + if new_reusedname in list(reuseTerms.values()): # simple way to avoid name clashes new_reusedname += '_'+str(num_reused) num_reused += 1 --- ./PyDSTool/ModelSpec.py (original) +++ ./PyDSTool/ModelSpec.py (refactored) @@ -12,15 +12,15 @@ # ---------------------------------------------------------------------------- -from __future__ import division -from common import * -from utils import info as utils_info -from parseUtils import * -from errors import * -from Symbolic import * + +from .common import * +from .utils import info as utils_info +from .parseUtils import * +from .errors import * +from .Symbolic import * from math import * -from utils import * +from .utils import * from numpy import Inf, NaN, isfinite, mod, sum from numpy import sometrue, alltrue from copy import copy, deepcopy @@ -90,7 +90,7 @@ def rename(self, newName): oldName = self.name - for robj in self._registry.values(): + for robj in list(self._registry.values()): if robj.objParentName == oldName: robj.objParentName = newName self.name = newName @@ -139,7 +139,7 @@ ## if globalRefs is None: ## print "Unresolved symbols:", self.freeSymbols ## else: - print "Unresolved symbols:", remain(self.freeSymbols, globalRefs) + print("Unresolved symbols:", remain(self.freeSymbols, globalRefs)) raise ValueError("Cannot flatten incomplete functional " "specification") if self.funcSpecDict == {} or force: @@ -148,14 +148,14 @@ except KeyboardInterrupt: raise except: - print "compileFuncSpec() failed" + print("compileFuncSpec() failed") raise fs = self.funcSpecDict # name mappings to be compatible with FuncSpec.py and python variable # naming rules: i.e. "a_name.b.x3" (ModelSpec) <-> "a_name_b_x3" (FuncSpec/python) FScompatibleNames = {} FScompatibleNamesInv = {} - for name in self._registry.keys(): + for name in list(self._registry.keys()): FScompatibleNames[name] = replaceSep(name) FScompatibleNamesInv[replaceSep(name)] = name # store for later use @@ -202,7 +202,7 @@ outfs['domains'] = {} outfs['spectypes'] = {} # mathNameMap maps title case math function names to all lower-case - mathNameMap = dict(zip(allmathnames_symbolic,allmathnames)) + mathNameMap = dict(list(zip(allmathnames_symbolic,allmathnames))) # ----- start of add_to_fs function ----- def add_to_fs(k, name, carg, i=None): # locally-defined because refers to outfs from scope of method @@ -237,7 +237,7 @@ if multiDefUnravel: # reconstruct list of full names for mrefs, e.g. 'z[i]' from 'z' # otherwise just leave the dict empty - for k, v in self.multiDefRefs.iteritems(): + for k, v in self.multiDefRefs.items(): try: ksubs = FScompatibleNames[k] except KeyError: @@ -252,14 +252,14 @@ FScompatibleNamesInv[ksubs+str(ix)] = k+str(ix) full_mref_names[ksubs+"["+v[0]+","+str(v[1])+","+str(v[2])+"]"]\ = ksubs - for k, v in fs.iteritems(): + for k, v in fs.items(): if k in quants: for c in v: - if c.name in full_mref_names.keys(): + if c.name in list(full_mref_names.keys()): # unravel defs given by pairs p in unravelDict root = full_mref_names[c.name] for p in unravelDict[root]: - for i in xrange(p[0],p[1]+1): + for i in range(p[0],p[1]+1): name = root + str(i) try: if name not in outfs[k]: @@ -292,36 +292,36 @@ defined = True # initial value if len(self.compatibleGens) == 0: if verbose: - print "'%s' ill defined: empty compatibleGens"%self.name + print("'%s' ill defined: empty compatibleGens"%self.name) return False if len(self.targetLangs) == 0: if verbose: - print "'%s' ill defined: empty targetLangs"%self.name + print("'%s' ill defined: empty targetLangs"%self.name) return False if self.isEmpty(): if verbose: - print "'%s' ill defined: empty contents"%self.name + print("'%s' ill defined: empty contents"%self.name) return False - for v in self.variables.values(): + for v in list(self.variables.values()): if not v.isDefined(verbose): if verbose: - print "... in '%s' (type %s)"%(self.name,str(self.__class__)) + print("... in '%s' (type %s)"%(self.name,str(self.__class__))) return False - for p in self.pars.values(): + for p in list(self.pars.values()): if not p.isDefined(verbose): if verbose: - print "... in '%s' (type %s)"%(self.name,str(self.__class__)) + print("... in '%s' (type %s)"%(self.name,str(self.__class__))) return False if not ignoreInputs: - for i in self.inputs.values(): + for i in list(self.inputs.values()): if not i.isDefined(verbose): if verbose: - print "... in '%s' (type %s)"%(self.name,str(self.__class__)) + print("... in '%s' (type %s)"%(self.name,str(self.__class__))) return False - for a in self.auxfns.values(): + for a in list(self.auxfns.values()): if not a.isDefined(verbose): if verbose: - print "... in '%s' (type %s)"%(self.name,str(self.__class__)) + print("... in '%s' (type %s)"%(self.name,str(self.__class__))) return False return defined @@ -373,13 +373,13 @@ results.append(type(self) == type(other)) results.append(self.name == other.name) results.append(self._registry == other._registry) - except AttributeError, e: + except AttributeError as e: if diff: - print "Type:", className(self), results - print " " + e + print("Type:", className(self), results) + print(" " + e) return False if diff: - print "Type:", className(self), results + print("Type:", className(self), results) return alltrue(results) @@ -398,26 +398,26 @@ "Invalid target language for '" + self.name + "'" if hasattr(self, 'components'): # leaf nodes do not have this - for c in self.components.values(): + for c in list(self.components.values()): assert c in self._componentNameMap, "Component name map incomplete" # assert remain(self._componentNameMap[c], # self._registry.keys()) == [] - for v in self.flatSpec['FScompatibleNamesInv'](self.variables.values()): + for v in self.flatSpec['FScompatibleNamesInv'](list(self.variables.values())): assert v in self._componentNameMap, "Variable name map incomplete" - for p in self.flatSpec['FScompatibleNamesInv'](self.pars.values()): + for p in self.flatSpec['FScompatibleNamesInv'](list(self.pars.values())): if p not in self._componentNameMap and p.name not in self.eventPars: - print "\n", self.name, self - print "Pars:", p - print p.name in self.flatSpec['FScompatibleNames'] - print p.name in self.flatSpec['FScompatibleNamesInv'] - print self.eventPars - print self.flatSpec['FScompatibleNamesInv'](p) - print "Component name map:", self._componentNameMap + print("\n", self.name, self) + print("Pars:", p) + print(p.name in self.flatSpec['FScompatibleNames']) + print(p.name in self.flatSpec['FScompatibleNamesInv']) + print(self.eventPars) + print(self.flatSpec['FScompatibleNamesInv'](p)) + print("Component name map:", self._componentNameMap) raise AssertionError("Parameter name map incomplete") i = None - for i in self.flatSpec['FScompatibleNamesInv'](self.inputs.values()): + for i in self.flatSpec['FScompatibleNamesInv'](list(self.inputs.values())): assert i in self._componentNameMap, "External input name map incomplete" - for a in self.flatSpec['FScompatibleNamesInv'](self.auxfns.values()): + for a in self.flatSpec['FScompatibleNamesInv'](list(self.auxfns.values())): assert a in self._componentNameMap, "Auxiliary function name map incomplete" # !! check that compatibleGens point to known Generator types !! # if get this far without raising exception, then valid @@ -462,11 +462,11 @@ self.auxfns[objname] = obj elif isinstance(obj, ModelSpec): if not issubclass(self.__class__, obj.compatibleContainers): - print "Component " + self.name + ": " + self.__class__.__name__ - print "Invalid sub-component " + objname \ - + " (type " + className(obj) + ") to add," - print " with compatible container types:", obj.compatibleContainers - print "Compatible sub-component types: ", self._allSubcomponentTypes + print("Component " + self.name + ": " + self.__class__.__name__) + print("Invalid sub-component " + objname \ + + " (type " + className(obj) + ") to add,") + print(" with compatible container types:", obj.compatibleContainers) + print("Compatible sub-component types: ", self._allSubcomponentTypes) raise ValueError("Incompatible sub-component type" " for object '" + objname + "'") else: @@ -487,21 +487,21 @@ # object inherits self's obj.compatibleGens = self.compatibleGens elif len(remain(obj.compatibleGens, self.compatibleGens)) > 0: - print remain(obj.compatibleGens, self.compatibleGens) + print(remain(obj.compatibleGens, self.compatibleGens)) raise ValueError("Incompatible generators found in component" " '" + obj.name + "'") if len(obj.targetLangs) == 0: # object inherits self's obj.targetLangs = self.targetLangs elif len(remain(obj.targetLangs, self.targetLangs)) > 0: - print remain(obj.targetLangs, self.targetLangs) + print(remain(obj.targetLangs, self.targetLangs)) raise ValueError("Incompatible target language in component" " '" + obj.name + "'") if obj.name in protected_allnames: raise ValueError("Name '" + obj.name + "' is a protected name") if not compareClassAndBases(obj, self._allSubcomponentTypes): - print "Valid sub-component types that have been declared:", \ - self._allSubcomponentTypes + print("Valid sub-component types that have been declared:", \ + self._allSubcomponentTypes) raise TypeError("Invalid type for object '" + obj.name + \ "' in component '" + self.name + "'") if parent_obj is None: @@ -526,7 +526,7 @@ # names that are to be added to the registry at this level. namemap = {} tracebacknames = [] - for sub_regObj in obj._registry.values(): + for sub_regObj in list(obj._registry.values()): subobj = sub_regObj.obj subobjname = self._register(subobj, depth+1, obj) # _register won't have created an entry yet @@ -547,7 +547,7 @@ # First, take out symbols defined by obj (i.e. those appearing in # its registry) from self.freeSymbols mapper = symbolMapClass(namemap) - globalized_newdefs = mapper(obj._registry.keys()) + globalized_newdefs = mapper(list(obj._registry.keys())) self.freeSymbols = remain(self.freeSymbols, globalized_newdefs) obj_freeSymbols = mapper(obj.freeSymbols) @@ -559,7 +559,7 @@ # print "Obj free (orig):", obj.freeSymbols, "(mapped)", obj_freeSymbols # the following never executes! if obj_freeSymbols != obj.freeSymbols: - print "mapped object free symbols not same as originals" + print("mapped object free symbols not same as originals") # Test code introspection for HH_spectest.py # if self.name == 'cell1' and obj.name == 'chan_s21': # # this is None, so comment out namemap[s] = snew below! @@ -575,7 +575,7 @@ # namemap[s] = snew # # TEMP # print self.name, obj.name, "namemap[%s] = %s"%(s,snew) - for sub_regObj in obj._registry.values(): + for sub_regObj in list(obj._registry.values()): subobjname = namemap[sub_regObj.obj.name] subsplit = subobjname.split(NAMESEP) # resolve the first parent of objects brought up from deep @@ -694,7 +694,7 @@ # print "new free symbols from obj:", obj_freeSymbs # print "defined:", self._registry.keys() self.freeSymbols.extend(remain(obj_freeSymbols, - self._registry.keys()+self.freeSymbols)) + list(self._registry.keys())+self.freeSymbols)) # print "resulting self.free:", self.freeSymbols # return objname in case _register is being called recursively return objname @@ -754,8 +754,8 @@ parentname = tempname[0] try: self.components[parentname].remove("".join(tempname[1:])) - except ValueError, e: - print e + except ValueError as e: + print(e) raise ValueError("Error recognizing parent object '%s' in " "sub-component '%s'"%(parentname,objname)) else: @@ -780,23 +780,23 @@ self._componentNameMap = {} self._componentTypeMap = {} nameResolver.clear(self) - for v in self.variables.values(): + for v in list(self.variables.values()): self._register(v) - for p in self.pars.values(): + for p in list(self.pars.values()): self._register(p) - for i in self.inputs.values(): + for i in list(self.inputs.values()): self._register(i) - for a in self.auxfns.values(): + for a in list(self.auxfns.values()): self._register(a) # do components, if any, last, so that self._componentNameMap is # built up properly (otherwise get validation error) if hasattr(self, 'components'): # leaf nodes do not have this - for c in self.components.values(): + for c in list(self.components.values()): self._register(c) try: self.validate() - except AssertionError, e: + except AssertionError as e: raise RuntimeError("Model spec structure inconsistent: "+str(e)) @@ -821,7 +821,7 @@ utils_info(self.__dict__, "ModelSpec " + self.name, recurseDepthLimit=1+verboselevel) else: - print self.__repr__() + print(self.__repr__()) def __repr__(self): @@ -832,19 +832,19 @@ if verbose > 0: if len(self.components) > 0: base_str += "\n Components: ( " - base_str += ", ".join([c._infostr(verbose-1) for c in self.components.values()]) + " )" + base_str += ", ".join([c._infostr(verbose-1) for c in list(self.components.values())]) + " )" if len(self.variables) > 0: base_str += "\n Variables: ( " - base_str += ", ".join([str(c) for c in self.variables.values()]) + " )" + base_str += ", ".join([str(c) for c in list(self.variables.values())]) + " )" if len(self.pars) > 0: base_str += "\n Parameters: ( " - base_str += ", ".join([str(c) for c in self.pars.values()]) + " )" + base_str += ", ".join([str(c) for c in list(self.pars.values())]) + " )" if len(self.inputs) > 0: base_str += "\n Inputs: ( " - base_str += ", ".join([str(c) for c in self.inputs.values()]) + " )" + base_str += ", ".join([str(c) for c in list(self.inputs.values())]) + " )" if len(self.auxfns) > 0: base_str += "\n Functions: ( " - base_str += ", ".join([str(c) for c in self.auxfns.values()]) + " )" + base_str += ", ".join([str(c) for c in list(self.auxfns.values())]) + " )" return base_str @@ -885,7 +885,7 @@ fsdict['vars'] = [] fsdict['pars'] = [] fsdict['auxfns'] = [] - for objname, regObj in self._registry.iteritems(): + for objname, regObj in self._registry.items(): objtype = regObj.obj.typestr+'s' add_obj = regObj.obj.renderForCode() if regObj.namemap != {}: @@ -897,11 +897,11 @@ mappedName = regObj.namemap[name] if mappedName in add_obj.freeSymbols and not \ isinstance(self._registry[mappedName].obj, (Par, Fun)): - RefactoringTool: Refactored ./PyDSTool/Points.py print "Problem with registry object:", \ - self._registry[mappedName].obj - print "in auxiliary function:", add_obj.name - print " that has free symbols:", \ - add_obj.freeSymbols + print("Problem with registry object:", \ + self._registry[mappedName].obj) + print("in auxiliary function:", add_obj.name) + print(" that has free symbols:", \ + add_obj.freeSymbols) raise TypeError("Fun '" + add_obj.name + "' " "cannot bind symbols to non-" "pars (info printed above)") @@ -920,7 +920,7 @@ # Quantity is defined if it has a specified definition # (even with unbound references) defined = ModelSpec.isDefined(self, verbose, ignoreInputs) - for c in self.components.values(): + for c in list(self.components.values()): if not c.isDefined(verbose, ignoreInputs): return False return defined @@ -932,7 +932,7 @@ def _register(self, obj, depth=0, parent_obj=None): if not compareBaseClass(obj, Quantity): - print "Bad argument %s (type %s) to register"%(str(obj), type(obj)) + print("Bad argument %s (type %s) to register"%(str(obj), type(obj))) raise TypeError("Not a valid Quantity type") return ModelSpec._register(self, obj, 0, parent_obj) @@ -947,10 +947,10 @@ assert self.isDefined(ignoreInputs=ignoreInputs), \ "Node '" + self.name + "' is not completely defined" fsdict = {} - fsdict['vars'] = [deepcopy(v) for v in self.variables.values()] - fsdict['pars'] = [deepcopy(p) for p in self.pars.values()] - fsdict['inputs'] = [deepcopy(i) for i in self.inputs.values()] - fsdict['auxfns'] = [deepcopy(a) for a in self.auxfns.values()] + fsdict['vars'] = [deepcopy(v) for v in list(self.variables.values())] + fsdict['pars'] = [deepcopy(p) for p in list(self.pars.values())] + fsdict['inputs'] = [deepcopy(i) for i in list(self.inputs.values())] + fsdict['auxfns'] = [deepcopy(a) for a in list(self.auxfns.values())] self.funcSpecDict = fsdict @@ -1126,7 +1126,7 @@ elif len(sourceList) == 0: sourceName = "" else: - print "Found: ", sourceList + print("Found: ", sourceList) raise ValueError("source list for macro resolution should have no " "more than one entry") targList_new, ctStr, opStr = resolveMacroTargets(qtemp.parser.tokenized, @@ -1210,7 +1210,7 @@ try: return self.namemap[self.objLocalName] except KeyError: - print "Namemap for '%s' is: "%self.__repr__(), self.namemap + print("Namemap for '%s' is: "%self.__repr__(), self.namemap) raise ValueError("Namemap for registry object didn't " "contain object's name " "'%s'"%self.objLocalName) --- ./PyDSTool/Points.py (original) +++ ./PyDSTool/Points.py (refactored) @@ -7,13 +7,13 @@ # ---------------------------------------------------------------------------- -from __future__ import division + ## PyDSTool imports -from utils import * -from common import * -from errors import * -from parseUtils import symbolMapClass, mapNames +from .utils import * +from .common import * +from .errors import * +from .parseUtils import symbolMapClass, mapNames ## Other imports from numpy import Inf, NaN, isfinite, array2string, r_, c_, \ @@ -96,7 +96,7 @@ kw = kwd self._parameterized = False self.labels = {} - if intersect(kw.keys(), point_keys) == []: + if intersect(list(kw.keys()), point_keys) == []: temp_kw = {} temp_kw['coorddict'] = copy(kw) kw = copy(temp_kw) @@ -118,7 +118,7 @@ coordvalues = [] if 'coorddict' in kw: vals = [] - for n, v in kw['coorddict'].iteritems(): + for n, v in kw['coorddict'].items(): # Add coord name with type checking coordnames.append(n if isinstance(n, str) else repr(n)) @@ -237,16 +237,16 @@ def makeIxMaps(self): - self._name_ix_map = dict(zip(self.coordnames, range(self.dimension))) + self._name_ix_map = dict(list(zip(self.coordnames, list(range(self.dimension))))) self._ix_name_map = copy(self.coordnames) def todict(self, aslist=False): """Convert Point to a dictionary of array values (or of list with aslist=True).""" if aslist: - return dict(zip(self._ix_name_map, self.coordarray.tolist())) - else: - return dict(zip(self._ix_name_map, self.coordarray)) + return dict(list(zip(self._ix_name_map, self.coordarray.tolist()))) + else: + return dict(list(zip(self._ix_name_map, self.coordarray))) def __contains__(self, coord): return coord in self.coordnames @@ -261,11 +261,11 @@ return d def update(self, d): - for k, v in d.iteritems(): + for k, v in d.items(): self.coordarray[self._map_names_to_ixs(k)] = v def items(self): - return zip(self._ix_name_map, self.coordarray) + return list(zip(self._ix_name_map, self.coordarray)) def iteritems(self): return iter(zip(self._ix_name_map, self.coordarray)) @@ -294,7 +294,7 @@ except TypeError: # list of strings return [self._name_ix_map[n] for n in namelist] - except KeyError, e: + except KeyError as e: raise PyDSTool_KeyError("Name not found: "+str(e)) @@ -304,8 +304,8 @@ def _force_coords_to_ixlist(self, x): if x is None: - return range(self.dimension) - elif x in xrange(self.dimension): + return list(range(self.dimension)) + elif x in range(self.dimension): # only used for recursive calls return [x] elif x in self.coordnames: @@ -313,7 +313,7 @@ return [self._name_ix_map[x]] elif isinstance(x, _seq_types): if len(x) == 0: - return range(self.dimension) + return list(range(self.dimension)) else: return [self._force_coords_to_ixlist(el)[0] for el in x] elif isinstance(x, slice): @@ -321,14 +321,14 @@ s1, s2, s3 = x.indices(stop) if s1 < 0 or s2 > self.dimension or s1 >= self.dimension: raise ValueError("Slice index out of range") - return range(s1, s2, s3) + return list(range(s1, s2, s3)) else: raise ValueError("Invalid coordinate / index: %s"%str(x) + \ " -- coord names are: %s"%str(self.coordnames)) def __call__(self, coords): - if coords in xrange(self.dimension+1): + if coords in range(self.dimension+1): if coords == self.dimension: # trap for when Point is used as an iterator, i.e. as # for x in pt -- avoids writing an __iter__ method that @@ -540,7 +540,7 @@ outputStr += c+': '+dvstr if c != self.coordnames[-1]: outputStr += "\n" - for label, infodict in self.labels.iteritems(): + for label, infodict in self.labels.items(): outputStr += "\nLabels: %s (%s)"%(label, str(infodict)) return outputStr @@ -553,7 +553,7 @@ def info(self, verboselevel=1): - print self._infostr(verboselevel) + print(self._infostr(verboselevel)) def __abs__(self): @@ -595,7 +595,7 @@ if kw != {}: raise ValueError("Cannot mix keyword dictionary and keywords") kw = kwd - if intersect(kw.keys(), point_keys) == []: + if intersect(list(kw.keys()), point_keys) == []: # creating Pointset from dictionary temp_kw = {} temp_kw['coorddict'] = copy(kw) @@ -612,8 +612,8 @@ self.indepvartype = _num_equivtype[it] except KeyError: raise TypeError('Independent variable type %s not valid'%str(it)) - vals = kw['indepvardict'].values()[0] - self.indepvarname = kw['indepvardict'].keys()[0] + vals = list(kw['indepvardict'].values())[0] + self.indepvarname = list(kw['indepvardict'].keys())[0] if isinstance(vals, _seq_types): self.indepvararray = array(vals, self.indepvartype) else: @@ -696,7 +696,7 @@ self.coordtype = _num_equivtype[ct] except KeyError: raise TypeError('Coordinate type %s not valid for Point'%str(ct)) - for c, v in kw['coorddict'].iteritems(): + for c, v in kw['coorddict'].items(): if isinstance(c, str): c_key = c else: @@ -716,7 +716,7 @@ raise TypeError("Must pass arrays, lists, or numeric types") else: coorddict[c_key] = array([v], self.coordtype) - self.coordnames = coorddict.keys() + self.coordnames = list(coorddict.keys()) # only way to order dictionary keys for array is to sort self.coordnames.sort() self.dimension = len(self.coordnames) @@ -779,10 +779,10 @@ else: coordnames = [str(cix) for cix in range(self.dimension)] if len(coordnames) != self.dimension: - print "Pointset initialization error:" - print "Found Coordnames: ", coordnames, \ - "(dimension = %s)"%len(coordnames) - print "vs. data dimension =", self.dimension + print("Pointset initialization error:") + print("Found Coordnames: ", coordnames, \ + "(dimension = %s)"%len(coordnames)) + print("vs. data dimension =", self.dimension) raise ValueError("Mismatch between number of coordnames and " "dimension of data") cs = array(coordnames) @@ -896,7 +896,7 @@ def reverse(self): """Reverse order of points *IN PLACE*.""" self.coordarray = self.coordarray[:,::-1] - self.labels.mapIndices(dict(zip(range(0,len(self)),range(len(self)-1,-1,-1)))) + self.labels.mapIndices(dict(list(zip(list(range(0,len(self))),list(range(len(self)-1,-1,-1)))))) def rename(self, coord, newcoord): """Rename a coordinate.""" @@ -908,7 +908,7 @@ self.makeIxMaps() def makeIxMaps(self): - self._name_ix_map = dict(zip(self.coordnames, range(self.dimension))) + self._name_ix_map = dict(list(zip(self.coordnames, list(range(self.dimension))))) self._ix_name_map = copy(self.coordnames) if self._parameterized: self._indepvar_ix_map = makeArrayIxMap(self.indepvararray) @@ -920,7 +920,7 @@ """Add string label to indexed point. info dictionary is optional""" if ix < 0: ix = len(self)+ix - if ix in xrange(len(self)): + if ix in range(len(self)): self.labels.update(ix, label, info) else: raise ValueError("Index out of range") @@ -1121,9 +1121,9 @@ s1, s2, s3 = ref1.indices(stop) if s1 < 0 or s2 > ls or s1 >= ls: raise ValueError("Slice index out of range") - ca = take(self.coordarray, xrange(s1, s2, s3), axis=1) + ca = take(self.coordarray, range(s1, s2, s3), axis=1) try: - ci = take(self.indepvararray, xrange(s1, s2, s3),axis=0) + ci = take(self.indepvararray, range(s1, s2, s3),axis=0) except (IndexError, AttributeError): # non-parameterized pointset pass @@ -1134,12 +1134,12 @@ lowest_ix = len(self)+lowest_ix new_cl_ixs = [i-lowest_ix for i in cl_ixs] else: - print "ref1 argument =", ref1 + print("ref1 argument =", ref1) raise TypeError("Type %s is invalid for Pointset indexing"%str(type(ref1))) ixlist = self._force_coords_to_ixlist(ref2) ca = take(ca, ixlist, axis=0) try: - cl.mapIndices(dict(zip(cl_ixs, new_cl_ixs))) + cl.mapIndices(dict(list(zip(cl_ixs, new_cl_ixs)))) except AttributeError: pass if self._parameterized: @@ -1224,7 +1224,7 @@ elif isinstance(ix, (list, ndarray)): new_cl_ixs = [ixmap[i] for i in cl_ixs] try: - labels.mapIndices(dict(zip(cl_ixs, new_cl_ixs))) + labels.mapIndices(dict(list(zip(cl_ixs, new_cl_ixs)))) except AttributeError: # empty pass @@ -1250,7 +1250,7 @@ else: labels = self.labels[ix] try: - labels.mapIndices(dict(zip(labels, [i-ix[0] for i in labels.getIndices()]))) + labels.mapIndices(dict(list(zip(labels, [i-ix[0] for i in labels.getIndices()])))) except AttributeError: # empty pass @@ -1267,7 +1267,7 @@ def __contains__(self, other): - for i in xrange(len(self)): + for i in range(len(self)): if comparePointCoords(self.__getitem__(i), other): return True return False @@ -1390,7 +1390,7 @@ lenp = len(p) vd_p = p.todict() try: - s_ixs = [self.findIndex(iva_p[i])[1]+i for i in xrange(lenp)] + s_ixs = [self.findIndex(iva_p[i])[1]+i for i in range(lenp)] except TypeError: raise ValueError("Independent variable " "values in Pointset already present") @@ -1398,7 +1398,7 @@ s_label_ixs = self.labels.getIndices() sLabelMap = {} pLabelMap = {} - for i in xrange(lenp): + for i in range(lenp): s_ix = s_ixs[i] if i in p_label_ixs: pLabelMap[i] = s_ix @@ -1406,7 +1406,7 @@ if s_label_ix >= s_ix-i: sLabelMap[s_label_ix] = s_label_ix+i+1 # for each one, list-insert new point data - for p_ix in xrange(lenp): + for p_ix in range(lenp): s_ix = s_ixs[p_ix] iva.insert(s_ix, iva_p[p_ix]) for k in self._ix_name_map: @@ -1514,18 +1514,18 @@ self.coordarray.dtype) if self._parameterized: self.indepvararray.resize(new_len) - tvals = tval[range(added_len)] + tvals = tval[list(range(added_len))] self.indepvararray[old_len:] = tvals - for tix in xrange(old_len): + for tix in range(old_len): self.coordarray[:, tix] = old_coords[:, tix] pdict = p.todict() self.coordarray[:, old_len:] = r_[[pdict[c][start_ix:] for c in self._ix_name_map]] p_labels = copy(p.labels) pixs = p.labels.getIndices() if start_ix == 1: - p_labels.mapIndices(dict(zip(pixs, [i+old_len-1 for i in pixs]))) - else: - p_labels.mapIndices(dict(zip(pixs, [i+old_len for i in pixs]))) + p_labels.mapIndices(dict(list(zip(pixs, [i+old_len-1 for i in pixs])))) + else: + p_labels.mapIndices(dict(list(zip(pixs, [i+old_len for i in pixs])))) self.labels.update(p_labels) elif isinstance(p, Point): # check p dimension and coordnames and type @@ -1564,9 +1564,9 @@ self.indepvararray.resize(new_len) self.indepvararray.resize(new_len) self.indepvararray[new_len-1] = tval - for tix in xrange(new_len-1): + for tix in range(new_len-1): self.coordarray[:, tix] = old_coords[:, tix] - for ix in xrange(self.dimension): + for ix in range(self.dimension): self.coordarray[ix,new_len-1] = p(self._ix_name_map[ix]) if len(p.labels) > 0: self.labels.update({new_len-1: p.labels}) @@ -1602,9 +1602,9 @@ def todict(self, aslist=False): """Convert Pointset to a dictionary of arrays (or of lists with aslist=True).""" if aslist: - d = dict(zip(self._ix_name_map, self.coordarray.tolist())) - else: - d = dict(zip(self._ix_name_map, self.coordarray)) + d = dict(list(zip(self._ix_name_map, self.coordarray.tolist()))) + else: + d = dict(list(zip(self._ix_name_map, self.coordarray))) if self._parameterized: d[self.indepvarname] = self.indepvararray return d @@ -1623,8 +1623,8 @@ precision = 8 lenv = len(self) if lenv > 8: - ixslo = range(0,2) - ixshi = range(lenv-2,lenv) + ixslo = list(range(0,2)) + ixshi = list(range(lenv-2,lenv)) outputStr += "\n" if self._parameterized: iv = self.indepvararray @@ -1666,7 +1666,7 @@ def info(self, verboselevel=1): - print self._infostr(verboselevel) + print(self._infostr(verboselevel)) def __copy__(self): @@ -1715,8 +1715,8 @@ try: if other._parameterized and self._parameterized: if not all(self.indepvararray == other.indepvararray): - print self.indepvararray - print other.indepvararray + print(self.indepvararray) + print(other.indepvararray) raise ValueError("Mismatched independent variable arrays") except AttributeError: pass @@ -1808,7 +1808,7 @@ # always expect the dictionary to be based on index self.by_label = DefaultDict({}) self.by_index = DefaultDict({}) - for k, v in ptlabels.iteritems(): + for k, v in ptlabels.items(): if not isinstance(k, _int_types): raise TypeError("Initialization dictionary must be keyed " "by integer indices") @@ -1816,7 +1816,7 @@ self.by_label[v][k] = {} self.by_index[k][v] = {} else: - for label, infodict in v.iteritems(): + for label, infodict in v.items(): self.by_label[label][k] = infodict self.by_index[k][label] = infodict else: @@ -1826,7 +1826,7 @@ def mapIndices(self, ixMapDict): by_index = {} ixMap = symbolMapClass(ixMapDict) - for ix, rest in self.by_index.iteritems(): + for ix, rest in self.by_index.items(): by_index[ixMap(ix)] = rest self.__init__(by_index) @@ -1835,19 +1835,19 @@ """Map labels, using a symbol map of class symbolMapClass.""" self.by_label = mapNames(themap, self.by_label) new_by_index = {} - for ix, labdict in self.by_index.iteritems(): + for ix, labdict in self.by_index.items(): new_by_index[ix] = mapNames(themap, labdict) self.by_index = new_by_index def sortByIndex(self): ixkeys = sortedDictKeys(self.by_index) - return zip(ixkeys,[self.by_index[ix] for ix in ixkeys]) + return list(zip(ixkeys,[self.by_index[ix] for ix in ixkeys])) def sortByLabel(self): labelkeys = sortedDictKeys(self.by_label) - return zip(labelkeys,[self.by_label[label] for label in labelkeys]) + return list(zip(labelkeys,[self.by_label[label] for label in labelkeys])) def getIndices(self): @@ -1880,7 +1880,7 @@ stop = key.stop or max_ixs+1 try: s1, s2, s3 = key.indices(stop) - ixs = xrange(s1, s2, s3) + ixs = range(s1, s2, s3) key = intersect(ixs, self_ixs) except TypeError: key = self_ixs @@ -1889,13 +1889,13 @@ keylabels = intersect(key, self.getLabels()) key = [] for l in keylabels: - key.extend(self.by_label[l].keys()) + key.extend(list(self.by_label[l].keys())) key = makeSeqUnique(key) elif all([isinstance(k, _int_types) for k in key]): key = intersect(key, self.getIndices()) else: raise TypeError("Invalid key type for PointInfo") - return PointInfo(dict(zip(key,[self.by_index[i] for i in key]))) + return PointInfo(dict(list(zip(key,[self.by_index[i] for i in key])))) elif key in self.by_index: return self.by_index[key] elif key in self.by_label: @@ -1968,9 +1968,9 @@ if key2 == (): # remove all labels associated with index, or vice versa if byix: - key2 = self.by_index[key1].keys() - else: - key2 = self.by_label[key1].keys() + key2 = list(self.by_index[key1].keys()) + else: + key2 = list(self.by_label[key1].keys()) if byix: for k in key2: # have to check k in dict otherwise DefaultDict creates entry! @@ -2000,14 +2000,14 @@ def update(self, key1, key2=None, info=None): if isinstance(key1, PointInfo): if key2 is None and info is None: - for k, v in key1.by_index.iteritems(): - for vk, vv in v.iteritems(): + for k, v in key1.by_index.items(): + for vk, vv in v.items(): self.update(k, vk, vv) else: raise TypeError("Invalid calling sequence to update") elif isinstance(key1, dict): if key2 is None and info is None: - for k, v in key1.iteritems(): + for k, v in key1.items(): if isinstance(k, _int_types): if k < 0: k = k + len(self.by_index) @@ -2020,7 +2020,7 @@ k3 = v[1] self.update(k, k2, k3) elif isinstance(v, dict): - for k2, k3 in v.iteritems(): + for k2, k3 in v.items(): self.update(k, k2, k3) else: raise ValueError("Invalid data for update") @@ -2054,14 +2054,14 @@ def __delitem__(self, key): if key in self.by_index: - labels = self.by_index[key].keys() + labels = list(self.by_index[key].keys()) del self.by_index[key] for label in labels: del self.by_label[label][key] if self.by_label[label] == {}: del self.by_label[label] elif key in self.by_label: - ixs = self.by_label[key].keys() + ixs = list(self.by_label[key].keys()) del self.by_label[key] for ix in ixs: del self.by_index[ix][key] @@ -2073,8 +2073,8 @@ def __eq__(self, other): try: - return all(self.by_index.keys() == other.by_index.keys()) and \ - all(self.by_label.keys() == other.by_label.keys()) + return all(list(self.by_index.keys()) == list(other.by_index.keys())) and \ + all(list(self.by_label.keys()) == list(other.by_label.keys())) except AttributeError: raise TypeError("Invalid type for comparison to PointInfo") @@ -2107,11 +2107,11 @@ def _pretty_print_label(d): """Internal utility to pretty print point label info.""" s = " %s: "%repr(d[0]) - entry_keys = d[1].keys() + entry_keys = list(d[1].keys()) ki = 0 kimax = len(entry_keys) for k in entry_keys: - keys = d[1][k].keys() + keys = list(d[1][k].keys()) if len(keys) == 0: s += "{%s: {}}"%k else: @@ -2134,9 +2134,9 @@ """ try: p1d = dict(p1) - p1dk = p1d.keys() + p1dk = list(p1d.keys()) p2d = dict(p2) - p2dk = p2d.keys() + p2dk = list(p2d.keys()) except: raise TypeError("Invalid Points, Pointsets, or dictionaries passed " "to comparePointCoords") @@ -2312,7 +2312,7 @@ raise TypeError("Must pass Pointset to this function: use " "arrayToPointset first!") infodict_usedkeys = [] - for key, info in infodict.iteritems(): + for key, info in infodict.items(): if isinstance(info, str): infodict_usedkeys += [info] elif info == []: @@ -2323,9 +2323,9 @@ allnames = copy(thepointset.coordnames) if thepointset._parameterized: allnames.append(thepointset.indepvarname) - remlist = remain(infodict_usedkeys, allnames+range(len(allnames))) + remlist = remain(infodict_usedkeys, allnames+list(range(len(allnames)))) if remlist != []: - print "Coords not found in pointset:", remlist + print("Coords not found in pointset:", remlist) raise ValueError("invalid keys in infodict - some not present " "in thepointset") assert isinstance(ext, str), "'ext' extension argument must be a string" @@ -2341,11 +2341,11 @@ totlen = len(thepointset) if totlen == 0: raise ValueError("Pointset is empty") - for fname, tup in infodict.iteritems(): + for fname, tup in infodict.items(): try: f = open(fname+ext, modestr) except IOError: - print "There was a problem opening file "+fname+ext + print("There was a problem opening file "+fname+ext) raise try: if isinstance(tup, str): @@ -2386,7 +2386,7 @@ "tuples/lists of strings or integers") except IOError: f.close() - print "Problem writing to file"+fname+ext + print("Problem writing to file"+fname+ext) raise except KeyError: f.close() @@ -2442,7 +2442,7 @@ if filelen <= 1: raise ValueError("Only 1 data point found in variables datafile") x_dummy_all = xFileStrList[preamblelines].rstrip("\n") - x_dummy_vallist = filter(lambda s: s != '', x_dummy_all.split(sep)) + x_dummy_vallist = [s for s in x_dummy_all.split(sep) if s != ''] if t is None: get_t = 0 elif isinstance(t, str): @@ -2467,10 +2467,10 @@ if indices == []: if get_t == 2: dim = len(x_dummy_vallist)-1 - indices = remain(range(0,dim+1),[t]) + indices = remain(list(range(0,dim+1)),[t]) else: dim = len(x_dummy_vallist) - indices = range(0,dim) + indices = list(range(0,dim)) else: dim = len(indices) if get_t == 2: @@ -2516,11 +2516,11 @@ tVals = zeros(filelen-start, float) xValRefactoringTool: No changes to ./PyDSTool/Redirector.py RefactoringTool: Refactored ./PyDSTool/Symbolic.py s = zeros([filelen-start, dim], float) # read rest of file - for i in xrange(filelen-start): + for i in range(filelen-start): vLine = xFileStrList[i+start].rstrip("\n") if vLine == '': continue - vLineVals = filter(lambda s: s != '', vLine.split(sep)) + vLineVals = [s for s in vLine.split(sep) if s != ''] if get_t == 1: # Additional left strip of space char in case sep is different tLine = tFileStrList[i+start].rstrip("\n").lstrip(sep).lstrip(" ") @@ -2535,7 +2535,7 @@ try: xLineVals = [vLineVals[ix] for ix in indices] except IndexError: - print "Valid indices were: 0 -", len(vLineVals)-1 + print("Valid indices were: 0 -", len(vLineVals)-1) raise if len(xLineVals) != dim: raise ValueError("Exactly "+str(dim)+" values expected per " @@ -2549,13 +2549,13 @@ return xVals else: # non-parameterized pointset - return Pointset(dict(zip(varnames, xVals))) + return Pointset(dict(list(zip(varnames, xVals)))) else: if varnames is None: return {t_name: tVals, 'vararray': xVals.T} else: return Pointset(indepvardict={t_name: tVals}, - coorddict=dict(zip(varnames,xVals.T))) + coorddict=dict(list(zip(varnames,xVals.T)))) def export_pointset_to_CSV(filename, pts): @@ -2578,10 +2578,10 @@ # data rows if pts._parameterized: - for i in xrange(len(pts)): + for i in range(len(pts)): writer.writerow([pts.indepvararray[i]] + list(pts.coordarray[:,i])) else: - for i in xrange(len(pts)): + for i in range(len(pts)): writer.writerow(pts.coordarray[:,i]) outfile.close() @@ -2658,7 +2658,7 @@ tlo, thi = pinterval ts = pts.indepvararray all_dict = value_dict.copy() - assert remain(value_dict.keys(), pts.coordnames) == [] + assert remain(list(value_dict.keys()), pts.coordnames) == [] if eps is None: eps = pts._abseps if tlo < ts[0]: --- ./PyDSTool/Symbolic.py (original) +++ ./PyDSTool/Symbolic.py (refactored) @@ -56,16 +56,16 @@ # ---------------------------------------------------------------------------- -from __future__ import division -import os, sys, types, cPickle -from Interval import Interval -from common import * -from utils import info as utils_info -from parseUtils import * -from errors import * + +import os, sys, types, pickle +from .Interval import Interval +from .common import * +from .utils import info as utils_info +from .parseUtils import * +from .errors import * #from math import * -from utils import * +from .utils import * from numpy import array, Inf, NaN, isfinite, mod, sum, float64, int32 from numpy import sometrue, alltrue # replacements of math functions so that expr2fun etc. produce vectorizable math functions @@ -94,7 +94,7 @@ ### Constants # determine what "globals" will be for math evaluations in _eval method math_dir = dir(math) -math_globals = dict(zip(math_dir,[getattr(math, m) for m in math_dir])) +math_globals = dict(list(zip(math_dir,[getattr(math, m) for m in math_dir]))) math_globals['Inf'] = Inf math_globals['NaN'] = NaN @@ -104,8 +104,8 @@ allmathnames_symbolic = [a.title() for a in allmathnames] # the definitions for the math names are made lower down in this file -mathNameMap = dict(zip(allmathnames_symbolic, allmathnames)) -inverseMathNameMap = dict(zip(allmathnames, allmathnames_symbolic)) +mathNameMap = dict(list(zip(allmathnames_symbolic, allmathnames))) +inverseMathNameMap = dict(list(zip(allmathnames, allmathnames_symbolic))) specTypes = ('RHSfuncSpec', 'ImpFuncSpec', 'ExpFuncSpec') @@ -183,8 +183,8 @@ allnonnumbers = [n for n in symbs if isNameToken(n)] if len(allnonnumbers) > 0 \ and alltrue([n in allmathnames for n in allnonnumbers]): - namemap = dict(zip(allnonnumbers, - [a.lower() for a in allnonnumbers])) + namemap = dict(list(zip(allnonnumbers, + [a.lower() for a in allnonnumbers]))) args[i].mapNames(namemap) args[i] = eval(args[i]()) else: @@ -195,9 +195,9 @@ argstr = ", ".join(map(str,args)) if convert: try: - return apply(eval(self.name.lower()), args) + return eval(self.name.lower())(*args) except TypeError: - print "Failed to evaluate function %s on args:"%self.name.lower(), argstr + print("Failed to evaluate function %s on args:"%self.name.lower(), argstr) raise else: return QuantSpec("__result__", self.name + "(" + argstr +")") @@ -209,12 +209,12 @@ else: arglist.append(a) try: - return float(apply(eval(self.name.lower()), arglist)) + return float(eval(self.name.lower())(*arglist)) except NameError: argstr = ", ".join(map(str,args)) return QuantSpec("__result__", self.name + "(" + argstr +")") except TypeError: - print "Error evaluating %s on args:"%self.name.lower(), args + print("Error evaluating %s on args:"%self.name.lower(), args) raise def __str__(self): @@ -264,7 +264,7 @@ that sequence, otherwise return the argument untouched.""" if isinstance(x, _seq_types): if len(x) > 0: - xstrlist = map(str,x) + xstrlist = list(map(str,x)) return '['+",".join(xstrlist)+']' else: return x @@ -291,7 +291,7 @@ o = {} try: # d is a Point or dictionary - for k, v in d.iteritems(): + for k, v in d.items(): if isinstance(v, tuple): if alltrue([isinstance(x, str) for x in v[0]]): o[str(k)] = (v[0], str(v[1])) @@ -326,8 +326,8 @@ o[d.subjectToken] = d.specStr else: raise TypeError("Invalid type %s"%str(type(d))) - except TypeError, err: - print "Argument was:\n", d + except TypeError as err: + print("Argument was:\n", d) raise TypeError("Invalid argument type: %s "%str(err) + \ "or argument's values cannot be converted to key:value" + \ "strings") @@ -341,9 +341,9 @@ qstr = str(q) try: val = eval(qstr, math_globals, local_free) - except NameError, err: + except NameError as err: raise ValueError("Invalid input.\nProblem was: %s"%str(err)) - except TypeError, err: + except TypeError as err: # trap getitem or call error for string version of object # try without runtime components, if any if eval_at_runtime != []: @@ -357,7 +357,7 @@ except KeyboardInterrupt: raise except: - print "Internal error evaluating function spec" + print("Internal error evaluating function spec") info(local_free, " ** Local free dict was") info(math_globals, " ** Math globals dict was") raise @@ -420,7 +420,7 @@ """ # put in local namespace for sake of final class method's # alt_call use of filteredDict - from common import filteredDict + from .common import filteredDict # convert values into a dictionary of strings where possible valDict = {} # functions that will end up as methods in the wrapper @@ -430,7 +430,7 @@ eval_at_runtime = [] free = [] h_map = symbolMapClass() - for k, v in values.iteritems(): + for k, v in values.items(): if isinstance(v, str): vs = v elif isinstance(v, _num_types): @@ -475,25 +475,25 @@ # now make a Var from the QuantSpec try: qvar = Var(qexpr, 'q') - except TypeError, e: + except TypeError as e: raise TypeError("Invalid qexpr argument type: " + str(e)) fspec = qvar.eval(**valDict) dyn_map = symbolMapClass() temp_dynamic = {} if ensure_dynamic is not None: - dyn_keys = ensure_dynamic.keys() + dyn_keys = list(ensure_dynamic.keys()) dyn_vals = ["self._pardict['%s']" %d for d in dyn_keys] - dyn_map.update(dict(zip(dyn_keys, dyn_vals))) + dyn_map.update(dict(list(zip(dyn_keys, dyn_vals)))) eval_at_runtime.extend(dyn_keys) for k in dyn_keys: temp_dynamic[k] = Var(k) else: dyn_keys = [] - for fname, (fnsig, fndef) in embed_funcs.iteritems(): + for fname, (fnsig, fndef) in embed_funcs.items(): qtemp = QuantSpec('q', fndef) - for emb_fname in embed_funcs.keys(): + for emb_fname in list(embed_funcs.keys()): # check for embedded function names in these definitions that need # prefix 'self.' for later function creation if emb_fname in qtemp: @@ -504,13 +504,13 @@ embed_funcs[fname] = (fnsig, new_fndef) free.extend(remain(fspec.freeSymbols, - math_globals.keys()+local_free.keys()+embed_funcs.keys()+dyn_keys)) + list(math_globals.keys())+list(local_free.keys())+list(embed_funcs.keys())+dyn_keys)) # hack to exclude object references which will be taken care of at runtime # or string literals that aren't supposed to be free symbols free = [sym for sym in free if not \ ("'%s'"%sym in qexpr or '"%s"'%sym in qexpr)] - mapnames = local_free.keys() + embed_funcs.keys() - for k in local_free.keys(): + mapnames = list(local_free.keys()) + list(embed_funcs.keys()) + for k in list(local_free.keys()): for sym in free: if '.' in sym and sym[:sym.index('.')] == k: mapnames.append(sym) @@ -523,11 +523,11 @@ # they are objects! free_h = [symb.replace('.', '_') for symb in free] free_h_nonFS = [symb.replace('_', '.') for symb in free] - h_map.update(dict(zip(free_h_nonFS, free_h))) + h_map.update(dict(list(zip(free_h_nonFS, free_h)))) free = free_h - defs = filteredDict(local_free, [k for k, v in local_free.iteritems() if v is not None]) - local_free.update(dict(zip(free, [QuantSpec(symb) for symb in free]))) - scope = filteredDict(local_free, [k for k, v in local_free.iteritems() if v is not None]) + defs = filteredDict(local_free, [k for k, v in local_free.items() if v is not None]) + local_free.update(dict(list(zip(free, [QuantSpec(symb) for symb in free])))) + scope = filteredDict(local_free, [k for k, v in local_free.items() if v is not None]) scope.update(local_funcs) scope.update(temp_dynamic) fspec.mapNames(h_map) @@ -543,8 +543,8 @@ for q in fspec.fromvector()]) + "]" fspec_eval = QuantSpec('__temp__', temp_str).renderForCode() if eval_at_runtime != []: - fspec_eval.mapNames(dict(zip(mapnames, - ['self.'+k for k in mapnames]))) + fspec_eval.mapNames(dict(list(zip(mapnames, + ['self.'+k for k in mapnames])))) fspec_eval.mapNames(dyn_map) fspec_str = str(fspec_eval) else: @@ -564,16 +564,16 @@ return '' if isinstance(fspec_eval, _num_types): if eval_at_runtime != []: - fspec.mapNames(dict(zip(mapnames, - ['self.'+k+append_call_parens(k) for k in mapnames]))) + fspec.mapNames(dict(list(zip(mapnames, + ['self.'+k+append_call_parens(k) for k in mapnames])))) fspec_str = str(fspec) else: fspec_str = repr(fspec_eval) elif not fspec.isvector(): # already found fspec_str using eval_at_runtime for isvector case if eval_at_runtime != []: - fspec.mapNames(dict(zip(mapnames, - ['self.'+k+append_call_parens(k) for k in mapnames]))) + fspec.mapNames(dict(list(zip(mapnames, + ['self.'+k+append_call_parens(k) for k in mapnames])))) fspec_str = str(fspec) else: fspec_str = str(fspec_eval.renderForCode()) @@ -600,15 +600,15 @@ return self.__call__(**filteredDict(self._namemap(keyed_arg), self._args)) """ if len(embed_funcs) > 0: - for fname, (fnsig, fndef) in embed_funcs.iteritems(): + for fname, (fnsig, fndef) in embed_funcs.items(): def_str += "\n def " + fname + "(self" if len(fnsig) > 0: def_str += ", " + ", ".join(fnsig) def_str += "):\n return " + fndef try: - exec def_str in locals(), globals() + exec(def_str, locals(), globals()) except: - print "Problem defining function:" + print("Problem defining function:") raise evalfunc = fn_wrapper() evalfunc.__dict__.update(defs) @@ -643,7 +643,7 @@ elif isinstance(b, Par): valDict[str(b)] = str(b.eval()) elif isinstance(b, dict): - for k, v in b.iteritems(): + for k, v in b.items(): if k in valDict: raise ValueError("Value for %s already bound"%k) valDict[k] = str(v) @@ -681,7 +681,7 @@ """Internal utility for prepJacobian""" add_fnspecs = {} new_free = [] - math_globals_keys = math_globals.keys() + math_globals_keys = list(math_globals.keys()) for symb in symbols: # derivatives of an unknown function f(x,y,z) will be marked # f_0, f_1, or f_2 depending on which variable was selected @@ -756,8 +756,8 @@ frame = frame.f_back objdict = frame.f_globals typelist = [Quantity, QuantSpec] - for objname, obj in objdict.iteritems(): - if type(obj) not in [type, types.ClassType, types.ModuleType]: + for objname, obj in objdict.items(): + if type(obj) not in [type, type, types.ModuleType]: if compareClassAndBases(obj, typelist): objdict_out[objname] = obj elif deepSearch: @@ -767,7 +767,7 @@ objdict_out[objname] = obj elif isinstance(obj, dict): if sometrue([compareClassAndBases(x, typelist) \ - for x in obj.values()]): + for x in list(obj.values())]): objdict_out[objname] = obj return objdict_out # original 'returnlevel=2' @@ -792,7 +792,7 @@ ## else: self.subjectToken = token else: - print "Found:",subjectToken + print("Found:",subjectToken) raise ValueError("Invalid subject token") if specStr != "" and specStr[0] == '+': if len(specStr) > 1: @@ -1198,13 +1198,13 @@ other.specStr.replace(" ","")) results.append(self.specType == other.specType) results.append(self.parser() == other.parser()) - except AttributeError, err: + except AttributeError as err: if diff: - print "Type:", className(self), results - print " " + str(err) + print("Type:", className(self), results) + print(" " + str(err)) return False if diff: - print "Type:", className(self), results + print("Type:", className(self), results) return alltrue(results) @@ -1307,7 +1307,7 @@ scope[self.subjectToken] = strval scopeobjs = {} # process scope objects - for key, obj in scopeobjs.iteritems(): + for key, obj in scopeobjs.items(): if isinstance(obj, Quantity): if obj.name != self.subjectToken: strval = str(obj.spec._eval(eval_type, {})) @@ -1350,7 +1350,7 @@ # process scope objects, avoiding identity mappings of # tokens that could lead to infinite loops scope = {} - for key, obj in scopeobjs.iteritems(): + for key, obj in scopeobjs.items(): if key == '__result__': # not a valid key continue @@ -1399,7 +1399,7 @@ scopeobjs = copy(defs) # process scope objects scope = {} - for key, obj in scopeobjs.iteritems(): + for key, obj in scopeobjs.items(): if key == '__result__': continue if isinstance(obj, Quantity): @@ -1452,10 +1452,10 @@ '['+','.join([r() for r in res_eval])+']', self.specType) # apply definitions in scope - arglist = scope.keys() + arglist = list(scope.keys()) arglist.sort() # convert any numeric substitutions into strings - for k, v in defs.iteritems(): + for k, v in defs.items(): if not isinstance(v, str) and k not in [str(v), "__result__"]: scope[k] = str(v) else: @@ -1540,7 +1540,7 @@ # but only use keys that weren't present before, to avoid circular # mapping: e.g. s->t then t->s if scope != {}: - qtemp.mapNames(filteredDict(scope,remain(toks,scope.keys()))) + qtemp.mapNames(filteredDict(scope,remain(toks,list(scope.keys())))) # references to builtin aux functions or macros require temp # definitions of those as Fun objects qtoks = qtemp.parser.tokenized @@ -1574,7 +1574,7 @@ # Would like to make this cleaner... defstr = sq except TypeError: - print self.specStr, sq + print(self.specStr, sq) raise else: # HACK: fix simplify_str()'s return of vector arg with round braces @@ -1621,7 +1621,7 @@ if not num_qtemp: freenamelist = remain(qtemp.freeSymbols, allmathnames_symbolic + localfuncs) - local_scope = dict(zip(freenamelist,[QuantSpec(symb) for symb in freenamelist])) + local_scope = dict(list(zip(freenamelist,[QuantSpec(symb) for symb in freenamelist]))) local_scope.update(local_fndef) local_scope_feval = copy(local_scope) if eval_type == 1: @@ -1713,7 +1713,7 @@ isHierarchicalName(newsubj, treatMultiRefs=True)): self.subjectToken = newsubj else: - print "Attempted to rename %s with object of type %s, value:"%(self.subjectToken,str(type(newsubj))), newsubj + print("Attempted to rename %s with object of type %s, value:"%(self.subjectToken,str(type(newsubj))), newsubj) raise TypeError("Cannot rename a QuantSpec with a non-name string") toks = [namemap(t) for t in self.parser.tokenized] # strip() in case spaces were preserved and there were trailing spaces @@ -1775,7 +1775,7 @@ # Also, any zXX refs present in the mrefs, where XX is not in # the range [i1,i2], are free symbols of this Quantity # because they aren't being defined here - defrange = xrange(i1,i2+1) + defrange = range(i1,i2+1) # Quantity subject token is 'z[]' # and future 'name' attribute token = rootname + "[" + ixname + "]" @@ -1807,10 +1807,10 @@ try: temp_qspec = QuantSpec(surrogateToken, surrogateSpec, specType, treatMultiRefs=True) - except ValueError, e: + except ValueError as e: # replace temp name __z__ with actual token name z[i] new_e = (e[0].replace(surrogateToken, token)) - raise ValueError, new_e + raise ValueError(new_e) for f in temp_qspec.freeSymbols: try: is_int = f[-1] in num_chars @@ -1950,7 +1950,7 @@ # an integer, where expr is everything between the square brackets original_tokenlist = temp.tokenized[2:-1] ixname_occs = [] - for i in xrange(len(original_tokenlist)): + for i in range(len(original_tokenlist)): if original_tokenlist[i] == ixname: ixname_occs.append(i) # make a list of all referenced integers by this expression, over this @@ -2020,11 +2020,11 @@ return False obj_rootname = obj.name[:p] obj_ix = int(obj.name[p:]) # known to be ok integer - for rootname, infotuple in multiDefRefs.iteritems(): + for rootname, infotuple in multiDefRefs.items(): if obj_rootname == rootname: # root of the name is present # so check if the number falls in the subject range - if obj_ix in xrange(infotuple[3], infotuple[4]+1): + if obj_ix in range(infotuple[3], infotuple[4]+1): result = True break return result @@ -2081,7 +2081,7 @@ token = name self.multiDefInfo = (True, rootname, ixname, i1, i2) else: - print "Token name argument was:", name + print("Token name argument was:", name) raise ValueError("Invalid Quantity token name") elif isinstance(spec, QuantSpec): actual_spec = copy(spec) @@ -2109,7 +2109,7 @@ token = name self.multiDefInfo = (True, rootname, ixname, i1, i2) else: - print "Token name argument was:", name + print("Token name argument was:", name) raise TypeError("Invalid type for Quantity token name") else: token = spec.subjectToken @@ -2251,7 +2251,7 @@ ixname = m[2] i1 = m[3] i2 = m[4] - if x in xrange(i1,i2+1): + if x in range(i1,i2+1): tokenized = [] for t in self.spec.parser.tokenized: # can trust that t starting with '[' is a valid mref @@ -2313,7 +2313,7 @@ try: r1 = QuantSpec("__result__", otherstr, other_specType) except TypeError: - print "Failed to compile: '" + otherstr + "'" + print("Failed to compile: '" + otherstr + "'") raise r2 = QuantSpec("__result__", self.name, self.specType) if reverseorder: @@ -2408,7 +2408,7 @@ def eval(self, *scopearg, **defs): """eval does not require all free symbols to be resolved, but any signature arguments (for a function) must be resolved.""" - arglist = defs.keys() + arglist = list(defs.keys()) if hasattr(self, 'signature'): if not alltrue([s in arglist for s in self.signature]): raise ValueError("All function signature arguments are " @@ -2436,7 +2436,7 @@ assert self.spec.specType in specTypes, "specType invalid" bad_tls = remain(self.targetLangs, targetLangs) if len(bad_tls)>0: - print "Invalid target languages:", bad_tls + print("Invalid target languages:", bad_tls) raise ValueError("Invalid target language specified") if self.typestr != 'var' and self.specType != 'ExpFuncSpec': raise TypeError("Invalid spec type specified for %s"%className(self)) @@ -2448,11 +2448,11 @@ self.validate() if not self.spec.isDefined(verbose) and self.typestr != 'par': if verbose: - print "'%s' ill defined: bound spec string is required"%self.name + print("'%s' ill defined: bound spec string is required"%self.name) return False if len(self.compatibleGens) == 0: if verbose: - print "'%s' ill defined: compatibleGens is empty"%self.name + print("'%s' ill defined: compatibleGens is empty"%self.name) return False return True @@ -2481,7 +2481,7 @@ utils_info(self.__dict__, "ModelSpec " + self.name, recurseDepthLimit=1+verboselevel) else: - print self.__repr__() + print(self.__repr__()) def __hash__(self): h = (hash(type(self)), hash(self.name), hash(str(self.spec)), @@ -2497,13 +2497,13 @@ results.extend([str(self.domain[i]) == str(other.domain[i]) \ for i in [0,1,2]]) results.append(self.spec == other.spec) - except AttributeError, e: + except AttributeError as e: if diff: - print "Type:", className(self), results - print " " + e + print("Type:", className(self), results) + print(" " + e) return False if diff: - print "Type:", className(self), results + print("Type:", className(self), results) return alltrue(results) def __ne__(self, other): @@ -2587,7 +2587,7 @@ for name in isection: # dummy arg name newname = "__"+name+"__" - while newname in argNameMapInv.keys() + \ + while newname in list(argNameMapInv.keys()) + \ self.signature+self.freeSymbols: # ensure unique name newname += "_" @@ -2599,14 +2599,14 @@ for name in isection: # dummy arg name newname = "__"+name+"__" - while newname in argNameMapInv.keys() + \ + while newname in list(argNameMapInv.keys()) + \ self.signature+self.freeSymbols: # ensure unique name newname += "_" argNameMapInv[newname] = name qtemp.mapNames({name:newname}) args[i] = str(qtemp) - res = self.spec._eval(1, **dict(zip(self.signature,args))) + res = self.spec._eval(1, **dict(list(zip(self.signature,args)))) res.mapNames(argNameMapInv) return res @@ -2622,7 +2622,7 @@ # references to builtin aux functions or macros require temp defs of those # as Fun objects local_fndef = {} -for fname in builtinFnSigInfo.keys(): +for fname in list(builtinFnSigInfo.keys()): # function will not have to return anything in order to be eval'd # but need a return value. we use '0'. # final underscore is to avoid name clash with actual Python names @@ -2741,7 +2741,7 @@ ostr = "[" + ",".join([str(Diff(o,a)) for o in t]) + "]" return QuantSpec("__result__", ostr) else: - print "Found:", t, "type (%s)"%type(t) + print("Found:", t, "type (%s)"%type(t)) raise TypeError("Invalid type for t") # deal with a ----------------------------------------- if compareClassAndBases(a, qtypes): @@ -2752,7 +2752,7 @@ elif isinstance(a, str): a_arg = a else: - print "Found:", a, "type (%s)"%type(a) + print("Found:", a, "type (%s)"%type(a)) raise TypeError("Invalid type for a") # if didn't already recurse then fully reduced to strings # ... attempt to simplify string using eval() method call @@ -2762,7 +2762,7 @@ res.simplify() return res except: - print "Tried to diff '%s' w.r.t. '%s'"%(t_arg,a_arg) + print("Tried to diff '%s' w.r.t. '%s'"%(t_arg,a_arg)) raise @@ -2814,8 +2814,7 @@ return simplify(string2ast(o)) if t[0]=='term': ttemp =RefactoringTool: Refactored ./PyDSTool/Trajectory.py ensureparen_div(t) - lft,dlft,rt,drt=map(lambda x: ast2string(simplify(x)), - getlftrtD(ttemp,a)) + lft,dlft,rt,drt=[ast2string(simplify(x)) for x in getlftrtD(ttemp,a)] if ttemp[2][0]=='STAR': return simplify(string2ast(doadd(domul(dlft,rt),domul(lft,drt)))) if ttemp[2][0]=='SLASH': @@ -2852,8 +2851,7 @@ ts.append(o) dts.append(DiffStr(o,a)) if t[2][0]=='DOUBLESTAR': - st,lft,dlft,rt,drt=map(lambda x: ast2string(simplify(x)), - [t,ts[0],dts[0],ts[1],dts[1]]) + st,lft,dlft,rt,drt=[ast2string(simplify(x)) for x in [t,ts[0],dts[0],ts[1],dts[1]]] rt1=trysimple('%s-1'%rt) if drt=='0': return toPowSyntax(string2ast(domul(domul(rt,dlft),dopower(lft,rt1)))) @@ -2876,7 +2874,7 @@ ll=splitargs(ast2string(DiffStr(aa,a))) ii=0;o='0' for i in ll: - o=doadd(o,domul(i,dofun(t[0][1]+'_'+`ii`,ast2string(aa)))) + o=doadd(o,domul(i,dofun(t[0][1]+'_'+repr(ii),ast2string(aa)))) ii=ii+1 return simplify(string2ast(o)) return t --- ./PyDSTool/Trajectory.py (original) +++ ./PyDSTool/Trajectory.py (refactored) @@ -6,14 +6,14 @@ # ---------------------------------------------------------------------------- # PyDSTool imports -from Variable import * -from Interval import * -from Points import * -from utils import * -from common import * -from common import _num_types -from parseUtils import * -from errors import * +from .Variable import * +from .Interval import * +from .Points import * +from .utils import * +from .common import * +from .common import _num_types +from .parseUtils import * +from .errors import * # Other imports from numpy import array, arange, float64, int32, concatenate, zeros, shape, \ @@ -53,11 +53,11 @@ vars = numeric_to_vars(vals, coordnames, indepvar, indepvarname, indepdomain, all_types_float, discrete) if event_times is not None: - return Trajectory(trajname, vars.values(), + return Trajectory(trajname, list(vars.values()), parameterized=indepvar is not None, eventTimes=event_times, events=event_vals) else: - return Trajectory(trajname, vars.values(), + return Trajectory(trajname, list(vars.values()), parameterized=indepvar is not None) def convert_ptlabel_events(pts, return_vals_dict=False): @@ -78,7 +78,7 @@ ixlist = [] ix_dict = pts.labels.by_label['Event:'+l] # don't use tdict in labels in case indepvararray has been re-scaled - for ix in ix_dict.keys(): + for ix in list(ix_dict.keys()): ts.append(pts.indepvararray[ix]) ixlist.append(ix) ts.sort() @@ -102,9 +102,9 @@ events found in the pointset and place them in the resulting Trajectory. """ if events is not None: - all_ev_names = events.keys() + all_ev_names = list(events.keys()) ev_times, ev_vals = convert_ptlabel_events(pts, True) - unused_keys = remain(all_ev_names, ev_times.keys()) + unused_keys = remain(all_ev_names, list(ev_times.keys())) for k in unused_keys: ev_times[k] = [] ev_vals[k] = None @@ -280,7 +280,7 @@ eventTimes = {} # if events was provided then fill in with that -- most # commonly used by Generators that only pass events object - for evname, evpts in self.events.iteritems(): + for evname, evpts in self.events.items(): if evpts is None: eventTimes[evname] = [] else: @@ -326,7 +326,7 @@ """Truncate trajectory according to a last coordinate specified by idx argument, provided trajectory is defined by an underlying mesh.""" t_vals = None - for vname, v in self.variables.iteritems(): + for vname, v in self.variables.items(): # vmesh is an array with two rows, the first = indep var, the second = dep var vmesh = v.underlyingMesh() if vmesh is not None: @@ -386,7 +386,7 @@ else: test_names = copy.copy(self.coordnames) if remain(coords, test_names) != []: - print "Valid coordinate names:", self.coordnames + print("Valid coordinate names:", self.coordnames) raise ValueError("Invalid coordinate names passed") elif any([isinstance(c, str) for c in coords]): raise TypeError("Cannot mix string and numeric values in " @@ -422,15 +422,15 @@ for v in [self.variables[vn] for vn in coordlist]] except: if checklevel > 1: - print "\nProblem calling with coords:", coordlist - print "Indepdendent variable values:", indepvals - print "Containment:", self.indepdomain.contains(t) + print("\nProblem calling with coords:", coordlist) + print("Indepdendent variable values:", indepvals) + print("Containment:", self.indepdomain.contains(t)) try: - print self.variables[coordlist[0]].indepdomain.get() - print self.variables[coordlist[0]].depdomain.get() + print(self.variables[coordlist[0]].indepdomain.get()) + print(self.variables[coordlist[0]].depdomain.get()) except AttributeError: # domains may be discrete - print "Discrete variable domain and/or range" + print("Discrete variable domain and/or range") # print self.variables[coordlist[0]].initialconditions raise # raise ValueError("Problem calling at these independent variable values") @@ -465,15 +465,15 @@ [self.variables[vn] for vn in coordlist]] except: if checklevel > 1: - print "\nProblem calling with coords:", coordlist - print "Indepdendent variable values:", t - print "Containment:", self.indepdomain.contains(t) + print("\nProblem calling with coords:", coordlist) + print("Indepdendent variable values:", t) + print("Containment:", self.indepdomain.contains(t)) try: - print self.variables[coordlist[0]].indepdomain.get() - print self.variables[coordlist[0]].depdomain.get() + print(self.variables[coordlist[0]].indepdomain.get()) + print(self.variables[coordlist[0]].depdomain.get()) except AttributeError: # domains may be discrete - print "Discrete variable domain and/or range" + print("Discrete variable domain and/or range") raise if asmap: coordlist.append(self.indepvarname) @@ -601,7 +601,7 @@ assert tlo < thi, 't start point must be less than t endpoint' if dt is not None and dt >= abs(thi-tlo): if precise: - print "dt = %f for interval [%f,%f]"%(dt,tlo,thi) + print("dt = %f for interval [%f,%f]"%(dt,tlo,thi)) raise ValueError('dt must be smaller than time interval') else: dt = (thi-tlo)/10. @@ -722,8 +722,8 @@ lastins = len(tmesh_glob) lenstart = len(start_ins) tmesh_glob = concatenate((start_ins, tmesh_glob, end_ins)) - ins_ixs = range(lenstart) + [i+lenstart for i in ins_ixs] + \ - range(lastins+lenstart, lastins+lenstart+len(end_ins)) + ins_ixs = list(range(lenstart)) + [i+lenstart for i in ins_ixs] + \ + list(range(lastins+lenstart, lastins+lenstart+len(end_ins))) tmesh_list = tmesh_glob.tolist() for i, (t, evname) in enumerate(evtlist): try: @@ -750,14 +750,14 @@ if len(tmesh) > 0: if dt is None: - coorddict = dict(zip(coords_sorted, [m[1][ix_range] for m in \ + coorddict = dict(list(zip(coords_sorted, [m[1][ix_range] for m in \ sortedDictValues(meshdict, - onlykeys=coords_sorted)])) + onlykeys=coords_sorted)]))) if eventdata: # insert var values at events (SLOW!) # can only insert to lists, so have to convert coorddict # arrays to lists first. - for tpos in xrange(len(ins_ixs)): + for tpos in range(len(ins_ixs)): tix = ins_ixs[tpos] t = ev_ts[tpos] x = self._FScompatibleNames(ev_pts_list[tpos]) @@ -803,7 +803,7 @@ # insert var values at events (SLOW!) # can only insert to lists, so have to convert coorddict # arrays to lists first. - for tpos in xrange(len(ins_ixs)): + for tpos in range(len(ins_ixs)): tix = ins_ixs[tpos] t = ev_ts[tpos] x = self._FScompatibleNames(ev_pts_list[tpos]) @@ -892,7 +892,7 @@ def __del__(self): # necessary for __del__ methods of variables to be accessed - for v in self.variables.values(): + for v in list(self.variables.values()): v.__del__() @@ -908,15 +908,15 @@ outputStr = "Trajectory " + self.name elif verbose >= 1: outputStr = "Trajectory " + self.name + "\n of variables: " + \ - str(self._FScompatibleNamesInv(self.variables.keys())) + str(self._FScompatibleNamesInv(list(self.variables.keys()))) outputStr += "\n over domains: " + str(self.depdomain) if verbose == 2: outputStr += joinStrs(["\n"+v._infostr(1) for v in \ - self.variables.values()]) + list(self.variables.values())]) return outputStr def info(self, verboselevel=1): - print self._infostr(verboselevel) + print(self._infostr(verboselevel)) def getEvents(self, evnames=None, asGlobalTime=True): @@ -926,7 +926,7 @@ """ # self.events is a dict of pointsets keyed by event name if evnames is None: - evnames = self.events.keys() + evnames = list(self.events.keys()) if isinstance(evnames, str): # singleton assert evnames in self.events, "Invalid event name provided: %s"%evnames @@ -961,7 +961,7 @@ """ result = {} if evnames is None: - evnames = self.events.keys() + evnames = list(self.events.keys()) # self.eventTimes is a dict of lists keyed by event name if isinstance(evnames, str): # singleton @@ -1107,7 +1107,7 @@ def showRegimes(self): parts = [p[1] for p in self.timePartitions] for g, p in zip(self.modelNames, parts): - print "Regime: %s, from t = %.5f"%(g,p) + print("Regime: %s, from t = %.5f"%(g,p)) def info(self): return info(self, "Hybrid Trajectory") @@ -1200,7 +1200,7 @@ if not isinstance(t, int): raise TypeError("time value must be an integer" " when treating system as a mapping") - if t not in range(num_parts+1): + if t not RefactoringTool: Refactored ./PyDSTool/Variable.py in list(range(num_parts+1)): raise PyDSTool_BoundsError("time value not in valid" " partition range") if t < num_parts: @@ -1238,8 +1238,8 @@ trel_part = [] tval = t[tix] if time_interval.contains(tval) is notcontained: - print "\n** Debugging info for Hybrid Traj %s: t value, interval, tolerance ="%self.name - print tval, time_interval.get(), time_interval._abseps + print("\n** Debugging info for Hybrid Traj %s: t value, interval, tolerance ="%self.name) + print(tval, time_interval.get(), time_interval._abseps) raise PyDSTool_BoundsError('time value outside of ' 'trajectory`s time interval ' 'of validity (if checklevel was >=2 then endpoints ' @@ -1344,10 +1344,10 @@ retvals.append(val) else: tinterval = self.indepdomain - print "valid t interval:", \ - tinterval.get() - print "t in interval? -->", tinterval.contains(tval) - print "interval abs eps = ", tinterval._abseps + print("valid t interval:", \ + tinterval.get()) + print("t in interval? -->", tinterval.contains(tval)) + print("interval abs eps = ", tinterval._abseps) raise ValueError('t = '+str(tval)+' is either not in any ' 'time interval defined for this ' 'trajectory, or there was an out-of-range' @@ -1417,7 +1417,7 @@ pset = self.__call__([t], coords) pset.name = self.name + "_sample" if doEvents: - for evname, ev_ts in self.eventTimes.items(): + for evname, ev_ts in list(self.eventTimes.items()): if t in ev_ts: pset.addlabel(0, 'Event:'+evname, {'t': t}) return pset @@ -1459,7 +1459,7 @@ try: pset = traj.sample(coords, dt, tlo, thi, doEvents, False) - except ValueError, e: + except ValueError as e: if e.message[:7] in ('tlo too', 'thi too'): # tlo or thi out of range pass @@ -1469,7 +1469,7 @@ try: pset_new = traj.sample(coords, dt, tlo, thi, doEvents, False) - except ValueError, e: + except ValueError as e: if e.message[:7] in ('tlo too', 'thi too'): # tlo or thi out of range pass @@ -1508,8 +1508,8 @@ #except (PyDSTool_BoundsError, ValueError): # r = 1000.*(t-t0) except: - print "Error at t=%f: "%t, sys.exc_info()[0], \ - sys.exc_info()[1] + print("Error at t=%f: "%t, sys.exc_info()[0], \ + sys.exc_info()[1]) raise try: result = bisect(f, t1_guess-guess_tol*(t1_guess-t0), @@ -1529,9 +1529,9 @@ if max_rval %f tolerance.\n"%(max_rval,rtol), \ "Try a different starting point,", \ - "a different test variable, or reduce relative tolerance." + "a different test variable, or reduce relative tolerance.") raise ValueError("Did not converge") --- ./PyDSTool/Variable.py (original) +++ ./PyDSTool/Variable.py (refactored) @@ -6,12 +6,12 @@ # ---------------------------------------------------------------------------- # PyDSTool imports -from utils import * -from common import * -from errors import * -from Points import * -from Interval import * -from FuncSpec import ImpFuncSpec +from .utils import * +from .common import * +from .errors import * +from .Points import * +from .Interval import * +from .FuncSpec import ImpFuncSpec from numpy import Inf, NaN, isfinite, sometrue, alltrue, any, all, \ array, float64, int32, ndarray, asarray @@ -238,9 +238,9 @@ # user-defined auxiliary functions # (built-ins are provided explicitly) try: - exec fninfo[0] in globals() + exec(fninfo[0], globals()) except: - print 'Error in supplied auxiliary function code' + print('Error in supplied auxiliary function code') raise self._funcreg[fninfo[1]] = ('Variable', fninfo[0]) setattr(Variable, fninfo[1], eval(fninfo[1])) @@ -248,9 +248,9 @@ fninfo_spec = funcspec.spec if not hasattr(Variable, fninfo_spec[1]): try: - exec fninfo_spec[0] in globals() + exec(fninfo_spec[0], globals()) except: - print 'Error in supplied functional specification code' + print('Error in supplied functional specification code') raise self._funcreg[fninfo_spec[1]] = ('Variable', fninfo_spec[0]) setattr(Variable, fninfo_spec[1], eval(fninfo_spec[1])) @@ -259,9 +259,9 @@ fninfo_auxspec = funcspec.auxspec if not hasattr(Variable, fninfo_auxspec[1]): try: - exec fninfo_auxspec[0] in globals() + exec(fninfo_auxspec[0], globals()) except: - print 'Error in supplied auxiliary variable code' + print('Error in supplied auxiliary variable code') raise self._funcreg[fninfo_auxspec[1]] = ('Variable', fninfo_auxspec[0]) setattr(Variable, fninfo_auxspec[1], eval(fninfo_auxspec[1])) @@ -303,9 +303,9 @@ solmethod=funcspec.algparams['solvemethod'], standalone=False)""" try: - exec impfn_str in this_scope + exec(impfn_str, this_scope) except: - print 'Error in supplied implicit function code' + print('Error in supplied implicit function code') raise # record special reference to the implicit fn, # as its a method of Variable (for delete method). @@ -396,7 +396,7 @@ self.coordtype, extent(output.pts.coordarray[0]), abseps=abseps) - elif type(output) in [types.InstanceType, types.TypeType] \ + elif type(output) in [types.InstanceType, type] \ or isinstance(output, (OutputFn, interpclass)): if hasattr(output, 'types'): deptype = output.types[0] @@ -448,9 +448,9 @@ raise ValueError('funcspec missing in setOutput') # Add the specific mapping functions for Ex/ImplicitFnGen objects try: - exec outputdata[1] in globals() + exec(outputdata[1], globals()) except: - print 'Internal Error in _mapspecfn code' + print('Internal Error in _mapspecfn code') raise has_op = hasattr(self, 'output') # have to define this function in here because use of lambda @@ -467,14 +467,14 @@ except ValueError: self.initialconditions = {self.coordname: NaN} except TypeError: - print "Debugging info: self.output = ", self.output + print("Debugging info: self.output = ", self.output) raise else: self.initialconditions = ics self._vectorizable = False self._refvars = refvars self.defined = True - elif type(outputdata) in [types.InstanceType, types.TypeType] \ + elif type(outputdata) in [types.InstanceType, type] \ or isinstance(outputdata, (OutputFn, interpclass)): # Variable generated by callable object that generates values over # mesh points that it holds, e.g. by interpolation @@ -548,13 +548,13 @@ # enumerated discrete domains assert len(indepdomain) == 1, "Independent variable " \ "dictionary must have only 1 entry" - d = indepdomain.values()[0] + d = list(indepdomain.values())[0] assert all(isfinite(d)), "Independent variable values must be" \ " finite" if self.trajirange: assert self.trajirange[0] in d assert self.trajirange[1] in d - self.indepvarname = indepdomain.keys()[0] + self.indepvarname = list(indepdomain.keys())[0] if isinstance(d, (list, tuple)): if self.coordtype is not None: self.indepdomain = array(d, self.coordtype) @@ -578,7 +578,7 @@ "Independent variable values must be increasing" self.indepvartype = self.indepdomain.dtype.type else: - print "Independent variable argument domain was:", indepdomain + print("Independent variable argument domain was:", indepdomain) raise TypeError("Invalid type for independent variable " "domain") @@ -626,13 +626,13 @@ elif isinstance(depdomain, dict): assert len(depdomain) == 1, \ "Depend variables dictionary must have only 1 entry" - d = depdomain.values()[0] + d = list(depdomain.values())[0] if self.trajdrange: assert self.trajdrange[0] in d assert self.trajdrange[1] in d ## Assume d is in increasing order assert all(isfinite(d)), "Values must be finite" - self.coordname = depdomain.keys()[0] + self.coordname = list(depdomain.keys())[0] if isinstance(d, (list, tuple)): if self.coordtype is not None: self.depdomain = array(d, self.coordtype) @@ -651,7 +651,7 @@ "domain") self.coordtype = self.depdomain.dtype.type else: - print "Dependent variable domain argument was:", depdomain + print("Dependent variable domain argument was:", depdomain) raise TypeError("Invalid type for dependent variable domain") if isinstance(self.output, Pointset): assert self.coordname == self.output.coordnames[0], \ @@ -727,7 +727,7 @@ vectorizable = True try: indepvar_ok = indepvar in idep - except PyDSTool_UncertainValueError, errinfo: + except PyDSTool_UncertainValueError as errinfo: # adjust for rounding error so that interpolator # does not barf on out-of-range values if indepvar < idep[0]: @@ -757,7 +757,7 @@ else: depvar = [self.output(ival) for ival in indepvar] depvar_ok = True - except PyDSTool_BoundsError, errinfo: + except PyDSTool_BoundsError as errinfo: depvar_ok = False # Now check that all computed values were in depdomain if depvar_ok: @@ -774,7 +774,7 @@ # interval, array and index indeps try: contresult = d in self.depdomain - except PyDSTool_UncertainValueError, errinfo: + except PyDSTool_UncertainValueError as errinfo: contresult = True if checklevel == 2: # find which indepvar was the cause of @@ -809,7 +809,7 @@ dv = depvar try: depvar_ok = dv in self.depdomain - except PyDSTool_UncertainValueError, errinfo: + except PyDSTool_UncertainValueError as errinfo: if checklevel == 2: self.diagnostics.warnings.append((indepvar, errinfo.varval)) if not isfinite(dv): @@ -846,7 +846,7 @@ else: vectorizable = True indepvar_ok = indepvar in self.indepdomain - except TypeError, e: + except TypeError as e: raise TypeError('Something messed up with the Variable ' 'initialization: '+str(e)) else: @@ -865,13 +865,13 @@ depvar = [self.output(ival) for ival in indepvar] depvar_ok = all([d in self.depdomain for d in \ depvar]) - except PyDSTool_BoundsError, e: + except PyDSTool_BoundsError as e: raise ValueError("Cannot compute a return value for " "this independent variable value: " + str(e)) except PyDSTool_TypeError: if not self.defined: - print "Variable '%s' not fully defined."%self.name + print("Variable '%s' not fully defined."%self.name) return None else: raise @@ -934,7 +934,7 @@ def info(self, verboselevel=1): - print self._infostr(verboselevel) + print(self._infostr(verboselevel)) def __copy__(self): @@ -958,7 +958,7 @@ # function that's not in the global namespace (so pickle fails # to find it) del d['output'] - for fname, finfo in self._funcreg.iteritems(): + for fname, finfo in self._funcreg.items(): if finfo[0] == 'self': try: del d[fname] @@ -977,7 +977,7 @@ self.indepvartype = _num_name2type[self.indepvartype] self.coordtype = _num_name2type[self.coordtype] # reinstate dynamic methods / functions - for fname, finfo in self._funcreg.iteritems(): + for fname, finfo in self._funcreg.items(): if finfo[0] == 'self' and not hasattr(eval(finfo[0]), fname): # avoids special entry for 'outputdata' setattr(eval(finfo[0]), fname, finfo[1]) @@ -1010,7 +1010,7 @@ # to avoid crowding namespace ## if hasattr(self, 'output'): ## del self.output - for fname, finfo in self._funcreg.iteritems(): + for fname, finfo in self._funcreg.items(): # Treat special cases first if finfo[0] is None: # don't want to eval(None) below @@ -1018,7 +1018,7 @@ elif fname == '_impfn': exec_str = 'del Variable.' + finfo[0] try: - exec exec_str + exec(exec_str) except AttributeError: # Uncertain why the name appears multiple times for their # to be multiple attempts to delete it (which of course @@ -1035,7 +1035,7 @@ elif hasattr(eval(finfo[0]), fname): RefactoringTool: Refactored ./PyDSTool/__init__.py exec_str = 'del '+ finfo[0] + '.' + fname try: - exec exec_str + exec(exec_str) except RuntimeError: # sometimes get these when objects improperly delted # and new objects with the same name created --- ./PyDSTool/__init__.py (original) +++ ./PyDSTool/__init__.py (refactored) @@ -83,31 +83,31 @@ import types, time # PyDSTool imports -from Events import * -from Interval import * -from Points import * -from Variable import * -from Trajectory import * -from FuncSpec import * +from .Events import * +from .Interval import * +from .Points import * +from .Variable import * +from .Trajectory import * +from .FuncSpec import * # \begin{hacksRus} -import Generator as GenModule -from Generator import Generator as Generator_ -from Generator import * +from . import Generator as GenModule +from .Generator import Generator as Generator_ +from .Generator import * Generator = GenModule -import Model as ModelModule -from Model import Model as Model_ -from Model import * +from . import Model as ModelModule +from .Model import Model as Model_ +from .Model import * Model = ModelModule # \end{hacksRus} -from ModelConstructor import * -from Toolbox.ParamEst import ParamEst -from Toolbox.ModelEst import ModelEst -from MProject import * -from Symbolic import * -from ModelSpec import * -from parseUtils import auxfnDBclass, protected_allnames, protected_auxnamesDB, \ +from .ModelConstructor import * +from .Toolbox.ParamEst import ParamEst +from .Toolbox.ModelEst import ModelEst +from .MProject import * +from .Symbolic import * +from .ModelSpec import * +from .parseUtils import auxfnDBclass, protected_allnames, protected_auxnamesDB, \ convertPowers -from PyCont import * +from .PyCont import * import numpy import numpy as npy # alternate # import scipy already done at top @@ -125,13 +125,13 @@ # note that the names with leading underscores will not be exported by # "from PyDSTool import *" # diff overwrites numpy diff -from common import Verbose, Continuous, Discrete, targetLangs, _seq_types, \ +from .common import Verbose, Continuous, Discrete, targetLangs, _seq_types, \ _num_types, _int_types, _float_types, _complex_types, \ _real_types, _all_numpy_int, _all_numpy_float, \ _all_numpy_complex, _all_int, _all_float, _all_complex, \ LargestInt32, diff, diff2 from scipy import who as scipy_who -from utils import * +from .utils import * # ------ Check Python version compatibility @@ -215,8 +215,8 @@ # typelist_actual = [typelist] #else: # raise TypeError("Invalid PyDSTool object types passed") - for objname, obj in objdict.iteritems(): - if type(obj) not in [type, types.ClassType, types.ModuleType]: + for objname, obj in objdict.items(): + if type(obj) not in [type, type, types.ModuleType]: if compareClassAndBases(obj, typelist_actual): if isinstance(obj, QuantSpec) and objname in protected_allnames: # don't display internally-created QuantSpecs (i.e. all @@ -230,29 +230,29 @@ objdict_out[objname] = obj elif isinstance(obj, dict): if any([compareClassAndBases(x, typelist_actual) \ - for x in obj.values()]): + for x in list(obj.values())]): objdict_out[objname] = obj if returnlevel == 1: # silent mode -- just return the objects - return objdict_out.values() + return list(objdict_out.values()) elif returnlevel == 2: # silent mode -- return the objects mapped by their names return objdict_out else: - for objname, obj in objdict_out.iteritems(): + for objname, obj in objdict_out.items(): # make appropriate separation between output items if verboselevel > 0: - print "\n"*(verboselevel-1) + RefactoringTool: Refactored ./PyDSTool/common.py print("\n"*(verboselevel-1)) if hasattr(obj, '_infostr') and not isinstance(obj, type): try: - print objname + ": " + obj._infostr(verboselevel) + print(objname + ": " + obj._infostr(verboselevel)) except: - print "Problem with: ", objname, className(obj), \ - obj.info + print("Problem with: ", objname, className(obj), \ + obj.info) raise else: - print objname + " (Class " + className(obj) + ")" \ - + (verboselevel > 0)*":" + print(objname + " (Class " + className(obj) + ")" \ + + (verboselevel > 0)*":") if verboselevel > 0: info(obj, objname, recurseDepthLimit=verboselevel-1) @@ -271,10 +271,10 @@ objlist.append(objnamelist) saveObjects(objlist, sessionName+'.'+__session_ext, force) if not silent: - print "Important!" - print "If you used any user-defined classes for ModelSpec, these need to " - print "be recreated by running their definition scripts when you restore " - print "the session. saveSession only saves class _instances_." + print("Important!") + print("If you used any user-defined classes for ModelSpec, these need to ") + print("be recreated by running their definition scripts when you restore ") + print("the session. saveSession only saves class _instances_.") #Symbolic.saveDiffs(sessionName+'.'+__symbolic_ext) @@ -289,11 +289,11 @@ try: loadlist = loadObjects(sessionName) except: - print "Problem loading session " + sessionName + print("Problem loading session " + sessionName) raise numobjs = len(loadlist) - 1 # last entry is obj name list if len(loadlist) <= 0: - raise ValueError, "Session was empty!" + raise ValueError("Session was empty!") objnamelist = loadlist[-1] objlist = loadlist[:-1] frame = sys._getframe().f_back @@ -303,11 +303,11 @@ nspace = frame.f_globals # bind the original session names for the objects to the objects try: - for i in xrange(numobjs): + for i in range(numobjs): nspace[objnamelist[i]] = objlist[i] except: - print "Problem recreating objects" - print "Debug info: ", len(objnamelist), len(objlist), numobjs + print("Problem recreating objects") + print("Debug info: ", len(objnamelist), len(objlist), numobjs) raise # load any symbolic derivatives previously auto-saved #symbolic.loadDiffs(sessionName+'.'+__symbolic_ext) @@ -331,7 +331,7 @@ objdict = who(returnlevel=2, _localCall=True, deepSearch=deep) frame = sys._getframe().f_back nspace = frame.f_globals - for objname, obj in objdict.iteritems(): + for objname, obj in objdict.items(): if objname not in ['nameResolver', 'protected_auxnamesDB'] and \ (not isinstance(obj, ndarray) or delall==2): # don't delete those types of global objects --- ./PyDSTool/common.py (original) +++ ./PyDSTool/common.py (refactored) @@ -4,7 +4,7 @@ Robert Clewley, September 2005. """ -from errors import * +from .errors import * import sys, types import numpy as npy @@ -42,9 +42,9 @@ import os if os.name == 'nt': # slow object copying for you guys - import fixedpickle as pickle + from . import fixedpickle as pickle else: - import cPickle as pickle + import pickle as pickle # ---------------------------------------------------------------------------- ### EXPORTS @@ -410,7 +410,7 @@ # removed offset=0 from arg list if len(self.__dict__) > 0: res = "%s ("%attributeTitle - for k, v in self.__dict__.iteritems(): + for k, v in self.__dict__.items(): try: istr = v._infostr(verbose-1) #, offset+2) except AttributeError: @@ -427,27 +427,27 @@ return self._infostr() def info(self): - print self._infostr() + print(self._infostr()) __str__ = __repr__ def values(self): - return self.__dict__.values() + return list(self.__dict__.values()) def keys(self): - return self.__dict__.keys() + return list(self.__dict__.keys()) def items(self): - return self.__dict__.items() + return list(self.__dict__.items()) def itervalues(self): - return self.__dict__.itervalues() + return iter(self.__dict__.values()) def iterkeys(self): - return self.__dict__.iterkeys() + return iter(self.__dict__.keys()) def iteritems(self): - return self.__dict__.iteritems() + return iter(self.__dict__.items()) def __getitem__(self, k): return self.__dict__[k] @@ -468,7 +468,7 @@ return self.__dict__.get(k, d) def has_key(self, k): - return self.__dict__.has_key(k) + return k in self.__dict__ def pop(self, k, d=None): return self.__dict__.pop(k, d) @@ -593,7 +593,7 @@ def clearWarnings(self): self.warnings = [] - for obj in self.propagate_dict.values(): + for obj in list(self.propagate_dict.values()): try: obj.diagnostics.clearWarnings() except AttributeError: @@ -605,7 +605,7 @@ def showWarnings(self): if len(self.warnings)>0: - print self.getWarnings() + print(self.getWarnings()) def getWarnings(self): if len(self.warnings)>0: @@ -640,7 +640,7 @@ def clearErrors(self): self.errors = [] - for obj in self.propagate_dict.values(): + for obj in list(self.propagate_dict.values()): try: obj.diagnostics.clearErrors() except AttributeError: @@ -652,7 +652,7 @@ def showErrors(self): if len(self.errors)>0: - print self.getErrors() + print(self.getErrors()) def getErrors(self): if len(self.errors)>0: @@ -696,7 +696,7 @@ or *not* containing the specified keys if option neg=True.""" out_d = {} if neg: - out_keys = remain(d.keys(), keys) + out_keys = remain(list(d.keys()), keys) else: out_keys = keys for k in out_keys: @@ -713,7 +713,7 @@ retstr = '' if d != {}: if order == []: - order = d.keys() + order = list(d.keys()) for key in order: itemlist = d[key] for strlist in itemlist: @@ -735,10 +735,10 @@ if var.is_continuous_valued(): out_varnames.append(varname) out_vars.append(var) - return dict(zip(out_varnames, out_vars)) - else: - return dict(zip(sortedDictKeys(vardict), [copy(v) for v in \ - sortedDictValues(vardict)])) + return dict(list(zip(out_varnames, out_vars))) + else: + return dict(list(zip(sortedDictKeys(vardict), [copy(v) for v in \ + sortedDictValues(vardict)]))) def insertInOrder(sourcelist, inslist, return_ixs=False, abseps=0): @@ -832,9 +832,9 @@ for x, y in zip(a1,a2): o.append(max(x,y)) except TypeError: - print "Problem with type of arguments in arraymax:" - print "Received a1 =", a1 - print " a2 =", a2 + print("Problem with type of arguments in arraymax:") + print("Received a1 =", a1) + print(" a2 =", a2) raise return array(o,t) @@ -978,7 +978,7 @@ if vars is None: if x0type == 'array': dim = len(x0) - vars = range(dim) + vars = list(range(dim)) elif x0type == 'num': dim = 1 vars = [0] @@ -1007,8 +1007,8 @@ if sfx0[0] == 0: raise TypeError("Invalid function return type") except AssertionError: - print "fx0 shape is", sfx0 - print fx0 + print("fx0 shape is", sfx0) + print(fx0) raise ValueError("Function should return an N-vector or N x 1 matrix," " but it returned a matrix with shape %s" % str(sfx0)) if isinstance(fx0, _float_types): @@ -1029,7 +1029,7 @@ if axes is None: if x0type in ['array', 'num']: try: - axes = range(sfx0[0]) + axes = list(range(sfx0[0])) except IndexError: # then singleton (scalar) was returned axes = [0] @@ -1061,8 +1061,8 @@ else: # Point x0a = x0[vars].toarray() - dx = dict(zip(vars, - eps*(abs(x0a) + array(x0a==zeros(dim),'float64')))) + dx = dict(list(zip(vars, + eps*(abs(x0a) + array(x0a==zeros(dim),'float64'))))) try: dim_mat = len(axes) except TypeError: @@ -1163,7 +1163,7 @@ try: x0 = x0.astype(float) except: - print "Found type:", x0.dtype.type + print("Found type:", x0.dtype.type) raise TypeError("Only real-valued arrays valid") elif isinstance(x0, _real_types): x0type = 'num' @@ -1181,7 +1181,7 @@ if vars is None: if x0type == 'array': dim = len(x0) - vars = range(dim) + vars = list(range(dim)) elif x0type == 'num': dim = 1 vars = [0] @@ -1221,8 +1221,8 @@ else: raise TypeError("Invalid function return type") except AssertionError: - print "fx0 shape is", sfx0 - print fx0 + print("fx0 shape is", sfx0) + print(fx0) raise ValueError("Function should return an N-vector or N x 1 matrix," " but it returned a matrix with shape %s" % str(sfx0)) else: @@ -1234,7 +1234,7 @@ if axes is None: if x0type in ['array', 'num']: try: - axes = range(sfx0[0]) + axes = list(range(sfx0[0])) except IndexError: # then singleton (scalar) was returned axes = [0] @@ -1268,8 +1268,8 @@ else: # Point x0a = x0[vars].toarray() - dx = dict(zip(vars, - eps*(abs(x0a) + array(x0a==zeros(dim),'float64')))) + dx = dict(list(zip(vars, + eps*(abs(x0a) + array(x0a==zeros(dim),'float64'))))) assert dir==1 or dir==-1, "Direction code must be -1 or 1" try: @@ -1544,9 +1544,9 @@ try: code = compile(fstr, 'test', 'exec') except: - print " Cannot make unique function because of a syntax (or other) error " \ - "in supplied code:\n" - print fstr + print(" Cannot make unique function because of a syntax (or other) error " \ + "in supplied code:\n") + print(fstr) raise bracepos = fstr.index("(") if idstr is None: @@ -1589,7 +1589,7 @@ """Convert occurrences of types / classes, to pretty-printable strings.""" try: - if type(x) in [types.InstanceType, types.TypeType]: + if type(x) in [types.InstanceType, type]: return className(x, True) elif isinstance(x, list): # search through any iterable parts (that aren't strings) @@ -1611,7 +1611,7 @@ elif isinstance(x, dict): rx = "{" if len(x)>0: - for k, o in x.iteritems(): + for k, o in x.items(): rx += object2str(k, digits) + ": " + object2str(o, digits) + ", " return rx[:-2]+"}" else: @@ -1754,7 +1754,7 @@ # returns the mapping from the entries in an array or list to their indices def makeArrayIxMap(a): - return dict(zip(a, range(len(a)))) + return dict(list(zip(a, list(range(len(a)))))) # invert an index mapping or other form of mapping @@ -1766,12 +1766,12 @@ returned.""" if isinstance(themap, dict): try: - return dict(map(lambda (k,v): (v,k), themap.iteritems())) + return dict([(k_v[1],k_v[0]) for k_v in iter(themap.items())]) except TypeError: # e.g., list objects are unhashable # try it the slow way for this case result = {} - for k, v in themap.iteritems(): + for k, v in themap.items(): if isinstance(v, (list,tuple)): for val in v: result[val] = k @@ -1780,10 +1780,10 @@ return result elif isinstance(themap, (list,tuple)): # input domain is the position index - return dict(zip(themap, range(len(themap)))) + return dict(list(zip(themap, list(range(len(themap)))))) elif isinstance(themap, ndarray): # input domain is the position index - return dict(zip(themap.tolist(), range(len(themap)))) + return dict(list(zip(themap.tolist(), list(range(len(themap)))))) elif hasattr(themap, 'inverse'): # symbolMapClass type return themap.inverse() @@ -1867,13 +1867,13 @@ added filtering of keys. """ if onlykeys is None: - keys = d.keys() - else: - keys = intersect(d.keys(), onlykeys) + keys = list(d.keys()) + else: + keys = intersect(list(d.keys()), onlykeys) keys.sort() if reverse: keys.reverse() - return map(d.get, keys) + return list(map(d.get, keys)) def sortedDictKeys(d, onlykeys=None, reverse=False): """Return sorted list of keys from a dictionary. @@ -1881,9 +1881,9 @@ Adapted from original function by Alex Martelli: added filtering of keys.""" if onlykeys is None: - keys = d.keys() - else: - keys = intersect(d.keys(), onlykeys) + keys = list(d.keys()) + else: + keys = intersect(list(d.keys()), onlykeys) keys.sort() if reverse: keys.reverse() @@ -1895,9 +1895,9 @@ Adapted from an original function by Duncan Booth. """ if onlykeys is None: - onlykeys = d.keys() + onlykeys = list(d.keys()) if byvalue: - i = [(val, key) for (key, val) in d.items() if key in onlykeys] + i = [(val, key) for (key, val) in list(d.items()) if key in onlykeys] i.sort() if reverse: i.reverse() @@ -1905,7 +1905,7 @@ rkeys = [key for (val, key) in i] else: # by key - i = [(key, val) for (key, val) in d.items() if key in onlykeys] + i = [(key, val) for (key, val) in list(d.items()) if key in onlykeys] i.sort() if reverse: i.reverse() @@ -1918,7 +1918,7 @@ sorted by value (default) or key. Adapted from an original function by Duncan Booth. """ - return zip(*sortedDictLists(d, byvalue, onlykeys, reverse)) + return list(zip(*sortedDictLists(d, byvalue, onlykeys, reverse))) # ---------------------------------------------------------------------- @@ -1926,12 +1926,12 @@ # find intersection of two lists, sequences, etc. def intersect(a, b): - return filter(lambda e : e in b, a) + return [e for e in a if e in b] # find remainder of two lists, sequences, etc., after intersection def remain(a, b): - return filter(lambda e : e not in b, a) + return [e for e in a if e not in b] # ---------------------------------------------------------------------- @@ -2344,7 +2344,7 @@ self.vector_valued = False self.yi = self.yi[:,npy.newaxis] elif len(self.yi.shape)>2: - raise ValueError, "y coordinates must be either scalars or vectors" + raise ValueError("y coordinates must be either scalars or vectors") else: self.vector_valued = True @@ -2352,19 +2352,19 @@ self.n = n nn, r = self.yi.shape if nn!=n: - raise ValueError, "%d x values provided and %d y values; must be equal" % (n, nn) + raise ValueError("%d x values provided and %d y values; must be equal" % (n, nn)) self.r = r c = npy.zeros((n+1,r)) c[0] = yi[0] Vk = npy.zeros((n,r)) - for k in xrange(1,n): + for k in range(1,n): s = 0 while s<=k and xi[k-s]==xi[k]: s += 1 s -= 1 Vk[0] = yi[k]/float(spy.factorial(s)) - for i in xrange(k-s): + for i in range(k-s): assert xi[i]!=xi[k] if s==0: Vk[i+1] = (c[i]-Vk[i])/(xi[i]-xi[k]) @@ -2399,7 +2399,7 @@ pi = 1 p = npy.zeros((m,self.r)) p += self.c[0,npy.newaxis,:] - for k in xrange(1,n): + for k in range(1,n): w = x - self.xi[k-1] pi = w*pi p = p + npy.multiply.outer(pi,self.c[k]) @@ -2465,7 +2465,7 @@ p = npy.zeros((m,self.r)) p += self.c[0,npy.newaxis,:] - for k in xrange(1,n): + for k in range(1,n): w[k-1] = x - self.xi[k-1] pi[k] = w[k-1]*pi[k-1] p += npy.multiply.outer(pi[k],self.c[k]) @@ -2473,8 +2473,8 @@ cn = npy.zeros((max(der,n+1),m,r)) cn[:n+1,...] += self.c[:n+1,npy.newaxis,:] cn[0] = p - for k in xrange(1,n): - for i in xrange(1,n-k+1): + for k in range(1,n): + for i in range(1,n-k+1): pi[i] = w[k+i-1]*pi[i-1]+pi[i] cn[k] = cn[k]+pi[i,:,npy.newaxis]*cn[k+i] cn[k]*=factorial(k) @@ -2554,11 +2554,11 @@ self.n = len(xi) self.xi = npy.asarray(xi) if yi is not None and len(yi)!=len(self.xi): - raise ValueError, "yi dimensions do not match xi dimensions" + raise ValueError("yi dimensions do not match xi dimensions") self.set_yi(yi) self.wi = npy.zeros(self.n) self.wi[0] = 1 - for j in xrange(1,self.n): + for j in range(1,self.n): self.wi[:j]*=(self.xi[j]-self.xi[:j]) self.wi[j] = npy.multiply.reduce(self.xi[:j]-self.xi[j]) self.wi**=-1 @@ -2585,13 +2585,13 @@ self.vector_valued = False yi = yi[:,npy.newaxis] elif len(yi.shape)>2: - raise ValueError, "y coordinates must be either scalars or vectors" + raise ValueError("y coordinates must be either scalars or vectors") else: self.vector_valued = True n, r = yi.shape if n!=len(self.xi): - raise ValueError, "yi dimensions do not match xi dimensions" + raise ValueError("yi dimensions do not match xi dimensions") self.yi = yi self.r = r @@ -2614,23 +2614,23 @@ """ if yi is not None: if self.yi is None: - raise ValueError, "No previous yi value to update!" + raise ValueError("No previous yi value to update!") yi = npy.asarray(yi) if len(yi.shape)==1: if self.vector_valued: - raise ValueError, "Cannot extend dimension %d y vectors with scalars" % self.r + raise ValueError("Cannot extend dimension %d y vectors with scalars" % self.r) yi = yi[:,npy.newaxis] elif len(yi.shape)>2: - raise ValueError, "y coordinates must be either scalars or vectors" + raise ValueError("y coordinates must be either scalars or vectors") else: n, r = yi.shape if r!=self.r: - raise ValueError, "Cannot extend dimension %d y vectors with dimension %d y vectors" % (self.r, r) + raise ValueError("Cannot extend dimension %d y vectors with dimension %d y vectors" % (self.r, r)) self.yi = npy.vstack((self.yi,yi)) else: if self.yi is not None: - raise ValueError, "No update to yi provided!" + raise ValueError("No update to yi provided!") old_n = self.n self.xi = npy.concatenate((self.xi,xi)) self.n = len(self.xi) @@ -2638,7 +2638,7 @@ old_wi = self.wi self.wi = npy.zeros(self.n) self.wi[:old_n] = old_wi - for j in xrange(old_n,self.n): + for j in range(old_n,self.n): self.wi[:j]*=(self.xi[j]-self.xi[:j]) self.wi[j] = npy.multiply.reduce(self.xi[:j]-self.xi[j]) self.wi**=-1 @@ -2733,7 +2733,7 @@ self.vector_valued = False self.r = 1 else: - raise ValueError, "Each derivative must be a vector, not a higher-rank array" + raise ValueError("Each derivative must be a vector, not a higher-rank array") self.xi = [xi[0]] self.yi = [yi0] @@ -2760,7 +2760,7 @@ n2 = min(n-n1,len(y2)) n1 = min(n-n2,len(y1)) if n1+n2!=n: - raise ValueError, "Point %g has %d derivatives, point %g has %d derivatives, but order %d requested" % (x1, len(y1), x2, len(y2), order) + raise ValueError("Point %g has %d derivatives, point %g has %d derivatives, but order %d requested" % (x1, len(y1), x2, len(y2), order)) assert n1<=len(y1) assert n2<=len(y2) @@ -2793,15 +2793,15 @@ yi = npy.asarray(yi) if self.vector_valued: if (len(yi.shape)!=2 or yi.shape[1]!=self.r): - raise ValueError, "Each derivative must be a vector of length %d" % self.r + raise ValueError("Each derivative must be a vector of length %d" % self.r) else: if len(yi.shape)!=1: - raise ValueError, "Each derivative must be a scalar" + raise ValueError("Each derivative must be a scalar") if self.direction is None: self.direction = npy.sign(xi-self.xi[-1]) elif (xi-self.xi[-1])*self.direction < 0: - raise ValueError, "x coordinates must be in the %d direction: %s" % (self.direction, self.xi) + raise ValueError("x coordinates must be in the %d direction: %s" % (self.direction, self.xi)) self.xi.append(xi) self.yi.append(yi) @@ -2839,7 +2839,7 @@ None indicates that it should be deduced from the first two xi """ - for i in xrange(len(xi)): + for i in range(len(xi)): if orders is None or npy.isscalar(orders): self.append(xi[i],yi[i],orders) else: @@ -2867,7 +2867,7 @@ y = npy.zeros((m,self.r)) else: y = npy.zeros(m) - for i in xrange(self.n-1): + for i in range(self.n-1): c = pos==i y[c] = self.polynomials[i](x[c]) return y @@ -2920,7 +2920,7 @@ y = npy.zeros((der,m,self.r)) else: y = npy.zeros((der,m)) - for i in xrange(self.n-1): + for i in range(self.n-1): c = pos==i y[:,c] = self.polynomials[i].derivatives(x[c],der=der) return y @@ -3019,9 +3019,9 @@ if constraint is None: if self.verbose: def res_fn(p): - print "\n",p + print("\n",p) r = self.fn(xs, *p) - ys - print "Residual = %f"%norm(r*weight) + print("Residual = %f"%norm(r*weight)) return r*weight else: def res_fn(p): @@ -3030,9 +3030,9 @@ else: if self.verbose: def res_fn(p): - print "\n",p + print("\n",p) r = npy.concatenate((constraint(*p), (self.fn(xs, *p) - ys)*weight)) - print "Residual = %f"%norm(r) + print("Residual = %f"%norm(r)) return r else: def res_fn(p): @@ -3046,10 +3046,10 @@ RefactoringTool: Refactored ./PyDSTool/conf.py RefactoringTool: No changes to ./PyDSTool/errors.py RefactoringTool: Refactored ./PyDSTool/fixedpickle.py gtol = self.algpars.gtol, maxfev = self.algpars.maxfev) except: - print "Error at parameters", pars_ic + print("Error at parameters", pars_ic) raise if self.verbose: - print "Result: ", res + print("Result: ", res) return res def fit(self, xs, ys, pars_ic=None, opts=None): @@ -3502,7 +3502,7 @@ value indicates whether a message was issue. """ if self.ge(level): - print >>self.fileo, s + print(s, file=self.fileo) return True return False @@ -3512,7 +3512,7 @@ value indicates whether a message was issued """ if self.ge('error'): - print >>self.erro, s + print(s, file=self.erro) return True return False --- ./PyDSTool/conf.py (original) +++ ./PyDSTool/conf.py (refactored) @@ -40,8 +40,8 @@ master_doc = 'index' # General information about the project. -project = u'PyDSTool' -copyright = u'2010, Robert Clewley' +project = 'PyDSTool' +copyright = '2010, Robert Clewley' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the @@ -178,8 +178,8 @@ # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, author, documentclass [howto/manual]). latex_documents = [ - ('index', 'PyDSTool.tex', u'PyDSTool Documentation', - u'Robert Clewley', 'manual'), + ('index', 'PyDSTool.tex', 'PyDSTool Documentation', + 'Robert Clewley', 'manual'), ] # The name of an image file (relative to this directory) to place at the top of @@ -211,6 +211,6 @@ # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). man_pages = [ - ('index', 'pydstool', u'PyDSTool Documentation', - [u'Robert Clewley'], 1) + ('index', 'pydstool', 'PyDSTool Documentation', + ['Robert Clewley'], 1) ] --- ./PyDSTool/fixedpickle.py (original) +++ ./PyDSTool/fixedpickle.py (refactored) @@ -30,8 +30,8 @@ __version__ = "$Revision: 1.156 $" # Code version from types import * -from copy_reg import dispatch_table -from copy_reg import _extension_registry, _inverted_registry, _extension_cache +from copyreg import dispatch_table +from copyreg import _extension_registry, _inverted_registry, _extension_cache import marshal import sys import struct @@ -199,7 +199,7 @@ """ if protocol is not None and bin is not None: - raise ValueError, "can't specify both 'protocol' and 'bin'" + raise ValueError("can't specify both 'protocol' and 'bin'") if bin is not None: warnings.warn("The 'bin' argument to Pickler() is deprecated", PendingDeprecationWarning) @@ -264,7 +264,7 @@ else: return LONG_BINPUT + pack("d', obj)) else: - self.write(FLOAT + `obj` + '\n') + self.write(FLOAT + repr(obj) + '\n') dispatch[FloatType] = save_float def save_string(self, obj, pack=struct.pack): @@ -507,7 +507,7 @@ else: self.write(BINSTRING + pack(" 0 ashex = hex(x) njunkchars = 2 + ashex.endswith('L') @@ -1385,19 +1385,19 @@ nbytes = len(data) if nbytes == 0: - return 0L + return 0 ashex = _binascii.hexlify(data[::-1]) - n = long(ashex, 16) # quadratic time before Python 2.3; linear now + n = int(ashex, 16) # quadratic time before Python 2.3; linear now if data[-1] >= '\x80': - n -= 1L << (nbytes * 8) + n -= 1 << (nbytes * 8) return n # Shorthands try: - from cStringIO import StringIO + from io import StringIO except ImportError: - from StringIO import StringIO + from io import StringIO def dump(obj, file, protocol=None, bin=None): Pickler(file, protocol, bin).dump(obj) --- ./PyDSTool/integrator.py (original) +++ ./PyDSTool/integrator.py (refactored) @@ -2,9 +2,9 @@ Erik Sherwood, September 2006 """ -from errors import PyDSTool_InitError as InitError -from errors import PyDSTool_ClearError as ClearError -from common import _all_int, _real_types, \ +from .errors import PyDSTool_InitError as InitError +from .errors import PyDSTool_ClearError as ClearError +from .common import _all_int, _real_types, \ verify_intbool, verify_pos, verify_nonneg, verify_values from numpy import isinf, Inf import operator @@ -110,7 +110,7 @@ verify_nonneg('nExtInputs', nExtInputs, _all_int) verify_nonneg('extraSpace', extraSpace, _all_int) except: - print sys.exc_info()[0], sys.exc_info()[1] + print(sys.exc_info()[0], sys.exc_info()[1]) raise InitError('Integrator initialization failed!') @@ -366,7 +366,7 @@ if orientation > 0: for y in range(len(extInputTimes[x])-1): if extInputTimes[x][y] >= extInputTimes[x][y+1]: - print x, y, extInputTimes[x][y],extInputTimes[x][y+1] + print(x, y, extInputTimes[x][y],extInputTimes[x][y+1]) raise ValueError("extInputTimes must be ordered consistently") @@ -442,7 +442,7 @@ if not isinstance(ic, list): raise TypeError("ic must be list") if len(ic) != self.phaseDim: - print "IC length %i didn't match phaseDim %i"%(len(ic), self.phaseDim), ic + print("IC length %i didn't match phaseDim %i"%(len(ic), self.phaseDim), ic) raise ValueError('ic must have length equal to phaseDim') for x in ic: if not isinstance(x, _real_types): --- ./PyDSTool/matplotlib_import.py (original) +++ ./PyDSTool/matplotlib_import.py (refactored) @@ -14,7 +14,7 @@ else: import matplotlib.pyplot as plt from matplotlib.pyplot import * -except RuntimeError, err: +except RuntimeError as err: if str(err) == 'could not open display': failed=True else: @@ -26,18 +26,18 @@ # Dummy plot overrides for PyDSTool when matplotlib fails to import def plot(*args, **kw): - print "Warning: plot does not work!" + print("Warning: plot does not work!") def save_fig(fignum, fname, formats=[]): - print "Warning: plot does not work!" + print("Warning: plot does not work!") - print "Warning: matplotlib failed to import properly and so is not" - print " providing a graphing interface" + print("Warning: matplotlib failed to import properly and so is not") + print(" providing a graphing interface") plt = None # will cause an error if someone tries to access in order to plot else: import os - from Trajectory import Trajectory - from common import _num_types + from .Trajectory import Trajectory + from .common import _num_types # Convenient shorthand to permit singleton numeric types and Trajectories # in the plot arguments without first converting them to lists or arrays. --- ./PyDSTool/parseUtils.py (original) +++ ./PyDSTool/parseUtils.py (refactored) @@ -8,9 +8,9 @@ """ # IMPORTS -from __future__ import division -from errors import * -from common import * + +from .errors import * +from .common import * import re import math, random from numpy import alltrue, sometrue @@ -80,10 +80,8 @@ 'exp2', 'radian', 'cosdg', 'sindg', 'tandg', 'cotdg', 'log1p', 'expm1', 'cosm1', 'round'] protected_specialfns = ['special_'+s for s in specialfns] -protected_mathnames = filter(lambda s: not s.startswith('__'), \ - dir(math)) -protected_randomnames = filter(lambda s: not s.startswith('_'), \ - dir(random)) # yes, just single _ +protected_mathnames = [s for s in dir(math) if not s.startswith('__')] +protected_randomnames = [s for s in dir(random) if not s.startswith('_')] # yes, just single _ # We add internal default auxiliary function names for use by # functional specifications. builtin_auxnames = ['globalindepvar', 'initcond', 'heav', 'if', @@ -152,7 +150,7 @@ name_chars_RE = re.compile('\w') alphanumeric_chars_RE = re.compile('[a-zA-Z0-9]') # without the '_' alphabet_chars_RE = re.compile('[a-zA-Z]') -num_chars = map(lambda i: str(i), range(10)) +num_chars = [str(i) for i in range(10)] if DO_POW: POW_STR = 'pow(%s,%s)' @@ -180,7 +178,7 @@ # and Robert Clewley. syms=token.tok_name -for s in symbol.sym_name.keys(): +for s in list(symbol.sym_name.keys()): syms[s]=symbol.sym_name[s] @@ -295,8 +293,8 @@ # so ignore return t except: - print t - print ast2string(t) + print(t) + print(ast2string(t)) raise elif t[0] == 'xor_expr' and t[2][0]=='CIRCUMFLEX': # ^ syntax has complex binding rules in python parser's AST! @@ -419,7 +417,7 @@ def sym2name(t): if type(t) is parser.ASTType: return sym2name(t.tolist()) if not isinstance(t, list): return t - return [syms[t[0]]]+map(sym2name,t[1:]) + return [syms[t[0]]]+list(map(sym2name,t[1:])) def string2ast(t): return sym2name(ast2shortlist(parser.expr(t))) @@ -928,7 +926,7 @@ # not copyable, so no need to worry res = arg try: - for k, v in arg.iteritems(): + for k, v in arg.items(): new_k = self.__call__(k) new_v = self.__call__(v) res[new_k] = new_v @@ -1004,26 +1002,25 @@ return self.lookupDict.__contains__(symbol) def keys(self): - return self.lookupDict.keys() + return list(self.lookupDict.keys()) def values(self): - return self.lookupDict.values() + return list(self.lookupDict.values()) def items(self): - return self.lookupDict.items() + return list(self.lookupDict.items()) def iterkeys(self): - return self.lookupDict.iterkeys() + return iter(self.lookupDict.keys()) def itervalues(self): - return self.lookupDict.itervalues() + return iter(self.lookupDict.values()) def iteritems(self): - return self.lookupDict.iteritems() + return iter(self.lookupDict.items()) def inverse(self): - return symbolMapClass(dict(map(lambda (k,v): (v,k), - self.lookupDict.iteritems()))) + return symbolMapClass(dict([(k_v[1],k_v[0]) for k_v in iter(self.lookupDict.items())])) def update(self, amap): try: @@ -1079,7 +1076,7 @@ def __call__(self, parserObj=None): if parserObj is None: # return all auxiliary functions known - return self.auxnames.values() + return list(self.auxnames.values()) else: try: return [self.auxnames[parserObj]] @@ -1088,7 +1085,7 @@ def removeAuxFn(self, auxfnName): flagdelete = None - for k, v in self.auxnames.iteritems(): + for k, v in self.auxnames.items(): if v == auxfnName: flagdelete = k break @@ -1129,7 +1126,7 @@ if type(specStr) is str: self.specStr = specStr else: - print "Found type", type(specStr), ": ", specStr + print("Found type", type(specStr), ": ", specStr) raise TypeError("specStr must be a string") self.treatMultiRefs = treatMultiRefs # record init options in case want to reset @@ -1335,7 +1332,7 @@ ## raise ValueError('Symbol ^ is not allowed. ' ## 'Please use the pow() call') ## else: - print "Problem with string '%s'"%specstr + print("Problem with string '%s'"%specstr) raise ValueError('Symbol %s is illegal. '%stemp) elif stemp == '[': # self.treatMultiRefs == False and '[' in specialtokens @@ -1484,7 +1481,7 @@ if s == 'for': # check next char is '(' if specstr[scount] != '(': - print "Next char found:", specstr[scount] + print("Next char found:", specstr[scount]) raise ValueError("Invalid 'for' macro syntax") # find next ')' (for statement should contain no # braces itself) @@ -1502,9 +1499,9 @@ temp.tokenized[2] == temp.tokenized[4] == ',', temp.tokenized[5] in ['+','*']] if not alltrue(macrotests): - print "specstr was: ", specstr - print "tokens: ", temp.tokenized - print "test results: ", macrotests + print("specstr was: ", specstr) + print("tokens: ", temp.tokenized) + print("test results: ", macrotests) raise ValueError("Invalid sub-clause in " "'for' macro") # start next parsing iteration after the ')' @@ -1765,7 +1762,7 @@ return tuple(themap(target)) elif hasattr(target, 'iteritems'): o = {} - for k, v in target.iteritems(): + for k, v in target.items(): o[themap(k)] = v return o elif isinstance(target, str): @@ -1929,7 +1926,7 @@ else: splitdone = True except: - print "Error in matrix specification" + print("Error in matrix specification") raise return specdict @@ -2029,7 +2026,7 @@ def makeParList(objlist, prefix=''): """wrap objlist into a comma separated string of str(objects)""" - parlist = ', '.join(map(lambda i: prefix+str(i), objlist)) + parlist = ', '.join([prefix+str(i) for i in objlist]) return parlist @@ -2050,7 +2047,7 @@ # find callfn in source findposlist = [source[currpos:].find(callfn+'(')] try: - findpos = min(filter(lambda x:x>=0,findposlist))+currpos + findpos = min([x for x in findposlist if x>=0])+currpos except ValueError: done = True if not done: @@ -2247,7 +2244,7 @@ sub_source = source[startbrace+1:endbrace] embedded_calls = [sub_source.find(fname+'(') for fname in callfns] try: - subpositions = filter(lambda x:x>0, embedded_calls) + subpositions = [x for x in embedded_calls if x>0] if subpositions == []: filtered_sub_source = sub_source new_d = {} @@ -2270,7 +2267,7 @@ output += source[currpos:] if dummies != {}: new_dummies = dummies.copy() - for k, v in dummies.items(): + for k, v in RefactoringTool: Refactored ./PyDSTool/scipy_ode.py list(dummies.items()): new_v, new_d = replaceCallsWithDummies(v, callfns, used_dummies, notFirst=True) new_dummies[k] = new_v @@ -2317,7 +2314,7 @@ # remove so that findpos except clause doesn't get confused findposlist_candidates.remove(candidate_pos) try: - findpos = min(filter(lambda x:x>=0,findposlist))+currpos + findpos = min([x for x in findposlist if x>=0])+currpos except ValueError: # findposlist is empty done = True @@ -2338,7 +2335,7 @@ sub_source = source[startbrace+1:endbrace] embedded_calls = [sub_source.find(fname+'(') for fname in callfns] try: - subpositions = filter(lambda x:x>0,embedded_calls) + subpositions = [x for x in embedded_calls if x>0] if subpositions == []: filtered_sub_source = sub_source else: --- ./PyDSTool/scipy_ode.py (original) +++ ./PyDSTool/scipy_ode.py (refactored) @@ -151,7 +151,7 @@ def set_initial_value(self,y,t=0.0): """Set initial conditions y(t) = y.""" - if type(y) in [types.IntType,types.FloatType]: + if type(y) in [int,float]: y = [y] n_prev = len(self.y) self.y = asarray(y,'d') @@ -165,8 +165,8 @@ """Set integrator by name.""" integrator = find_integrator(name) if integrator is None: - print 'No integrator name match with %s or is not available.'\ - %(`name`) + print('No integrator name match with %s or is not available.'\ + %(repr(name))) else: self._integrator = integrator(**integrator_params) if not len(self.y): @@ -233,18 +233,17 @@ Return 2-tuple (y1,t1) where y1 is the result and t=t1 defines the stoppage coordinate of the result. """ - raise NotImplementedError,\ - 'all integrators must define run(f,jac,t0,t1,y0,f_params,jac_params)' + raise NotImplementedError('all integrators must define run(f,jac,t0,t1,y0,f_params,jac_params)') def step(self,f,jac,y0,t0,t1,f_params,jac_params): """Make one integration step and return (y1,t1).""" - raise NotImplementedError,'%s does not support step() method' %\ - (self.__class__.__name__) + raise NotImplementedError('%s does not support step() method' %\ + (self.__class__.__name__)) def run_relax(self,f,jac,y0,t0,t1,f_params,jac_params): """Integrate from t=t0 to t>=t1 and return (y1,t).""" - raise NotImplementedError,'%s does not support run_relax() method' %\ - (self.__class__.__name__) + raise NotImplementedError('%s does not support run_relax() method' %\ + (self.__class__.__name__)) #XXX: __str__ method for getting visual state of the integrator @@ -252,7 +251,7 @@ try: import scipy.integrate.vode as _vode except ImportError: - print sys.exc_value + print(sys.exc_info()[1]) _vode = None runner = getattr(_vode,'dvode',None) @@ -282,7 +281,7 @@ if re.match(method,r'adams',re.I): self.meth = 1 elif re.match(method,r'bdf',re.I): self.meth = 2 - else: raise ValueError,'Unknown integration method %s'%(method) + else: raise ValueError('Unknown integration method %s'%(method)) self.with_jacobian = with_jacobian self.rtol = rtol self.atol = atol @@ -336,7 +335,7 @@ elif mf in [24,25]: lrw = 22 + 11*n + (3*self.ml+2*self.mu)*n else: - raise ValueError,'Unexpected mf=%s'%(mf) + raise ValueError('Unexpected mf=%s'%(mf)) if miter in [0,3]: liw = 30 else: @@ -357,7 +356,7 @@ def run(self,*args): y1,t,istate = self.runner(*(args[:5]+tuple(self.call_args)+args[5:])) if istate <0: - print 'vodRefactoringTool: Refactored ./PyDSTool/utils.py e:',self.messages.get(istate,'Unexpected istate=%s'%istate) + print('vode:',self.messages.get(istate,'Unexpected istate=%s'%istate)) self.success = 0 else: self.call_args[3] = 2 # upgrade istate from 1 to 2 @@ -389,7 +388,7 @@ while ode_runner.successful() and ode_runner.t < 50: y1 = ode_runner.integrate(ode_runner.t+2) - print ode_runner.t,y1[:3] + print(ode_runner.t,y1[:3]) def test2(f, jac): # Stiff problem. Requires analytic Jacobian. @@ -399,11 +398,11 @@ method='bdf', ) r.set_initial_value([1,0,0]) - print 'At t=%s y=%s'%(r.t,r.y) + print('At t=%s y=%s'%(r.t,r.y)) tout = 0.4 for i in range(12): r.integrate(tout) - print 'At t=%s y=%s'%(r.t,r.y) + print('At t=%s y=%s'%(r.t,r.y)) tout *= 10 @@ -425,9 +424,8 @@ if __name__ == "__main__": - print 'Integrators available:',\ - ', '.join(map(lambda c:c.__name__, - IntegratorBase.integrator_classes)) + print('Integrators available:',\ + ', '.join([c.__name__ for c in IntegratorBase.integrator_classes])) test1(f1) test2(f2, jac) --- ./PyDSTool/utils.py (original) +++ ./PyDSTool/utils.py (refactored) @@ -2,10 +2,10 @@ User utilities. """ -from errors import * -from common import * -import Redirector as redirc -from parseUtils import joinStrs +from .errors import * +from .common import * +from . import Redirector as redirc +from .parseUtils import joinStrs from numpy import Inf, NaN, isfinite, less, greater, sometrue, alltrue, \ searchsorted, take, argsort, array, swapaxes, asarray, zeros, transpose, \ @@ -51,7 +51,7 @@ # writeout file .m mfile = open(name+".m", 'w') mfile.write("function %s = %s(%s)\n"%(name,name,argname)) - for k, v in defs.iteritems(): + for k, v in defs.items(): if k != name: mfile.write("%s = %s;\n"%(k,v)) # now the final definition of tau_recip or inf @@ -68,17 +68,17 @@ if recurseDepth == 1: if not _repeatFirstTime: # first time through - print "Information for " + specName + "\n" - else: - print specName + ":", + print("Information for " + specName + "\n") + else: + print(specName + ":", end=' ') if x.__class__ is type: return if hasattr(x, 'iteritems'): x_keys = sortedDictKeys(x) if len(x_keys) == 0: - print "< empty >" + print("< empty >") elif recurseDepth != 1: - print "" + print("") for k in x_keys: v = x[k] kstr = object2str(k) @@ -111,9 +111,9 @@ if recurseDepth==1 and len(outStrList)>1: # print an extra space between topmost level entries # provided those entries occupy more than one line. - print "\n" + print("\n") for s in outStrList: - print s + print(s) elif hasattr(x, '__dict__') and recurseDepth <= recurseDepthLimit: info(x.__dict__, specName, offset, recurseDepth, recurseDepthLimit, True) @@ -121,7 +121,7 @@ xstr = repr(x) if xstr == '': xstr = '< no information >' - print xstr + print(xstr) _implicitSolveMethods = ['newton', 'bisect', 'steffe', 'fsolve'] @@ -243,7 +243,7 @@ ## rerr.stop() return res - except TypeError, e: + except TypeError as e: if solmethod == 'bisect': infostr = " (did you specify a pair for x0?)" else: @@ -254,11 +254,11 @@ return newton_fn elif solmethod == 'bisect': if fprime is not None: - print "Warning: fprime argument unused for bisection method" + print("Warning: fprime argument unused for bisection method") return bisect_fn elif solmethod == 'steffe': if fprime is not None: - print "Warning: fprime argument unused for aitken method" + print("Warning: fprime argument unused for aitken method") return steffe_fn elif solmethod == 'fsolve': return fsolve_fn @@ -311,7 +311,7 @@ ins_off = 0 pta = array([pt]) # extra [] to get compatible shape for concat - dim_range = range(target.shape[1]) + dim_range = list(range(target.shape[1])) # neighborhood nhood = target[index-lo_off:index+hi_off] if all(ismonotonic(nhood[:,d]) for d in dim_range): @@ -369,7 +369,7 @@ curr_tol = [tol] * len(target_array) est_tol = 0.0 - for i in xrange(len(target_array)): + for i in range(len(target_array)): best_off = 0 # used to adjust closest_indices[i] for best approximating element in input_array if closest_indices[i] >= input_array_len: @@ -463,20 +463,20 @@ """ if evnames is None: - evnames = edict.keys() - else: - assert remain(evnames, edict.keys()) == [], "Invalid event names passed" + evnames = list(edict.keys()) + else: + assert remain(evnames, list(edict.keys())) == [], "Invalid event names passed" # put times as first tuple entry of etuplelist if nonames: alltlist = [] - for (evname,tlist) in edict.items(): + for (evname,tlist) in list(edict.items()): if evname in evnames: alltlist.extend(tlist) alltlist.sort() return alltlist else: etuplelist = [] - for (evname,tlist) in edict.items(): + for (evname,tlist) in list(edict.items()): if evname in evnames: etuplelist.extend([(t,evname) for t in tlist]) # sort by times @@ -518,7 +518,7 @@ xdict = xdict_base.copy() if use_gen_params: def Rhs_wrap(x, t): - xdict.update(dict(zip(x0_names, x))) + xdict.update(dict(list(zip(x0_names, x)))) try: return take(gen.Rhs(t, xdict, gen.pars), x0_ixs) except (OverflowError, ValueError): @@ -526,7 +526,7 @@ else: def Rhs_wrap(x, t, pdict): - xdict.update(dict(zip(x0_names, x))) + xdict.update(dict(list(zip(x0_names, x)))) try: return take(gen.Rhs(t, xdict, pdict), x0_ixs) except (OverflowError, ValueError): @@ -563,14 +563,14 @@ xdict = xdict_base.copy() if use_gen_params: def Jac_wrap(x, t): - xdict.update(dict(zip(x0_names, x))) + xdict.update(dict(list(zip(x0_names, x)))) try: return take(take(gen.Jacobian(t, xdict, gen.pars), x0_ixs,0), x0_ixs,1) except (OverflowError, ValueError): return array([overflow_penalty]*dim) else: def Jac_wrap(x, t, pdict): - xdict.update(dict(zip(x0_names, x))) + xdict.update(dict(list(zip(x0_names, x)))) try: return take(take(gen.Jacobian(t, xdict, pdict), x0_ixs,0), x0_ixs,1) except (OverflowError, ValueError): @@ -627,9 +627,9 @@ pickle.dump(obj, pklfile, opt) except: if hasattr(obj, 'name'): - print "Failed to save '%s'"%obj.name + print("Failed to save '%s'"%obj.name) else: - print "Failed to save object '%s'"%str(obj) + print("Failed to save object '%s'"%str(obj)) raise pklfile.close() @@ -680,16 +680,16 @@ except EOFError: notDone = False except: - print "Error in un-pickling:" - print "Was the object created with an old version of PyDSTool?" + print("Error in un-pickling:") + print("Was the object created with an old version of PyDSTool?") pklfile.close() raise pklfile.close() if objlist == []: RefactoringTool: Refactored ./PyDSTool/tests/CIN.py if getall: - print "No objects found in file" - else: - print "No named objects found in file" + print("No objects found in file") + else: + print("No named objects found in file") if was_singleton_name: return objlist[0] else: @@ -699,7 +699,7 @@ def intersect(a, b): """Find intersection of two lists, sequences, etc. Returns a list that includes repetitions if they occur in the inputs.""" - return filter(lambda e : e in b, a) + return [e for e in a if e in b] def union(a, b): """Find union of two lists, sequences, etc. @@ -710,7 +710,7 @@ def remain(a, b): """Find remainder of two lists, sequences, etc., after intersection. Returns a list that includes repetitions if they occur in the inputs.""" - return filter(lambda e : e not in b, a) + return [e for e in a if e not in b] def compareList(a, b): """Compare elements of lists, ignoring order (like sets).""" @@ -730,9 +730,9 @@ Deprecated as of v0.89.""" if isinstance(fieldvalues, ndarray): - return dict(zip(fieldnames, [a.tolist() for a in fieldvalues])) - else: - return dict(zip(fieldnames, fieldvalues)) + return dict(list(zip(fieldnames, [a.tolist() for a in fieldvalues]))) + else: + return dict(list(zip(fieldnames, fieldvalues))) # ------------------------ --- ./PyDSTool/tests/CIN.py (original) +++ ./PyDSTool/tests/CIN.py (refactored) @@ -24,17 +24,17 @@ # test of inherited sub-components c=MNcell('c') -print "Inherited compatible sub-components of an MN cell are:" +print("Inherited compatible sub-components of an MN cell are:") allcompats = [className(csub) for csub in c._allSubcomponentTypes] -print allcompats, "\n" +print(allcompats, "\n") assert allcompats==['channel', 'Par', 'Var', 'Input', 'Fun', 'Component'] def gaussianICs(varnames, mu, sigma): - return dict(zip(varnames, [random.gauss(mu, sigma) for v in varnames])) + return dict(list(zip(varnames, [random.gauss(mu, sigma) for v in varnames]))) def uniformICs(varnames, a, b): - return dict(zip(varnames, [random.uniform(a, b) for v in varnames])) + return dict(list(zip(varnames, [random.uniform(a, b) for v in varnames]))) defICs_soma = { @@ -47,7 +47,7 @@ def defaultICs(cell): defICs = defICs_soma[type(cell)] ics = {} - for k, v in defICs.iteritems(): + for k, v in defICs.items(): ics[cell.name+'.'+k] = v return ics @@ -66,13 +66,13 @@ noauxs = True auxwarning_part="Building model with auxiliary variables" if noauxs: - print "Not "+auxwarning_part.lower() + print("Not "+auxwarning_part.lower()) else: - print auxwarning_part + print(auxwarning_part) targetGen = 'Dopri_ODEsystem' -print "Target integrator is "+targetGen -print "------------------------------------" +print("Target integrator is "+targetGen) +print("------------------------------------") # measure time to build model t0 = clock() @@ -165,7 +165,7 @@ HHnet = makePointNeuronNetwork('HHnet', [RGNcell1, MNcell1, synRGN_MN]) t1=clock() -print "Compiled network specification in %f seconds"%(t1-t0) +print("Compiled network specification in %f seconds"%(t1-t0)) ## uncomment for easy interactive reference at prompt #flatspec = HHnet.flattenSpec() @@ -188,8 +188,8 @@ CB.set(ics=ic_args_net, checklevel=0) t1=clock() -print "Instantiated model for target ODE solver %s in %f seconds"%(targetGen, - t1-t0) +print("Instantiated model for target ODE solver %s in %f seconds"%(targetGen, + t1-t0)) def getTraj(dt_plot=0.25, tend=1000): # dt_plot only controls resolution of plot data, not integration @@ -199,16 +199,16 @@ return CB.sample('test')#, dt=dt_plot) -print "\nParameters defined: check using who(Par)" +print("\nParameters defined: check using who(Par)") who(Par) -print "\nCells defined: check using who(soma, deepSearch=True)" +print("RefactoringTool: No changes to ./PyDSTool/tests/DAE_example.py RefactoringTool: Refactored ./PyDSTool/tests/Dopri_backwards_test.py RefactoringTool: Refactored ./PyDSTool/tests/HH_DSSRTtest.py \nCells defined: check using who(soma, deepSearch=True)") who(soma, deepSearch=True) # try out conversion of expression to a function of the free names RGNtaun_fun = expr2fun(RGNtaun, theta_n=-52, k_n=-5, taun_bar=10) -print "\nRGNtaun_fun is a Python function created from the ModelSpecs using expr2fun()" -print "RGNtaun_fun(-10.) =", RGNtaun_fun(-10.) +print("\nRGNtaun_fun is a Python function created from the ModelSpecs using expr2fun()") +print("RGNtaun_fun(-10.) =", RGNtaun_fun(-10.)) # -------------------------------------------------------------------- @@ -243,26 +243,26 @@ # -------------------------------------------------------------------- -print "\n\nComputing trajectory and getting plot data..." +print("\n\nComputing trajectory and getting plot data...") t0=clock() v_dat = getTraj() t1=clock() -print "... finished in %f seconds\n"%(t1-t0) +print("... finished in %f seconds\n"%(t1-t0)) #plotActivation(MNtaun, [-100,30], [MNtheta_n, MNk_n, MNtaun_bar]) plotVoltages(v_dat) plt.figure() -print "Plotting synaptic facilitation variable, sRM.d ..." +print("Plotting synaptic facilitation variable, sRM.d ...") plot(v_dat['t'], v_dat['sRM.d']) -print "Setting other terminal events ..." +print("Setting other terminal events ...") CB.setDSEventActive(target='HHnet', eventTarget='RGNcell1_K_n_stat_dec_evt', flagVal=True) CB.setDSEventTerm(target='HHnet', eventTarget='RGNcell1_K_n_stat_dec_evt', flagVal=True) CB.compute(trajname='test2', tdata=[0,300]) -print "Computed additional trajectory." +print("Computed additional trajectory.") ###### Other useful operations with CIN --- ./PyDSTool/tests/Dopri_backwards_test.py (original) +++ ./PyDSTool/tests/Dopri_backwards_test.py (refactored) @@ -21,7 +21,7 @@ ode = Generator.Dopri_ODEsystem(DSargs) ode.set(tdata=[0, 10]) trajf = ode.compute('testf') -print "======================" +print("======================") DSargsB = args() DSargsB.varspecs = {'x': 'k*x'} DSargsB.pars = {'k': .1} @@ -34,7 +34,7 @@ odeb.set(tdata=[-10, 0]) trajb = odeb.compute('testb', 'b') -print 'Preparing plot (curves should align to be a single smooth curve)' +print('Preparing plot (curves should align to be a single smooth curve)') plotDataf = trajf.sample(dt=0.1) plotDatab = trajb.sample(dt=0.1) --- ./PyDSTool/tests/HH_DSSRTtest.py (original) +++ ./PyDSTool/tests/HH_DSSRTtest.py (refactored) @@ -49,7 +49,7 @@ 'tau_h', 'inf_h'] if aux_vars is not None: DSargs['varspecs'].update(aux_vars) - DSargs['auxvars'].extend(aux_vars.keys()) + DSargs['auxvars'].extend(list(aux_vars.keys())) DSargs['pars'] = par_args DSargs['fnspecs'] = auxdict DSargs['xdomain'] = {'v': [-130, 70], 'm': [0,1], 'h': [0,1], 'n': [0,1]} @@ -68,13 +68,13 @@ peak_ev = Events.makeZeroCrossEvent(vfn_str, -1, {'name': 'peak_ev', 'eventtol': 1e-5, - 'term': False}, ['v','m','n','h'], par_args.keys(), + 'term': False}, ['v','m','n','h'], list(par_args.keys()), fnspecs={'Itot': auxdict['Itot']}, targetlang=targetlang) trough_ev = Events.makeZeroCrossEvent(vfn_str, 1, {'name': 'trough_ev', 'eventtol': 1e-5, - 'term': False}, ['v','m','n','h'], par_args.keys(), + 'term': False}, ['v','m','n','h'], list(par_args.keys()), fnspecs={'Itot': auxdict['Itot']}, targetlang=targetlang) DSargs['events'] = [peak_ev, trough_ev] @@ -124,7 +124,7 @@ Dargs.infs = {} Dargs.psis = {} -for var in ics.keys(): +for var in list(ics.keys()): Dargs.taus[var] = 'tau_%s' % var Dargs.infs[var] = 'inf_%s' % var Dargs.psis[var] = None @@ -168,7 +168,7 @@ plt.plot(ts, cycle['v']) plt.plot(ts, cycle['inf_v']) plt.title('v(t) and v_inf(t) for RefactoringTool: Refactored ./PyDSTool/tests/HH_adjointPRC.py one approximate period') -print "Graph shows **approximate** period of tonic spiking =", t1-t0 +print("Graph shows **approximate** period of tonic spiking =", t1-t0) for ep in epochs: ep.info() @@ -185,9 +185,9 @@ def make_evs(evdefs, pars, evtol, targetlang): extra_evs = [] - for evname, evargs in evdefs.items(): - all_pars = pars.keys() - all_pars.extend(remain(evargs.pars, pars.keys())) + for evname, evargs in list(evdefs.items()): + all_pars = list(pars.keys()) + all_pars.extend(remain(evargs.pars, list(pars.keys()))) extra_evs.append(makeZeroCrossEvent(evargs.defn, evargs.dirn, {'name': evname, 'eventtol': evtol, 'term': True}, @@ -221,7 +221,7 @@ # and whether epoch conditions are met throughout the trajectory. # # Acquire underlying Generator from target model interface - gen = target.model.registry.values()[0] + gen = list(target.model.registry.values())[0] ptsFS = target.test_traj.sample() # pick up or create DSSRT assistant object for this regime @@ -311,9 +311,9 @@ # diagnostics if test1 and (not test3 or not test2): - print "Time scale tests failed" - print "Fast:", epoch_reg.fast, self.pars.fast - print "Slow:", epoch_reg.slow, self.pars.slow + print("Time scale tests failed") + print("Fast:", epoch_reg.fast, self.pars.fast) + print("Slow:", epoch_reg.slow, self.pars.slow) return test1 and test2 and test3 @@ -483,7 +483,7 @@ plt.title('Original (B) and hybrid (G) model voltage vs. t') ## Bifurcation-like diagram, to compare at different parameter values -print "\nComparing bifurcations of spiking onset" +print("\nComparing bifurcations of spiking onset") bifpar = 'Iapp' bifpar_range = concatenate((linspace(0.2, 0.4, 7), linspace(0.5, 3, 18))) @@ -505,19 +505,19 @@ return 0 # Compute long runs (100 ms) to approximate a settled periodic orbit -print "\nOriginal model", +print("\nOriginal model", end=' ') sys.stdout.flush() for bpval in bifpar_range: - print ".", + print(".", end=' ') sys.stdout.flush() HH.set(pars={bifpar: bpval}, tdata=[0,100]) traj = HH.compute('orig_bif') period_data_orig.append(find_period(traj)) -print "\nHybrid model", +print("\nHybrid model", end=' ') sys.stdout.flush() for i, bpval in enumerate(bifpar_range): - print ".", + print(".", end=' ') sys.stdout.flush() hybrid_HH.set(pars={bifpar: bpval}) hybrid_HH.compute('hyb_bif', tdata=[0,100], ics=ics, verboselevel=0, @@ -527,6 +527,6 @@ plt.figure() plt.plot(bifpar_range, period_data_hyb, 'ko') plt.plot(bifpar_range, period_data_orig, 'kx') -print "\nDepending on your platform and matplotlib configuration you may need" -print " to execute the plt.show() command to see the plots" +print("\nDepending on your platform and matplotlib configuration you may need") +print(" to execute the plt.show() command to see the plots") # plt.show() --- ./PyDSTool/tests/HH_adjointPRC.py (original) +++ ./PyDSTool/tests/HH_adjointPRC.py (refactored) @@ -60,7 +60,7 @@ # ------------------------------------------------------------ -print '-------- Test: PRC on Hodgkin-Huxley system' +print('-------- Test: PRC on Hodgkin-Huxley system') par_args = {'gna': 120, 'gk': 36, 'gl': 0.3, 'vna': 115, 'vk': -12, 'vl': 10.559, 'T': 6.3, 'I': 12, 'C': 1.0} @@ -76,12 +76,12 @@ 'term': False}, ['v'], targetlang='c') -print "Making HH neuron" +print("Making HH neuron") HH = makeHHneuron('HH_PRCtest', 0.01, par_args, ic_args, [thresh_ev], special=linspace(0,100,100/0.001)) HH.set(tdata=[0, 100]) -print "Computing long orbit to converge to limit cycle" +print("Computing long orbit to converge to limit cycle") HHtraj = HH.compute('test') evt=HH.getEventTimes()['thresh_ev'] HHpts = HHtraj.sample() @@ -105,RefactoringTool: Refactored ./PyDSTool/tests/HH_loaded.py RefactoringTool: Refactored ./PyDSTool/tests/HH_loaded_Cintegrator.py RefactoringTool: Refactored ./PyDSTool/tests/HH_model.py 6 +105,6 @@ plot(po['t'],po['v']) show() -print "Calling adjoint PRC calculator" +print("Calling adjoint PRC calculator") PRCdata = adjointPRC(HH, po, 'v', 'I', numIntervals=300, numCollocation=5, spike_est=10, doPlot=True, saveData=False, verbosity=1) --- ./PyDSTool/tests/HH_loaded.py (original) +++ ./PyDSTool/tests/HH_loaded.py (refactored) @@ -6,7 +6,7 @@ try: objs = loadObjects('temp_HH.pkl') except: - print "Only run after test 'HH_model.py'" + print("Only run after test 'HH_model.py'") raise HH = objs[0] HHtraj1 = objs[1] --- ./PyDSTool/tests/HH_loaded_Cintegrator.py (original) +++ ./PyDSTool/tests/HH_loaded_Cintegrator.py (refactored) @@ -7,7 +7,7 @@ try: objs = loadObjects('temp_HH_Cintegrator.pkl') except: - print "Only run after test 'HH_model_Cintegrator.py'" + print("Only run after test 'HH_model_Cintegrator.py'") raise HH = objs[0] HHtraj1 = objs[1] --- ./PyDSTool/tests/HH_model.py (original) +++ ./PyDSTool/tests/HH_model.py (refactored) @@ -62,14 +62,14 @@ if __name__=='__main__': # need the __main__ to use above functions as imports without running this part - print '-------- Test: Hodgkin-Huxley system' + print('-------- Test: Hodgkin-Huxley system') par_args = {'gna': 100, 'gk': 80, 'gl': 0.1, 'vna': 50, 'vk': -100, 'vl': -67, 'Iapp': 1.75, 'C': 1.0} ic_args = {'v':-70.0, 'm': 0, 'h': 1, 'n': 0} # test single terminal event first - print "Testing single terminal event and its sampling" + print("Testing single terminal event and its sampling") thresh_ev = Events.makePythonStateZeroCrossEvent('v', 0, 1, {'name': 'thresh_ev', @@ -88,10 +88,10 @@ HH_term.set(tdata=[0, 25]) start = clock() HHtraj_term = HH_term.compute('test_term') - print 'Computed trajectory in %.3f seconds.\n' % (clock()-start) + print('Computed trajectory in %.3f seconds.\n' % (clock()-start)) trajdata = HHtraj_term.sample(dt=1.0, precise=True) - print "sampled this data up until the event", HH_term.getEventTimes(), ":" - print trajdata['v'], "\n" + print("sampled this data up until the event", HH_term.getEventTimes(), ":") + print(trajdata['v'], "\n") HH = makeHHneuron('HHtest', par_args, ic_args, [thresh_ev]) @@ -109,33 +109,33 @@ # equations, are not dynamical systems!) HH.set(tdata=[0, 6.797]) - print 'Integrating...' + print('Integrating...') start = clock() HHtraj = HH.compute('test') - print ' ... finished in %.3f seconds.\n' % (clock()-start) + print(' ... finished in %.3f seconds.\n' % (clock()-start)) evt = HH.getEventTimes()['thresh_ev'] evt_same = HH.getEventTimes('thresh_ev') assert evt == [] == evt_same - print 'Saving Model and Trajectory...' + print('Saving Model and Trajectory...') saveObjects([HH, HHtraj], 'temp_HH.pkl', True) # try a longer run - print "Trying a longer run" + print("Trying a longer run") HH.set(tdata=[0, 40]) HHtraj2 = HH.compute('test_long') evts=HH.getEvents() HH.set(tdata=[40, 60]) HHtraj3 = HH.compute('test_long_c','c') - print "In 50ms, found the following events:" + print("In 50ms, found the following events:") evts_c=HH.getEvents() all_evts = copy(evts) - for k, a in evts_c.items(): + for k, a in list(evts_c.items()): if k in evts and a is not None: all_evts[k].append(a) else: all_evts[k] = a - print all_evts + print(all_evts) assert len(all_evts['thresh_ev']) == 4, "Problem with ODE events" assert allclose(all_evts['thresh_ev']['t'][3], 56.218, 1e-3), "Problem with ODE events" @@ -147,8 +147,8 @@ # pick out first event evt = evts['thresh_ev']['t'][0] plt.plot(evt, HHtraj(evt, 'v'), 'ro') - print "Showing longer trajectory with +10mV offset, using the syntax" - print ">>> plotData2['v'] += 10" + print("Showing longer trajectory with +10mV offset, using the syntaxRefactoringTool: Refactored ./PyDSTool/tests/HH_model_Cintegrator.py RefactoringTool: Refactored ./PyDSTool/tests/HH_model_Cintegrator_testbounds.py ") + print(">>> plotData2['v'] += 10") plotData2 = HHtraj2.sample() plotData3 = HHtraj3.sample() plotData2['v'] += 10 # could have plotted plotData2['v']+10 --- ./PyDSTool/tests/HH_model_Cintegrator.py (original) +++ ./PyDSTool/tests/HH_model_Cintegrator.py (refactored) @@ -55,14 +55,14 @@ # ------------------------------------------------------------ -print '-------- Test: Hodgkin-Huxley system' +print('-------- Test: Hodgkin-Huxley system') par_args = {'gna': 100, 'gk': 80, 'gl': 0.1, 'vna': 50, 'vk': -100, 'vl': -67, 'I': 1.75, 'C': 1.0} ic_args = {'v':-70.0, 'm': 0, 'h': 1, 'n': 0} # test single terminal event first -print "Testing single terminal event and its sampling" +print("Testing single terminal event and its sampling") thresh_ev = Events.makeZeroCrossEvent('v', 1, {'name': 'thresh_ev', @@ -79,15 +79,15 @@ nobuild=True) # test inclusion of other libraries in C file (not used in this example!) HH_term.makeLib(include=['limits.h']) -print "Successfully tested inclusion of additional C libraries into vector" -print "field definition code." +print("Successfully tested inclusion of additional C libraries into vector") +print("field definition code.") HH_term.set(tdata=[0, 25]) start = clock() HHtraj_term = HH_term.compute('test_term') -print 'Computed trajectory in %.3f seconds.\n' % (clock()-start) +print('Computed trajectory in %.3f seconds.\n' % (clock()-start)) trajdata = HHtraj_term.sample(dt=1.0) -print "Sampled this data at dt=1.0 up to the event", HH_term.getEventTimes(), ":" -print trajdata['v'], "\n" +print("Sampled this data at dt=1.0 up to the event", HH_term.getEventTimes(), ":") +print(trajdata['v'], "\n") # HH is a "Generator" object (an ODE in this case) # (Generator is the new name for the DynamicalSystem class, because some @@ -96,23 +96,23 @@ HH = makeHHneuron('HH_model_test', par_args, ic_args, [thresh_ev]) HH.set(tdata=[0, 50]) -print 'Integrating...' +print('Integrating...') start = clock() HHtraj = HH.compute('test') -print ' ... finished in %.3f seconds.\n' % (clock()-start) +print(' ... finished in %.3f seconds.\n' % (clock()-start)) plotData = HHtraj.sample(dt=0.1) evt=HH.getEventTimes()['thresh_ev'] -print 'Saving Model and Trajectory...' +print('Saving Model and Trajectory...') saveObjects([HH, HHtraj], 'temp_HH_Cintegrator.pkl', True) -print 'Testing continued integration' +print('Testing continued integration') new_t0 = HHtraj.indepdomain[1] HH.set(tdata=[new_t0,new_t0+20]) HHtraj2 = HH.compute('test_cont', 'c') -print "Non-terminal events found:", HH.getEvents() +print("Non-terminal events found:", HH.getEvents()) -print 'Preparing plot' +print('Preparing plot') plotData2 = HHtraj2.sample(dt=0.1) evt2=HH.getEventTimes()['thresh_ev'] yaxislabelstr = 'v' --- ./PyDSTool/tests/HH_model_Cintegrator_testbounds.py (original) +++ ./PyDSTool/tests/HH_model_Cintegrator_testbounds.py (refactored) @@ -58,14 +58,14 @@ if __name__=='__main__': - print '-------- Test: Hodgkin-Huxley system' + print('-------- Test: Hodgkin-Huxley system') par_args = {'gna': 100, 'gk': 80, 'gl': 0.1, 'vna': 50, 'vk': -100, 'vl': -67, 'I': 1.75, 'C': 1.0} ic_args = {'v':-70.0, 'm': 0, 'h': 1, 'n': 0} # test single terminal event first - print "Testing bounds terminal event and its sampling" + print("Testing bounds terminal event and its sampling") bd_event = Events.makeZeroCrossEvent('v-getbound("v",1)', 1, {'name': 'bd_ev', @@ -82,11 +82,11 @@ assert trajdata['v_bd1'][0]==50 assert trajdata['v_bd0'][0]==-100 - print 'Testing continued integration from t=25, having now set' - print 'voltage domain to be [-100,20]' + print('Testing continued integration from t=25, having now set') + print('voltage domain to be [-100,20]') HH.set(xdomain={'v':[-100,20]}, tdata=[0,50]) HHtraj2 = HH.compute('test_cont', 'c') - print "Sampled tRefactoringTool: Refactored ./PyDSTool/tests/HH_model_testbounds.py RefactoringTool: Refactored ./PyDSTool/tests/IF_delaynet.py RefactoringTool: Refactored ./PyDSTool/tests/IF_delaynet_syn.py his data up until the event", HH.getEventTimes(), ":" + print("Sampled this data up until the event", HH.getEventTimes(), ":") plotData = HHtraj2.sample(dt=0.1) evt=HH.getEventTimes()['bd_ev'] --- ./PyDSTool/tests/HH_model_testbounds.py (original) +++ ./PyDSTool/tests/HH_model_testbounds.py (refactored) @@ -56,14 +56,14 @@ if __name__=='__main__': - print '-------- Test: Hodgkin-Huxley system' + print('-------- Test: Hodgkin-Huxley system') par_args = {'gna': 100, 'gk': 80, 'gl': 0.1, 'vna': 50, 'vk': -100, 'vl': -67, 'I': 1.75, 'C': 1.0} ic_args = {'v':-70.0, 'm': 0, 'h': 1, 'n': 0} # test single terminal event first - print "Testing bounds terminal event and its sampling" + print("Testing bounds terminal event and its sampling") HH = makeHHneuron('HHtest_bdev', par_args, ic_args, [], enforce_bds=True) @@ -74,19 +74,19 @@ assert trajdata['v_bd1'][0]==50 assert trajdata['v_bd0'][0]==-90 assert len(HH.getEventTimes()['v_domlo']) > 0 - print "Voltage hit low domain bound defined by event v_domlo:" - print HH.getEventTimes()['v_domlo'] + print("Voltage hit low domain bound defined by event v_domlo:") + print(HH.getEventTimes()['v_domlo']) - print 'Testing continued integration, having now set voltage domain to be [-100,20]' + print('Testing continued integration, having now set voltage domain to be [-100,20]') HH.set(xdomain={'v':[-100,20]}, tdata=[HHtraj.indepdomain[1],50]) HHtraj2 = HH.compute('test_cont', 'c') assert len(HH.getEventTimes()['v_domhi']) > 0 - print "Sampled this data up until the event v_domhi:" - print HH.getEventTimes()['v_domhi'] + print("Sampled this data up until the event v_domhi:") + print(HH.getEventTimes()['v_domhi']) - print "Plotting continued orbit..." + print("Plotting continued orbit...") plotData = HHtraj2.sample(dt=0.1) - evt=HH.getEventTimes().values()[0] + evt=list(HH.getEventTimes().values())[0] yaxislabelstr = 'v' plt.ylabel(yaxislabelstr) plt.xlabel('t') --- ./PyDSTool/tests/IF_delaynet.py (original) +++ ./PyDSTool/tests/IF_delaynet.py (refactored) @@ -108,9 +108,9 @@ # ------------------------------------------------------------------------- -print '-------- IF network test with delayed pulse coupling' +print('-------- IF network test with delayed pulse coupling') -print "Building coupled IF model\n" +print("Building coupled IF model\n") delay = Par('9', 'delay') vreset = Par('-90', 'Vreset') @@ -142,7 +142,7 @@ # ------------------------------------------------------------------------- -print "Computing trajectory...\n" +print("Computing trajectory...\n") icdict = {'IF1.V': -75, 'IF2.V': -85} def test(): IFmodel.compute(trajname='test', @@ -151,7 +151,7 @@ verboselevel=0) start = clock() test() -print '... finished in %.3f seconds.\n' % (clock()-start) +print('... finished in %.3f seconds.\n' % (clock()-start)) # ------------------------------------------------------------------------- --- ./PyDSTool/tests/IF_delaynet_syn.py (original) +++ ./PyDSTool/tests/IF_delaynet_syn.py (refactored) @@ -158,9 +158,9 @@ # ------------------------------------------------------------------------- -print '-------- IF network test with delayed pulse coupling' - -print "Building coupled IF model\n" +print('-------- IF network test with delayed pulse coupling') + +print("Building coupled IF model\n") delay = Par('6', 'delay') vreset = Par('-90', 'Vreset') @@ -194,7 +194,7 @@ # ------------------------------------------------------------------------- -print "Computing trajectory...\n" +print("Computing trajectory...\n") icdict = {'IF1.V': -76, 'IF2.V': -66, 'IF1.excited': 0, 'IF2.excited': 0, 'IF1.syn_IF2_IF1.s': 0, 'IF2.syn_IF1_IF2.s': 0} start = clock() @@ -202,11 +202,11 @@ tdata=[0, 1000], ics=icdict, verboselevel=0) -print '... finished in %.3f seconds.\nRefactoringTool: Refactored ./PyDSTool/tests/IF_model_test.py RefactoringTool: Refactored ./PyDSTool/tests/IF_squarespike_model.py ' % (clock()-start) - -# ------------------------------------------------------------------------- - -print "Testing synch orbits" +print('... finished in %.3f seconds.\n' % (clock()-start)) + +# ------------------------------------------------------------------------- + +print("Testing synch orbits") icdict['IF1.V'] = icdict['IF2.V'] IFmodel.compute(trajname='synch_test', tdata=[0,30], ics=icdict) assert IFmodel.getTrajEventTimes('synch_test')['IF1_thresh'][-1] - \ --- ./PyDSTool/tests/IF_model_test.py (original) +++ ./PyDSTool/tests/IF_model_test.py (refactored) @@ -18,7 +18,7 @@ # --------------------------------------------------------------------------- -print '-------- Model test' +print('-------- Model test') all_model_names = ['leak', 'spike'] # 'excited' is an internal variable of the model, and is used to @@ -76,18 +76,18 @@ IFmodel = Model.HybridModel({'name': 'IF_fit', 'modelInfo': modelInfoDict}) -print "Computing trajectory...\n" +print("Computing trajectory...\n") start = clock() IFmodel.compute(trajname='onespike', tdata=[0,30], ics=ics, verboselevel=2, force=True) -print '... finished in %.3f seconds.\n' % (clock()-start) +print('... finished in %.3f seconds.\n' % (clock()-start)) -print 'Preparing plot to show non-identity mapping of epoch state transitions' +print('Preparing plot to show non-identity mapping of epoch state transitions') plotData = IFmodel.sample('onespike', ['V'], 0.02) plt.ylabel('V') plt.xlabel('t') vline = plt.plot(plotData['t'], plotData['V']) -print "\n\nInformation about Model's components:\n" +print("\n\nInformation about Model's components:\n") info(IFmodel.query('submodels')) plt.show() --- ./PyDSTool/tests/IF_squarespike_model.py (original) +++ ./PyDSTool/tests/IF_squarespike_model.py (refactored) @@ -99,7 +99,7 @@ if __name__=='__main__': # need the __main__ to use above functions as imports for other # scripts without running this part - print '-------- IF model test 1' + print('-------- IF model test 1') par_args_linear = {'Iapp': 1.3, 'gl': 0.1, 'vl': -67, 'threshval': -65, 'C': 1} @@ -109,21 +109,21 @@ icdict = {'v': -80, 'excited': 0} start = clock() - print 'Computing trajectory...' + print('Computing trajectory...') IFmodel.compute(trajname='onespike', tdata=[0, 60], ics=icdict, verboselevel=0) - print '\n... finished in %.3f seconds.\n' % (clock()-start) + print('\n... finished in %.3f seconds.\n' % (clock()-start)) IFmodel.set(pars={'Iapp': 1.0, 'threshval': -60}) - print 'Recomputing trajectory with new params...' + print('Recomputing trajectory with new params...') IFmodel.compute(trajname='twospike', tdata=[0, 60], ics=icdict) - print 'Preparing plot' + print('Preparing plot') plotData = IFmodel.sample('onespike', dt=0.05) plotData2 = IFmodel.sample('twospike', ['v', 'testaux'], 0.05) plt.ylabel('v, testaux') @@ -132,26 +132,26 @@ vline2 = plt.plot(plotData2['t'], plotData2['v']) aline = plt.plot(plotData['t'], plotData['testaux']) - print "\nLast point of hybrid trajectory: " - print "IFmodel.getEndPoint('onespike') -->\n", \ - IFmodel.getEndPoint('onespike') + print("\nLast point of hybrid trajectory: ") + print("IFmodel.getEndPoint('onespike') -->\n", \ + IFmodel.getEndPoint('onespike')) - print "\nFirst point of hybrid trajectory: " - print "IFmodel.getEndPoint('onespike', 0) -->\n", \ - IFmodel.getEndPoint('onespike', 0) + print("\nFirst point of hybrid trajectory: ") + print("IFmodel.getEndPoint('onespike', 0) -->\n", \ + IFmodel.getEndPoint('onespike', 0)) - print "Testing IF hybrid model as mapping ..." + print("Testing IF hybrid model as mapping ...") num_parts = len(IFmodel.getTrajTimePartitions('twospike')) #eventvals = IFmodel('onespike', range(0, num_parts+1), asmap=True) - RefactoringTool: Refactored ./PyDSTool/tests/ML_adjointPRC.py RefactoringTool: Refactored ./PyDSTool/tests/ModelSpec_test.py RefactoringTool: No changes to ./PyDSTool/tests/MultiCompartments.py RefactoringTool: Refactored ./PyDSTool/tests/MultiCompartments2.py eventvals = IFmodel('twospike', range(0, num_parts+1), asmap=True) + eventvals = IFmodel('twospike', list(range(0, num_parts+1)), asmap=True) for i in range(0,num_parts+1): - print "(v, t) at event(%i) = (%.4f, %.4f)" % (i, eventvals(i)('v'), - eventvals(i)('t')) - print "\nAlternative access to explicit event info using " + \ - "getTrajEvents(trajname) method:\n" + print("(v, t) at event(%i) = (%.4f, %.4f)" % (i, eventvals(i)('v'), + eventvals(i)('t'))) + print("\nAlternative access to explicit event info using " + \ + "getTrajEvents(trajname) method:\n") evs = IFmodel.getTrajEvents('twospike') evtimes = IFmodel.getTrajEventTimes('onespike') - print evs + print(evs) assert len(evs['threshold']) == 2, "Problem with hybrid events" assert len(evtimes['threshold']) == 4, "Problem with hybrid events" assert allclose(evtimes['threshold'][3], 54.009, 1e-3), \ @@ -159,6 +159,6 @@ assert allclose(evs['threshold'][1]['v'], -60, 1e-3), \ "Problem with hybrid events" - print "\nDepending on your platform and matplotlib configuration you may need" - print " to execute the plt.show() command to see the plots" + print("\nDepending on your platform and matplotlib configuration you may need") + print(" to execute the plt.show() command to see the plots") # plt.show() --- ./PyDSTool/tests/ML_adjointPRC.py (original) +++ ./PyDSTool/tests/ML_adjointPRC.py (refactored) @@ -49,7 +49,7 @@ # ------------------------------------------------------------ -print '-------- Test: PRC on Morris-Lecar system' +print('-------- Test: PRC on Morris-Lecar system') par_args = {'gca': 4, 'gk': 8, 'gl': 2, 'vca': 120, 'vk': -80, 'vl': -60, 'v1': -1.2, 'v2': 18, 'v3': 4, 'v4': 17.4, @@ -65,11 +65,11 @@ 'term': False}, ['v'], targetlang='c') -print "Making ML neuron" +print("Making ML neuron") ML = makeMLneuron('ML_PRCtest', 0.01, par_args, ic_args, [thresh_ev]) ML.set(tdata=[0, 500]) -print "Computing long orbit to converge to limit cycle" +print("Computing long orbit to converge to limit cycle") MLtraj = ML.compute('test') evt=ML.getEventTimes()['thresh_ev'] MLpts = MLtraj.sample() @@ -93,6 +93,6 @@ plot(po['t'],po['v']) show() -print "Calling adjoint PRC calculator" +print("Calling adjoint PRC calculator") PRCdata = adjointPRC(ML, po, 'v', 'I', numIntervals=200, numCollocation=5, spike_est=50, doPlot=True, saveData=False, verbosity=1) --- ./PyDSTool/tests/ModelSpec_test.py (original) +++ ./PyDSTool/tests/ModelSpec_test.py (refactored) @@ -20,7 +20,7 @@ # ------------------------------------------------------------------------- -print "ModelSpec and neural computation toolbox tests..." +print("ModelSpec and neural computation toolbox tests...") def make_noise_signal(dt, t_end, mean, stddev, num_cells, seed=None): """Helper function: Gaussian white noise at sample rate = dt for 1 or more cells, @@ -251,4 +251,4 @@ v2line = plt.plot(v_dat['t'], v_dat['cell2.V']) plt.show() -print " ... passed" +print(" ... passed") --- ./PyDSTool/tests/MultiCompartments2.py (original) +++ ./PyDSTool/tests/MultiCompartments2.py (refactored) @@ -60,13 +60,13 @@ ####### User demonstration stuff -print "*** Example of hierarchical referencing to components, etc." -print "Na vrev Par object is given by >>> net['cell2.soma.Na.vrev'] = \n ", \ - repr(net['cell2.soma.Na.vrev']) -print "which is equivalent to >>> net.components['cell2'].components['soma'].components['Na'].pars['vrev']" -print "Na vrev value is given by >>> net['cell2.soma1.Na.vrev']() = \n ", \ - net['cell2.soma.Na.vrev']() -print "Could delete this Par in place using >>> del net['cell2.soma.Na.vrev'] (not done here!)" +print("*** Example of hierarchical referencing to components, etc.") +print("Na vrev Par object is given by >>> net['cRefactoringTool: Refactored ./PyDSTool/tests/NineML_import_test.py RefactoringTool: Refactored ./PyDSTool/tests/PointInfo_test.py RefactoringTool: Refactored ./PyDSTool/tests/PyCont_ABCReaction.py RefactoringTool: Refactored ./PyDSTool/tests/PyCont_ABReaction.py RefactoringTool: Refactored ./PyDSTool/tests/PyCont_Brusselator.py RefactoringTool: Refactored ./PyDSTool/tests/PyCont_Catalytic.py ell2.soma.Na.vrev'] = \n ", \ + repr(net['cell2.soma.Na.vrev'])) +print("which is equivalent to >>> net.components['cell2'].components['soma'].components['Na'].pars['vrev']") +print("Na vrev value is given by >>> net['cell2.soma1.Na.vrev']() = \n ", \ + net['cell2.soma.Na.vrev']()) +print("Could delete this Par in place using >>> del net['cell2.soma.Na.vrev'] (not done here!)") --- ./PyDSTool/tests/NineML_import_test.py (original) +++ ./PyDSTool/tests/NineML_import_test.py (refactored) @@ -133,7 +133,7 @@ plt.title('Hodgkin-Huxley membrane potential') ev_info = pts.labels.by_label['Event:spikeoutput'] - for ev_ix, ev_tdata in ev_info.items(): + for ev_ix, ev_tdata in list(ev_info.items()): plt.plot(ev_tdata['t'], pts[ev_ix]['V'], 'ko') plt.xlabel('t') --- ./PyDSTool/tests/PointInfo_test.py (original) +++ ./PyDSTool/tests/PointInfo_test.py (refactored) @@ -6,7 +6,7 @@ from PyDSTool import * from PyDSTool.parseUtils import symbolMapClass -print "Tests on Pointset labelling class: PointInfo" +print("Tests on Pointset labelling class: PointInfo") sm = symbolMapClass({'a': 'A'}) @@ -16,7 +16,7 @@ p['a'] = (5, {'bif': 'h'}) p[1] = ('b', {'bif': 'c'}) -assert p['a'].keys() == [3,5] +assert list(p['a'].keys()) == [3,5] sorted = p.sortByIndex() assert [s[0] for s in sorted] == [1,3,5] assert p.getIndices() == [1,3,5] @@ -24,7 +24,7 @@ p.update(3, 'c', {'foo': 'bar'}) p.update(3, 'h') -assert p[3].keys() == ['a','h','c'] +assert list(p[3].keys()) == ['a','h','c'] try: p[-1] --- ./PyDSTool/tests/PyCont_ABCReaction.py (original) +++ ./PyDSTool/tests/PyCont_ABCReaction.py (refactored) @@ -34,10 +34,10 @@ PCargs.SaveEigen = True PyCont.newCurve(PCargs) -print 'Computing curve...' +print('Computing curve...') start = clock() PyCont['EQ1'].forward() -print 'done in %.3f seconds!' % (clock()-start) +print('done in %.3f seconds!' % (clock()-start)) # Hopf Curve -- Curiously screws up further out on curve. Will take a closer look later ..... PCargs = args(name='HO1', type='H-C2') @@ -48,10 +48,10 @@ PCargs.verbosity = 2 PyCont.newCurve(PCargs) -print 'Computing Hopf curve...' +print('Computing Hopf curve...') start = clock() PyCont['HO1'].backward() -print 'done in %.3f seconds!' % (clock()-start) +print('done in %.3f seconds!' % (clock()-start)) # Plot PyCont.display(('p1','u1'), stability=True) --- ./PyDSTool/tests/PyCont_ABReaction.py (original) +++ ./PyDSTool/tests/PyCont_ABReaction.py (refactored) @@ -39,10 +39,10 @@ PCargs.verbosity = 2 PyCont.newCurve(PCargs) -print 'Computing curve...' +print('Computing curve...') start = clock() PyCont['EQ1'].forward() -print 'done in %.3f seconds!' % (clock()-start) +print('done in %.3f seconds!' % (clock()-start)) PCargs.name = 'LC1' PCargs.type = 'LC-C' @@ -57,10 +57,10 @@ PCargs.SaveEigen = True PyCont.newCurve(PCargs) -print 'Computing curve...' +print('Computing curve...') start = clock() PyCont['LC1'].forward() -print 'done in %.3f seconds!' % (clock()-start) +print('done in %.3f seconds!' % (clock()-start)) PCargs.name = 'FO1' PCargs.type = 'LP-C' @@ -73,10 +73,10 @@ PCargs.verbosity = 2 PyCont.newCurve(PCargs) -print 'Computing Fold curve...' +print('Computing Fold curve...') start = clock() PyCont['FO1'].forward() -print 'done in %.3f seconds!' % (clock()-start) +print('done in %.3f seconds!' % (clock()-start)) # Plot PyCont['EQ1'].display(stability=True, axes=(1,2,1)) --- ./PyDSTool/tests/PyCont_Brusselator.py (original) +++ ./PyDSTool/tests/PyCont_Brusselator.py (refactored) @@ -42,10 +42,10 @@ PCargs.SaveEigen = True PyCont.newCurve(PCargs) -print 'Computing curve...' +print('Computing curve...') start = clock() PyCont['EQ1'].forward() -print 'done in %.3f seconds!' % (clock()-start) +print('done in %.3f seconds!' % (clock()-start)) # Plot PyCont['EQ1'].display(('lambda','X1'), stability=True) --- ./PyDSTool/tests/PyCont_Catalytic.py (original) +++ ./PyDSTool/tests/PyCont_Catalytic.py (refactored) @@ -37,10 +37,10 @@ PCargs.SaveEigen = True RefactoringTool: Refactored ./PyDSTool/tests/PyCont_Catalytic_demo.py PyCont.newCurve(PCargs) -print 'Computing equilibrium curve...' +print('Computing equilibrium curve...') start = clock() PyCont['EQ1'].forward() -print 'done in %.3f seconds!' % (clock()-start) +print('done in %.3f seconds!' % (clock()-start)) # Hopf curve PCargs.name = 'HO1' @@ -53,10 +53,10 @@ PyCont.newCurve(PCargs) -print 'Computing hopf curve...' +print('Computing hopf curve...') start = clock() PyCont['HO1'].forward() -print 'done in %.3f seconds!' % (clock()-start) +print('done in %.3f seconds!' % (clock()-start)) # Fold curve PCargs.name = 'FO1' @@ -68,10 +68,10 @@ PyCont.newCurve(PCargs) -print 'Computing fold curve...' +print('Computing fold curve...') start = clock() PyCont['FO1'].forward() -print 'done in %.3f seconds!' % (clock()-start) +print('done in %.3f seconds!' % (clock()-start)) # Plot PyCont.display(('q2','x'), axes=(3,1,1)) --- ./PyDSTool/tests/PyCont_Catalytic_demo.py (original) +++ ./PyDSTool/tests/PyCont_Catalytic_demo.py (refactored) @@ -29,9 +29,9 @@ PyCont = ContClass(testDS) """ -print '\n' + c*d(str) + str + c*d(str) -dummy = raw_input() -exec str +print('\n' + c*d(str) + str + c*d(str)) +dummy = input() +exec(str) str = """ PCargs = args(name='EQ1', type='EP-C') @@ -45,68 +45,68 @@ PyCont['EQ1'].forward() """ -print '\n' + c*d(str) + str + c*d(str) -dummy = raw_input() -print 'Computing curve...' -exec str +print('\n' + c*d(str) + str + c*d(str)) +dummy = input() +print('Computing curve...') +exec(str) str = """ PyCont['EQ1'].info() """ -print '\n' + c*d(str) + str + c*d(str) -dummy = raw_input() -exec str +print('\n' + c*d(str) + str + c*d(str)) +dummy = input() +exec(str) str = """ X = PyCont['EQ1'].getSpecialPoint('LP1') print X """ -print '\n' + c*d(str) + str + c*d(str) -dummy = raw_input() -exec str +print('\n' + c*d(str) + str + c*d(str)) +dummy = input() +exec(str) str = """ print X.labels['LP']['data'].a """ -print '\n' + c*d(str) + str + c*d(str) -dummy = raw_input() -exec str +print('\n' + c*d(str) + str + c*d(str)) +dummy = input() +exec(str) str = """ PyCont['EQ1'].display(axes=(1,2,1)) """ -print '\n' + c*d(str) + str + c*d(str) -dummy = raw_input() -exec str +print('\n' + c*d(str) + str + c*d(str)) +dummy = input() +exec(str) show() str = """ PyCont['EQ1'].display(('q2','x'), axes=(1,2,2)) """ -print '\n' + c*d(str) + str + c*d(str) -dummy = raw_input() -exec str +print('\n' + c*d(str) + str + c*d(str)) +dummy = input() +exec(str) str = """ PyCont.plot.info() """ -print '\n' + c*d(str) + str + c*d(str) -dummy = raw_input() -exec str +print('\n' + c*d(str) + str + c*d(str)) +dummy = input() +exec(str) str = """ PyCont.info() """ -print '\n' + c*d(str) + str + c*d(str) -dummy = raw_input() -exec str +print('\n' + c*d(str) + str + c*d(str)) +dummy = input() +exec(str) str = """ PCargs = args(name='HO1', type='H-C2') @@ -120,19 +120,19 @@ PyCont['HO1'].forward() """ -print '\n' + c*d(str) + str + c*d(str) -dummy = raw_input() -print 'Computing curve...' -exec str +print('\n' + c*d(str) + str + c*d(str)) +dummy = input() +print('Computing curve...') +exec(str) str = """ PyCont.plot.clearall() PyCont.display(('q2','x')) """ -print '\n' + c*d(str) + str + c*d(str) -dummy = raw_input() -exec str +print('\n' + c*d(str) + str + c*d(str)) +dummy = input() +exec(str) str = """ PCargs = args(name='FO1', type='LP-C') @@ -145,45 +145,45 @@ PyCont['FO1'].forward() """ -print '\n' + c*d(str) + str + c*d(str) -dummy = raw_input() -print 'Computing curve...' -exec str +print('\n' + c*d(str) + str + c*d(str)) +dummy = input() +print('Computing curve...') +exec(str) str = """ PyCont.plot.clearall() PyCont.display(('q2','x')) """ -print '\n' + c*d(str) + str + c*d(str) -dummy = raw_input() -exec str +print('\n' + c*d(str) + str + c*d(str)) +dummy = input() +exec(str) str = """ PyCont['FO1'].backward() """ -print '\n' + c*d(str) + str + c*d(str) -dummy = raw_input() -print 'Computing curve...' -exec str +print('\n' + c*d(str) + str + c*d(str)) +dummy = input() +print('RefactoringTool: Refactored ./PyDSTool/tests/PyCont_DiscPredPrey.py RefactoringTool: Refactored ./PyDSTool/tests/PyCont_Hamiltonian.py RefactoringTool: Refactored ./PyDSTool/tests/PyCont_HindmarshRose.py Computing curve...') +exec(str) str = """ PyCont.plot.fig1.axes1.FO1.delete() PyCont['FO1'].display(('q2','x')) """ -print '\n' + c*d(str) + str + c*d(str) -dummy = raw_input() -exec str +print('\n' + c*d(str) + str + c*d(str)) +dummy = input() +exec(str) str = """ PyCont.plot.toggleLabels('off') """ -print '\n' + c*d(str) + str + c*d(str) -dummy = raw_input() -exec str +print('\n' + c*d(str) + str + c*d(str)) +dummy = input() +exec(str) str = """ PyCont.plot.toggleLabels('on') @@ -192,9 +192,9 @@ PyCont.plot.fig1.axes1.HO1.toggleCurve('off') """ -print '\n' + c*d(str) + str + c*d(str) -dummy = raw_input() -exec str +print('\n' + c*d(str) + str + c*d(str)) +dummy = input() +exec(str) str = """ PyCont.computeEigen() @@ -202,10 +202,10 @@ PyCont.plot.fig2.toggleAll('off', bytype='P') """ -print '\n' + c*d(str) + str + c*d(str) -dummy = raw_input() -exec str - -print '\n' - -dummy = raw_input() +print('\n' + c*d(str) + str + c*d(str)) +dummy = input() +exec(str) + +print('\n') + +dummy = input() --- ./PyDSTool/tests/PyCont_DiscPredPrey.py (original) +++ ./PyDSTool/tests/PyCont_DiscPredPrey.py (refactored) @@ -33,10 +33,10 @@ PCargs.verbosity = 2 PyCont.newCurve(PCargs) -print 'Computing curve...' +print('Computing curve...') start = clock() PyCont['FP1'].forward() -print 'done in %.3f seconds!' % (clock()-start) +print('done in %.3f seconds!' % (clock()-start)) PCargs = args(name='FP2', type='FP-C') PCargs.freepars = ['p1'] @@ -47,13 +47,13 @@ PCargs.verbosity = 2 PyCont.newCurve(PCargs) -print 'Computing second branch...' +print('Computing second branch...') start = clock() PyCont['FP2'].forward() PyCont['FP2'].update(args(MaxNumPoints=10)) PyCont['FP2'].backward() PyCont['FP2'].cleanLabels() -print 'done in %.3f seconds!' % (clock()-start) +print('done in %.3f seconds!' % (clock()-start)) PCargs.name = 'FP3' PCargs.initpoint = 'FP2:BP2' @@ -61,12 +61,12 @@ PCargs.MaxNumPoints = 50 PyCont.newCurve(PCargs) -print 'Computing third branch...' +print('Computing third branch...') start = clock() PyCont['FP3'].forward() PyCont['FP3'].backward() PyCont['FP3'].cleanLabels() -print 'done in %.3f seconds!' % (clock()-start) +print('done in %.3f seconds!' % (clock()-start)) PCargs.name = 'FP4' PCargs.initpoint = 'FP2:PD1' @@ -75,12 +75,12 @@ PCargs.MaxNumPoints = 100 PyCont.newCurve(PCargs) -print 'Computing third branch...' +print('Computing third branch...') start = clock() PyCont['FP4'].forward() PyCont['FP4'].backward() PyCont['FP4'].cleanLabels() -print 'done in %.3f seconds!' % (clock()-start) +print('done in %.3f seconds!' % (clock()-start)) # Plot PyCont.display(('p1','u1')) --- ./PyDSTool/tests/PyCont_Hamiltonian.py (original) +++ ./PyDSTool/tests/PyCont_Hamiltonian.py (refactored) @@ -35,19 +35,19 @@ PCargs.verbosity = 2 PyCont.newCurve(PCargs) -print 'Computing equilibrium curve...' +print('Computing equilibrium curve...') start = clock() PyCont['EQ1'].forward() -print 'done in %.3f seconds!' % (clock()-start) +print('done in %.3f seconds!' % (clock()-start)) PCargs.initpoint = {'x': 1, 'y': 0} PCargs.name = 'EQ2' PyCont.newCurve(PCargs) -print 'Computing equilibrium curve...' +print('Computing equilibrium curve...') start = clock() PyCont['EQ2'].forward() -print 'done in %.3f seconds!' % (clock()-start) +print('done in %.3f seconds!' % (clock()-start)) PCargs.name = 'LC1' PCargs.type = 'LC-C' @@ -60,19 +60,19 @@ PCargs.SaveEigen = False PyCont.newCurve(PCargs) -print 'Computing curve...' +print('Computing curve...') start = clock() PyCont['LC1'].forward() -print 'done in %.3f seconds!' % (clock()-start) +print('done in %.3f seconds!' % (clock()-start)) PCargs.name = 'LC2' PCargs.initpoint = 'EQ2:H1' PyCont.newCurve(PCargs) -print 'Computing curve...' +print('Computing curve...') start = clock() PyCont['LC2'].forward() -print 'done in %.3f seconds!' % (clock()-start) +print('done in %.3f seconds!' % (clock()-start)) # Plot PyCont.display(curves=['EQ1', 'EQ2'], coords=('x','y'),stability=True) --- ./PyDSTool/tRefactoringTool: Refactored ./PyDSTool/tests/PyCont_Hopfield.py RefactoringTool: Refactored ./PyDSTool/tests/PyCont_LPNeuron.py RefactoringTool: Refactored ./PyDSTool/tests/PyCont_LevelCurve.py ests/PyCont_HindmarshRose.py (original) +++ ./PyDSTool/tests/PyCont_HindmarshRose.py (refactored) @@ -41,11 +41,11 @@ PCargs.verbosity = 2 HR_fast.newCurve(PCargs) - print 'Computing curve...' + print('Computing curve...') start = clock() HR_fast['EQ1'].forward() HR_fast['EQ1'].backward() - print 'done in %.3f seconds!' % (clock()-start) + print('done in %.3f seconds!' % (clock()-start)) PCargs.name = 'LC1' PCargs.type = 'LC-C' @@ -63,10 +63,10 @@ PCargs.SaveEigen = True HR_fast.newCurve(PCargs) - print 'Computing LC-C from H1...' + print('Computing LC-C from H1...') start = clock() HR_fast['LC1'].forward() - print 'done in %.3f seconds!' % (clock()-start) + print('done in %.3f seconds!' % (clock()-start)) def plot_fast_subsystem(HR_fast): HR_fast['EQ1'].display(figure='new', coords=('z', 'x'), stability=True) @@ -122,11 +122,11 @@ HR.newCurve(PCargs) if EQ: - print 'Computing curve...' + print('Computing curve...') start = clock() HR['EQ1'].forward() HR['EQ1'].backward() - print 'done in %.3f seconds!' % (clock()-start) + print('done in %.3f seconds!' % (clock()-start)) PCargs.name = 'LC1' PCargs.type = 'LC-C' @@ -150,10 +150,10 @@ HR.newCurve(PCargs) if LC: - print 'Computing LC-C from H1...' + print('Computing LC-C from H1...') start = clock() HR['LC1'].forward() - print 'done in %.3f seconds!' % (clock()-start) + print('done in %.3f seconds!' % (clock()-start)) def create_HR_cycle(HR, t1=3000): DS = HR.gensys --- ./PyDSTool/tests/PyCont_Hopfield.py (original) +++ ./PyDSTool/tests/PyCont_Hopfield.py (refactored) @@ -39,10 +39,10 @@ testDS = Generator.Vode_ODEsystem(DSargs) -print 'Integrating...' +print('Integrating...') start = clock() testtraj = testDS.compute('testDS') -print ' ... finished in %.3f seconds.\n' % (clock()-start) +print(' ... finished in %.3f seconds.\n' % (clock()-start)) if 0: plotData=testtraj.sample(dt=0.1) @@ -67,10 +67,10 @@ PCargs.MaxTestIters = 200 PyCont.newCurve(PCargs) -print 'Computing curve...' +print('Computing curve...') start = clock() PyCont['EQ1'].forward() -print 'done in %.3f seconds!' % (clock()-start) +print('done in %.3f seconds!' % (clock()-start)) if 0: PyCont.display(('alpha','m'),stability=True) @@ -83,11 +83,11 @@ PCargs.StopAtPoints = ['B'] PyCont.newCurve(PCargs) -print 'Computing curve...' +print('Computing curve...') start = clock() PyCont['FO1'].forward() PyCont['FO1'].backward() -print 'done in %.3f seconds!' % (clock()-start) +print('done in %.3f seconds!' % (clock()-start)) PyCont['FO1'].display(('theta','alpha'),stability=True) show() --- ./PyDSTool/tests/PyCont_LPNeuron.py (original) +++ ./PyDSTool/tests/PyCont_LPNeuron.py (refactored) @@ -116,10 +116,10 @@ PCargs.verbosity = 2 PyCont.newCurve(PCargs) -print 'Computing curve...' +print('Computing curve...') start = clock() PyCont['EQ1'].forward() -print 'done in %.3f seconds!' % (clock()-start) +print('done in %.3f seconds!' % (clock()-start)) PyCont['EQ1'].display(('Iext','v'), figure='new') PyCont.plot.toggleAll('off', bytype='P') @@ -138,10 +138,10 @@ PCargs.TestTol = 1e-8 PyCont.newCurve(PCargs) -print 'Computing limit-cycle curve...' +print('Computing limit-cycle curve...') start = clock() PyCont['LC1'].forward() -print 'done in %.3f seconds!' % (clock()-start) +print('done in %.3f seconds!' % (clock()-start)) PyCont['LC1'].display(('Iext','v'), stability=True) --- ./PyDSTool/tests/PyCont_LevelCurve.py (original) +++ ./PyDSTool/tests/PyCont_LevelCurve.py (refactored) @@ -49,23 +49,23 @@ sol = P['test'].sol -print "There were %i points computed" % len(sol) +print("There were %i points computed" % len(sol)) # solution points: -print sol +print(sol) -print "\nLabels for each point in sol pointset give diagnostic information about" -print "first derivative of the point along the curve ('V' entry) and the arc RefactoringTool: Refactored ./PyDSTool/tests/PyCont_Logistic.py RefactoringTool: Refactored ./PyDSTool/tests/PyCont_Lorenz.py RefactoringTool: Refactored ./PyDSTool/tests/PyCont_MorrisLecar_TypeI.py " -print "length parameter shows distance along the curve so far ('ds' entry)." +print("\nLabels for each point in sol pointset give diagnostic information about") +print("first derivative of the point along the curve ('V' entry) and the arc ") +print("length parameter shows distance along the curve so far ('ds' entry).") -print "\nVelocity around curve is always 1, e.g. look at 100th point" -print "norm(Point(sol[100].labels['EP']['data'].V)) =", \ - norm(Point(sol[100].labels['EP']['data'].V)) +print("\nVelocity around curve is always 1, e.g. look at 100th point") +print("norm(Point(sol[100].labels['EP']['data'].V)) =", \ + norm(Point(sol[100].labels['EP']['data'].V))) -print "... at which we have travelled distance ds =", \ - sol[100].labels['EP']['data'].ds +print("... at which we have travelled distance ds =", \ + sol[100].labels['EP']['data'].ds) -print "\nThis distance is equal to 100 * the max step size (0.01) which PyCont" -print "deemed sufficient for the desired accuracy." +print("\nThis distance is equal to 100 * the max step size (0.01) which PyCont") +print("deemed sufficient for the desired accuracy.") # easy way to plot the result P.display(curves=['test'], coords=('x','y')) --- ./PyDSTool/tests/PyCont_Logistic.py (original) +++ ./PyDSTool/tests/PyCont_Logistic.py (refactored) @@ -36,10 +36,10 @@ PCargs.SPOut = {'r': [0.1919191, 1.5353535]} PyCont.newCurve(PCargs) -print 'Computing curve...' +print('Computing curve...') start = clock() PyCont['FP1'].forward() -print 'done in %.3f seconds!' % (clock()-start) +print('done in %.3f seconds!' % (clock()-start)) s = PyCont['FP1'].sol assert len(s.bylabel('SP-r-0')) == 1 @@ -52,10 +52,10 @@ PCargs.LocBifPoints = ['PD', 'B'] PyCont.newCurve(PCargs) -print 'Computing second branch...' +print('Computing second branch...') start = clock() PyCont['FP2'].forward() -print 'done in %.3f seconds!' % (clock()-start) +print('done in %.3f seconds!' % (clock()-start)) PCargs.name = 'FP3' PCargs.initpoint = 'FP2:PD1' @@ -65,12 +65,12 @@ PCargs.period = 2 PyCont.newCurve(PCargs) -print 'Computing 2-cycle branch...' +print('Computing 2-cycle branch...') start = clock() PyCont['FP3'].forward() PyCont['FP3'].backward() PyCont['FP3'].cleanLabels() -print 'done in %.3f seconds!' % (clock()-start) +print('done in %.3f seconds!' % (clock()-start)) PCargs.name='FP4' PCargs.initpoint = 'FP3:PD1' @@ -78,24 +78,24 @@ PCargs.period = 4 PyCont.newCurve(PCargs) -print 'Computing 1st 4-cycle branch...' +print('Computing 1st 4-cycle branch...') start = clock() PyCont['FP4'].forward() PyCont['FP4'].backward() PyCont['FP4'].cleanLabels() -print 'done in %.3f seconds!' % (clock()-start) +print('done in %.3f seconds!' % (clock()-start)) PCargs.name = 'FP5' PCargs.initpoint = 'FP3:PD2' PCargs.initdirec = PyCont['FP3'].getSpecialPoint('PD2').labels['PD']['data'].branch PyCont.newCurve(PCargs) -print 'Computing 2nd 4-cycle branch...' +print('Computing 2nd 4-cycle branch...') start = clock() PyCont['FP5'].forward() PyCont['FP5'].backward() PyCont['FP5'].cleanLabels() -print 'done in %.3f seconds!' % (clock()-start) +print('done in %.3f seconds!' % (clock()-start)) # Plot PyCont.display(stability=True) --- ./PyDSTool/tests/PyCont_Lorenz.py (original) +++ ./PyDSTool/tests/PyCont_Lorenz.py (refactored) @@ -54,12 +54,12 @@ PCargs.SaveJacobian = True PyCont.newCurve(PCargs) -print "Beginning computation of curve in backward and then forward direction..." +print("Beginning computation of curve in backward and then forward direction...") start = clock() PyCont['LC1'].backward() PyCont['LC1'].update({'MaxNumPoints': 90, 'NumSPOut': 90}) PyCont['LC1'].forward() -print "\nComputation complete in %.3f seconds.\n" % (clock()-start) +print("\nComputation complete in %.3f seconds.\n" % (clock()-start)) # Plot PyCont['LC1'].cleanLabels() --- ./PyDSTool/tests/PyCont_MorrisLecar_TypeI.py (original) +++ ./PyDSTool/tests/PyCont_MorrisLecar_TypeI.py (refactored) @@ -52,10 +52,10 @@ PCargs.SaveEigen = True PyCont.newCurve(RefactoringTool: Refactored ./PyDSTool/tests/PyCont_MorrisLecar_TypeII.py RefactoringTool: Refactored ./PyDSTool/tests/PyCont_NewLorenz.py RefactoringTool: Refactored ./PyDSTool/tests/PyCont_PredPrey.py RefactoringTool: Refactored ./PyDSTool/tests/PyCont_SaddleNode.py RefactoringTool: Refactored ./PyDSTool/tests/PyCont_hybrid_osc.py PCargs) -print 'Computing curve...' +print('Computing curve...') start = clock() PyCont['EQ1'].forward() -print 'done in %.3f seconds!' % (clock()-start) +print('done in %.3f seconds!' % (clock()-start)) PCargs.name = 'LC1' PCargs.type = 'LC-C' @@ -70,10 +70,10 @@ PCargs.SaveEigen = True PyCont.newCurve(PCargs) -print 'Computing curve...' +print('Computing curve...') start = clock() PyCont['LC1'].forward() -print 'done in %.3f seconds!' % (clock()-start) +print('done in %.3f seconds!' % (clock()-start)) # Plot PyCont.display(('Iapp','v'),stability=True) --- ./PyDSTool/tests/PyCont_MorrisLecar_TypeII.py (original) +++ ./PyDSTool/tests/PyCont_MorrisLecar_TypeII.py (refactored) @@ -52,10 +52,10 @@ PCargs.SaveEigen = True PyCont.newCurve(PCargs) -print 'Computing curve...' +print('Computing curve...') start = clock() PyCont['EQ1'].forward() -print 'done in %.3f seconds!' % (clock()-start) +print('done in %.3f seconds!' % (clock()-start)) PCargs.name = 'LC1' PCargs.type = 'LC-C' @@ -70,10 +70,10 @@ PCargs.SaveEigen = True PyCont.newCurve(PCargs) -print 'Computing curve...' +print('Computing curve...') start = clock() PyCont['LC1'].forward() -print 'done in %.3f seconds!' % (clock()-start) +print('done in %.3f seconds!' % (clock()-start)) # Plot PyCont.display(('Iapp','v'),stability=True) --- ./PyDSTool/tests/PyCont_NewLorenz.py (original) +++ ./PyDSTool/tests/PyCont_NewLorenz.py (refactored) @@ -34,10 +34,10 @@ PCargs.verbosity = 2 PyCont.newCurve(PCargs) -print 'Computing equilibrium curve...' +print('Computing equilibrium curve...') start = clock() PyCont['EQ1'].forward() -print 'done in %.3f seconds!' % (clock()-start) +print('done in %.3f seconds!' % (clock()-start)) # Hopf curve PCargs = args(name='HO1', type='H-C2') @@ -47,10 +47,10 @@ PyCont.newCurve(PCargs) -print 'Computing hopf curve...' +print('Computing hopf curve...') start = clock() PyCont['HO1'].forward() -print 'done in %.3f seconds!' % (clock()-start) +print('done in %.3f seconds!' % (clock()-start)) # Plot PyCont.display(('F','x')) --- ./PyDSTool/tests/PyCont_PredPrey.py (original) +++ ./PyDSTool/tests/PyCont_PredPrey.py (refactored) @@ -45,10 +45,10 @@ PCargs.verbosity = 2 PC.newCurve(PCargs) -print 'Computing curve...' +print('Computing curve...') start = clock() PC['EQ1'].forward() -print 'done in %.3f seconds!' % (clock()-start) +print('done in %.3f seconds!' % (clock()-start)) PCargs.name = 'HO1' PCargs.type = 'H-C2' @@ -59,10 +59,10 @@ PCargs.LocBifPoints = ['ZH'] PC.newCurve(PCargs) -print 'Computing Hopf curve...' +print('Computing Hopf curve...') start = clock() PC['HO1'].forward() -print 'done in %.3f seconds!' % (clock()-start) +print('done in %.3f seconds!' % (clock()-start)) PCargs = args(name = 'FO1', type = 'LP-C') PCargs.initpoint = 'HO1:ZH1' @@ -72,15 +72,15 @@ PCargs.LocBifPoints = 'all' PC.newCurve(PCargs) -print 'Computing fold curve (forward)...' +print('Computing fold curve (forward)...') start = clock() PC['FO1'].forward() -print 'done in %.3f seconds!' % (clock()-start) +print('done in %.3f seconds!' % (clock()-start)) -print 'Computing fold curve (backward)...' +print('Computing fold curve (backward)...') start = clock() PC['FO1'].backward() -print 'done in %.3f seconds!' % (clock()-start) +print('done in %.3f seconds!' % (clock()-start)) # Plot PC.display(('k','D')) --- ./PyDSTool/tests/PyCont_SaddleNode.py (original) +++ ./PyDSTool/tests/PyCont_SaddleNode.py (refactored) @@ -35,10 +35,10 @@ PCargs.Corrector = 'Natural' PyCont.newCurve(PCargs) -print 'Computing equilibrium curve...' +print('Computing equilibrium curve...') start = clock() PyCont['EQ1'].forward() -print 'done in %.3f seconds!' % (clock()-start) +print('done in %.3f seconds!' % (clock()-start)) # Plot PyCont.display(('r','x'), stability=True, linewidth=0.5) --- ./PyDSTool/tests/PyCont_hybrid_osc.py (original) +++ ./PyDSTool/tests/PyCont_hybrid_osc.py (refactored) @@ -37,7 +37,7 @@ try: F = get_cycle(DS) except PyDSTool_ExistError: - print 'PRefactoringTool: Refactored ./PyDSTool/tests/PyCont_vanDerPol.py roblem computing orbit' + print('Problem computing orbit') C._userdata.problem = True return array([0], float) else: @@ -60,7 +60,7 @@ PCargs.initpoint = {'gl': PyCont.gensys.query('pars')['gl']} PyCont.newCurve(PCargs) -print 'Computing curve...' +print('Computing curve...') PyCont['UD1'].forward() PyCont['UD1'].backward() --- ./PyDSTool/tests/PyCont_vanDerPol.py (original) +++ ./PyDSTool/tests/PyCont_vanDerPol.py (refactored) @@ -11,7 +11,7 @@ import sys vdp_filename = 'vanderPol.dat' -print "At end of testing you can delete the temp file", vdp_filename +print("At end of testing you can delete the temp file", vdp_filename) def integrate(DS, t1=200, name='traj'): DS.set(tdata=[0, t1]) @@ -224,7 +224,7 @@ DS = C.gensys DS.pars['a'] = pt['a'] - if ((not C._userdata.has_key('sgn')) or C._userdata.sgn == -1): + if (('sgn' not in C._userdata) or C._userdata.sgn == -1): x1 = {'x': -1.0, 'y': pars['y1']} else: x1 = {'x': DS.pars['a'], 'y': pars['y1']} @@ -234,7 +234,7 @@ try: tx1b = DS.compute('x1b', dirn='b', ics=x1) except PyDSTool_ExistError: - print 'Lost canard!\n' + print('Lost canard!\n') C._userdata.problem = True return array([0], float) x1b = DS.getEvents()['event_x_a'][0].toarray() @@ -259,7 +259,7 @@ px1b = tx1b.sample(dt=0.01) plt.plot(px1f['x'], px1f['y']) plt.plot(px1b['x'], px1b['y']) - raw_input() + input() plt.close() F = array([x1f[1]-x1b[1]], float) @@ -271,7 +271,7 @@ if meas is None and solution measure nm2 or max if specified.""" if meas is None: for pt in PyCont[name].sol: - if 'UD' in pt.labels and pt.labels['UD']['data'].has_key('cycle'): + if 'UD' in pt.labels and 'cycle' in pt.labels['UD']['data']: cycle = pt.labels['UD']['data'].cycle plt.plot(cycle['x'], cycle['y'], '-b') else: @@ -280,7 +280,7 @@ ind = [] if meas == 'nm2': for i, pt in enumerate(PyCont[name].sol): - if 'UD' in pt.labels and pt.labels['UD']['data'].has_key('cycle'): + if 'UD' in pt.labels and 'cycle' in pt.labels['UD']['data']: cycle = pt.labels['UD']['data'].cycle dt = (cycle['t'][1:]-cycle['t'][0:-1])/(cycle['t'][-1]-cycle['t'][0]) solmeas.append(sqrt(0.5*(sum(dt*(cycle['x'][1:]*cycle['x'][1:] + \ @@ -288,7 +288,7 @@ ind.append(i) elif meas == 'max': for i, pt in enumerate(PyCont[name].sol): - if 'UD' in pt.labels and pt.labels['UD']['data'].has_key('cycle'): + if 'UD' in pt.labels and 'cycle' in pt.labels['UD']['data']: solmeas.append(max(abs(pt.labels['UD']['data'].cycle['x']))) ind.append(i) @@ -303,7 +303,7 @@ # Compute limit cycle cycle = find_cycle(DS, disp=False) -print "Finding limit cycle using AUTO" +print("Finding limit cycle using AUTO") C = ContClass(DS) continuation(C, cycle=cycle, compute=True, disp=False) @@ -315,7 +315,7 @@ plt.xlim([-2.5, 2.5]) plt.ylim([-1, 1]) -print "Continuing limit cycle" +print("Continuing limit cycle") continuation(C, cycle=None, compute=False, disp=False) DS.set(tdata=[0, 400]) @@ -328,20 +328,20 @@ C['UD1'].gensys.eventstruct['event_x_a'].activeFlag = True C['UD1'].gensys.eventstruct['event_x_a'].termFlag = True -print 'UD1: Integrating backward...' +print('UD1: Integrating backward...') try: C['UD1'].backward() except: exceptionType, exceptionValue, exceptionTraceback = sys.exc_info() - print "Error: ", exceptionType, ": message:", exceptionValue -print 'done!\n\n' -print 'UD1: Integrating forward...' + print("Error: ", exceptionType, ": message:", exceptionValue) +print('done!\n\n') +print('UD1: Integrating forward...') try: C['UD1'].forward() except: exceptionType, exceptionValue, exceptionTraceback = sys.exc_info() - RefactoringTool: Refactored ./PyDSTool/tests/PySCes_import_test.py RefactoringTool: No changes to ./PyDSTool/tests/SLIP_2D.py RefactoringTool: Refactored ./PyDSTool/tests/SLIP_2D_maps.py print "Error: ", exceptionType, ": message:", exceptionValue -print 'done!\n\n' + print("Error: ", exceptionType, ": message:", exceptionValue) +print('done!\n\n') ## Temp removed UD2 calculation (broken) @@ -367,5 +367,5 @@ plot_manifold() plot_cycles(C, 'UD1') #plot_cycles(C, 'UD2') -print "At end of testing you can delete the temp file", vdp_filename +print("At end of testing you can delete the temp file", vdp_filename) show() --- ./PyDSTool/tests/PySCes_import_test.py (original) +++ ./PyDSTool/tests/PySCes_import_test.py (refactored) @@ -6,7 +6,7 @@ from PyDSTool import * from PyDSTool.Toolbox.PySCes_SBML import * -print "Modify the path variable to indicate where your PySCes models are..." +print("Modify the path variable to indicate where your PySCes models are...") path = '/pysces/pscmodels/' #fname = 'pysces_test_linear1.psc' fname = 'pysces_test_branch1.psc' --- ./PyDSTool/tests/SLIP_2D_maps.py (original) +++ ./PyDSTool/tests/SLIP_2D_maps.py (refactored) @@ -24,7 +24,7 @@ y_ic = cos(beta) info(pars, "Parameter values") icdict = {'y': y_ic, 'z': z_ic, 'ydot': 0.8, 'zdot': .3, 'incontact': 0} -print "\n" +print("\n") info(icdict, "Initial conditions") @@ -39,7 +39,7 @@ # extract single point from pointset using [0] reference res = SLIP_map.getTrajEvents('pdc', 'liftoff')[0] res['incontact'] = 0 # make eligible for new i.c. - return res[icdict.keys()] + return res[list(icdict.keys())] # Find fixed point of gait map parameterized by beta, @@ -54,7 +54,7 @@ x1 = pdc_map(x0) except: # no liftoff event so probably a failed trajectory - print "Problem at x0 =", x0 + print("Problem at x0 =", x0) return Point({'zdot': 1e6}) return x1['zdot']-x0['zdot'] # Point @@ -69,13 +69,13 @@ icdict_pert = copy(icdict) icpt = Point({'coorddict': icdict_pert}) -print "\nFinding fixed point of periodic map as a function of beta" +print("\nFinding fixed point of periodic map as a function of beta") # Equally efficient alternatives to shoot for f.p. solution beta_pdc = minpack.fsolve(fp_beta_fsolve, beta, args=(icpt,), xtol=1e-4) ##beta_pdc = minpack.newton(fp_beta_newton, beta, args=(icpt,), tol=1e-4) beta_pdc_known = 1.21482619378 -print "beta_pdc = ", beta_pdc +print("beta_pdc = ", beta_pdc) assert abs(beta_pdc-beta_pdc_known)<1e-4, "beta_pdc was not found accurately" # update i.c. for new beta @@ -83,16 +83,16 @@ icdict_pert['y'] = math.cos(beta_pdc) icdict_maps = copy(icdict_pert) icpt = Point({'coorddict': icdict_maps}) -print "\nCalculating approximation to periodic maps" +print("\nCalculating approximation to periodic maps") SLIP_map.set(pars={'beta': beta_pdc}) states = [icpt] for i in range(5): states.append(pdc_map(states[-1])) -pdcgaittraj = pointsToPointset(states, 'n', range(len(states))) +pdcgaittraj = pointsToPointset(states, 'n', list(range(len(states)))) -print "\nCalculating approximation to periodic trajectory" +print("\nCalculating approximation to periodic trajectory") pars['beta'] = beta_pdc SLIP = makeSLIP2D_Vode(pars, dt=0.005) SLIP.compute(trajname='pdc', @@ -100,7 +100,7 @@ ics=icdict_pert, verboselevel=0) -print 'Plotting periodic trajectory (event dots from application of map)' +print('Plotting periodic trajectory (event dots from application of map)') SLIP_plot(SLIP, 'pdc', 'plane') # Plot successive (y,z) events points overlayed nmax = pdcgaittraj.indepvararray[-1] @@ -127,22 +127,22 @@ -print "Jacobian DP as a function of z, ydot, zdot (y contributes an e'val = 1)" +print("Jacobian DP as a function of z, ydot, zdot (y contributes an e'val = 1)") DP = diff2(pdc_map, icpt, axes=['z','ydot','zdot'], vars=['z','ydot','zdot'], eps=0.01) -print "DP(fp) =\n",DP -print "|DP(fp)| =", det(DP) +print("DP(fp) =\n",DP) +print("|DP(fp)| =", det(DP)) evals = eigvals(DP) -print "\nDP's eigenvalues are ",evals -print "Max eigenvalue magnitude = ", max(abs(evals)) +print("\nDP's eigenvalues are ",evals) +print("Max eigenvalue mRefactoringTool: Refactored ./PyDSTool/tests/SLIP_2D_pdc.py agnitude = ", max(abs(evals))) # verify beta = delta using the geometry tTD = SLIP.getTrajEventTimes('pdc')['touchdown'][0] # time at first touchdown sTD = SLIP('pdc',tTD) # system state at t=TD delta=math.atan(-sTD('ydot')/sTD('zdot')) # angle of velocity vector from horizontal theta_qv=beta_pdc-delta -print "Geometry shows that beta = delta, as theta_qv = beta-delta ..." -print "theta_qv =", theta_qv +print("Geometry shows that beta = delta, as theta_qv = beta-delta ...") +print("theta_qv =", theta_qv) assert abs(theta_qv-0.0028)<1e-4, "theta_qv not found accurately" # Check against Eq. (14) in ref (P. Holmes et al) @@ -153,6 +153,6 @@ assert abs(vmag_LOtheory - vmag_LO) < 1e-6, "vmag value doesn't match prediction" -print "Using Eq. (14), difference in velocity magnitudes v_LO given by" -print "simulation vs. conservation of energy =", vmag_LOtheory - vmag_LO +print("Using Eq. (14), difference in velocity magnitudes v_LO given by") +print("simulation vs. conservation of energy =", vmag_LOtheory - vmag_LO) show() --- ./PyDSTool/tests/SLIP_2D_pdc.py (original) +++ ./PyDSTool/tests/SLIP_2D_pdc.py (refactored) @@ -28,9 +28,9 @@ info(ics, "Initial conditions") # Choose makeSLIP2D_Dopri or makeSLIP2D_Vode as alternatives... -print "Beware that Radau has problems with this model on Mac OS X and maybe linux too..." -print "If you get a bus error then please inform me of what your setup is." -print "Then try re-running by changing the integrator to Dopri (see line below this in script)" +print("Beware that Radau has problems with this model on Mac OS X and maybe linux too...") +print("If you get a bus error then please inform me of what your setup is.") +print("Then try re-running by changing the integrator to Dopri (see line below this in script)") SLIP = makeSLIP2D_Radau(pars) SLIP.set(verboselevel=0) @@ -39,14 +39,14 @@ # residual fn for searching in beta def residual_fn_beta(x): ics['incontact'] = 0 - print "Trying beta =", x[0] + print("Trying beta =", x[0]) try: SLIP.compute(pars={'beta': x[0]}, force=True, trajname='par_est', tdata=[0, 12], ics=ics) except PyDSTool_ExistError: # beta chosen such that no eligible generators found - print " ... arbitrarily setting cost to be 1000" + print(" ... arbitrarily setting cost to be 1000") return 1000 # time of touchdown and liftoff evs = SLIP.getTrajEventTimes('par_est') @@ -58,13 +58,13 @@ if LOev < TDev: LOev = evs['liftoff'][2] z3 = SLIP('par_est',LOev,'z') - print "z3=",z3 + print("z3=",z3) delta = math.asin(z3) - print "delta =",delta + print("delta =",delta) # Dpsi = pi-beta-delta # target Dpsi = pi-2*beta, i.e. beta=delta cost = (beta-delta)**2 - print "cost =", cost + print("cost =", cost) else: raise RuntimeError("Not enough events found") return cost @@ -84,7 +84,7 @@ ics=ics) except PyDSTool_ExistError: # ydot chosen such that no eligible generators found - print " ... arbitrarily setting cost to be 1000" + print(" ... arbitrarily setting cost to be 1000") return 1000 # time of touchdown and liftoff evs = SLIP.getTrajEventTimes('par_est') @@ -102,21 +102,21 @@ # Dpsi = pi-beta-delta # target Dpsi = pi-2*beta, i.e. beta=delta cost = (beta-delta)**2 - print "cost =", cost + print("cost =", cost) else: - print evs - print "Found %i TD events, %i LO events"%(numTDs, numLOs) + print(evs) + print("Found %i TD events, %i LO events"%(numTDs, numLOs)) raise RuntimeError("Not enough events found") return cost Dpsi_tol = 1e-3 -print "Finding periodic gait by varying initial y velocity," -print "to tolerance in Dpsi of", Dpsi_tol, "\n" +print("Finding periodic gait by varying initial y velocity,") +print("to tolerance in Dpsi of", Dpsi_tol, "RefactoringTool: Refactored ./PyDSTool/tests/SLIP_plot.py RefactoringTool: Refactored ./PyDSTool/tests/Symbolic_Diff_test.py \n") # use optimizer with boundary constraints ydot_opt = optimize.fminbound(residual_fn_ydot, 0.5, 0.75, xtol=Dpsi_tol) ydot_opt_known = 0.666463229031 -print "ydot for periodic gait = ", ydot_opt +print("ydot for periodic gait = ", ydot_opt) assert abs(ydot_opt-ydot_opt_known) 0: delta = math.asin(z3) - print "|delta - beta| =", abs(delta - beta) + print("|delta - beta| =", abs(delta - beta)) plot([y2,y3],[z2,z3],'r-',linewidth=3) --- ./PyDSTool/tests/Symbolic_Diff_test.py (original) +++ ./PyDSTool/tests/Symbolic_Diff_test.py (refactored) @@ -11,7 +11,7 @@ assert DiffStr('x-(4*x*y)/(1+x*x)','x') == \ '1-4*(y)/(1+x*x)+(4*x*y)*2*x*pow((1+x*x),-2)' -print "Showing the variety of ways that symbolic Diff() can be used:" +print("Showing the variety of ways that symbolic Diff() can be used:") f1 = '[-3*x**2+2*(x+y),-y/2]' f2 = ['-3*x**2+2*(x+y)','-y/2'] @@ -21,26 +21,26 @@ f4 = ['-3*x**2.+2*(x+y)','-y/2.'] xx = QuantSpec('dummy','x') -print "The following strings should all be identical" -print Diff(f1,'x') -print Diff(f2,'x') -print Diff(f3,'x') -print Diff(f1,x) -print Diff(f2,x) -print Diff(f3,x) -print Diff(f3,xx) -print "\n" -print Diff(f1, ['x','y']) -print Diff(f1, [x,y]) -print Diff(f1, [xx,y]) -print Diff(f2, ['x','y']) -print Diff(f2, [x,y]) -print Diff(f3, ['x','y']) -print Diff(f3, [x,y]) - -print "--------------------------\n" - -print "Now some more complex tests..." +print("The following strings should all be identical") +print(Diff(f1,'x')) +print(Diff(f2,'x')) +print(Diff(f3,'x')) +print(Diff(f1,x)) +print(Diff(f2,x)) +print(Diff(f3,x)) +print(Diff(f3,xx)) +print("\n") +print(Diff(f1, ['x','y'])) +print(Diff(f1, [x,y])) +print(Diff(f1, [xx,y])) +print(Diff(f2, ['x','y'])) +print(Diff(f2, [x,y])) +print(Diff(f3, ['x','y'])) +print(Diff(f3, [x,y])) + +print("--------------------------\n") + +print("Now some more complex tests...") t=Var('t') s=Var('s') @@ -49,47 +49,47 @@ p=Par('3.','p') f = Fun(QuantSpec('f', str(2.0+s-10*(t**2)+Exp(p))), ['s','t']) f_0=Fun(QuantSpec('f_0', str(Diff(f(s,t),t))), ['t']) -print 2*f.eval(s=3,t=t) -print Diff('-10*Pow(t,2)','t') -print Diff(2*f.eval(s=3,t=t), t) -print Diff(3+t*f.eval(s=3,t=t),t) -print Diff(3+t*f(s,t),t).eval(s=3,t=1,p=p) -print Diff(3+t*f(s,t),t).eval(s=3,t=1,p=p()) +print(2*f.eval(s=3,t=t)) +print(Diff('-10*Pow(t,2)','t')) +print(Diff(2*f.eval(s=3,t=t), t)) +print(Diff(3+t*f.eval(s=3,t=t),t)) +print(Diff(3+t*f(s,t),t).eval(s=3,t=1,p=p)) +print(Diff(3+t*f(s,t),t).eval(s=3,t=1,p=p())) assert Diff(str(f(s,t)),'t') == Diff(f(s,t),t) q1=Diff(f(s,t),t) q2=Diff(str(f(s,t)),t) assert q1 == q2 q1.difference(q2) -print "\n" -print Diff(f(t,s),t) -print Diff(2*f(3,t*5), t) +print("\n") +print(Diff(f(t,s),t)) +print(Diff(2*f(3,t*5), t)) assert str(Diff(2*f(3,t*5), t)) != str(0) assert f(s,t) != f(t,s) -print f(s,t).eval() +print(f(s,t).eval()) q=f(s,t) -print q.eval() - -print Diff('g(s)',s) -print Diff('g(s)',s).eval() +print(q.eval()) + +print(DRefactoringTool: Refactored ./PyDSTool/tests/Symbolic_test.py iff('g(s)',s)) +print(Diff('g(s)',s).eval()) dg_dt=Fun(QuantSpec('g_0', '2-Sin(t/2)'),['t']) assert str(Diff('g(t)',t).eval()) != 'g_0(t)' -print "\n\n" -print Diff('g(s)',s) -print Diff('g(s)',s).eval() +print("\n\n") +print(Diff('g(s)',s)) +print(Diff('g(s)',s).eval()) g=Fun('',[t],'g') # declare empty function assert str(g(t)) == 'g(t)' -print Diff(g(s),s).eval() +print(Diff(g(s),s).eval()) assert eval(str(Diff('pow(1,2)*t','t'))) == 1 assert eval(str(Diff(Pow(1,2)*t,t))) == 1 assert str(Diff(Sin(Pow(t,1)),t)) == 'Cos(t)' q=QuantSpec('q','-0+3+pow(g(x)*h(y,x),1)*1') -print Diff(q,'x') +print(Diff(q,'x')) assert str(Diff(q,'x')) == '(g_0(x)*h(y,x)+g(x)*h_1(y,x))' # BROKEN in this version (need to move to SymPy) #print Diff(q,'x').eval() @@ -99,8 +99,8 @@ p1=Var('p1') pv=Var([p0,p1], 'p') -print pv() -print pv.eval() +print(pv()) +print(pv.eval()) u=Var('Pi/(2*Sin(Pi*t/2))','u') assert u.eval(t=1).tonumeric() == pi/2 @@ -155,23 +155,23 @@ #------------------ -print "\nSymbolic vector tests" +print("\nSymbolic vector tests") q0=Var(p0+3,'q0') q1=Var(Diff(1+Sin(Pow(p0,3)+q0),p0),'q1') qv=Var([q0,q1], 'q') -print qv() -print qv.eval() +print(qv()) +print(qv.eval()) v=Var('v') w=Var('w') f=Var([-3*Pow((2*v+1),3)+2*(w+v),-w/2], 'f') df = Diff(f, [v,w]) -print df +print(df) dfe = df.eval(v=3,w=10).tonumeric() -print dfe +print(dfe) assert isinstance(dfe, ndarray) assert isinstance(df.fromvector(), list) @@ -202,37 +202,37 @@ f1 = Fun([-3*x**3+2*(x+y),-y/2], [x,y], 'f1') f2 = ['-3*x**3+2*(x+y)','-y/2'] f3 = [-3*x**3.+2*(x+y),-y/2.] -print "\n\nVector-valued function f(x,y) =", f1 -print "The function string can be passed to Diff in various ways..." -print str(f1) -print str(f2) -print str(f3) -print "\nThe following outputs are for Diff(f,'x') for each of these forms" -print "They should all be the same (except for some may contain decimal points)" +print("\n\nVector-valued function f(x,y) =", f1) +print("The function string can be passed to Diff in various ways...") +print(str(f1)) +print(str(f2)) +print(str(f3)) +print("\nThe following outputs are for Diff(f,'x') for each of these forms") +print("They should all be the same (except for some may contain decimal points)") f4 = [-3*Pow((2*x+1),3)+2*(x+y),-y/2] xx = QuantSpec('dummy','x') f5=Var([-3*Pow((2*x+1),3)+2*(x+y),-y/2], 'f5') assert Diff(f1,x) == Diff(f1,'x') -print Diff(f1,x) -print Diff(f3,x) -print Diff(f3,xx) -print Diff(f4,x) -print Diff(f4,xx) -print "\nExamples of Jacobian Diff(f, [x,y])..." +print(Diff(f1,x)) +print(Diff(f3,x)) +print(Diff(f3,xx)) +print(Diff(f4,x)) +print(Diff(f4,xx)) +print("\nExamples of Jacobian Diff(f, [x,y])...") assert Diff(f1, [x,y]) == Diff(f1, ['x','y']) == Diff(f1(x,y), [x,y]) -print Diff(f2, ['x','y']) -print Diff(f3, ['x','y']) -print Diff(f1, [xx,y]) -print Diff(f1, [xx,'y']) -print Diff(f2, [x,y]) -print Diff(f3, [x,y]), "\n" -print Diff(f4, [x,y]) +print(Diff(f2, ['x','y'])) +print(Diff(f3, ['x','y'])) +print(Diff(f1, [xx,y])) +print(Diff(f1, [xx,'y'])) +print(Diff(f2, [x,y])) +print(Diff(f3, [x,y]), "\n") +print(Diff(f4, [x,y])) df5 = Diff(f5, [x,y]) -print df5 -print df5.eval(x=3,y=10).tonumeric() -print df5.eval(x=3,y=10).fromvector(0) -print df5.fromvector(0) +print(df5) +print(df5.eval(x=3,y=10).tonumeric()) +print(df5.eval(x=3,y=10).fromvector(0)) +print(df5.fromvector(0)) assert isinstance(df5.fromvector(), list) a = df5.fromvector(0).eval(x=3,y=10).tonumeric() b = df5.eval(x=3,y=10).tonumeric()[0] @@ -240,8 +240,8 @@ # -- -print "\nExamples of differentiation using nested functions" -print " - this functionality is built in to Symbolic.prepJacobian" +print("\nExamples of differentiation using nested functions") +print(" - this functionality is built in to Symbolic.prepJacobian") func_ma_spec = (['p', 'v'], '0.32*(v+54)/(1-exp(-p*(v+54)/4))') ma = Fun(func_ma_spec[1], func_ma_spec[0], 'ma') ma_1 = Fun(Diff(ma, 'v'), ['v'], 'ma_1') --- ./PyDSTool/tests/Symbolic_test.py (original) +++ ./PyDSTool/tests/Symbolic_test.py (refactored) @@ -90,7 +90,7 @@ assert testq() == 'a' assert str(testq.eval(a=3)) == '3' q = QuantSpec('q', 'zeta(yrel(y,initcond(y)),z)-1') -print q.eval({}) +print(q.eval({})) assert 'initcond' in str(q.eval({})) q2=QuantSpec('q','Exp(-spikeTable+b)/k') assert 'spikeTable' in q2.freeSymbols @@ -125,21 +125,21 @@ assert c.isDefined() == False c.add(x) -print c.freeSymbols, c.isDefined() +print(c.freeSymbols, c.isDefined()) c.add(az) -print c.freeSymbols, c.isDefined() +print(c.freeSymbols, c.isDefined()) c.add(w) -print c.freeSymbols, c.isDefined() - -print "\n" +print(c.freeSymbols, c.isDefined()) + +print("\n") c.compileFuncSpec() -print c.funcSpecDict - -print "\n" +print(c.funcSpecDict) + +print("\n") empty_fn = Fun('1+exp(1)', [], 'dumb_fn') -print empty_fn() +print(empty_fn()) q = Par('qpar') y = Var(QuantSpec('rel', 'v+p'), domain=[0,1]) @@ -165,160 +165,160 @@ a = myNode('sys1') a.add([f,p,y]) -print a.isDefined(True) +print(a.isDefined(True)) a.add(c) -print a.freeSymbols, a.isDefined(), a.isComplete() +print(a.freeSymbols, a.isDefined(), a.isComplete()) a.add(d) -print a.freeSymbols, a.isDefined(), a.isComplete() +print(a.freeSymbols, a.isDefined(), a.isComplete()) a.add(d2) -print a.freeSymbols, a.isDefined(), a.isComplete() +print(a.freeSymbols, a.isDefined(), a.isComplete()) a.add(v) -print "Added v" -print a.freeSymbols, a.isDefined(), a.isComplete() -print "Removed v" +print("Added v") +print(a.freeSymbols, a.isDefined(), a.isComplete()) +print("Removed v") a.remove(v) -print a.freeSymbols, a.isDefined(), a.isComplete() +print(a.freeSymbols, a.isDefined(), a.isComplete()) a.add([z,ipar]) -print a.freeSymbols, a.isDefined(), a.isComplete() -print "\na._registry --> " -print a._registry -print "Re-added v" +print(a.freeSymbols, a.isDefined(), a.isComplete()) +print("\na._registry --> ") +print(a._registry) +print("Re-added v") a.add(v) -print a.freeSymbols, a.isDefined(), a.isComplete() -print "\nv in a -->", v in a - -print "\n" +print(a.freeSymbols, a.isDefined(), a.isComplete()) +print("\nv in a -->", v in a) + +print("\n") try: a.compileFuncSpec() test = True - print "\nWas able to add a non-parameter as a free name to an" - print "auxiliary function definition! This should not have happened!" -except TypeError, errinfo: - print "\nSuccessfully could not add a non-parameter as a free name" - print "in an auxiliary function" - print "Error was: ", errinfo + print("\nWas able to add a non-parameter as a free name to an") + print("auxiliary function definition! This should not have happened!") +except TypeError as errinfo: + print("\nSuccessfully could not add a non-parameter as a free name") + print("in an auxiliary function") + print("Error was: ", errinfo) test = False assert not test a.remove(['leaf2.qfunc_dummy', 'leaf2.q_notpar']) -print "--------- sys1: funcSpecDict ---------------------" +print("--------- sys1: funcSpecDict ---------------------") a.compileFuncSpec() info(a.funcSpecDict) -print "\n\n------------- Flatten spec with unravelling\n" -print "\n\ninfo(a.flattenSpec()) --> \n" +print("\n\n------------- Flatten spec with unravelling\n") +print("\n\ninfo(a.flattenSpec()) --> \n") info(a.flattenSpec(globalRefs=['t']), "Model specification") -print "\n\n------------- Flatten spec with no unravelling\n" -print "\n\ninfo(a.flattenSpec(False, globalRefs=['t'])) --> \n" +print("\n\n------------- Flatten spec with no unravelling\n") +print("\n\ninfo(a.flattenSpec(False, globalRefs=['t'])) --> \n") info(a.flattenSpec(False, globalRefs=['t']), "Model specification") -print "\n\nDemos for functions (results are strings):\n" +print("\n\nDemos for functions (results are strings):\n") h = f(p, -x) z = QuantSpec('zero','0') -print "h = f(p, -x) --> ", h -print "z = QuantSpec('zero','0') --> ", z -print "f(g(3)*1,h) --> ", f(g(3)*1,h) -print "f(g(p),h) --> ", f(g(p),h) -print "f(g(p),0*h) --> ", f(g(p),0*h) -print "f(g(x),h+z) --> ", f(g(x),h+z) +print("h = f(p, -x) --> ", h) +print("z = QuantSpec('zero','0') --> ", z) +print("f(g(3)*1,h) --> ", f(g(3)*1,h)) +print("f(g(p),h) --> ", f(g(p),h)) +print("f(g(p),0*h) --> ", f(g(p),0*h)) +print("f(g(x),h+z) --> ", f(g(x),h+z)) # e is the math constant, but it doesn't evaluate to a float! -print "f(g(x()),(e+h)/2) --> ", f(g(x()),(e+h)/2) -print "f(g(x()),-h) --> ", f(g(x()),-h) -print "f(g(x()),.5-h+0) --> ", f(g(x()),.5-h+0) -print "Sin(pi+q) --> ", Sin(pi+q) +print("f(g(x()),(e+h)/2) --> ", f(g(x()),(e+h)/2)) +print("f(g(x()),-h) --> ", f(g(x()),-h)) +print("f(g(x()),.5-h+0) --> ", f(g(x()),.5-h+0)) +print("Sin(pi+q) --> ", Sin(pi+q)) qsin=QuantSpec('qsin','zv-sin(beta)') assert str(qsin.eval()) == 'zv-sin(beta)' -print "\n\nDemos for local scope evaluation and **:\n" -print "q=Var('xv+1','qv')" -print "x=Var('3','xv')" +print("\n\nDemos for local scope evaluation and **:\n") +print("q=Var('xv+1','qv')") +print("x=Var('3','xv')") q=Var('xv+1','qv') x=Var('3','xv') sc1 = str(q.eval()) == '4' -print "q.eval() == 4? ", sc1 +print("q.eval() == 4? ", sc1) assert sc1 -print "a=x/q" +print("a=x/q") a=x/q sc2 = str(a) == 'xv/qv' -print "a == xv/qv? ", sc2 +print("a == xv/qv? ", sc2) assert sc2 sc3 = str(a.eval())=='0.75' -print "a.eval() == 0.75? ", sc3 +print("a.eval() == 0.75? ", sc3) assert sc3 sc4 = str(a.eval(xv=5))=='5/qv' -print "a.eval(xv=5) == 5/q? ", sc4 +print("a.eval(xv=5) == 5/q? ", sc4) assert sc4 sc5 = (str(a.eval(xv=5,qv=q())),'0.83333333333333337') assert_approx_equal(*sc5) -print "assert_approx_equal(%s,%s)" % sc5 +print("assert_approx_equal(%s,%s)" % sc5) sc6 = (str(a.eval({'xv': 10, 'qv': q()})),'0.90909090909090906') -print "assert_approx_equal(%s,%s)" % sc6 +print("assert_approx_equal(%s,%s)" % sc6) assert_approx_equal(*sc6) -print "qs=QuantSpec('qsv','xsv+1')" -print "xs=QuantSpec('xsv','3')" +print("qs=QuantSpec('qsv','xsv+1')") +print("xs=QuantSpec('xsv','3')") qs=QuantSpec('qsv','xsv+1') xs=QuantSpec('xsv','3') qse = qs.eval() qt1 = str(qse) == '4' -print "qs.eval() == 4? ", qt1 +print("qs.eval() == 4? ", qt1) assert qt1 assert qse.tonumeric() == 4 -print "asq = xs/qs" +print("asq = xs/qs") asq=xs/qs qt2 = str(asq) == '3/(xsv+1)' -print "asq == 3/(xsv+1)? ", qt2 +print("asq == 3/(xsv+1)? ", qt2) assert qt2 qt3 = str(asq.eval()) == '0.75' -print "as.eval() == 0.75? ", qt3 +print("as.eval() == 0.75? ", qt3) assert qt3 ps = asq**xs -print "ps = as**xs" +print("ps = as**xs") qt4 = str(ps) == 'Pow(3/(xsv+1),3)' -print "ps == Pow(3/(xsv+1),3)? ", qt4 +print("ps == Pow(3/(xsv+1),3)? ", qt4) assert qt4 qt5 = str(ps.eval()) == str(0.75**3) -print "ps.eval() == 0.421875? ", qt5 +print("ps.eval() == 0.421875? ", qt5) assert qt5 -print "sq=QuantSpec('sv','sin(xsv)')" -print "s2q=QuantSpec('s2v','Sin(xv)')" +print("sq=QuantSpec('sv','sin(xsv)')") +print("s2q=QuantSpec('s2v','Sin(xv)')") sq=QuantSpec('sv','sin(xsv)') s2q=QuantSpec('s2v','Sin(xv)') -print "sq.eval() --> ", sq.eval() -print "s2q.eval() --> ", s2q.eval() +print("sq.eval() --> ", sq.eval()) +print("s2q.eval() --> ", s2q.eval()) assert sq.eval().tonumeric() == s2q.eval().tonumeric() assert sq[:] == ['sin','(','xsv',')'] -print "\n\nDemos for multiple quantity definitions:\n" +print("\n\nDemos for multiple quantity definitions:\n") mp=QuantSpec('p','a + 3*z[4*i-2]') m=Var(mp, 'z[i,2,5]', specType='RHSfuncSpec') v=Var('3*z[i-1]+z4-i', 'z[i,1,5]', specType='RHSfuncSpec') -print "mp=QuantSpec('p','a + 3*z[4*i-2]')" -print "m=Var(mp, 'z[i,2,5]', specType='RHSfuncSpec')" -print "v=Var('3*z[i-1]+z4-i', 'z[i,1,5]', specType='RHSfuncSpec')" -print "v[3] -->", v[3] +print("mp=QuantSpec('p','a + 3*z[4*i-2]')") +print("m=Var(mp, 'z[i,2,5]', specType='RHSfuncSpec')") +print("v=Var('3*z[i-1]+z4-i', 'z[i,1,5]', specType='RHSfuncSpec')") +print("v[3] -->", v[3]) assert str(v[3])=='z3' -print "v.freeSymbols -->", v.freeSymbols +print("v.freeSymbols -->", v.freeSymbols) assert v.freeSymbols == ['z0'] -print "\nModelSpec a already contains 'z0', which was defined as part of" -print "a multiple quantity definition, so check that attempting to add" -print "v to a results in an error ..." +print("\nModelSpec a alreRefactoringTool: No changes to ./PyDSTool/tests/Tutorial_Calcium.py RefactoringTool: No changes to ./PyDSTool/tests/Tutorial_LorenzMap.py RefactoringTool: Refactored ./PyDSTool/tests/Tutorial_PredatorPrey.py RefactoringTool: Refactored ./PyDSTool/tests/Tutorial_SymbolicJac.py ady contains 'z0', which was defined as part of") +print("a multiple quantity definition, so check that attempting to add") +print("v to a results in an error ...") try: a.add(v) - print "v was successfully added -- test failed" + print("v was successfully added -- test failed") except: - print "v was rejected - test passed" -print "\nTest of eval method, e.g. on a function f(s,t)..." -print "f.eval(s='1', t='t_val') -->", f.eval(s='1', t='t_val') -print "f.eval(s=1, t='t_val', p=0.5) -->", f.eval(s=1, t='t_val', p=0.5) -print "\nTesting convertPowers():" + print("v was rejected - test passed") +print("\nTest of eval method, e.g. on a function f(s,t)...") +print("f.eval(s='1', t='t_val') -->", f.eval(s='1', t='t_val')) +print("f.eval(s=1, t='t_val', p=0.5) -->", f.eval(s=1, t='t_val', p=0.5)) +print("\nTesting convertPowers():") cp_tests = ["phi1dot^m3", "1+phi1dot^m3*s", "phi1dot**m3", "1+phi1dot**m3*s", "sin(x^3)**4", "(2/3)^2.5", "3^cos(x)-pi", "3^(cos(x)-pi)", "2^(sin(y**p))"] for spec in cp_tests: - print spec, " --> ", convertPowers(spec) + print(spec, " --> ", convertPowers(spec)) qc=QuantSpec('t', "a+coot+b/'coot'") @@ -326,13 +326,13 @@ coot=QuantSpec('coot', "1.05") assert str(qc.eval()) == 'a+1.05+b/"coot"' -print "\nTest of function calling with argument names that clash with" -print "bound names inside the function." +print("\nTest of function calling with argument names that clash with") +print("bound names inside the function.") x0=Var('x0') x1=Var('x1') x2=Var('x2') F=Fun([x0*x2,x0*5,x2**0.5], [x0,x1,x2], 'F') -print "F=Fun([x0*x2,x0*5,x2**0.5], [x0,x1,x2], 'F')" -print "F(3,2,Sin(x0))) = [3*Sin(x0),15,Pow(Sin(x0),0.5)] ..." -print " ... even though x0 is a bound name inside definition of F" +print("F=Fun([x0*x2,x0*5,x2**0.5], [x0,x1,x2], 'F')") +print("F(3,2,Sin(x0))) = [3*Sin(x0),15,Pow(Sin(x0),0.5)] ...") +print(" ... even though x0 is a bound name inside definition of F") assert str(F(3,2,Sin(x0)))=='[3*Sin(x0),15,Pow(Sin(x0),0.5)]' --- ./PyDSTool/tests/Tutorial_PredatorPrey.py (original) +++ ./PyDSTool/tests/Tutorial_PredatorPrey.py (refactored) @@ -62,10 +62,10 @@ PCargs.verbosity = 2 PC.newCurve(PCargs) -print 'Computing curve...' +print('Computing curve...') start = clock() PC['EQ1'].forward() -print 'done in %.3f seconds!' % (clock()-start) +print('done in %.3f seconds!' % (clock()-start)) PCargs.name = 'HO1' PCargs.type = 'H-C2' @@ -77,10 +77,10 @@ PCargs.SaveEigen = True PC.newCurve(PCargs) -print 'Computing Hopf curve...' +print('Computing Hopf curve...') start = clock() PC['HO1'].forward() -print 'done in %.3f seconds!' % (clock()-start) +print('done in %.3f seconds!' % (clock()-start)) PCargs = args(name = 'FO1', type = 'LP-C') PCargs.initpoint = 'HO1:ZH1' @@ -101,14 +101,14 @@ hopfs = Pointset(indepvararray=PC['HO1'].sol['k'], indepvarname='k', coorddict=hopfs_unparam.todict()) ix0, ix1 = hopfs.find(9) -print "k values found around 9.0 are %.3f, %.3f" % ( hopfs['k'][ix0], hopfs['k'][ix1] ) +print("k values found around 9.0 are %.3f, %.3f" % ( hopfs['k'][ix0], hopfs['k'][ix1] )) # Arbitrarily choose closest lower index to check stability -print "Hopf point found for k = %.3f is stable?" % hopfs['k'][ix0], +print("Hopf point found for k = %.3f is stable?" % hopfs['k'][ix0], end=' ') if PC['HO1'].sol[ix0].labels['H']['stab'] == 'N': - print "No" + print("No") else: - print "Yes" + print("Yes") # Create interpolatable curve from the pointset hopfs_curve = pointset_to_traj(hopfs) --- ./PyDSTool/tests/Tutorial_SymbolicJac.py (original) +++ ./PyDSTool/tests/Tutorial_SymbolicJac.py (refactored) @@ -52,37 +52,37 @@ 'term': True}, [y0]) testODE = Vode_ODEsystem(DSargs) -print "Defined the following internal Python function for Jacobian:" -print testODE.funcspec.auxfns['Jacobian'][0] +print("Defined the following internal Python function for Jacobian:") +print(testODE.funcspec.auxfns['Jacobian'][0]) -print "\nOutput at exponentiallyRefactoringTool: Refactored ./PyDSTool/tests/Tutorial_VdP.py RefactoringTool: Refactored ./PyDSTool/tests/Tutorial_compneuro.py RefactoringTool: No changes to ./PyDSTool/tests/Tutorial_linear.py RefactoringTool: Refactored ./PyDSTool/tests/basic_gen_tests.py RefactoringTool: Refactored ./PyDSTool/tests/basic_gen_tests_C.py larger subsequent time steps (with event detection!):\n" +print("\nOutput at exponentially larger subsequent time steps (with event detection!):\n") tvals = [0.4*10**i for i in range(0,12)] t0 = 0. for t1 in tvals: dt = t1-t0 - print "\n===============================================\nAt t=", - print t1, "using dt =", dt + print("\n===============================================\nAt t=", end=' ') + print(t1, "using dt =", dt) testODE.set(tdata=[t0,t1], algparams={'init_step': dt}) if t0 >0.: - print testODE._solver.y + print(testODE._solver.y) traj = testODE.compute('test', 'c') # c for continue (acts as f first time) try: - print traj(t1) + print(traj(t1)) except ValueError: - print "\n----------" + print("\n----------") testODE.diagnostics.showWarnings() - print traj(traj.indepdomain[1]) - print "----------\n" + print(traj(traj.indepdomain[1])) + print("----------\n") t0 = traj.indepdomain[1] else: t0 = t1 -print "\nCompare results with the output directly from the scipy_ode.py test" -print "(up to the point where the terminal event was found)." -print "The values from a test integration performed with scipy_ode.py " \ - + "are listed in the comments at the end of this script" +print("\nCompare results with the output directly from the scipy_ode.py test") +print("(up to the point where the terminal event was found).") +print("The values from a test integration performed with scipy_ode.py " \ + + "are listed in the comments at the end of this script") ## At t=0.0 y=[ 1. 0. 0.] ## At t=0.4 y=[ 9.85172114e-001 3.38639538e-005 1.47940221e-002] --- ./PyDSTool/tests/Tutorial_VdP.py (original) +++ ./PyDSTool/tests/Tutorial_VdP.py (refactored) @@ -98,7 +98,7 @@ traj = vdp.compute('eps_%.4f'%eps) pts = traj.sample() event_dict = pts.labels.by_label['Event:event_x_a'] - indices = np.sort(event_dict.keys()) + indices = np.sort(list(event_dict.keys())) # assume there are at least 3 indices! # pick the last two that go through the same point ix1, ix2, ix3 = indices[-3:] --- ./PyDSTool/tests/Tutorial_compneuro.py (original) +++ ./PyDSTool/tests/Tutorial_compneuro.py (refactored) @@ -163,7 +163,7 @@ HH_model = model_HH.getModel() verboselevel = 2 -print "Computing trajectory using verbosity level %d..."%verboselevel +print("Computing trajectory using verbosity level %d..."%verboselevel) ## don't extend tdata past the range given to the ModelConstructor HH_model.compute(trajname='test', tdata=[0, 100], --- ./PyDSTool/tests/basic_gen_tests.py (original) +++ ./PyDSTool/tests/basic_gen_tests.py (refactored) @@ -1,6 +1,6 @@ from PyDSTool import * -print "Basic generator tests..." +print("Basic generator tests...") # Test: InterpolateTable xnames = ['x1', 'x2'] @@ -28,7 +28,7 @@ # print "ltabletraj(0.4) =" try: ltabletraj(0.4) -except ValueError, e: +except ValueError as e: pass # print "... ltabletraj(0.4) did not succeed because ", e # print "(0.4 is not in the tdata array)" @@ -105,11 +105,11 @@ sintraj = sin_gen.compute('sinewave') assert sintraj(0.0, checklevel=2)['s'] - 0.38941834 < 1e-7 -print "Expect problem calling at t=0.8..." +print("Expect problem calling at t=0.8...") try: sintraj(0.8, checklevel=2) -except PyDSTool_BoundsError, e: - print "... correctly raised error: ", e +except PyDSTool_BoundsError as e: + print("... correctly raised error: ", e) else: raise AssertionError # print "Set limits properly now, to [-1., 1.] ..." @@ -171,4 +171,4 @@ traj = tm3.compute('test') assert allclose(tm3.Rhs(0, {'x': 0}), 8*pi) -print " ...passed" +print(" ...passed") --- ./PyDSTool/tests/basic_gen_tests_C.py (original) +++ ./PyDSTool/tests/basic_gen_tests_C.py (refactored) @@ -1,6 +1,6 @@ from PyDSTool import * -print "Basic generator tests for C-based vector fields..." +print("Basic generator tests for C-based vector fields...") fnspecs = {'RefactoringTool: Refactored ./PyDSTool/tests/dopri_event_test.py RefactoringTool: Refactored ./PyDSTool/tests/embedded_map_test.py RefactoringTool: Refactored ./PyDSTool/tests/expfn_test.py RefactoringTool: Refactored ./PyDSTool/tests/fingermodel_auxvartest.py testif': (['x'], 'if(x<0.0,0.0,x)'), @@ -42,4 +42,4 @@ traj = tm2.compute('test') assert allclose(tm2.Rhs(0, {'y0':0, 'y1': 0.3, 'y2': 5}), array([-11. , 2.3+pi, 0. ])) -print " ...passed" +print(" ...passed") --- ./PyDSTool/tests/dopri_event_test.py (original) +++ ./PyDSTool/tests/dopri_event_test.py (refactored) @@ -57,13 +57,13 @@ DSargs.events = [thresh_ev_nonterm,thresh_ev_term] testODE = Dopri_ODEsystem(DSargs) -print "Computing trajectory:" -print "traj = testODE.compute('traj')" +print("Computing trajectory:") +print("traj = testODE.compute('traj')") traj = testODE.compute('traj') -print "\ntestODE.diagnostics.showWarnings() => " +print("\ntestODE.diagnostics.showWarnings() => ") testODE.diagnostics.showWarnings() -print "\ntraj.indepdomain.get() => ", traj.indepdomain.get() +print("\ntraj.indepdomain.get() => ", traj.indepdomain.get()) indep1 = traj.indepdomain[1] assert indep1 < 1.15 and indep1 > 1.13 mon_evs_found = testODE.getEvents()['monitor'] --- ./PyDSTool/tests/embedded_map_test.py (original) +++ ./PyDSTool/tests/embedded_map_test.py (refactored) @@ -84,7 +84,7 @@ map.showSpec() test_traj = map.compute('test', map_ics) -print test_traj.sample(), "\n" +print(test_traj.sample(), "\n") def return_map(ic): return map.compute('pdc_shoot', ic)(1) @@ -96,26 +96,26 @@ ## print "\nfp_residual: y0 = ", y0 v = return_map({'y': y0}) ## plot(0, y0, 'k.') - print v + print(v) return v-ic[0] -print "Finding fixed point of return map as function of initial condition" +print("Finding fixed point of return map as function of initial condition") # Equally efficient alternatives to shoot for f.p. solution y0_guess = map_ics['y'] sol_pdc = minpack.fsolve(fp_residual, array([y0_guess]), xtol=1e-6) -print "sol_pdc = ", sol_pdc +print("sol_pdc = ", sol_pdc) -print "Plotting (x,y) limit cycle of oscillator with Poincare section" -print " given by x=0" +print("Plotting (x,y) limit cycle of oscillator with Poincare section") +print(" given by x=0") traj, pts = getTraj({'x':0, 'y':-sol_pdc}, {'m':1}, t1=10, termFlag=False) traj, pts = getTraj({'x':0, 'y':-sol_pdc}, {'m':14}, t1=10, termFlag=False) map.set(ics={'y':sol_pdc}) -print "Initializing PyCont to follow x=0 crossing as parameter m varied:" +print("Initializing PyCont to follow x=0 crossing as parameter m varied:") pc=ContClass(map) pcargs=args(name='FPu', type='FP-C', @@ -128,13 +128,13 @@ ) pc.newCurve(pcargs) -print "\nRunning PyCont forward" +print("\nRunning PyCont forward") pc['FPu'].forward() -print "\n\nSolution is:\n", repr(pc['FPu'].sol) +print("\n\nSolution is:\n", repr(pc['FPu'].sol)) s=pc['FPu'].sol -print "Plotting line of fixed points of x vs parameter m ..." +print("Plotting line of fixed points of x vs parameter m ...") figure() plot(s['m'],s['y']) --- ./PyDSTool/tests/expfn_test.py (original) +++ ./PyDSTool/tests/expfn_test.py (refactored) @@ -10,7 +10,7 @@ from PyDSTool import * -print "Test of Explicit and Implicit Function generators, global time, and deletion" +print("Test of Explicit and Implicit Function generators, global time, and deletion") ev_args = {'name': 'threshold', 'eventtol': 1e-4, @@ -64,4 +64,4 @@ del sintraj1 assert dv != dir(Variable) -print " ...passed" +print(" ...passed") --- ./PyDSTool/tests/fingermodel_auxvartest.py (original) +++ ./PyDSTool/tests/fingermodel_auxvartest.py (refactored) @@ -28,13 +28,13 @@ dtraj1 = decay.compute('testtraj1') decay.set(ics={'a': 0.5}) dtraj2 = decay.compute('testtraj2') -print "To test that separate trajectories output from generator actually" -print " have different values we compare two traj's values" -print "These should be different:" +print("To test that separate trajectories output from generator actually") +print(" have different values we compare two traj's values") +print("These should be different:") result = dtraj1.variables['a'](0.2) != dtraj2.variables['a'](0.2) -print "dtraj1.variables['a'](0.2) != dtraj2.variables['a'](0.2)? =>", \ - result -print "This demRefactoringTool: Refactored ./PyDSTool/tests/fingermodel_vode.py RefactoringTool: Refactored ./PyDSTool/tests/forced_spring.py RefactoringTool: Refactored ./PyDSTool/tests/freefinger_noforce_radau.py RefactoringTool: Refactored ./PyDSTool/tests/funcspec_tests.py onstrates avoiding an insufficiently deep 'copy' of new" -print " Variables into new trajectories whereby new Variables overwrite" -print " old ones in other Trajectory objects" +print("dtraj1.variables['a'](0.2) != dtraj2.variables['a'](0.2)? =>", \ + result) +print("This demonstrates avoiding an insufficiently deep 'copy' of new") +print(" Variables into new trajectories whereby new Variables overwrite") +print(" old ones in other Trajectory objects") assert result --- ./PyDSTool/tests/fingermodel_vode.py (original) +++ ./PyDSTool/tests/fingermodel_vode.py (refactored) @@ -69,7 +69,7 @@ 'eventdelay': 1e-6, 'starttime': 0, 'term': True, - 'name': 'deriv'}, ['a'], pd.keys()) + 'name': 'deriv'}, ['a'], list(pd.keys())) DSargs = {'varspecs': specdict_contact, 'fnspecs': fnspecs, 'xdomain': {'a': [0, 2*pi], 'incontact': 1}, @@ -83,7 +83,7 @@ 'events': [tang_ev, d_ev], } ode = embed(Generator.Vode_ODEsystem(DSargs), tdata=[0,200]) - print ode.query('ics') + print(ode.query('ics')) ode_MI = intModelInterface(ode) @@ -156,15 +156,15 @@ fullmodel = makeModel3(pars, dt=0.01) -print "Computing trajectory" -print "Using verboselevel=2 for debug-level info ..." +print("Computing trajectory") +print("Using verboselevel=2 for debug-level info ...") fullmodel.compute(trajname='run1', tdata=[0, 3.0], ics={'a': pars['alpha0'], 'incontact': 1}, verboselevel=2) -print "\nPlotting output" +print("\nPlotting output") plotData = fullmodel.sample('run1', coords=['a','ad'], dt=0.01) afig = plt.figure() --- ./PyDSTool/tests/forced_spring.py (original) +++ ./PyDSTool/tests/forced_spring.py (refactored) @@ -133,6 +133,6 @@ assert abs(evts['sw_ON']['t'][0] - p['t_on']) < evtol, "Event detection was inaccurate" show() -print "Red trajectory shows unforced behavior. Green trajectory shows brief forcing..." -print "Now zoom in closely, to roughly the interval t = [%.3f, %.3f]"%(pars['t_on']-0.1,pars['t_on']+0.1) -print "The solid trajectory switches within +/-%.5f of the intended switch time\nt_on=%.2f"%(on_event_args['eventtol'],pars['t_on']) +print("Red trajectory shows unforced behavior. Green trajectory shows brief forcing...") +print("Now zoom in closely, to roughly the interval t = [%.3f, %.3f]"%(pars['t_on']-0.1,pars['t_on']+0.1)) +print("The solid trajectory switches within +/-%.5f of the intended switch time\nt_on=%.2f"%(on_event_args['eventtol'],pars['t_on'])) --- ./PyDSTool/tests/freefinger_noforce_radau.py (original) +++ ./PyDSTool/tests/freefinger_noforce_radau.py (refactored) @@ -78,7 +78,7 @@ if __name__=='__main__': - print '-------- Finger Test' + print('-------- Finger Test') # spatial units in mm, angular units in radians # Ix = 1/12 * mx * lx^2 # radii were 10mm, 8mm, 7mm @@ -116,21 +116,21 @@ pars['m2'] = m2 pars['m3'] = m3 - print "Making Radau finger model using mass matrix" + print("Making Radau finger model using mass matrix") finger = make_finger_massmatrix('freefinger_noforce_massmatrix', par_args, ic_args) finger.set(tdata=[0, 3]) # saveObjects(finger, 'fingergen', force=True) - print 'Integrating...' + print('Integrating...') start = clock() ftraj = finger.compute('test') - print 'Computed trajectory in %.3f seconds.\n' % (clock()-start) + print('Computed trajectory in %.3f seconds.\n' % (clock()-start)) plotData = ftraj.sample(dt=.001) exportPointset(plotData, {'varvals': ['phi1','phi2','phi3'], 'tvals':'t'}, ext='dat') - print 'Preparing plot' + print('Preparing plot') yaxislabelstr = 'angles' plt.ylabel(yaxislabelstr) --- ./PyDSTool/tests/funcspec_tests.py (original) +++ ./PyDSTool/tests/fRefactoringTool: Refactored ./PyDSTool/tests/imp_load_test.py RefactoringTool: Refactored ./PyDSTool/tests/impfn_test.py uncspec_tests.py (refactored) @@ -42,8 +42,8 @@ 'codeinsert_start': """ print 'code inserted at start'""", 'targetlang': 'python'} DSfuncspec = RHSfuncSpec(fsargs) -print DSfuncspec._infostr(verbose=2) -print "\nDSfuncspec.auxfns['Jacobian'] =>", DSfuncspec.auxfns['Jacobian'],"\n" +print(DSfuncspec._infostr(verbose=2)) +print("\nDSfuncspec.auxfns['Jacobian'] =>", DSfuncspec.auxfns['Jacobian'],"\n") ## C version fsargs_C = deepcopy(fsargs) @@ -53,34 +53,34 @@ del fsargs_C['codeinsert_start'] del fsargs_C['codeinsert_end'] DSfuncspec_C = RHSfuncSpec(fsargs_C) -print '\nC version of same specifications:\n', DSfuncspec_C._infostr(verbose=2) -print "Dependencies are not calculated for C code in FuncSpec. If you use ModelSpec" -print "to generate your models you will have that information there." +print('\nC version of same specifications:\n', DSfuncspec_C._infostr(verbose=2)) +print("Dependencies are not calculated for C code in FuncSpec. If you use ModelSpec") +print("to generate your models you will have that information there.") -print "\nTesting re-targetting of funcspec using 'recreate' method..." +print("\nTesting re-targetting of funcspec using 'recreate' method...") dsc=DSfuncspec.recreate('c') assert dsc.spec[0]==DSfuncspec_C.spec[0], " - FAILED" -print " - PASSED.\n" +print(" - PASSED.\n") -print "\n=============================================================" -print "Test: wrapping delimiters around call arguments" -print """ ... around first argument: wrapArgInCall(fs, 'initcond', '"')""" +print("\n=============================================================") +print("Test: wrapping delimiters around call arguments") +print(""" ... around first argument: wrapArgInCall(fs, 'initcond', '"')""") fs = 'initcond(v,p)' -print fs, " -- wrapped to: ", wrapArgInCall(fs, 'initcond', '"'), "\n" -print """ ... around second argument: wrapArgInCall(fs,'initcond','"',argnums=[1])""" -print fs, " -- wrapped to: ", wrapArgInCall(fs, 'initcond', '"', argnums=[1]), "\n" -print """ ... extra braces to both arguments: wrapArgInCall(fs,'initcond','[',']',[0,1])""" -print fs, " -- wrapped to: ", wrapArgInCall(fs, 'initcond', '[', ']', [0,1]), "\n" +print(fs, " -- wrapped to: ", wrapArgInCall(fs, 'initcond', '"'), "\n") +print(""" ... around second argument: wrapArgInCall(fs,'initcond','"',argnums=[1])""") +print(fs, " -- wrapped to: ", wrapArgInCall(fs, 'initcond', '"', argnums=[1]), "\n") +print(""" ... extra braces to both arguments: wrapArgInCall(fs,'initcond','[',']',[0,1])""") +print(fs, " -- wrapped to: ", wrapArgInCall(fs, 'initcond', '[', ']', [0,1]), "\n") -print "\nTest combo of addArgToCalls and wrapArgInCall with embedded calls:" +print("\nTest combo of addArgToCalls and wrapArgInCall with embedded calls:") fs2 = "1/zeta(y_rel(y,initcond(y)+initcond(z)),z-initcond(x))+zeta(0.)" -print fs2, "\n" +print(fs2, "\n") fs2_p = addArgToCalls(fs2, ['zeta','y_rel','initcond','nothing'], "p") -print " ** becomes **" -print fs2_p, "\n" +print(" ** becomes **") +print(fs2_p, "\n") fs2_p = wrapArgInCall(fs2_p, 'initcond', '"') -print " ** becomes **" -print fs2_p +print(" ** becomes **") +print(fs2_p) from PyDSTool.parseUtils import proper_match s='1 +abc13 + abc' --- ./PyDSTool/tests/imp_load_test.py (original) +++ ./PyDSTool/tests/imp_load_test.py (refactored) @@ -3,7 +3,7 @@ from PyDSTool import * import os -print "Implicit trajectory load test" +print("Implicit trajectory load test") impgen, imptraj = loadObjects('temp_imp.pkl') assert impgen.xdomain['y'] == [-2, 2] @@ -24,4 +24,4 @@ os.remove('temp_imp.pkl') -print " ...passed" +print(" ...passed") --- ./PyDSTool/tests/impfn_test.py (original) +++ ./PyDSTool/tests/impfn_test.py (refactored) @@ -9,7 +9,7 @@ from numpy.linalg import norm from copy import copy -print "Test implicit function as variable" +print("Test implicit function as variable") # 1D example: a half-circle using newton's method (secant method for estimating derivative) # Change sign of 'y' initial condition to solve for other half-circle fRefactoringTool: Refactored ./PyDSTool/tests/imprecise_event_test.py RefactoringTool: Refactored ./PyDSTool/tests/interp_dopri_test.py varspecs = {"y": "t*t+y*y-r*r", @@ -73,4 +73,4 @@ saveObjects([testimp2d, traj2], 'temp_imp.pkl', force=True) -print " ...passed" +print(" ...passed") --- ./PyDSTool/tests/imprecise_event_test.py (original) +++ ./PyDSTool/tests/imprecise_event_test.py (refactored) @@ -34,7 +34,7 @@ ode.set(tdata=[0, 80]) traj = ode.compute('test') -print 'Preparing plot' +print('Preparing plot') plotData = traj.sample(dt=0.1) yaxislabelstr = 'x' @@ -42,11 +42,11 @@ plt.xlabel('t') vline=plot(plotData['t'], plotData['x']) evt=ode.getEventTimes()['thresh_ev_imprec'][0] -print "Event at", evt, "where x has value", traj(evt) +print("Event at", evt, "where x has value", traj(evt)) if traj(evt,'x') != 40: - print "Event occurred away from precise threshold: Test PASSED" + print("Event occurred away from precise threshold: Test PASSED") else: - print "Event occurred precisely on threshold value: Test FAILED" + print("Event occurred precisely on threshold value: Test FAILED") raise RuntimeError plot(evt, traj(evt, 'x'), 'ro') show() --- ./PyDSTool/tests/interp_dopri_test.py (original) +++ ./PyDSTool/tests/interp_dopri_test.py (refactored) @@ -14,28 +14,28 @@ from copy import copy -print '-------- Test: InterpolateTable' +print('-------- Test: InterpolateTable') xnames = ['x1', 'x2'] timeData = array([0., 11., 20., 30.]) x1data = array([10.2, -1.4, 4.1, 6.]) x2data = array([0.1, 0.01, 0.4, -0.8]) -print "names for variables: xnames = ", xnames -print "timeData = ", timeData -print "x1data = ", x1data -print "x2data = ", x2data +print("names for variables: xnames = ", xnames) +print("timeData = ", timeData) +print("x1data = ", x1data) +print("x2data = ", x2data) xData = makeDataDict(xnames, [x1data, x2data]) interptable = InterpolateTable({'tdata': timeData, 'ics': xData, 'name': 'interp' }) itabletraj = interptable.compute('interp') -print "interptable.variables['x1'](0.4) = ", interptable.variables['x1'](0.4), '\n' -print "itabletraj(11, ['x1']) = ", itabletraj(11, ['x1']), " (preferred syntax)\n" +print("interptable.variables['x1'](0.4) = ", interptable.variables['x1'](0.4), '\n') +print("itabletraj(11, ['x1']) = ", itabletraj(11, ['x1']), " (preferred syntax)\n") # ------------------------------------------------------------ -print '-------- Test: ODE system' +print('-------- Test: ODE system') wfn_str = '100 -(1+a)*w*heav(0.2-sin(t+1)) -2*x1 -k*auxval1(t, w)*auxval2(y)' yfn_str = '50 - (w/100)*y' @@ -55,26 +55,26 @@ DSargs.ics = {'w': 30.0, 'y': 80} DSargs.name = 'ODEtest' -print "\n" +print("\n") info(DSargs) -print "\n" +print("\n") testODE = Dopri_ODEsystem(DSargs) -print 'Integrating...' +print('Integrating...') start = clock() testtraj = testODE.compute('test') -print ' ... finished in %.3f seconds.\n' % (clock()-start) +print(' ... finished in %.3f seconds.\n' % (clock()-start)) -print "\nTesting direct call to vector field function:" -print """testODE.Rhs(0.3, {'w':10., 'y':0.3}, DSargs.pars, - {'itable': itabletraj.variables['x1'](0.3)}) -->""" -print testODE.Rhs(0.3, {'w':10., 'y':0.3}, DSargs.pars) +print("\nTesting direct call to vector field function:") +print("""testODE.Rhs(0.3, {'w':10., 'y':0.3}, DSargs.pars, + {'itable': itabletraj.variables['x1'](0.3)}) -->""") +print(testODE.Rhs(0.3, {'w':10., 'y':0.3}, DSargs.pars)) plotData = testtraj.sample(dt=0.1) yaxislabelstr = 'w, y, for k = ' + str(DSargs.pars['k']) -print "\nTesting continued integration -- with different input" +print("\nTesting continued integration -- with different input") testODE.set(tdata=[10,20], inputs={'x1': itabletraj.variables['x2']}) testtraj2 = testODE.compute('test2', 'c') plotData2 = testtraj2.sample(dt=0.1) @@ -101,9 +101,9 @@ assert allclose(warning[1][0], 14.44, 0.1), \ "Trajectory should have been truncated at approximately t = 14.44" -print "\n--------------------------------------\ntestODE.showSpec() -->" +print("\n-RefactoringTool: Refactored ./PyDSTool/tests/interp_piecewise_test.py RefactoringTool: Refactored ./PyDSTool/tests/interp_vode_test.py -------------------------------------\ntestODE.showSpec() -->") testODE.showSpec() -print "testODE.showAuxFnSpec() -->" +print("testODE.showAuxFnSpec() -->") testODE.showAuxFnSpec() show() --- ./PyDSTool/tests/interp_piecewise_test.py (original) +++ ./PyDSTool/tests/interp_piecewise_test.py (refactored) @@ -8,8 +8,8 @@ from PyDSTool import * -print 'Test InterpolateTable comparing piecewise-constant and piecewise-' -print 'linear interpolation of sine function' +print('Test InterpolateTable comparing piecewise-constant and piecewise-') +print('linear interpolation of sine function') timeData = linspace(0, 10, 30) sindata = sin(timeData) @@ -41,4 +41,4 @@ # plot(x, sin(x)) # show() -print " ...passed" +print(" ...passed") --- ./PyDSTool/tests/interp_vode_test.py (original) +++ ./PyDSTool/tests/interp_vode_test.py (refactored) @@ -14,28 +14,28 @@ from copy import copy -print '-------- Test: InterpolateTable' +print('-------- Test: InterpolateTable') xnames = ['x1', 'x2'] timeData = array([0., 11., 20., 30.]) x1data = array([10.2, -1.4, 4.1, 6.]) x2data = array([0.1, 0.01, 0.4, -0.8]) -print "names for variables: xnames = ", xnames -print "timeData = ", timeData -print "x1data = ", x1data -print "x2data = ", x2data +print("names for variables: xnames = ", xnames) +print("timeData = ", timeData) +print("x1data = ", x1data) +print("x2data = ", x2data) xData = makeDataDict(xnames, [x1data, x2data]) interptable = InterpolateTable({'tdata': timeData, 'ics': xData, 'name': 'interp' }) itabletraj = interptable.compute('interp') -print "interptable.variables['x1'](0.4) = ", interptable.variables['x1'](0.4), '\n' -print "itabletraj(11, ['x1']) = ", itabletraj(11, ['x1']), " (preferred syntax)\n" +print("interptable.variables['x1'](0.4) = ", interptable.variables['x1'](0.4), '\n') +print("itabletraj(11, ['x1']) = ", itabletraj(11, ['x1']), " (preferred syntax)\n") # ------------------------------------------------------------ -print '-------- Test: ODE system' +print('-------- Test: ODE system') wfn_str = '100 -(1+a)*w*heav(0.2-sin(t+1)) - special_erf(w) -2*itable -k*auxval1(t, w)*auxval2(y)' yfn_str = '50 - (w/100)*y' @@ -54,26 +54,26 @@ DSargs.ics = {'w': 30.0, 'y': 80} DSargs.name = 'ODEtest' -print "\n" +print("\n") info(DSargs) -print "\n" +print("\n") testODE = Vode_ODEsystem(DSargs) -print 'Integrating...' +print('Integrating...') start = clock() testtraj = testODE.compute('test') -print ' ... finished in %.3f seconds.\n' % (clock()-start) +print(' ... finished in %.3f seconds.\n' % (clock()-start)) -print "\nTesting direct call to vector field function:" -print """testODE.Rhs(0.3, {'w':10., 'y':0.3}, DSargs.pars, - {'itable': itabletraj.variables['x1'](0.3)}) -->""" -print testODE.Rhs(0.3, {'w':10., 'y':0.3}, DSargs.pars) +print("\nTesting direct call to vector field function:") +print("""testODE.Rhs(0.3, {'w':10., 'y':0.3}, DSargs.pars, + {'itable': itabletraj.variables['x1'](0.3)}) -->""") +print(testODE.Rhs(0.3, {'w':10., 'y':0.3}, DSargs.pars)) plotData = testtraj.sample(dt=0.1) yaxislabelstr = 'w, y, for k = ' + str(DSargs.pars['k']) -print "\nTesting continued integration" +print("\nTesting continued integration") testODE.set(tdata=[10,20], inputs={'itable': itabletraj.variables['x2']}) testtraj2 = testODE.compute('test2', 'c') plotData2 = testtraj2.sample(dt=0.1) @@ -92,12 +92,12 @@ wline2=plot(plotData2['t'], plotData2['w']) yline2=plot(plotData2['t'], plotData2['y']) -print "\nContinued integration successfull if only two curves are visible" -print "(possibly with multiple colours)" +print("\nContinued integration successfull if only two curves are visible") +print("(possibly with multiple colours)") -print "\n--------------------------------------\ntestODE.showSpec() -->" +print("\n--------------------------------------\ntestODE.showSpec() -->") testODE.showSpec() -print "testODE.showAuxFnSpec() -->" +print("tRefactoringTool: Refactored ./PyDSTool/tests/joe_pest.py RefactoringTool: Refactored ./PyDSTool/tests/mapsystem_test.py RefactoringTool: Refactored ./PyDSTool/tests/numeric_diff_test.py estODE.showAuxFnSpec() -->") testODE.showAuxFnSpec() show() --- ./PyDSTool/tests/joe_pest.py (original) +++ ./PyDSTool/tests/joe_pest.py (refactored) @@ -122,8 +122,8 @@ est_parnames = ['gl', 'vl'] # parameter estimation -print 'Starting Least Squares parameter estimation' -print 'Goal pars are gl = ', est_pars_ref['gl'], ' vl = ', est_pars_ref['vl'] +print('Starting Least Squares parameter estimation') +print('Goal pars are gl = ', est_pars_ref['gl'], ' vl = ', est_pars_ref['vl']) pest_pars = LMpest(freeParams=est_parnames, testModel=testModel, context=c @@ -135,10 +135,10 @@ 'xtol':1e-3}, verbose=True ) -print ' ... finished in %.3f seconds.\n' % (clock()-start) +print(' ... finished in %.3f seconds.\n' % (clock()-start)) # Prepare plots -print '\nPreparing plots' +print('\nPreparing plots') disp_dt = 0.05 ##plotData_goal = reftraj.sample(['v'], disp_dt) goalleg = "v original" --- ./PyDSTool/tests/mapsystem_test.py (original) +++ ./PyDSTool/tests/mapsystem_test.py (refactored) @@ -30,22 +30,22 @@ DSargs.checklevel = 2 DSargs.inputs = datafn.variables testmap = MapSystem(DSargs) -print "params set => ", testmap.pars -print "DS defined? => ", testmap.defined -print "testmap.set(...)" +print("params set => ", testmap.pars) +print("DS defined? => ", testmap.defined) +print("testmap.set(...)") testmap.set(ics={'w': 3.0, 'v': 2.}, tdata=[10,400]) -print "traj1 = testmap.compute('traj1')" +print("traj1 = testmap.compute('traj1')") traj1 = testmap.compute('traj1') -print "DS defined now? => ", testmap.defined -print "traj1(25) => ", traj1(25) -print "testmap.diagnostics.showWarnings() => " +print("DS defined now? => ", testmap.defined) +print("traj1(25) => ", traj1(25)) +print("testmap.diagnostics.showWarnings() => ") testmap.diagnostics.showWarnings() -print "\ntraj1.indepdomain => ", traj1.indepdomain -print "traj1(30, ['aux_other']) => ", traj1(30, ['aux_other']) -print "traj1(range(10,40)) => ", traj1(range(10,40)) +print("\ntraj1.indepdomain => ", traj1.indepdomain) +print("traj1(30, ['aux_other']) => ", traj1(30, ['aux_other'])) +print("traj1(range(10,40)) => ", traj1(list(range(10,40)))) -print "\nNow adding a terminating co-ordinate threshold event at w=58..." +print("\nNow adding a terminating co-ordinate threshold event at w=58...") ev_args = {'name': 'threshold', 'eventtol': 1e-4, 'eventdelay': 1e-5, @@ -55,14 +55,14 @@ 'precise': False} thresh_ev = Events.makePythonStateZeroCrossEvent('w', 58, 1, ev_args) testmap.eventstruct.add(thresh_ev) -print "Recomputing trajectory:" -print "traj2 = testmap.compute('traj2')" +print("Recomputing trajectory:") +print("traj2 = testmap.compute('traj2')") t0=clock() traj2 = testmap.compute('traj2') -print "Elapsed time =", clock()-t0 +print("Elapsed time =", clock()-t0) assert testmap.getEventTimes()['threshold'] == [347.] -print "\ntestmap.diagnostics.showWarnings() => " +print("\ntestmap.diagnostics.showWarnings() => ") testmap.diagnostics.showWarnings() -print "\ntraj2.indepdomain.get() => ", traj2.indepdomain.get() -print "traj2(traj2.indepdomain[1],'w') => ", traj2(traj2.indepdomain[1],'w') -print "Tests passed." +print("\ntraj2.indepdomain.get() => ", traj2.indepdomain.get()) +print("traj2(traj2.indepdomain[1],'w') => ", traj2(traj2.indepdomain[1],'w')) +print("Tests passed.") --- ./PyDSTool/tests/numeric_diff_test.py (original) +++ ./PyDSTool/tests/numeric_diff_test.py (refactored) @@ -7,7 +7,7 @@ from PyDSTool import _num_types from numpy import all -print "Testing numerical differentiation using diff..." +print("Testing numerical differentiation using diff...") # Test scalar f @@ -15,7 +15,7 @@ if isinstance(x, _num_types): return 3*x*x else: - print type(x) + print(type(x)) raise TypeError def f2(x): @@ -98,5 +98,5 @@ df5_diffd = array(f5(y0pt)) + simplifyMatrixRepr(diff(f5, y0pt)*matrix(y1pt-y0pt).T) RefactoringTool: Refactored ./PyDSTool/tests/objectdelete_test.py RefactoringTool: Refactored ./PyDSTool/tests/pest_test1.py RefactoringTool: Refactored ./PyDSTool/tests/pest_test2.py assert alltrue([err < 0.01 for err in abs(df5_taylor-df5_diffd)]) -print " ...passed" +print(" ...passed") --- ./PyDSTool/tests/objectdelete_test.py (original) +++ ./PyDSTool/tests/objectdelete_test.py (refactored) @@ -5,16 +5,16 @@ from PyDSTool import * -print "Test object deletion and deletion of dynamically created class methods" +print("Test object deletion and deletion of dynamically created class methods") -var1 = Variable(Pointset(coordarray = array(range(10), float)*0.1, - indepvararray = array(range(10), float)*0.5 +var1 = Variable(Pointset(coordarray = array(list(range(10)), float)*0.1, + indepvararray = array(list(range(10)), float)*0.5 ), name='v1') del var1 try: - print var1 + print(var1) except NameError: - print " ...passed" + print(" ...passed") else: raise AssertionError("Variable deletion unsuccessful") --- ./PyDSTool/tests/pest_test1.py (original) +++ ./PyDSTool/tests/pest_test1.py (refactored) @@ -30,8 +30,8 @@ ## Prepare goal ODE trajectory -print 'Preparing goal trajectory from perturbed system (with k = ', \ - refpars['k'], ') ...' +print('Preparing goal trajectory from perturbed system (with k = ', \ + refpars['k'], ') ...') xfn_refstr = "50-k*w+a*(2-t)*sin_input" @@ -47,7 +47,7 @@ ) refODE = Generator.Vode_ODEsystem(refDSargs) reftraj = refODE.compute('goal') -print '... finished.\n' +print('... finished.\n') ## Get plot data for goal orbit @@ -57,8 +57,8 @@ ## Parameter estimation -print 'Estimating parameter k for fit (assuming initial condition for w)' -print 'Goal value is k = ', refpars['k'], " ..." +print('Estimating parameter k for fit (assuming initial condition for w)') +print('Goal value is k = ', refpars['k'], " ...") xfn_str = "50-k*w" testDSargs = args(algparams={'init_step':0.02, 'strictopt':True}, @@ -104,13 +104,13 @@ pestData_par = pest_pars.run(parDict={'ftol': ftol, 'xtol':1e-3}, verbose=True) -print '... finished in %.4f seconds\n' % (time.clock()-start_time) +print('... finished in %.4f seconds\n' % (time.clock()-start_time)) bestFitModel_par = pestData_par['sys_sol'] ## Initial condition estimation -print "Estimating initial condition for w (assuming k is correct)" -print "Goal value is w(0) = ", xic['w'], " ..." +print("Estimating initial condition for w (assuming k is correct)") +print("Goal value is w(0) = ", xic['w'], " ...") modelArgs_ic = copy(testDSargs) modelArgs_ic['ics'] = {'w': 0.0} @@ -127,11 +127,11 @@ 'xtol':1e-3}, verbose=True) bestFitModel_ic = pestData_ic['sys_sol'] -print '... finished' +print('... finished') ## Finish preparing plots -print '\nPreparing plots' +print('\nPreparing plots') west_plotData_par = bestFitModel_par.sample('test_iface_traj', dt=0.02, tlo=min(trange), thi=max(trange), --- ./PyDSTool/tests/pest_test2.py (original) +++ ./PyDSTool/tests/pest_test2.py (refactored) @@ -30,7 +30,7 @@ sample_dt = 0.06 count = 0 countlim = 5 -print "Generating non-uniform samples from HH orbit..." +print("Generating non-uniform samples from HH orbit...") tsamples = arange(0, 14, sample_dt) vsamples = HH_traj(tsamples, ['v']).toarray() for i in range(len(tsamples)): @@ -46,7 +46,7 @@ HH_sampleData['t'].append(t) HH_sampleData['v'].append(v) count = 0 -print "... done" +print("... done") tableArgs = {'tdata': HH_sampleData['t'], @@ -80,7 +80,7 @@ result = HH_thresh_ev.searchForEvents((0, 15)) HH_spike_t = result[0][0] -print "HH spike time found at ", HH_spike_t +print("HH spike time found at ", HH_spike_t) class IF_spike_feat(qt_feature_leaf): def _local_init(self): @@ -128,7 +128,7 @@ ## Parameter estimation for spike length -print "\nParam est. for spike length ..." +pRefactoringTool: Refactored ./PyDSTool/tests/pest_test3.py RefactoringTool: Refactored ./PyDSTool/tests/pest_test3_Cintegrator.py rint("\nParam est. for spike length ...") if not pestData_thr['success']: raise RuntimeError("Failure: will not continue") @@ -162,7 +162,7 @@ IF_ic = IFmodel_splen('test', t_ic, ['v']) IFmodel_splen.set(tdata=[t_ic, 12]) -print "\n----------------------" +print("\n----------------------") IFmodel_splen.set(ics={'v': IF_ic}) splen_feat = L2_feature_1D('splen', pars=args(t_samples=tmesh_ic, @@ -192,7 +192,7 @@ ics={'v':-70, 'excited':0}) ## Plot data -print "Acquiring plot data" +print("Acquiring plot data") origline=plot(orig_pdata['t'], orig_pdata['v']) origleg = "Un-fitted IF orbit" IF_sampleData = [] --- ./PyDSTool/tests/pest_test3.py (original) +++ ./PyDSTool/tests/pest_test3.py (refactored) @@ -44,9 +44,9 @@ result = HH_thresh_ev.searchForEvents(tuple(tdata)) HH_spike_t = result[0][0] -print "True HH spike time based on threshold event is at ", HH_spike_t -print "but assume the traj is real data so that we have to find the spike" -print "directly from the noisy data" +print("True HH spike time based on threshold event is at ", HH_spike_t) +print("but assume the traj is real data so that we have to find the spike") +print("directly from the noisy data") ## Set up external interface for the reference trajectory based on spike time @@ -162,22 +162,22 @@ pest_context = context([ (spike_interface, int_spike_iface), (geom_interface, int_geom_iface) ]) -print "Feature evaluation on initial set-up: ", pest_context.evaluate(HH_test_model) -print "geom feat residual: ", norm(geom_feat.metric.results) +print("Feature evaluation on initial set-up: ", pest_context.evaluate(HH_test_model)) +print("geom feat residual: ", norm(geom_feat.metric.results)) pts1=geom_feat.ref_traj(tmesh,coords=['v']) pts2=HH_test_model('test_iface_traj', tmesh, coords=['v']) #plot(tmesh, pts1['v']) #plot(tmesh, pts2['v']) -print "\nResidual norm before feature weighting:" -print norm(pest_context.residual(HH_test_model)) +print("\nResidual norm before feature weighting:") +print(norm(pest_context.residual(HH_test_model))) pest_context.set_weights({geom_interface: 0.005, spike_interface: 0.25}) -print "Residual norm after feature weighting:" -print norm(pest_context.residual(HH_test_model)) +print("Residual norm after feature weighting:") +print(norm(pest_context.residual(HH_test_model))) ## Parameter estimation -print '\nEstimating pars gl and vl for fit' -print 'Goal values are vl =', par_args_HH_goal['vl'], ', gl = ', \ - par_args_HH_goal['gl'], ' ...' +print('\nEstimating pars gl and vl for fit') +print('Goal values are vl =', par_args_HH_goal['vl'], ', gl = ', \ + par_args_HH_goal['gl'], ' ...') # Using the built-in least squares optimizer doesn't work @@ -210,9 +210,9 @@ sol_pars = pest2.log[log_ix].pars HH_test_model.set(pars=sol_pars) #pestData_par['pars_sol']) -print "Feature evaluation on solution set-up: ", \ - pest_context.evaluate(HH_test_model) -print "geom feat residual: ", norm(geom_feat.metric.results) +print("Feature evaluation on solution set-up: ", \ + pest_context.evaluate(HH_test_model)) +print("geom feat residual: ", norm(geom_feat.metric.results)) # solution trajectory involving voltage happens to be the second of the # two trajectories stored in each log (one for each model interface, and @@ -220,7 +220,7 @@ sol_traj = pest2.log[log_ix].trajectories[-1] ## Finish preparing plots -print '\nPreparing plots' +print('\nPreparing plots') figure() disp_dt = 0.05 plotData_orig = HH_test_model.sample('orig', ['v'], disp_dt, precise=True) --- ./PyDSTool/tests/pest_test3_Cintegrator.py (original) +++ ./PyDSTool/tests/pest_test3_Cintegrator.py (refactored) @@ -44,7 +44,7 @@ HH_spike_t = HH_goal.getEventTimes()['HH_zerothresh'][0] -print "HH spike time found at ", HH_spike_t +print("HH spike time found at ", HH_spike_t) ## Set up test HH model @@ -160,23 +160,23 @@ pest_context = context([ (spike_interface, int_spike_iface), (geom_interface, int_geom_iface) ]) -RefactoringTool: Refactored ./PyDSTool/tests/pest_test4_Cintegrator.py RefactoringTool: Refactored ./PyDSTool/tests/phaseplane_HHtest.py print "Feature evaluation on initial set-up: ", pest_context.evaluate(HH_test_model) -print "geom feat residual: ", norm(geom_feat.metric.results) +print("Feature evaluation on initial set-up: ", pest_context.evaluate(HH_test_model)) +print("geom feat residual: ", norm(geom_feat.metric.results)) pts1=geom_feat.ref_traj(tmesh,coords=['v']) pts2=HH_test_model('test_iface_traj', tmesh, coords=['v']) #plot(tmesh, pts1['v']) #plot(tmesh, pts2['v']) -print "\nResidual norm before feature weighting:" -print norm(pest_context.residual(HH_test_model)) +print("\nResidual norm before feature weighting:") +print(norm(pest_context.residual(HH_test_model))) #pest_context.set_weights({geom_interface: 0.005}) pest_context.set_weights({geom_interface: 0.005, spike_interface: 0.25}) -print "Residual norm after feature weighting:" -print norm(pest_context.residual(HH_test_model)) +print("Residual norm after feature weighting:") +print(norm(pest_context.residual(HH_test_model))) ## Parameter estimation -print '\nEstimating pars gl and vl for fit' -print 'Goal values are vl =', par_args_HH_goal['vl'], ', gl = ', \ - par_args_HH_goal['gl'], ' ...' +print('\nEstimating pars gl and vl for fit') +print('Goal values are vl =', par_args_HH_goal['vl'], ', gl = ', \ + par_args_HH_goal['gl'], ' ...') pnames = ['vl', 'gl'] parscales = {'vl': 0.1, 'gl': 0.01} @@ -203,15 +203,15 @@ parscales=parscales, parseps=parseps) opt.iterate() -print '... finished in %.3f seconds\n' % (clock()-start) +print('... finished in %.3f seconds\n' % (clock()-start)) log_ix = pest2.find_logs()[0] sol_pars = pest2.log[log_ix].pars HH_test_model.set(pars=sol_pars) #pestData_par['pars_sol']) -print "Feature evaluation on solution set-up: ", \ - pest_context.evaluate(HH_test_model) -print "geom feat residual: ", norm(geom_feat.metric.results) +print("Feature evaluation on solution set-up: ", \ + pest_context.evaluate(HH_test_model)) +print("geom feat residual: ", norm(geom_feat.metric.results)) # solution trajectory involving voltage happens to be the second of the # two trajectories stored in each log (one for each model interface, and @@ -219,7 +219,7 @@ sol_traj = pest2.log[log_ix].trajectories[-1] ## Finish preparing plots -print '\nPreparing plots' +print('\nPreparing plots') figure() disp_dt = 0.05 plotData_orig = HH_test_model.sample('orig', ['v'], disp_dt, precise=True) --- ./PyDSTool/tests/pest_test4_Cintegrator.py (original) +++ ./PyDSTool/tests/pest_test4_Cintegrator.py (refactored) @@ -44,9 +44,9 @@ result = HH_thresh_ev.searchForEvents(tuple(tdata)) HH_spike_t = result[0][0] -print "True HH spike time based on threshold event is at ", HH_spike_t -print "but assume the traj is real data so that we have to find the spike" -print "directly from the noisy data" +print("True HH spike time based on threshold event is at ", HH_spike_t) +print("but assume the traj is real data so that we have to find the spike") +print("directly from the noisy data") ## Set up external interface for the reference trajectory based on spike time @@ -170,9 +170,9 @@ (geom_interface, int_geom_iface) ]) ## Parameter estimation -print 'Estimating pars gna and vl for fit to non-identical HH cell' -print 'Goal values are gna =', par_args_HH_goal['gna'], ', gl =', \ - par_args_HH_goal['gl'], ' ...' +print('Estimating pars gna and vl for fit to non-identical HH cell') +print('Goal values are gna =', par_args_HH_goal['gna'], ', gl =', \ + par_args_HH_goal['gl'], ' ...') pest_pars = LMpest(freeParams=['gna', 'gl'], @@ -203,11 +203,11 @@ }, verbose=True) -print '... finished in %.4f seconds\n'%(clock()-t0) +print('... finished in %.4f seconds\n'%(clock()-t0)) ## Finish preparing plots -print '\nPreparing plots' +print('\nPreparing plots') figure() disp_dt = 0.05 plotData_orig = HH_test_model.sample('orig', ['v'], disp_dt, precise=True) --- ./PyDSTool/tests/phaseplane_HHtesRefactoringTool: No changes to ./PyDSTool/tests/poly_interp_test.py RefactoringTool: Refactored ./PyDSTool/tests/radau_event_test.py RefactoringTool: Refactored ./PyDSTool/tests/run_all_tests.py t.py (original) +++ ./PyDSTool/tests/phaseplane_HHtest.py (refactored) @@ -53,7 +53,7 @@ ev, ev_helper=make_flow_normal_event('v', 'm', vfn_str, mfn_str, targetlang='c', fnspec={'vars': ['v', 'm', 'h', 'n'], - 'pars': par_args.keys(), + 'pars': list(par_args.keys()), 'inputs': [], 'auxfns': auxdict}, evtArgs={'eventtol': 1e-8, @@ -80,7 +80,7 @@ -print 'Phase Plane test using Hodgkin-Huxley system during action potential' +print('Phase Plane test using Hodgkin-Huxley system during action potential') par_args = {'gna': 100, 'gk': 80, 'gl': 0.1, 'vna': 50, 'vk': -100, 'vl': -67, 'I': 1.75, 'C': 1.0} @@ -93,7 +93,7 @@ HH, ev_helper = makeHHneuron('HH_PP_test', 0.1, par_args, ic_args) HH.set(tdata=[0, 100], ics={'h':0.7, 'n': 0.2}) -print "Finding analytic Jacobian w.r.t. phase-plane variables v, m..." +print("Finding analytic Jacobian w.r.t. phase-plane variables v, m...") jac, new_fnspecs = prepJacobian(HH.funcspec._initargs['varspecs'], ['m', 'v'], HH.funcspec._initargs['fnspecs']) @@ -102,8 +102,8 @@ scope.update(new_fnspecs) jac_fn = expr2fun(jac, ensure_args=['t'], **scope) -print "Use of Jacobian speeds up finding of nullclines and fixed points by" -print "nearly a factor of two (not including time to plot results)..." +print("Use of Jacobian speeds up finding of nullclines and fixed points by") +print("nearly a factor of two (not including time to plot results)...") fp_coords = find_fixedpoints(HH, n=4, jac=jac_fn, eps=1e-8, subdomain={'v':HH.xdomain['v'],'m':HH.xdomain['m'], 'h': HH.initialconditions['h'], 'n': HH.initialconditions['n']}) @@ -116,8 +116,8 @@ N_y = nullcline('v', 'm', nulls_y) -print "Fixed points for (v,m) phase plane sub-system when h=%.2f and n=%.2f: " % (HH.initialconditions['h'], HH.initialconditions['n']) -print "For classification and stability, we use the fixedpoint class..." +print("Fixed points for (v,m) phase plane sub-system when h=%.2f and n=%.2f: " % (HH.initialconditions['h'], HH.initialconditions['n'])) +print("For classification and stability, we use the fixedpoint class...") fps=[] fps.append(fixedpoint_2D(HH, Point(fp_coords[0]), coords=['v', 'm'], @@ -128,8 +128,8 @@ jac=jac_fn, description='top', eps=1e-8)) for fp in fps: - print "F.p. at (%.5f, %.5f) is a %s and has stability %s" % (fp.point['v'], - fp.point['m'], fp.classification, fp.stability) + print("F.p. at (%.5f, %.5f) is a %s and has stability %s" % (fp.point['v'], + fp.point['m'], fp.classification, fp.stability)) plotter.fig_directory = {'PP_large': 1, 'PP_small': 2} --- ./PyDSTool/tests/radau_event_test.py (original) +++ ./PyDSTool/tests/radau_event_test.py (refactored) @@ -57,13 +57,13 @@ DSargs.events = [thresh_ev_nonterm,thresh_ev_term] testODE = Radau_ODEsystem(DSargs) -print "Computing trajectory:" -print "traj = testODE.compute('traj')" +print("Computing trajectory:") +print("traj = testODE.compute('traj')") traj = testODE.compute('traj') -print "\ntestODE.diagnostics.showWarnings() => " +print("\ntestODE.diagnostics.showWarnings() => ") testODE.diagnostics.showWarnings() -print "\ntraj.indepdomain.get() => ", traj.indepdomain.get() +print("\ntraj.indepdomain.get() => ", traj.indepdomain.get()) indep1 = traj.indepdomain[1] assert indep1 < 1.15 and indep1 > 1.13 mon_evs_found = testODE.getEvents()['monitor'] --- ./PyDSTool/tests/run_all_tests.py (original) +++ ./PyDSTool/tests/run_all_tests.py (refactored) @@ -159,20 +159,20 @@ failure = False for f in flist: fname = f+'.py' - print "\n***** Testing script %s ****************************\n"%fname + print("\n***** Testing script %s ****************************\n"%fname) try: e=os.system(whichpy + ' ' + fname) except: - print "\n Testing failed on test file %s"%fname + print("\n Testing failed on test file %s"%fname) failed.append(fname) if not failure: res.append("%s: appears to be broken on your system"%infostr) failure = True else: if e in [0,3]: - print "\n Testing passed on test file %s"%fname + print("\n Testing passed on test file %s"%fname) else: - print "\n Testing failed on test file %s"%fname + print("\n Testing failed on test file %s"%fname) failed.append(fname) failure = True time.sleep(2) @@ -183,79 +183,79 @@ # --------------------------------------------------------------------------- -print "***** Running all tests in order...\n" -print "Note: Depending on your settings, you may have to close matplotlib windows by hand in order to continue to the next test script\n" +print("***** Running all tests in order...\n") +print("Note: Depending on your settings, you may have to close matplotlib windows by hand in order to continue to the next test script\n") if test_general: - print "Testing general PyDSTool functions...\n" + print("Testing general PyDSTool functions...\n") test(general_list, pythonprogram, "Basic PyDSTool functions") else: res.append("Tests of basic PyDSTool functions: SKIPPED") if test_maps: - print "Testing map modules...\n" + print("Testing map modules...\n") test(map_list, pythonprogram, "Map related modules") else: res.append("Tests of map related modules: SKIPPED") if test_vode: - print "Testing modules using VODE integrator...\n" + print("Testing modules using VODE integrator...\n") test(vode_list, pythonprogram, "VODE related modules") else: res.append("Tests of VODE related modules: SKIPPED") if test_symbolic: - print "Testing symbolic differentiation module...\n" + print("Testing symbolic differentiation module...\n") test(symbolic_list, pythonprogram, "Symbolic differentiation module") else: res.append("Tests of symbolic differentiation module: SKIPPED") if test_param_est: - print "Testing parameter estimation module, no C compiler dependence...\n" + print("Testing parameter estimation module, no C compiler dependence...\n") test(param_est_list, pythonprogram, "Parameter estimation module") else: res.append("Tests of parameter estimation module: SKIPPED") if test_pycont: - print "Testing PyCont module, no external compiler dependence...\n" + print("Testing PyCont module, no external compiler dependence...\n") test(pycont_list, pythonprogram, "PyCont") else: res.append("Tests of PyCont with no external compiler dependence: SKIPPED") if do_external: - print "\n***** Now running tests that use external compilers...\n" + print("\n***** Now running tests that use external compilers...\n") if test_dopri: - print "Testing dopri integration; external C compiler dependence...\n" + print("Testing dopri integration; external C compiler dependence...\n") test(dopri_list, pythonprogram, "Dopri ODE systems") else: res.append("Tests of Dopri ODE systems: SKIPPED") if test_radau: - print "Testing radau integration; external C, fortran compiler dependence...\n" + print("Testing radau integration; external C, fortran compiler dependence...\n") test(radau_list, pythonprogram, "Radau ODE systems") else: res.append("Tests of Radau ODE systems: SKIPPED") if test_param_est_C: - print "Testing parameter estimation module; with C compiler dependence...\n" + print("Testing parameter estimation module; with C compiler dependence...\n") test(param_est_C_list, pythonprogram, "Parameter estimation module with external compilers") else: res.append("Tests of parameter estimation moduleRefactoringTool: Refactored ./PyDSTool/tests/saveload_test.py RefactoringTool: Refactored ./PyDSTool/tests/sloppycell_example.py with external compilers: SKIPPED") if test_pycont_auto: - print "Testing PyCont continuation with AUTO...\n" + print("Testing PyCont continuation with AUTO...\n") test(pycont_auto_list, pythonprogram, "PyCont interface to AUTO") else: res.append("Tests of PyCont interface to AUTO: SKIPPED") if len(failed) == 0: - print "No test scripts failed" -else: - print "Test scripts that failed:" + print("No test scripts failed") +else: + print("Test scripts that failed:") for fname in failed: - print "\t%s"%fname - -print "Summary:" + print("\t%s"%fname) + +print("Summary:") for r in res: - print r + print(r) --- ./PyDSTool/tests/saveload_test.py (original) +++ ./PyDSTool/tests/saveload_test.py (refactored) @@ -5,7 +5,7 @@ # -------------------------------------------------------------------- -print "Test pickling for saving and loading various PyDSTool objects" +print("Test pickling for saving and loading various PyDSTool objects") # array a=array([1,Inf]) @@ -41,16 +41,16 @@ assert objs_pts[0] == x # Simple Variable -var1 = Variable(Pointset(coordarray = array(range(10), float)*0.1, - indepvararray = array(range(10), float)*0.5 +var1 = Variable(Pointset(coordarray = array(list(range(10)), float)*0.1, + indepvararray = array(list(range(10)), float)*0.5 ), name='v1') saveObjects(var1, 'temp_objects.pkl', True) obj_var = loadObjects('temp_objects.pkl')[0] assert obj_var(1.5) == var1(1.5) # Trajectory -var2 = Variable(Pointset(coordarray = array(range(10), float)*0.25+1.0, - indepvararray = array(range(10), float)*0.5 +var2 = Variable(Pointset(coordarray = array(list(range(10)), float)*0.25+1.0, + indepvararray = array(list(range(10)), float)*0.5 ), name='v2') traj = Trajectory('traj1', [var1,var2]) saveObjects(traj, 'temp_objects.pkl', True) @@ -158,4 +158,4 @@ # delete temp file os.remove('temp_objects.pkl') -print " ...passed" +print(" ...passed") --- ./PyDSTool/tests/sloppycell_example.py (original) +++ ./PyDSTool/tests/sloppycell_example.py (refactored) @@ -313,7 +313,7 @@ # change genTarget to 'Vode_ODEsystem' if your external C compiler doesn't work -print "Making model" +print("Making model") genTarget = 'Radau_ODEsystem' algparams = {'init_step': 0.1} @@ -322,23 +322,23 @@ sModel = makeSloppyModel('cplx_eg', sloppyModelEg, genTarget, algParams=algparams, silent=True) -print "\nAux spec:\n", +print("\nAux spec:\n", end=' ') sModel.showDef('cplx_eg', 'auxspec') # make some random i.c.s def uniformICs(varnames, a, b): - return dict(zip(varnames, [random.uniform(a, b) for v in varnames])) + return dict(list(zip(varnames, [random.uniform(a, b) for v in varnames]))) #ics = uniformICs(sModel.allvars, 0, 1) ics = {} -for name, val in all_ics_pars.iteritems(): +for name, val in all_ics_pars.items(): if name in sModel.allvars: ics[name] = val def compute(trajname='fig2', thi=205, dt=0.1, verboselevel=0): - print "Computing trajectory" + print("Computing trajectory") sModel.set(algparams={'init_step': dt}) t0=clock() sModel.compute(trajname=trajname, @@ -347,7 +347,7 @@ tdata=[0,thi], # time in minutes verboselevel=verboselevel ) - print "Finished in %f seconds using initial step size of %f"%(clock()-t0,dt) + print("Finished in %f seconds using initial step size of %f"%(clock()-t0,dt)) def doPlots(trajname='test', coords=None, dt=0.1, tlo=None, thi=None): @@ -356,7 +356,7 @@ for v in coords: plot(plotdata['t'], plotdata[v]) -print "\nComputing trajectory" +print("\nComputing trajectory") compute() # these plots correspond to the sub-plots of Chen 2004 paper @@ -371,6 +371,6 @@ # Event2: v['CLB2_20']+v['CLB5_22']-p['KEZ2_172'] # Event3: v['SPN_53']-1 evs=sModel.getTrajEvents('fig2') -print orderEventData(sModel.getTrajEveRefactoringTool: Refactored ./PyDSTool/tests/splinetest.py RefactoringTool: Refactored ./PyDSTool/tests/test_bd_containment.py RefactoringTool: Refactored ./PyDSTool/tests/test_context_spikes.py RefactoringTool: Refactored ./PyDSTool/tests/test_find_nearby_ball.py RefactoringTool: Refactored ./PyDSTool/tests/test_hybrid_extinputs.py ntTimes('fig2')) +print(orderEventData(sModel.getTrajEventTimes('fig2'))) show() --- ./PyDSTool/tests/splinetest.py (original) +++ ./PyDSTool/tests/splinetest.py (refactored) @@ -81,7 +81,7 @@ PyCont['EQ1'].display(('delta','D'), stability=True, color='green') -print "Avoiding computing the Hopf curves until C code can be augmented with equivalent spline code" +print("Avoiding computing the Hopf curves until C code can be augmented with equivalent spline code") plt.show() # STOP HERE 1/0 @@ -135,7 +135,7 @@ -print 'done in %.3f seconds!' % (clock()-start) +print('done in %.3f seconds!' % (clock()-start)) ax1=subplot(111) PyCont['FO1'].display(('delta','D_max'),axes=ax1, stability=True, color='green') --- ./PyDSTool/tests/test_bd_containment.py (original) +++ ./PyDSTool/tests/test_bd_containment.py (refactored) @@ -2,7 +2,7 @@ from PyDSTool import * -print "Basic tests for boundary containment features..." +print("Basic tests for boundary containment features...") vals1 = linspace(-3,3,20) test_traj1 = numeric_to_traj([vals1], @@ -85,4 +85,4 @@ ic_disc = numeric_to_traj([[1],[0]], 'test', ['x', 'dxdt'], 0.) assert disc_dom(ic_disc) -print " ...passed" +print(" ...passed") --- ./PyDSTool/tests/test_context_spikes.py (original) +++ ./PyDSTool/tests/test_context_spikes.py (refactored) @@ -4,7 +4,7 @@ # importPointset or use scipy's text file -> array reading functions from PyDSTool.Toolbox.neuro_data import * -print "Test Context class and example of qualitative fitting of spikes" +print("Test Context class and example of qualitative fitting of spikes") sigma = 0.05 @@ -46,4 +46,4 @@ assert allclose(is_spike.results.spike_time, 270.5574) assert allclose(is_spike.results.spike_val, 5117.07697) -print " ...passed" +print(" ...passed") --- ./PyDSTool/tests/test_find_nearby_ball.py (original) +++ ./PyDSTool/tests/test_find_nearby_ball.py (refactored) @@ -19,12 +19,12 @@ ##swirl = generate_swirl(1000, 1, 0.1, 1.5, 0.0064, 0.00005, 0.000, 2, 0.01) -print "Generating 2D spiral data with added noise (s.d. 0.05)" +print("Generating 2D spiral data with added noise (s.d. 0.05)") spiral = generate_spiral(150, 2, 1., 0.1, 0.1, 1, 0.05) # test function for radius of data set diam = find_diameter(spiral, 0.5) -print "\nDiameter of spiral to within +/- 0.5 is", diam +print("\nDiameter of spiral to within +/- 0.5 is", diam) #centre_ix = find_central_point(spiral) centre_ix = 80 # pick a point out on the arm @@ -33,13 +33,13 @@ times = 0.1*arange(0, len(spiral)) rec_info = find_recurrences(spiral, centre_ix, diam/3, times) -print "\nAll data indices in ball: ", rec_info.ball_ixs +print("\nAll data indices in ball: ", rec_info.ball_ixs) -print "\nPartitions found (by index): ", rec_info.partitions +print("\nPartitions found (by index): ", rec_info.partitions) -print "\nNumber of contiguous traj points in a ball near centre_ix = ", rec_info.partition_lengths -print "\nRecurrence times for a ball around the black square of radius %.3f"%(diam/3) -print "for the partitions found are ", rec_info.rec_times +print("\nNumber of contiguous traj points in a ball near centre_ix = ", rec_info.partition_lengths) +print("\nRecurrence times for a ball around the black square of radius %.3f"%(diam/3)) +print("for the partitions found are ", rec_info.rec_times) # x-y projection --- ./PyDSTool/tests/test_hybrid_extinputs.py (original) +++ ./PyDSTool/tests/test_hybrid_extinputs.py (refactored) @@ -82,7 +82,7 @@ return mc.getModel() def test1(m): - print '\nTest 1, integrating... ' + print('\nTest 1, integrating... ') m.compute(trajname='test1', tdata=tdomain, ics={'x':1.1, 'state': 1}, verboselevel=2) assert len(m.trajectories['test1'].trajSeq) == 9, \ @@ -100,7 +100,7 @@ return m.sample('test1') def test2(m): - print "\nTest 2, integrating ..." + print("\nTest 2, integrating ...") m.compute(trajname='test2', tdata=tdomain, ics={'x':5.1, 'state': 1}) assert len(m.trajectories['test2'].trajSeq) == 8, \ "Incorrect numbRefactoringTool: Refactored ./PyDSTool/tests/test_hybrid_extinputs_Cintegrator.py RefactoringTool: Refactored ./PyDSTool/tests/test_interval.py er of hybrid segments" @@ -108,7 +108,7 @@ "Inaccurate hybrid computation" def doPlot(plotData): - print 'Preparing plot' + print('Preparing plot') plt.ylabel('x') plt.xlabel('t') xline=plot(plotData['t'], plotData['x']) @@ -118,7 +118,7 @@ if __name__=='__main__': m = makeModel('Vode','Vode') - print "Testing vode integrator" + print("Testing vode integrator") plotData = test1(m) test2(m) --- ./PyDSTool/tests/test_hybrid_extinputs_Cintegrator.py (original) +++ ./PyDSTool/tests/test_hybrid_extinputs_Cintegrator.py (refactored) @@ -11,10 +11,10 @@ m1 = makeModel('Dopri','Dopri') m2 = makeModel('Vode','Radau') -print "Testing dopri integrator" +print("Testing dopri integrator") plotData1 = test1(m1) test2(m1) -print "Testing vode + radau integrator" +print("Testing vode + radau integrator") plotData2 = test1(m2) test2(m2) --- ./PyDSTool/tests/test_interval.py (original) +++ ./PyDSTool/tests/test_interval.py (refactored) @@ -3,7 +3,7 @@ """ from PyDSTool import * -print '---------- Test for Interval.py ----------' +print('---------- Test for Interval.py ----------') a=Interval('a', float, [-1,1], abseps=1e-5) b=Interval('b', float, [-1.,1.]) c=Interval('c', float, [-3.,-2.]) @@ -21,37 +21,37 @@ assert ([-5, 0, -1] < a) == [True, False, False] assert (a> array([-5, -4, -1])) == [True, True, False] -print "m=Interval('test1', float, (0,1))" +print("m=Interval('test1', float, (0,1))") m=Interval('test1', float, (0,1)) -print 'm => ', m -print 'm() => ', m() -print 'm.info() => ', +print('m => ', m) +print('m() => ', m()) +print('m.info() => ', end=' ') m.info() -print '0.1 in m => ', 0.1 in m -print -print "n=Interval('test2', float, (0,0.4))" +print('0.1 in m => ', 0.1 in m) +print() +print("n=Interval('test2', float, (0,0.4))") n=Interval('test2', float, (0,0.4)) try: - print 'n in m => ', n in m, '\n' + print('n in m => ', n in m, '\n') raise RuntimeError("Failed test") -except PyDSTool_UncertainValueError, e: - print 'UncertainValueError: ', e -print "s=Interval('a_singleton', float, 0.4)" +except PyDSTool_UncertainValueError as e: + print('UncertainValueError: ', e) +print("s=Interval('a_singleton', float, 0.4)") s=Interval('a_singleton', float, 0.4) -print 's.get() => ', s.get() -print "s in m => ", s in m, ' (works for singleton interval s)\n' +print('s.get() => ', s.get()) +print("s in m => ", s in m, ' (works for singleton interval s)\n') r=Interval('another_singleton', float, 0.0) -print "r=Interval('another_singleton', float, 0.0)" +print("r=Interval('another_singleton', float, 0.0)") b=Interval('b', int, 0) -print "b=Interval('b', int, 0)" +print("b=Interval('b', int, 0)") try: - print "b in m => ", b in m + print("b in m => ", b in m) raise RuntimeError("Failed test") -except PyDSTool_UncertainValueError, e: - print 'UncertainValueError: ', e +except PyDSTool_UncertainValueError as e: + print('UncertainValueError: ', e) i=Interval('i', int, (0,1)) -print "i=Interval('i', int, (0,1))" -print "b in i => ", b in i, " (true because we're comparing integer intervals)" +print("i=Interval('i', int, (0,1))") +print("b in i => ", b in i, " (true because we're comparing integer intervals)") ii=i+3 assert ii[0] == i[0]+3 assert ii[1] == i[1]+3 @@ -73,80 +73,80 @@ ii_neg = 1/i_neg assert ii_neg.get() == [-1, 1] -print "\nUse the explicit `contains` method to avoid exceptions, and instead" -print " get an IntervalMembership type returned..." -print "m.contains(i) => ", m.contains(i) -print "m.contains(0.4) => ", m.contains(0.4) +print("\nUse the explicit `contains` method to avoid exceptions, and instead") +print(" get an IntervalMembership type returned...") +print("m.contains(i) => ", m.contains(i)) +print("m.contains(0.4) => ", m.contains(0.4)) j = Interval('test3', float, (0,0.999999999)) -print "j = Interval('test3', float, (0,0.999999999))" -print "p = m.contains(j)" +print("j = Interval('test3', float, (0,0.999999999))") +print("p = m.contains(j)") p = m.contains(j) -print "p is uncertain => ", p is uncertain +print("p is uncertain => ", p is uncertain) -print "\nBut don't try to compare IntervalMembership objects to booleans..." -print "q = m.contains(0.9)" +print("\nBut don't try to compare IntervalMembership objects to booleans...") +print("q = m.contains(0.9)") q = m.contains(0.9) assert q is contained assert not(q is True) -print "q is True => ", q is True, " (false because q is not a boolean type)" -print "... but can use in a statement such as 'if m.contains(0.9): ...etc.'" +print("q is True => ", q is True, " (false because q is not a boolean type)") +print("... but can use in a statement such as 'if m.contains(0.9): ...etc.'") -print "\nElementary `interval logic` can be performed when checking endpoints" -print " for interval containment." -print "contained and notcontained => ", contained and notcontained -print "contained and uncertain => ", contained and uncertain -print "notcontained and notcontained => ", notcontained and notcontained +print("\nElementary `interval logic` can be performed when checking endpoints") +print(" for interval containment.") +print("contained and notcontained => ", contained and notcontained) +print("contained and uncertain => ", contained and uncertain) +print("notcontained and notcontained => ", notcontained and notcontained) -print "\nm.sample(0.09, strict=False, avoidendpoints=True) => ", \ - m.sample(0.09, strict=False, avoidendpoints=True) +print("\nm.sample(0.09, strict=False, avoidendpoints=True) => ", \ + m.sample(0.09, strict=False, avoidendpoints=True)) -print "\nm.sample(0.09, strict=False) => ", \ - m.sample(0.09, strict=False) +print("\nm.sample(0.09, strict=False) => ", \ + m.sample(0.09, strict=False)) -print "i2=Interval('i2', int, (0,10))" +print("i2=Interval('i2', int, (0,10))") i2=Interval('i2', int, (0,10)) -print "\ni2.sample(2, strict=False, avoidendpoints=True) => ", \ - i2.sample(2, strict=False, avoidendpoints=True) +print("\ni2.sample(2, strict=False, avoidendpoints=True) => ", \ + i2.sample(2, strict=False, avoidendpoints=True)) -print "i3=Interval('i3', float, (0.,0.4))" +print("i3=Interval('i3', float, (0.,0.4))") i3=Interval('i3', float, (0.,0.4)) -print "\ni3.sample(0.36, strict=False) => ", \ - i3.sample(0.36, strict=False) +print("\ni3.sample(0.36, strict=False) => ", \ + i3.sample(0.36, strict=False)) -print "\ni3.sample(0.36, strict=False, avoidendpoints=True) => ", \ - i3.sample(0.36, strict=False, avoidendpoints=True) +print("\ni3.sample(0.36, strict=False, avoidendpoints=True) => ", \ + i3.sample(0.36, strict=False, avoidendpoints=True)) -print "\ni3.sample(0.36, strict=True) => ", \ - i3.sample(0.36, strict=True) +print("\ni3.sample(0.36, strict=True) => ", \ + i3.sample(0.36, strict=True)) assert len(i3.sample(0.36, strict=True)) == 3 -print "\nInfinite intervals" -print "inf1 = Interval('inf1', float, [0,Inf])" +print("\nInfinite intervals") +print("inf1 = Interval('inf1', float, [0,Inf])") inf1 = Interval('inf1', float, [0,Inf], abseps=0) -print "0 in inf1 => ", 0 in inf1 -print "inf1.contains(inf1) => ", inf1.contains(inf1) -print "inf2 = Interval('inf2', float, [-Inf,Inf])" +print("0 in inf1 => ", 0 in inf1) +print("inf1.contains(inf1) => ", inf1.contains(inf1)) +print("inf2 = Interval('inf2', float, [-Inf,Inf])") inf2 = Interval('inf2', float, [-Inf,Inf]) -print "inf2.contains(inf2) => ", inf2.contains(inf2) -print "inf2.contains(inf1) => ", inf2.contains(inf1) -print "inf3 = Interval('inf3', float, [-Inf,0])" +print("inf2.contains(inf2) => ", inf2.contains(inf2)) +print("inf2.contains(inf1) => ", inf2.contains(inf1)) +print("inf3 = Interval('inf3', float, [-Inf,0])") inf3 = Interval('inf3', float, [-Inf,0]) -print "inf3.contains(inf2) => ", inf3.contains(inf2) +print("inf3.contains(inf2) => ", inf3.contains(inf2)) inf_int = Interval('inf3', int, [-Inf,0]) -print "inf_int = Interval('inf3', int, [-Inf,0])" -print "inf_int.contains(inf3) => " +print("inf_int = Interval('inf3', int, [-Inf,0])")RefactoringTool: Refactored ./PyDSTool/tests/test_pointsets.py +print("inf_int.contains(inf3) => ") try: inf_int.contains(inf3) -except PyDSTool_TypeError, e: - print " ",e -print "inf_int.contains(-Inf) => ", inf_int.contains(-Inf) +except PyDSTool_TypeError as e: + print(" ",e) +print("inf_int.contains(-Inf) => ", inf_int.contains(-Inf)) assert inf_int.contains(-Inf) i4 = Interval('i4', int, [-5,5]) -print "i4 = Interval('i4', int, [-5,5])" -print "inf_int.intersect(i4) => ", inf_int.intersect(i4).get() -print "Intersection should fail on mixed-type intervals ..." +print("i4 = Interval('i4', int, [-5,5])") +print("inf_int.intersect(i4) => ", inf_int.intersect(i4).get()) +print("Intersection should fail on mixed-type intervals ...") try: result1 = inf3.intersect(i4).get() except: @@ -155,9 +155,9 @@ result2 = j.intersect(i2).get() except: result2 = " >> FAILURE" -print "inf3.intersect(i4) => ", result1 +print("inf3.intersect(i4) => ", result1) assert result1 == " >> FAILURE" -print "j.intersect(i2) => ", result2 +print("j.intersect(i2) => ", result2) assert result2 == " >> FAILURE" i5 = Interval('i5', int, [4,4]) assert i5.issingleton @@ -168,4 +168,4 @@ assert 4 in i5 assert 4.0 in i5 -print "Tests passed" +print("Tests passed") --- ./PyDSTool/tests/test_pointsets.py (original) +++ ./PyDSTool/tests/test_pointsets.py (refactored) @@ -4,172 +4,172 @@ from PyDSTool import * # POINTS -print "\n****** Point class test ******\n" -print "x uses Python float type:" +print("\n****** Point class test ******\n") +print("x uses Python float type:") xstr = """x = Point({'coorddict': {'x0': [1.123456789], 'x1': [-0.4], 'x2': [4000]}, 'coordtype': float})""" -print xstr +print(xstr) exec(xstr) # float is equivalent to float64 -print "x => ", repr(x) -print "x.toarray() = ", x.toarray() -print "\nprint x => ", x -print "x.dimension => ", x.dimension, ", x.coordnames => ", x.coordnames -print "x.coordtype => ", x.coordtype -print "x.coordtype => ", x.coordtype -print "x('x1') = ", x('x1') -print "x(['x1','x0']) = ", x(['x1','x0']) -print "x([0,1]) = ", x([0,1]) -print "\nChanging x entries is done by x[index] = value:" -print "x[1] = -0.45" +print("x => ", repr(x)) +print("x.toarray() = ", x.toarray()) +print("\nprint x => ", x) +print("x.dimension => ", x.dimension, ", x.coordnames => ", x.coordnames) +print("x.coordtype => ", x.coordtype) +print("x.coordtype => ", x.coordtype) +print("x('x1') = ", x('x1')) +print("x(['x1','x0']) = ", x(['x1','x0'])) +print("x([0,1]) = ", x([0,1])) +print("\nChanging x entries is done by x[index] = value:") +print("x[1] = -0.45") x[1] = -0.45 -print "\nThe index can also be a name, a list of names, or even a dictionary:" -print "x[['x0', 'x1']] = [4.11103, -0.56])" +print("\nThe index can also be a name, a list of names, or even a dictionary:") +print("x[['x0', 'x1']] = [4.11103, -0.56])") x[['x0', 'x1']] = [4.11103, -0.56] -print "\ny is a 1D point (with integer type):" +print("\ny is a 1D point (with integer type):") # can also specify as array([4]) ystr = """y = Point({'y': 4})""" -print ystr +print(ystr) exec(ystr) -print "print y => ", y -print "y(0) = ", y(0) -print "type(y(0)) => ", type(y(0)) -print "y([0]) = ", y([0]) -print "y.toarray() = ", y.toarray() +print("print y => ", y) +print("y(0) = ", y(0)) +print("type(y(0)) => ", type(y(0))) +print("y([0]) = ", y([0])) +print("y.toarray() = ", y.toarray()) assert comparePointCoords(x,(x+0)*1,fussy=True) ### POINTSETS -print "\n\n****** Pointset test ******\n" -print "v is a 'singleton' pointset, to make sure this doesn't break the interface" +print("\n\n****** Pointset test ******\n") +print("v is a 'singleton' pointset, to make sure this doesn't break the interface") vstr = """v = Pointset({'coorddict': {'x0': 0.2, 'x1': -1.2}, 'indepvardict': {'t': 0.01}, 'coordtype': float64, 'indepvartype': float64 })""" -print vstr +print(vstr) exec(vstr) -print "print v =>", v -print "\nprint v(0.01) => ", v(0.01) -print "and v(0.01) is a Point object\n" -print "print v(0.01, 0) => ", v(0.01, 0) -print "and v(0.01, 0) is a float\n" -print "print v(0.01, 'x0') => ", v(0.01, 'x0') - -print "\nk tests deprecated syntax for single-point pointset" +print("print v =>", v) +print("\nprint v(0.01) => ", v(0.01)) +print("and v(0.01) is a Point object\n") +print("print v(0.01, 0) => ", v(0.01, 0)) +print("and v(0.01, 0) is a float\n") +print("print v(0.01, 'x0') => ", v(0.01, 'x0')) + +print("\nk tests deprecated syntax for single-point pointset") kstr = """k = Pointset({'coordarray': array(0.1), 'coordnames': 'k0', 'indepvarname': 't', 'indepvararray': array(0.0)})""" -print kstr +print(kstr) exec(kstr) assert k.dimension == 1 -print "print k.toarray() => ", k.toarray() -print "print k['t'] => ", k['t'] -print "print k(0.0) => ", k(0.0) -print "print k => ", k - -print "\nu tests non-parameterized pointset" +print("print k.toarray() => ", k.toarray()) +print("print k['t'] => ", k['t']) +print("print k(0.0) => ", k(0.0)) +print("print k => ", k) + +print("\nu tests non-parameterized pointset") ustr = """u = Pointset({'coordarray': array([10., 20., 30., 40.])})""" exec(ustr) -print ustr -print "u.toarray() => ", u.toarray() -print "isparameterized(u) => ", isparameterized(u) -print "print u => ", u - -print "\nw tests alternative declaration syntax, and other forms of calling" +print(ustr) +print("u.toarray() => ", u.toarray()) +print("isparameterized(u) => ", isparameterized(u)) +print("print u => ", u) + +print("\nw tests alternative declaration syntax, and other forms of calling") wstr = """wp = Pointset({'coordarray': array([[4.456, 2.34634, 7.3431, 5.443], [-10.0336, -5.2235, -3.23221, -0.01], [3e5, 3.1e5, 3.3e5, 2.8e5]], float64), 'coordnames': ['x0', 'x1', 'x2'], 'indepvarname': 't', 'indepvararray': array([0.0, 1.0, 2.0, 3.0], float64)})""" -print wstr +print(wstr) exec(wstr) assert type(wp.coordarray)==type(array([1,2],float64)) -print "wp.dimension => ", wp.dimension -print "print wp(0.0) => ", wp(0.0) -print "type(wp(0.0)) => ", type(wp(0.0)) -print "print wp(1.0)(0) => ", wp(1.0)(0) -print "print wp(2.0, 'x1') => ", wp(2.0, 'x1') -print "\nprint wp(2.0, ['x2', 'x1']) => ", wp(2.0, ['x2', 'x1']) -print "type(wp(2.0, ['x1', 'x2'])) => ", type(wp(2.0, ['x1', 'x2'])) -print "print wp[['x1','x0']] => ", wp[['x1','x0']] -print "\nwp.info(1) =>", wp.info(1) -print "wp(1.0).info(1) =>", wp(1.0).info(1) -print "wp['t'] => ", wp['t'] -print "\nCall several 't' values at once (explicit values only -- no ellipses):" -print "wp([1., 2.]) => ", wp([1., 2.]) -print "\nExtract a coordinate (only by name) as a regular array:" +print("wp.dimension => ", wp.dimension) +print("print wp(0.0) => ", wp(0.0)) +print("type(wp(0.0)) => ", type(wp(0.0))) +print("print wp(1.0)(0) => ", wp(1.0)(0)) +print("print wp(2.0, 'x1') => ", wp(2.0, 'x1')) +print("\nprint wp(2.0, ['x2', 'x1']) => ", wp(2.0, ['x2', 'x1'])) +print("type(wp(2.0, ['x1', 'x2'])) => ", type(wp(2.0, ['x1', 'x2']))) +print("print wp[['x1','x0']] => ", wp[['x1','x0']]) +print("\nwp.info(1) =>", wp.info(1)) +print("wp(1.0).info(1) =>", wp(1.0).info(1)) +print("wp['t'] => ", wp['t']) +print("\nCall several 't' values at once (explicit values only -- no ellipses):") +print("wp([1., 2.]) => ", wp([1., 2.])) +print("\nExtract a coordinate (only by name) as a regular array:") w_x0 = wp['x0'] -print "w_x0 = wp['x0'] => ", w_x0 - -print "\nExtract a point of w as a regular array:" +print("w_x0 = wp['x0'] => ", w_x0) + +print("\nExtract a point of w as a regular array:") w_at_1 = wp(1.).toarray() -print "w_at_1 = wp(1.).toarray() => ", w_at_1 - -print "\nMany forms to access individual values or sub-arrays:" -print "wp(1., 'x1') => ", wp(1., 'x1') -print "wp(1.)('x1') => ", wp(1.)('x1') -print "wp(1., 1)) => ", wp(1., 1) -print "wp([1.,3.], 1) => ", wp([1.,3.], 1) -print "wp([1.,3.])('x1') => ", wp([1.,3.])['x1'] -print "wp(1.)([0,1]) => ", wp(1.)([0,1]) -print "but ... wp([1.])(1., [0,1]) => ", wp([1.])(1., [0,1]) -print "... because wp([1.]) is a Pointset and wp(1.) is a Point" -print "This is why wp(1.).toarray() shows a different array shape to wp([1.]).toarray():" -print "wp(1.).toarray().shape => ", wp(1.).toarray().shape -print "wp([1.]).toarray().shape => ", wp([1.]).toarray().shape - -print "\nChange a point in w using wp[indepvar_value] = point:" -print "Old value at t=1.0: wp(1.0) =>", wp(1.0) -print "wp[1] = x" +print("w_at_1 = wp(1.).toarray() => ", w_at_1) + +print("\nMany forms to access individual values or sub-arrays:") +print("wp(1., 'x1') => ", wp(1., 'x1')) +print("wp(1.)('x1') => ", wp(1.)('x1')) +print("wp(1., 1)) => ", wp(1., 1)) +print("wp([1.,3.], 1) => ", wp([1.,3.], 1)) +print("wp([1.,3.])('x1') => ", wp([1.,3.])['x1']) +print("wp(1.)([0,1]) => ", wp(1.)([0,1])) +print("but ... wp([1.])(1., [0,1]) => ", wp([1.])(1., [0,1])) +print("... because wp([1.]) is a Pointset and wp(1.) is a Point") +print("This is why wp(1.).toarray() shows a different array shape to wp([1.]).toarray():") +print("wp(1.).toarray().shape => ", wp(1.).toarray().shape) +print("wp([1.]).toarray().shape => ", wp([1.]).toarray().shape) + +print("\nChange a point in w using wp[indepvar_value] = point:") +print("Old value at t=1.0: wp(1.0) =>", wp(1.0)) +print("wp[1] = x") wp[1] = x -print "w has now been updated for the meshpoint at t=1.0 =>" -print "New value at t=1.0: wp(1.0) => ", wp(1.0) -assert type(wp.coordarray)==type(array([1,2],float64)) - -print "\nWe can test equality between arrays, as usual:" -print "w_at_1 != wp(1.).toarray() => ", w_at_1 != wp(1.).toarray() -print "We can also compare with a Pointset object:" -print "wp(1.) != w_at_1 => ", wp(1.) != w_at_1 -print "But we can't put an array on the left-hand side if a Point or " \ - "Pointset is on the right." - -print "\nTo demonstrate appending a Point and Pointset to another Pointset:" +print("w has now been updated for the meshpoint at t=1.0 =>") +print("New value at t=1.0: wp(1.0) => ", wp(1.0)) +assert type(wp.coordarray)==type(array([1,2],float64)) + +print("\nWe can test equality between arrays, as usual:") +print("w_at_1 != wp(1.).toarray() => ", w_at_1 != wp(1.).toarray()) +print("We can also compare with a Pointset object:") +print("wp(1.) != w_at_1 => ", wp(1.) != w_at_1) +print("But we can't put an array on the left-hand side if a Point or " \ + "Pointset is on the right.") + +print("\nTo demonstrate appending a Point and Pointset to another Pointset:") vw = Pointset({'coorddict': {'x0': [0.1, 0.15], 'x1': [100., 102], 'x2': [0.2, 0.1]}, 'indepvardict': {'t': [4.5, 5.0]}, 'coordtype': float64, 'indepvartype': float64, 'labels': {1: 'c'} }) -print "vw.labels -->", vw.labels -print "wp.append(vw)" +print("vw.labels -->", vw.labels) +print("wp.append(vw)") wp.append(vw) -print "wp.labels -->", wp.labels +print("wp.labels -->", wp.labels) assert type(wp.coordarray)==type(array([1,2],float64)) wp.append(Point({'coorddict': {'t': 6.5, 'x0': 2, 'x1': -300, 'x2': -0.9997}})) assert type(wp.coordarray)==type(array([1,2],float64)) -print "\nwp.toarray() -->\n", wp.toarray() -print "\nwp(4.5) -->\n", wp(4.5) -print "\nwp[[3,6]] -->", wp[[3,6]] -print "\nwp[3:5] -->", wp[3:5] -print "\nwp[2:] -->", wp[2:] +print("\nwp.toarray() -->\n", wp.toarray()) +print("\nwp(4.5) -->\n", wp(4.5)) +print("\nwp[[3,6]] -->", wp[[3,6]]) +print("\nwp[3:5] -->", wp[3:5]) +print("\nwp[2:] -->", wp[2:]) try: # index out of range wp[10:] except ValueError: pass -print "\nwp[wp.findIndex(4.5)] -->\n", wp[wp.findIndex(4.5)] -print "\nwp.labels -->", wp.labels -print "\nLabels test:" +print("\nwp[wp.findIndex(4.5)] -->\n", wp[wp.findIndex(4.5)]) +print("\nwp.labels -->", wp.labels) +print("\nLabels test:") wp.labels[3] = ('a', {'bif':'SN'}) -print "wp.labels[3] -->", wp.labels[3] +print("wp.labels[3] -->", wp.labels[3]) wp_part = wp[3:5] -print "wp_part.labels -->", wp_part.labels +print("wp_part.labels -->", wp_part.labels) assert wp_part.labels[0] == wp.labels[3] wRefactoringTool: Refactored ./PyDSTool/tests/test_variable_traj.py pt = wp(3.) assert wpt.labels == {'a': {'bif':'SN'}} @@ -179,42 +179,42 @@ 'indepvartype': float64, 'labels': {2: 'b', 3: {'a': {'bif':'H'}}} }) -print "\nwp_ins object created to insert into wp:" -print wp_ins +print("\nwp_ins object created to insert into wp:") +print(wp_ins) wp.insert(wp_ins) -print "\nwp.insert(wp_ins) -->\n", wp - -print "\nTo demonstrate building a Pointset from a list of Point objects:" +print("\nwp.insert(wp_ins) -->\n", wp) + +print("\nTo demonstrate building a Pointset from a list of Point objects:") codestr = """ pointlist = [] for t in wp['t']: pointlist.append(wp(t)) w_reconstructed = pointsToPointset(pointlist, 't', wp['t']) """ -print codestr +print(codestr) exec(codestr) -print "\nAnd to demonstrate that this yields an identical object:" -print "w_reconstructed == w => ", w_reconstructed == wp +print("\nAnd to demonstrate that this yields an identical object:") +print("w_reconstructed == w => ", w_reconstructed == wp) try: w_double = w_reconstructed.append(w_reconstructed) raise RuntimeError("Internal error with Pointset class!") except ValueError: - print "(ensure that any independent variable values to append are well-ordered)" - -print "\nTest of non-parameterized use of pointsToPointset:" + print("(ensure that any independent variable values to append are well-ordered)") + +print("\nTest of non-parameterized use of pointsToPointset:") wnp = pointsToPointset(pointlist) -print "(Adding two additional labels to wnp)" +print("(Adding two additional labels to wnp)") wnp.labels[0]=('b', {}) wnp.addlabel(4, 'c', {'bif': 'H'}) # preferred syntax -print wnp -print "\nwnp[:] -->\n", wnp[:] -print "-- OK!" - -print "\nCan iterate over points and pointsets:" -print "for p in wnp.bylabel('a'):\n print p\n" +print(wnp) +print("\nwnp[:] -->\n", wnp[:]) +print("-- OK!") + +print("\nCan iterate over points and pointsets:") +print("for p in wnp.bylabel('a'):\n print p\n") for p in wnp.bylabel('a'): - print p + print(p) wp2 = Pointset({'coorddict': {'x0': [-4.5, 2, 3], 'x1': [54, 62, 64], 'x2': [0.9, 0.8, 0.2]}, @@ -235,7 +235,7 @@ # ----------------------------- -print "\n" -print "x (point) and wp, wnp (param'd and non-param'd pointsets) are available in the global namespace,", \ - "to play with interactively now that this script has run." - +print("\n") +print("x (point) and wp, wnp (param'd and non-param'd pointsets) are available in the global namespace,", \ + "to play with interactively now that this script has run.") + --- ./PyDSTool/tests/test_variable_traj.py (original) +++ ./PyDSTool/tests/test_variable_traj.py (refactored) @@ -6,138 +6,138 @@ w_pts = Pointset({'coordarray': array([4.456, 2.34634, 7.3431, 5.443], float64), 'indepvararray': array([0.0, 1.0, 2.0, 3.0], float64)}) w_var = Variable(w_pts) -print "w_var(0.0) => ", w_var(0.0) +print("w_var(0.0) => ", w_var(0.0)) -print "\n" +print("\n") f2 = interp1d([0., 1., 2.], [5,6,7]) v_var = Variable(f2, 't', 'x') -print "Use optional 'checklevel' argument to specify degree of bounds/domain checking" -print "This is useful mainly during initial computation of a variable" -print "v_var(0.01) => ", v_var(0.01, 2) +print("Use optional 'checklevel' argument to specify degree of bounds/domain checking") +print("This is useful mainly during initial computation of a variable") +print("v_var(0.01) => ", v_var(0.01, 2)) try: - print "\nv_var(array([0.24,2.566]), 2) =>\n", v_var(array([0.24,2.566]), 2) -except ValueError, e: - print " ",e -print "\nv_var =>\n", v_var -print "v_var.getDataPoints() => ", v_var.getDataPoints() + print("\nv_var(array([0.24,2.566]), 2) =>\n", v_var(array([0.24,2.566]), 2)) +except ValueError as e: + print(" ",e) +print("\nv_var =>\n", v_var) +print("v_var.getDataPoints() => ", v_var.getDataPoints()) # ------------------------------ -print """Test of domain checking... By making depdomain to be a +print("""Test of domain checking... By making depdomain to be a set of integers, and the coordarray to be non-integers, this object can only be called for indepvar values in [0, 0.5, 1, 1.5, -..., 4.5]""" +..., 4.5]""") -print "\n" -v_int = Variable(Pointset({'coordarray': array(range(10), float64)*0.1, - 'indepvararray': array(range(10), float64)*0.5 +print("\n") +v_int = Variable(Pointset({'coordarray': array(list(range(10)), float64)*0.1, + 'indepvararray': array(list(range(10)), float64)*0.5 })) -print "v_int(0.5) => ", v_int(0.5, 2) -print "v_int(0.4) => " +print("v_int(0.5) => ", v_int(0.5, 2)) +print("v_int(0.4) => ") try: v_int(0.4, 2) -except ValueError, e: - print "Successfully checked domain validation with v_int:" - print " ... error was "+str(e) -print "v_int(0) => ", v_int(0) +except ValueError as e: + print("Successfully checked domain validation with v_int:") + print(" ... error was "+str(e)) +print("v_int(0) => ", v_int(0)) # ------------------------------ -print "\nTest simple functions in Variable object" +print("\nTest simple functions in Variable object") exp_str = """exp_var = Variable(math.exp, 'x', Interval('y', float, [0,Inf]))""" -print exp_str +print(exp_str) exec(exp_str) -print "exp_var(0.5) => ", exp_var(0.5) +print("exp_var(0.5) => ", exp_var(0.5)) -print "\nTest wrapped functions in OutputFn class" -print """The optional Intervals specify the "trajectory" range, but are for -informational purposes only! They are not checked anywhere.""" +print("\nTest wrapped functions in OutputFn class") +print("""The optional Intervals specify the "trajectory" range, but are for +informational purposes only! They are not checked anywhere.""") sin_str = """sin_opfunc = OutputFn(math.sin, (Interval('t', float, [0,Inf]), Interval('x', float, [-1.,1.])))""" -print sin_str +print(sin_str) exec(sin_str) -print """\nThese Intervals specify the valid domains of the indep and dep var -Deliberately only allow +ve angles (unless specified here they won't be checked)""" +print("""\nThese Intervals specify the valid domains of the indep and dep var +Deliberately only allow +ve angles (unless specified here they won't be checked)""") sin_str2 = """sin_var = Variable(sin_opfunc, Interval('t', float, [0,Inf]), Interval('x', float, [-1,1]))""" -print sin_str2 +print(sin_str2) exec(sin_str2) -print "sin_var(math.pi) => ", sin_var(math.pi, 2) -print "sin_var(-math.pi/2) =>" +print("sin_var(math.pi) => ", sin_var(math.pi, 2)) +print("sin_var(-math.pi/2) =>") try: sin_var(-math.pi/2, 2) -except ValueError, e: - print " ", e +except ValueError as e: + print(" ", e) -print "sin_var([0., 0.5*math.pi, math.pi]) => ", sin_var([0., 0.5*math.pi, - math.pi]) +print("sin_var([0., 0.5*math.pi, math.pi]) => ", sin_var([0., 0.5*math.pi, + math.pi])) # ------------------------------ from utils import makeImplicitFunc -print "\nTest implicit function routine on half-circle of radius 2" +print("\nTest implicit function routine on half-circle of radius 2") cf = """def circ_formula(x,y): return x*x+y*y-4""" -print cf +print(cf) exec(cf) nf_str = """newton_halfcirc_fn = makeImplicitFunc(circ_formula, x0=0.75, solmethod='newton')""" -print nf_str +print(nf_str) exec(nf_str) impl_str = """implicit_halfcirc = OutputFn(newton_halfcirc_fn, (Interval('t', float, (0,2)), Interval('x', float, (-2,2))))""" -print impl_str +print(impl_str) exec(impl_str) -print "tval = -1.3" +print("tval = -1.3") tval = -1.3 xval = implicit_halfcirc(tval) -print "xval = implicit_halfcirc(tval) => ", xval -print "math.sqrt(xval*xval + tval*tval) => ", math.sqrt(xval*xval + \ - tval*tval), " = radius" -print "As it stands, the OutputFn doesn't understand the bounds on the variables:" -print "implicit_halfcirc(3.) =>" +print("xval = implicit_halfcirc(tval) => ", xval) +print("math.sqrt(xval*RefactoringTool: Refactored ./PyDSTool/tests/traj_gt0_test.py RefactoringTool: Refactored ./PyDSTool/tests/vode_event_test1.py RefactoringTool: Refactored ./PyDSTool/tests/vode_event_test2.py xval + tval*tval) => ", math.sqrt(xval*xval + \ + tval*tval), " = radius") +print("As it stands, the OutputFn doesn't understand the bounds on the variables:") +print("implicit_halfcirc(3.) =>") try: implicit_halfcirc(3.) -except RuntimeError,e: - print " ... returns error: ", e -except AssertionError,e: - print " ... returns error: ", e -print """\nSo we can embed this OutputFn into a variable for x as -a function of t, with enforcable bounds (using checklevel > 0 second call argument)""" +except RuntimeError as e: + print(" ... returns error: ", e) +except AssertionError as e: + print(" ... returns error: ", e) +print("""\nSo we can embed this OutputFn into a variable for x as +a function of t, with enforcable bounds (using checklevel > 0 second call argument)""") implicit_hc_varstr = """implicit_halfcirc_var = Variable(implicit_halfcirc, Interval('t', float, (0,2)), Interval('x', float, (-2,2)))""" -print implicit_hc_varstr +print(implicit_hc_varstr) exec(implicit_hc_varstr) -print "implicit_halfcirc_var(tval) => ", implicit_halfcirc_var(tval), ", as before" -print "implicit_halfcirc_var(3., 2) =>" +print("implicit_halfcirc_var(tval) => ", implicit_halfcirc_var(tval), ", as before") +print("implicit_halfcirc_var(3., 2) =>") try: implicit_halfcirc_var(3., 2) -except ValueError,e: - print " ... returns error: ", e +except ValueError as e: + print(" ... returns error: ", e) -print "Tests passed" +print("Tests passed") -print "\n\nTest regular Trajectory object" -v1 = Variable(Pointset({'coordarray': array(range(10), float)*0.1, - 'indepvararray': array(range(10), float)*0.5 +print("\n\nTest regular Trajectory object") +v1 = Variable(Pointset({'coordarray': array(list(range(10)), float)*0.1, + 'indepvararray': array(list(range(10)), float)*0.5 }), name='v1') -v2 = Variable(Pointset({'coordarray': array(range(10), float64)*0.25+1.0, - 'indepvararray': array(range(10), float64)*0.5 +v2 = Variable(Pointset({'coordarray': array(list(range(10)), float64)*0.25+1.0, + 'indepvararray': array(list(range(10)), float64)*0.5 }), name='v2') traj = Trajectory('test1', [v1,v2]) -print "print traj(0.5, checklevel=2) => ", traj(0.5, checklevel=2) -print "print traj([0., 0.5]) => ", traj([0., 0.5], 'v1') -print "traj(0.4, 0, checklevel=2) =>" +print("print traj(0.5, checklevel=2) => ", traj(0.5, checklevel=2)) +print("print traj([0., 0.5]) => ", traj([0., 0.5], 'v1')) +print("traj(0.4, 0, checklevel=2) =>") try: traj(0.4, 0, checklevel=2) -except ValueError, e: - print " ... raised error: ", e +except ValueError as e: + print(" ... raised error: ", e) -print "Tests passed." +print("Tests passed.") --- ./PyDSTool/tests/traj_gt0_test.py (original) +++ ./PyDSTool/tests/traj_gt0_test.py (refactored) @@ -51,4 +51,4 @@ assert all(vals6['t'] == array([2.7, 3.7, 5.7])) assert vals6[0] == 0.2 -print "\nAll trajectory sampling tests passed" +print("\nAll trajectory sampling tests passed") --- ./PyDSTool/tests/vode_event_test1.py (original) +++ ./PyDSTool/tests/vode_event_test1.py (refactored) @@ -69,7 +69,7 @@ # Alternative way to extract events: they are labelled in the # pointset! These return dictionaries indexing into the pointset. mon_evs_dict = pts.labels.by_label['Event:monitor'] -mon_ev_points = pts[sort(mon_evs_dict.keys())] +mon_ev_points = pts[sort(list(mon_evs_dict.keys()))] assert len(mon_evs_found) == len(mon_ev_points) == 2 assert numpy.all(mon_evs_found == mon_ev_points) --- ./PyDSTool/tests/vode_event_test2.py (original) +++ ./PyDSTool/tests/vode_event_test2.py (refactored) @@ -36,22 +36,22 @@ DSargs.algparams = {'init_step':0.01} DSargs.checklevel = 2 testODE = Vode_ODEsystem(DSargs) -print "params set => ", testODE.pars -print "DS defined? => ", testODE.defined -print "testODE.set(...)" +print("params set => ", testODE.pars) +print("DS defined? => ", testODE.defineRefactoringTool: Refactored ./PyDSTool/tests/vode_withJac_test.py RefactoringTool: Refactored ./PyDSTool/Toolbox/DSSRT_tools.py d) +print("testODE.set(...)") testODE.set(ics={'w':3.0}, tdata=[0.11,2.1]) -print "traj1 = testODE.compute('traj1')" +print("traj1 = testODE.compute('traj1')") traj1 = testODE.compute('traj1') -print "DS defined now? => ", testODE.defined -print "traj1(0.5) => ", traj1(0.5) -print "testODE.diagnostics.showWarnings() => " +print("DS defined now? => ", testODE.defined) +print("traj1(0.5) => ", traj1(0.5)) +print("testODE.diagnostics.showWarnings() => ") testODE.diagnostics.showWarnings() -print "\ntraj1.indepdomain => ", traj1.indepdomain -print "traj1(0.2, ['aux_other']) => ", traj1(0.2, ['aux_other']) +print("\ntraj1.indepdomain => ", traj1.indepdomain) +print("traj1(0.2, ['aux_other']) => ", traj1(0.2, ['aux_other'])) -print "\nNow adding a terminating co-ordinate threshold event" -print " and non-terminating timer event" +print("\nNow adding a terminating co-ordinate threshold event") +print(" and non-terminating timer event") # Show off the general-purpose, language-independent event creator: # 'makeZeroCrossEvent' ev_args_nonterm = {'name': 'monitor', @@ -77,12 +77,12 @@ thresh_ev_term = Events.makePythonStateZeroCrossEvent('w', 20, 1, ev_args_term) testODE.eventstruct.add([thresh_ev_nonterm,thresh_ev_term]) -print "Recomputing trajectory:" -print "traj2 = testODE.compute('traj2')" +print("Recomputing trajectory:") +print("traj2 = testODE.compute('traj2')") traj2 = testODE.compute('traj2') -print "\ntestODE.diagnostics.showWarnings() => " +print("\ntestODE.diagnostics.showWarnings() => ") testODE.diagnostics.showWarnings() -print "\ntraj2.indepdomain.get() => ", traj2.indepdomain.get() +print("\ntraj2.indepdomain.get() => ", traj2.indepdomain.get()) indep1 = traj2.indepdomain[1] assert indep1 < 1.17 and indep1 > 1.16 mon_evs_found = testODE.getEvents('monitor') --- ./PyDSTool/tests/vode_withJac_test.py (original) +++ ./PyDSTool/tests/vode_withJac_test.py (refactored) @@ -38,8 +38,8 @@ DSargs.name = 'jactest' testODE = Vode_ODEsystem(DSargs) -print "Defined the following internal Python function for Jacobian:" -print testODE.funcspec.auxfns['Jacobian'][0], "\n" +print("Defined the following internal Python function for Jacobian:") +print(testODE.funcspec.auxfns['Jacobian'][0], "\n") tvals = [0.4*10**i for i in range(0,12)] @@ -47,25 +47,25 @@ for t1 in tvals: dt = t1-t0 - print "\n============================================\nAt t=", - print t1, "using dt =", dt + print("\n============================================\nAt t=", end=' ') + print(t1, "using dt =", dt) testODE.set(tdata=[t0,t1], algparams={'init_step': dt} ) if t0 >0.: - print testODE._solver.y + print(testODE._solver.y) traj = testODE.compute('test', 'c') # c for continue testODE.diagnostics.showWarnings() et = testODE.getEventTimes()['thresh_ev'] if et != []: - print "\n****** Event found at t =", et, "\n" + print("\n****** Event found at t =", et, "\n") t0 = t1 - print traj(t1) + print(traj(t1)) -print "\nCompare results with the output directly from the scipy_ode.py test" -print "The values from a test integration performed with scipy_ode.py " \ - + "are listed in the comments at the end of the script" +print("\nCompare results with the output directly from the scipy_ode.py test") +print("The values from a test integration performed with scipy_ode.py " \ + + "are listed in the comments at the end of the script") ##At t=0.0 y=[ 1. 0. 0.] ##At t=0.4 y=[ 9.85172114e-001 3.38639538e-005 1.47940221e-002] --- ./PyDSTool/Toolbox/DSSRT_tools.py (original) +++ ./PyDSTool/Toolbox/DSSRT_tools.py (refactored) @@ -12,7 +12,7 @@ from PyDSTool import * from PyDSTool.parseUtils import symbolMapClass -from FR import * +from .FR import * import os from copy import copy from random import uniform, gauss @@ -71,7 +71,7 @@ inputs[mi].append(mo) except AttributeError: inputs[mi] = [mo] - for k, v in inputs.iteritems(): + for k, v in inputs.items(): if v is None: inputs[k] = [] self.inputs = inputs @@ -88,7 +88,7 @@ if remain(self.varsext, vars) != []: raise NotImplementedError("Can only make network graph with all " "external variables at this time") - print "Finding graph layout for network..." + print("Finding graph layout for network...") V = {} E = {} # prepare vertices @@ -101,7 +101,7 @@ domX = [0.08, 0.96] # override position initial conditions for specially selected variables if ics is not None: - for var, ic in ics.items(): + for var, ic in list(ics.items()): if ic[0] < domX[0] or ic[0] > domX[1]: raise ValueError("X initial condition for %s out of "%var \ + "bounds [%.3f, %.3f]"%(domX[0], domX[1])) @@ -134,7 +134,7 @@ for v in vars: if in_d[v] + out_d[v] == 0: info(in_d, 'in-degrees') - print "\n" + print("\n") info(out_d, 'out-degrees') raise ValueError("Variable %s had no associated edges"%v) self._V = V @@ -142,7 +142,7 @@ if ics is None: fixedICs = {} else: - fixedICs = dict(zip(ics.keys(),[V[k] for k in ics.keys()])) + fixedICs = dict(list(zip(list(ics.keys()),[V[k] for k in list(ics.keys())]))) # call the Fruchtermann-Reingold algorithm to determine graph FR(V, E, domX, domY, fixed=fixedICs) self.nodes = [] @@ -215,8 +215,8 @@ bd0 = 0 bd1 = 1 else: - print "Warning: variable %s has not been given bounds"%var - print " (assuming +/- 'infty_val' attribute)" + print("Warning: variable %s has not been given bounds"%var) + print(" (assuming +/- 'infty_val' attribute)") bd0 = -self._infty_val bd1 = self._infty_val magopt = int(bd0 == 0 and bd1 == 1) @@ -232,8 +232,8 @@ bd0 = 0 bd1 = 1 else: - print "Warning: variable %s has not been given bounds"%var - print " (assuming +/- 'infty_val' attribute)" + print("Warning: variable %s has not been given bounds"%var) + print(" (assuming +/- 'infty_val' attribute)") bd0 = -self._infty_val bd1 = self._infty_val # these variables still need vbars @@ -317,7 +317,7 @@ try: voltname = model._FScompatibleNames(model.searchForVars(parts[0]+'.'+'V')[0]) except: - print "Problem finding membrane voltage name in model spec" + print("Problem finding membrane voltage name in model spec") raise self.cfac[voltname] = model._FScompatibleNames(fullname) # need to take out function-specific parameters from depars -- @@ -328,40 +328,40 @@ # prepare DEpars alldepars = model._FScompatibleNames(model.query('parameters')) # full list of pars depar_names = remain(alldepars, not_depars) - self.depars = dict(zip(depar_names, [mspec.flatSpec['pars'][p] for p in depar_names])) + self.depars = dict(list(zip(depar_names, [mspec.flatSpec['pars'][p] for p in depar_names]))) # perform the textual subs for non-tau or inf function calls with > 1 argument raise NotImplementedError("This function is incomplete!") # do something with subsFnDef # work out gam1terms and gam2terms # validate CFG self.prepCFG() - print "Finished preparing CFG information. Call outputCFG(filename) to output .cfg file" + print("Finished preparing CFG information. Call outputCFG(filename) to output .cfg file") def prepCFG(self): """Prepare .cfg file (at least a pre-cursor for later editing by hand)""" # Set remaining bounds to default limits - bd_overlap = intersect(self.bounds.keys(), self.unitbounds) + bd_overlap = intersect(list(self.bounds.keys()), self.unitbounds) if bd_overlap != []: - print bd_overlap + print(bd_overlap) raise ValueError("Clash between variables with explicitly declared" "bounds and those with unit bounds") - for v in remain(self.varsall, self.bounds.keys()+self.unitbounds): + for v in remain(self.varsall, list(self.bounds.keys())+self.unitbounds): self.bounds[v] = [-self._infty_val, self._infty_val] self._CFG['VARSEXT'] = [" ".join(self.varsext)] self._CFG['VARSINT'] = [" ".join(self.varsint)] - self._CFG['INPUTS'] = [ename + " " + " ".join(inlist) for ename, inlist in self.inputs.items()] - self._CFG['BOUNDS'] = [ename + " %f %f"%(bd[0],bd[1]) for ename, bd in self.bounds.items()] + self._CFG['INPUTS'] = [ename + " " + " ".join(inlist) for ename, inlist in list(self.inputs.items())] + self._CFG['BOUNDS'] = [ename + " %f %f"%(bd[0],bd[1]) for ename, bd in list(self.bounds.items())] self._CFG['UNITBOUNDS'] = [" ".join(self.unitbounds)] self._CFG['DEQNS'] = [" ".join(self.deqns)] - self._CFG['CFAC'] = [vname + " " + cname for (vname, cname) in self.cfac.items()] + self._CFG['CFAC'] = [vname + " " + cname for (vname, cname) in list(self.cfac.items())] self._CFG['GAM1TERM'] = [] - for vname, termlists in self.gam1terms.iteritems(): + for vname, termlists in self.gam1terms.items(): self._CFG['GAM1TERM'].extend([vname + " " + " ".join(termlist) for termlist in termlists]) self._CFG['GAM2TERM'] = [] - for vname, termlists in self.gam2terms.iteritems(): + for vname, termlists in self.gam2terms.items(): self._CFG['GAM2TERM'].extend([vname + " " + " ".join(termlist) for termlist in termlists]) - deparnames = self.depars.keys() + deparnames = list(self.depars.keys()) deparnames.sort() self._CFG['DEPAR'] = [] for parname in deparnames: @@ -415,13 +415,13 @@ def prepDEpars(self): updates = {} - for par, parval in self.depars.iteritems(): + for par, parval in self.depars.items(): try: if par[-3:]=="tau": updates[par] = (par+"_recip", 1/parval) except IndexError: pass - for par, (newpar, newval) in updates.iteritems(): + for par, (newpar, newval) in updates.items(): del self.depars[par] self.depars[newpar] = newval @@ -436,14 +436,14 @@ subsFnDef=[] not_depars=[] mfiles = {} - allpars = pardict.keys() - for fname, (fsig, fdef) in auxfndict.iteritems(): + allpars = list(pardict.keys()) + for fname, (fsig, fdef) in auxfndict.items(): if len(fsig) == 1 and fname[-3:] in ['tau', 'inf']: fdefQS = QuantSpec("__fdefQS__", fdef) # fpars are the parameters used in the function -- we fetch # their values and subs them directly into the M file function. fpars = intersect(fdefQS.freeSymbols, allpars) - fpar_defs = dict(zip(fpars,[pardict[p] for p in fpars])) + fpar_defs = dict(list(zip(fpars,[pardict[p] for p in fpars]))) not_depars.extend(remain(fpars, not_depars)) if fname[-3:] == 'tau': fname += "_recip" @@ -457,7 +457,7 @@ subsFnDef.append(fname) # make m files if nofiles==False if makeMfiles: - for fname, finfo in mfiles.iteritems(): + for fname, finfo in mfiles.items(): makeMfileFunction(fname, finfo[0], finfRefactoringTool: Refactored ./PyDSTool/Toolbox/FR.py RefactoringTool: Refactored ./PyDSTool/Toolbox/FSM.py RefactoringTool: No changes to ./PyDSTool/Toolbox/InputProfile.py RefactoringTool: Refactored ./PyDSTool/Toolbox/ModelEst.py o[1]) return subsFnDef, not_depars @@ -481,9 +481,9 @@ except AttributeError: raise TypeError("Invalid DSSRT_info object for plotNetworkGraph") plt.figure() - for v in V.itervalues(): + for v in V.values(): plt.plot([v.pos[0]],[v.pos[1]],'ko') - for elist in E.itervalues(): + for elist in E.values(): for e in elist: plt.plot([e.u.pos[0],e.v.pos[0]], [e.u.pos[1],e.v.pos[1]], --- ./PyDSTool/Toolbox/FR.py (original) +++ ./PyDSTool/Toolbox/FR.py (refactored) @@ -1,7 +1,7 @@ # Fruchterman-Reingold graph drawing algorithm in Python # R. Clewley, November 2005 -from __future__ import division + from numpy import array, alltrue, arange, sign from numpy.linalg import norm import math @@ -60,7 +60,7 @@ def itercool(t, t0, n=30): cooler = cool(t0, tarray) for i in range(n+1): - print t + print(t) t=cooler(t) @@ -75,9 +75,9 @@ def in_degree(V, E): ind = {} - for vn, vv in V.iteritems(): + for vn, vv in V.items(): count = 0 - for vert in V.keys(): + for vert in list(V.keys()): try: es = E[vert] except KeyError: @@ -104,7 +104,7 @@ return k*k/x od = out_degree(V, E) - fixedverts = fixed.values() + fixedverts = list(fixed.values()) # initial temperature t = t0 = max([W[1]-W[0], L[1]-L[0]])/3.5 @@ -115,12 +115,12 @@ for i in range(num_its): # print "t = %.4f"%t # calculate repulsive forces (with weak Gaussian noise) - for vname, v in V.iteritems(): + for vname, v in V.items(): # each vertex has two vectors: .pos and .disp v.disp = array([0., 0.]) if vname in fixed: continue - for uname, u in V.iteritems(): + for uname, u in V.items(): if u != v: D = v.pos - u.pos aD = norm(D) @@ -141,7 +141,7 @@ aD = norm(D) v.disp = v.disp + (D/aD) * fr(aD) \ + array([normal(0, t), normal(0, t)]) - for vname, v in V.iteritems(): + for vname, v in V.items(): # penalize edges from common vertex that are very close to # eachother in angle if od[vname] > 2: @@ -188,7 +188,7 @@ # angles are close enough that use same direction for other vertex angles_sorted[ni].u.disp = angles_sorted[ni].u.disp - c*vd # calculate attractive forces along edges - for vname, elist in E.iteritems(): + for vname, elist in E.items(): if od[vname] > 3: att_scale = 1.75 else: @@ -205,7 +205,7 @@ # limit the maximum displacement to the temperature t # and then prevent vertex being displaced outside frame - for v in V.itervalues(): + for v in V.values(): if v in fixedverts: continue v.pos = v.pos + (v.disp/norm(v.disp)) * min([norm(v.disp), t]) --- ./PyDSTool/Toolbox/FSM.py (original) +++ ./PyDSTool/Toolbox/FSM.py (refactored) @@ -78,7 +78,7 @@ self.value = value def __str__(self): - return `self.value` + return repr(self.value) class FSM(object): @@ -200,9 +200,9 @@ 4. No transition was defined. If we get here then raise an exception. """ - if self.state_transitions.has_key((input_symbol, state)): + if (input_symbol, state) in self.state_transitions: return self.state_transitions[(input_symbol, state)] - elif self.state_transitions_any.has_key (state): + elif state in self.state_transitions_any: return self.state_transitions_any[state] elif self.default_transition is not None: return self.default_transition --- ./PyDSTool/Toolbox/ModelEst.py (original) +++ ./PyDSTool/Toolbox/ModelEst.py (refactored) @@ -60,8 +60,8RefactoringTool: Refactored ./PyDSTool/Toolbox/ModelHelper.py @@ # dict of par -> sensitivity #sens = param_sensitivity(model, self.context, free_pars) - print "Get pre-defined tols from features somehow" - print "Establish parameter estimation class and run it" + print("Get pre-defined tols from features somehow") + print("Establish parameter estimation class and run it") #pest = LMpest(freeParams=free_pars, # testModel=model, # context=self.context, --- ./PyDSTool/Toolbox/ModelHelper.py (original) +++ ./PyDSTool/Toolbox/ModelHelper.py (refactored) @@ -110,60 +110,60 @@ if targetGen not in allODEgens: # Print a list of the valid targets - print 'Valid target ODE solvers: ' + ", ".join(allODEgens) + print('Valid target ODE solvers: ' + ", ".join(allODEgens)) raise ValueError('Invalid target ODE solver') # Empty model spec to be populated with the information in modelDict theModelSpec = SpiffyODEModel(modelName, compatibleGens=allODEgens) if not silent: - print "Building model: '%s'"%modelName + print("Building model: '%s'"%modelName) # Build the ODE RHS, save list of ODEs varnames = [] - if 'odes' in modelDict.keys(): - for odeName, expr in modelDict['odes'].iteritems(): + if 'odes' in list(modelDict.keys()): + for odeName, expr in modelDict['odes'].items(): theModelSpec.add(Var(expr, odeName, specType='RHSfuncSpec')) varnames.append(odeName) if not silent: - print 'Added ODE: ', odeName + print('Added ODE: ', odeName) # Build the aux variables, save list of them auxvarnames = [] - if 'auxs' in modelDict.keys(): - for auxName, expr in modelDict['auxs'].iteritems(): + if 'auxs' in list(modelDict.keys()): + for auxName, expr in modelDict['auxs'].items(): theModelSpec.add(Var(expr, auxName, specType='ExpFuncSpec')) auxvarnames.append(auxName) if not silent: - print 'Added aux variable: ', auxName + print('Added aux variable: ', auxName) # Build the list of RHS specific parameters, save list of them parnames = [] - if 'params' in modelDict.keys(): - for parName, val in modelDict['params'].iteritems(): + if 'params' in list(modelDict.keys()): + for parName, val in modelDict['params'].items(): theModelSpec.add(Par(str(val), parName)) parnames.append(parName) if not silent: - print 'Added parameter: ', parName, "=", val + print('Added parameter: ', parName, "=", val) # Build the inputs, save list of them inputnames = [] inputdict = {} - if 'inputs' in modelDict.keys(): - for inputName, val in modelDict['inputs'].iteritems(): + if 'inputs' in list(modelDict.keys()): + for inputName, val in modelDict['inputs'].items(): theModelSpec.add(Input(str(inputName))) inputnames.append(inputName) #if not silent: # print val.variables.keys() inputdict[inputName] = val.variables[inputName] if not silent: - print 'Added input: ', inputName, "=", val + print('Added input: ', inputName, "=", val) # Build the dict of extra functions, save list of them auxfndict = {} - if 'functions' in modelDict.keys(): - for funSig, expr in modelDict['functions'].iteritems(): + if 'functions' in list(modelDict.keys()): + for funSig, expr in modelDict['functions'].items(): # check syntax; this could be taken care of by Lex-built # syntax checking function assert ')' == funSig[-1] @@ -181,22 +181,22 @@ if name == 'Jacobian_pars': makeJacP = False if not silent: - print 'Added function: ', name, " of arguments: ", args + print('Added function: ', name, " of arguments: RefactoringTool: Refactored ./PyDSTool/Toolbox/NineML.py RefactoringTool: Refactored ./PyDSTool/Toolbox/PRCtools.py ", args) # Make symbolic jacobian if requested if makeJac: - if 'Jacobian' not in modelDict.keys(): + if 'Jacobian' not in list(modelDict.keys()): varnames.sort() dotlist = [modelDict['odes'][x] for x in varnames] F = Fun(dotlist, varnames, 'F') Jac = Fun(Diff(F, varnames), ['t'] + varnames, 'Jacobian') theModelSpec.add(Jac) if not silent: - print "Added jacobian" + print("Added jacobian") if makeJacP: - if 'Jacobian_pars' not in modelDict.keys(): + if 'Jacobian_pars' not in list(modelDict.keys()): varnames.sort() parnames.sort() dotlist = [modelDict['odes'][x] for x in varnames] @@ -204,7 +204,7 @@ JacP = Fun(Diff(G, varnames + parnames), ['t'] + varnames + parnames, 'Jacobian_pars') theModelSpec.add(JacP) if not silent: - print "Added jacobian w.r.t parameters" + print("Added jacobian w.r.t parameters") # Construct the model --- ./PyDSTool/Toolbox/NineML.py (original) +++ ./PyDSTool/Toolbox/NineML.py (refactored) @@ -5,7 +5,7 @@ R. Clewley, 2012 """ -from __future__ import division + from PyDSTool import * from PyDSTool.common import _seq_types, _num_types @@ -57,8 +57,8 @@ # lists pars = [p.name for p in c.parameters] - vars = dyn.state_variables_map.keys() - fns = c.aliases_map.keys() + vars = list(dyn.state_variables_map.keys()) + fns = list(c.aliases_map.keys()) # Turn aliases into function defs: # multiple passes until all dependencies resolved @@ -116,7 +116,7 @@ reg_info_list = [] reg_models = {} - all_reg_names = c.regimes_map.keys() + all_reg_names = list(c.regimes_map.keys()) num_regs = len(c.regimes_map) if num_regs > 1: is_hybrid = True @@ -125,7 +125,7 @@ # This is the default value, updated to True if there are any # state assignments for events (even for only one regime) # r is a singleton regime - r = c.regimes.next() + r = next(c.regimes) for e in r.on_conditions: for s in e.state_assignments: is_hybrid = True @@ -268,14 +268,14 @@ reg_MI = intModelInterface(reg_model) reg_info_list.append(makeModelInfoEntry(reg_MI, all_reg_names, - epmaps.values())) + list(epmaps.values()))) if is_hybrid: # build MIs, map events, etc. the_model = Model.HybridModel({'name': model_name, 'modelInfo': makeModelInfo(reg_info_list)}) else: - the_model = reg_models.values()[0] + the_model = list(reg_models.values())[0] return the_model --- ./PyDSTool/Toolbox/PRCtools.py (original) +++ ./PyDSTool/Toolbox/PRCtools.py (refactored) @@ -52,9 +52,9 @@ t_check = 10000*np.ones((tries,),float) norm_check = 10000*np.ones((tries,),float) T = np.zeros((tries,),float) - look_range = range(1, min((tries+1, len(evts)))) - if verbose: - print "\n Tries: ", tries, "\n" + look_range = list(range(1, min((tries+1, len(evts))))) + if verbose: + print("\n Tries: ", tries, "\n") for lookback in look_range: try: d_evts = [evts[i]-evts[i-lookback] for i in \ @@ -73,8 +73,8 @@ ix1 = min((t_ix, n_ix)) ix2 = max((t_ix, n_ix)) if verbose: - print t_check, norm_check, T - print ix1, ix2 + print(t_check, norm_check, T) + print(ix1, ix2) if t_check[ix1] < ev_t_tol and norm_check[ix1] < ev_norm_tol: success = True T_final = T[ix1] @@ -101,8 +101,8 @@ model.set(algparams={'poly_interp': old_interp_setting}) return ref_traj, ref_pts, T_final else: - print "norm check was", norm_check - print "t check wRefactoringTool: Refactored ./PyDSTool/Toolbox/ParamEst.py as", t_check + print("norm check was", norm_check) + print("t check was", t_check) raise RuntimeError("Failure to converge after 80 iterations") @@ -143,7 +143,7 @@ model = embed(model) if keep_trajs: tag_pts = True - print "Note: model object will be stored in PRC attribute _model" + print("Note: model object will be stored in PRC attribute _model") try: all_pts = ref_traj_period.sample() ref_pts = all_pts[::skip] @@ -167,14 +167,14 @@ PRCvals = [] t_off = 0 if verbose: - print "Period T =", T + print("Period T =", T) for i, t0 in enumerate(ref_ts): if t0 > stop_at_t: break ic = do_pert(model, ref_pts[i], pertcoord, pertsize, t0) if verbose: - print i, "of", len(ref_ts), ": t0 = ", t0, "of", T, " t_end", settle*T+t0 - print " ", ic + print(i, "of", len(ref_ts), ": t0 = ", t0, "of", T, " t_end", settle*T+t0) + print(" ", ic) model.set(ics=ic.copy(), tdata=[0, (settle+1)*T+t0]) if keep_trajs: model.compute(trajname='pert_%i'%i, force=True) @@ -183,7 +183,7 @@ model.compute(trajname='pert', force=True) evts = model.getTrajEventTimes('pert', evname) if verbose: - print " Last event:", evts[-1] + print(" Last event:", evts[-1]) if i == 0: # make sure to always use the same event number evnum = max(0,len(evts)-2) @@ -195,7 +195,7 @@ m = np.argmin(abs(PRCvals[-1] - test_vals)) val = test_vals[m] if verbose and abs(PRCvals[-1] - val) > 0.05: - print "\nCorrected value", i, PRCvals, val + print("\nCorrected value", i, PRCvals, val) else: # i = 0. Check that value is adjusted to be closest to zero, # given that we assume the minimum will be at the beginning of the run. @@ -236,7 +236,7 @@ PRC_val = -np.mod(evts[-1]+t0, T)/T if abs(PRC_val) > 0.5: PRC_val += 1 - print "t0 = %.6f, PRC value = %f" % (t0, PRC_val) + print("t0 = %.6f, PRC value = %f" % (t0, PRC_val)) if fignum is not None: figure(fignum) --- ./PyDSTool/Toolbox/ParamEst.py (original) +++ ./PyDSTool/Toolbox/ParamEst.py (refactored) @@ -3,7 +3,7 @@ Robert Clewley. """ -from __future__ import division + # PyDSTool imports from PyDSTool.Points import Point, Pointset @@ -104,19 +104,19 @@ orig_dirn corresponds to direction of positive dirn, in case when re-calculating gradient the sign flips""" record = {} - print "Recalculating gradient" + print("Recalculating gradient") grad = fun.gradient(p) neut = np.array([grad[1], -grad[0]]) neut = neut/norm(neut) if np.sign(dot(neut, orig_dirn)) != 1: - print "(neut was flipped for consistency with direction)" + print("(neut was flipped for consistency with direction)") neut = -neut - print "Neutral direction:", neut + print("Neutral direction:", neut) record['grad'] = grad record['neut'] = neut residuals = [] # inner loop - assumes curvature will be low (no adaptive step size) - print "\n****** INNER LOOP" + print("\n****** INNER LOOP") new_pars = copy(p) i = 0 while True: @@ -133,11 +133,11 @@ r = (copy(new_pars), res) residuals.append(r) all_records[i0+dirn*i] = r - num_dirn_steps = len([k for k in all_records.keys() if \ + num_dirn_steps = len([k for k in list(all_records.keys()) if \ k*dirn >= abs(i0)]) i += 1 - print len(all_records), "total steps taken, ", num_dirn_steps, \ - "in since grad re-calc: pars =", new_pars, " res=", res + print(len(all_records), "total steps taken, ", num_dirn_steps, \ + "in since grad re-calc: pars =", new_pars, " res=", res) else: # re-calc gradient break @@ -159,7 +159,7 @@ space, given by dirn = +1/-1 from point p0. maxsteps is *per* direction""" - print "\nStarting direction:", dirn + print("\nStarting direction:", dirn) dirn_rec = [] p = p0 if dirn == 1: @@ -170,7 +170,7 @@ i = -1 done = False while not done: - print "Steps from i =", i + print("Steps from i =", i) r = do_step(fun, p, dirn, maxsteps, stepsize, atol, i, orig_res, orig_dirn, all_records) if r['n'] == 0: @@ -227,16 +227,16 @@ raise except: exceptionType, exceptionValue, exceptionTraceback = sys.exc_info() - print "******************************************" - print "Problem evaluating residual function" - print " ", exceptionType, exceptionValue + print("******************************************") + print("Problem evaluating residual function") + print(" ", exceptionType, exceptionValue) for line in traceback.format_exc().splitlines()[-4:-1]: - print " " + line - print " originally on line:", traceback.tb_lineno(exceptionTraceback) + print(" " + line) + print(" originally on line:", traceback.tb_lineno(exceptionTraceback)) if self.pest.verbose_level > 1: raise else: - print "(Proceeding with penalty values)\n" + print("(Proceeding with penalty values)\n") return 10*ones(pest.context.res_len) class residual_fn_context_1D(helpers.ForwardFiniteDifferencesCache): @@ -251,16 +251,16 @@ raise except: exceptionType, exceptionValue, exceptionTraceback = sys.exc_info() - print "******************************************" - print "Problem evaluating residual function" - print " ", exceptionType, exceptionValue + print("******************************************") + print("Problem evaluating residual function") + print(" ", exceptionType, exceptionValue) for line in traceback.format_exc().splitlines()[-4:-1]: - print " " + line - print " originally on line:", traceback.tb_lineno(exceptionTraceback) + print(" " + line) + print(" originally on line:", traceback.tb_lineno(exceptionTraceback)) if self.pest.verbose_level > 1: raise else: - print "(Proceeding with penalty value)\n" + print("(Proceeding with penalty value)\n") return 100 @@ -272,9 +272,9 @@ def grad_from_psens(psens, pest): pd2a = pest.pars_dict_to_array pd = {} - for pname, fsens_dict in psens.items(): + for pname, fsens_dict in list(psens.items()): res_list = [] - for feat, sens_array in fsens_dict.items(): + for feat, sens_array in list(fsens_dict.items()): res_list.extend(list(sens_array)) pd[pname] = sum() return pd2a(pd) @@ -303,8 +303,8 @@ incr = [] decr = [] neut = [] - for mi, fdict in feat_sens[parname].iteritems(): - for f, sens in fdict.iteritems(): + for mi, fdict in feat_sens[parname].items(): + for f, sens in fdict.items(): sum_sens = sum(sens) sign_ss = np.sign(sum_sens) abs_ss = abs(sum_sens) @@ -336,7 +336,7 @@ incr = [] decr = [] neut = [] - for pname, fdict in feat_sens.iteritems(): + for pname, fdict in feat_sens.items(): sens = fdict[mi][feat] sum_sens = sum(sens) sign_ss = np.sign(sum_sens) @@ -408,15 +408,15 @@ seen[x] = (s, f) else: seen[x] = (s, f) - Lu = [(x,pair[0], pair[1]) for x, pair in seen.items()] + Lu = [(x,pair[0], pair[1]) for x, pair in list(seen.items())] return sorted(Lu, reverse=True, key=operator.itemgetter(1)) def pp(l): """List pretty printer""" - print "[", + print("[", end=' ') for x in l: - print x, "," - print "]" + print(x, ",") + print("]") # --------------------------------- @@ -433,16 +433,16 @@ try: solver = solver_lookup[method] except KeyError: - print "Specified solver not found. Will try recursive backtracking solver" + print("Specified solver not found. Will try recursive backtracking solver") solver = RecursiveBacktrackingSolver try: problem = Problem(solver(forwardCheck)) except TypeError: - print "Install constraint package from http://labix.org/python-constraint" + print("Install constraint package from http://labix.org/python-constraint") raise ImportError("Must have constraint package installed to use this feature") global D, feat_name_lookup, pars, par_deltas par_deltas = deltas - pars = feat_sens.keys() + pars = list(feat_sens.keys()) pars.sort() num_pars = len(pars) assert len(par_deltas) == num_pars @@ -451,8 +451,8 @@ max_val = 0 for par in pars: - for mi, fdict in feat_sens[par].iteritems(): - for f, ra in fdict.iteritems(): + for mi, fdict in feat_sens[par].items(): + for f, ra in fdict.items(): val = sum(ra) if norm(val) > max_val: max_val = val @@ -465,11 +465,11 @@ problem.addVariables(pars, values) feat_name_lookup = {} - for f in D.keys(): + for f in list(D.keys()): feat_name_lookup[f.name] = f constraint_funcs = [] - for f in D.keys(): + for f in list(D.keys()): if f in desired_feats: op = 'operator.le' this_tol = neg_tol @@ -484,13 +484,13 @@ if verbose: code += " print sum(prods)\n" code += " return %s(sum(prods), %f)\n"%(op,this_tol) - exec code + exec(code) constraint_funcs.append(locals()['D'+f.name]) for func in constraint_funcs: problem.addConstraint(FunctionConstraint(func), pars) - print "Use problem.getSolution() to find a solution" + print("Use problem.getSolution() to find a solution") return problem, D @@ -500,16 +500,16 @@ For unweighted feature sensitivities, or else it unweights weighted ones.""" D_n = {} - for feat, pD in D_sum.items(): - pD_min_abs = min(abs(array(pD.values()))) + for feat, pD in list(D_sum.items()): + pD_min_abs = min(abs(array(list(pD.values())))) D_n[feat] = {} - for pname, pD_val in pD.items(): + for pname, pD_val in list(pD.items()): D_n[feat][pname] = pD_val/pD_min_abs return D_n def filter_iface(psens, iface): ws = {} - for parname, wdict in psens.items(): + for parname, wdict in list(psens.items()): ws[parname] = {iface: wdict[iface]} return ws @@ -518,7 +518,7 @@ # between related MIs if discrete_feats is None: discrete_feats = [] - pars = feat_sens.keys() + pars = list(feat_sens.keys()) pars.sort() D_sum = {} @@ -526,8 +526,8 @@ max_val = 0 for par in pars: - for mi, fdict in feat_sens[par].iteritems(): - for f, ra in fdict.iteritems(): + for mi, fdict in feat_sens[par].items(): + for f, ra in fdict.items(): val = sum(ra) if norm(val) > max_val: max_val = val @@ -592,7 +592,7 @@ parseps = {}.fromkeys(parnames, 1e-7) if parscales is None: parscales = parseps.copy() - for k, v in parscales.iteritems(): + for k, v in parscales.items(): parscales[k] = 10*v pest = ParamEst(freeParams=freepars, testModel=model, @@ -727,7 +727,7 @@ self.parScales = dict.fromkeys(self.freeParNames, 1) else: self.parScales = kw['freeParams'] - self.freeParNames = self.parScales.keys() + self.freeParNames = list(self.parScales.keys()) self.numFreePars = len(self.freeParNames) self.freeParNames.sort() self.testModel = kw['testModel'] @@ -781,7 +781,7 @@ def resetParArgs(self): self.parTypeStr = [] - for i in xrange(self.numFreePars): + for i in range(self.numFreePars): if self.freeParNames[i] in self.testModel.obsvars: # for varying initial conditions self.parTypeStr.append('ics') @@ -889,16 +889,16 @@ entry = self.log[i] except IndexError: raise ValueError("No such call %i recorded"%i) - print "\n **** Call %i"%i, "Residual norm: %f"%entry.residual_norm + print("\n **** Call %i"%i, "Residual norm: %f"%entry.residual_norm) if entry.ics != {}: - print "Ics:", entry.ics + print("Ics:", entry.ics) if entry.pars != {}: - print "Pars:", entry.pars + print("Pars:", entry.pars) if full: - print "Res:\n" + print("Res:\n") self.context.show_res_info(entry.residual_vec) else: - print "Res:", entry.residual_vec + print("Res:", entry.residual_vec) def pars_to_ixs(self): all_pars = sortedDictKeys(self.testModel.pars) @@ -907,7 +907,7 @@ return inv_ixs def pars_array_to_dict(self, parray): - return dict(zip(self.freeParNames, parray)) + return dict(list(zip(self.freeParNames, parray))) def pars_dict_to_array(self, pdict): return array(sortedDictValues(filteredDict(pdict, self.freeParNames))) @@ -982,11 +982,11 @@ """ ws = self.context.feat_weights wfeat_sens = {} - for pn, sensdict in feat_sens.iteritems(): + for pn, sensdict in feat_sens.items(): pd = wfeat_sens[pn] = {} - for mi, fdict in sensdict.iteritems(): + for mi, fdict in sensdict.items(): md = pd[mi] = {} - for f, sens in fdict.iteritems(): + for f, sens in fdict.items(): md[f] = sens*ws[(mi,f)] return wfeat_sens @@ -1070,7 +1070,7 @@ parsOrig = [] self.numFreePars = len(self.freeParNames) self.resetParArgs() - for i in xrange(self.numFreePars): + for i in range(self.numFreePars): val = self.testModel.query(self.parTypeStr[i])\ [self.freeParNames[i]] self.parsOrig[self.freeParNames[i]] = val @@ -1111,8 +1111,8 @@ if not verbose: out = rout.stop() err = rerr.stop() - print "Calculating residual failed for pars:", \ - parsOrig + print("Calculating residual failed for pars:", \ + parsOrig) raise if not verbose: out = rout.stop() @@ -1130,10 +1130,10 @@ alg_results['message'] = results[3] self.pestResult = {'success': success, 'cov': results[1], - 'pars_sol': dict(zip(self.freeParNames, - res_par_list)), - 'pars_orig': dict(zip(self.freeParNames, - orig_par_list)), + 'pars_sol': dict(list(zip(self.freeParNames, + res_par_list))), + 'pars_orig': dict(list(zip(self.freeParNames, + orig_par_list))), 'alg_results': alg_results, 'sys_sol': self.testModel } @@ -1144,20 +1144,20 @@ # because it converged. if success or results[3].find('at most') != -1: if success: - print 'Solution of ', self.freeParNames, ' = ', results[0] + print('Solution of ', self.freeParNames, ' = ', results[0]) else: ## parvals = [self.testModel.pars[p] for p in \ ## self.freeParNames] - print 'Closest values of ', self.freeParNames, ' = ', \ - results[0] + print('Closest values of ', self.freeParNames, ' = ', \ + results[0]) ## parvals - print 'Original values = ', parsOrig - print 'Number of fn evals = ', results[2]["nfev"], \ - '(# iterations)' + print('Original values = ', parsOrig) + print('Number of fn evals = ', results[2]["nfev"], \ + '(# iterations)') if not success: - print 'Solution not found: '+results[3] + print('Solution not found: '+results[3]) else: - print 'Solution not found: '+results[3] + print('Solution not found: '+results[3]) return copy(self.pestResult) @@ -1294,13 +1294,13 @@ if verbose: if success: - print 'Solution of ', self.freeParNames[0], ' = ', results[0] - print 'Original value = ', parsOrig - print 'Number of fn evals = ', results[3], "(# iterations)" - print 'Error tolerance = ', xtol + print('Solution of ', self.freeParNames[0], ' = ', results[0]) + print('Original value = ', parsOrig) + print('Number of fn evals = ', results[3], "(# iterations)") + print('Error tolerance = ', xtol) else: - print 'No convergence of BoundMin' - print results + print('No convergence of BoundMin') + print(results) return copy(self.pestResult) @@ -1335,7 +1335,7 @@ s = zeros(shape(x), 'float') else: raise ValueError("Use default = 0 or 1 only") - for i in xrange(len(x)-lookahead): + for i in range(len(x)-lookahead): s[i,:] = [max(prec,val) for val in \ ravel((x[i+lookahead,:]-x[i,:]).toarray())] return s @@ -1405,7 +1405,7 @@ ival_ml = max([0, ival - lookahead]) ival_pl = min([max_ix, ival + lookahead]) if verbose: - print "*********** t =", tval, " , ival =", ival + print("*********** t =", tval, " , ival =", ival) v = slopes.coordarray[:,ival] for ci, c in enumerate(coords): for m in [0,1]: @@ -1421,7 +1421,7 @@ if tval>(last_t[c][1-m]+halfper-detect_tol): detect_on[ci][m] = True if verbose: - print " + %s detect (>half per of %s) for %s now True:"%(ms[m],ms[1-m],c), last_t[c][1-m], last_t[c][1-m]+halfper-detect_tol + print(" + %s detect (>half per of %s) for %s now True:"%(ms[m],ms[1-m],c), last_t[c][1-m], last_t[c][1-m]+halfper-detect_tol) # The next segment allows consecutive local extrema of the # same type without an intermediate of the other type. # This is generally not desirable! @@ -1438,8 +1438,8 @@ ## print " + %s detect (>half per) for %s now True:"%(ms[1-m],c), last_t[c][1-m], last_t[c][m]+halfper-detect_tol do_anything = detect_on[ci][0] or detect_on[ci][1] if verbose: - print "Detecting for %s? (min=%i) (max=%i)"%(c, int(detect_on[ci][0]), int(detect_on[ci][1])) - print " v[ci] = %.4f, last_inc[ci] = %.4f"%(v[ci], last_inc[ci]) + print("Detecting for %s? (min=%i) (max=%i)"%(c, int(detect_on[ci][0]), int(detect_on[ci][1]))) + print(" v[ci] = %.4f, last_inc[ci] = %.4f"%(v[ci], last_inc[ci])) if do_anything and v[ci] != last_inc[ci]: # extremum if changed sign if v[ci]>0: @@ -1447,8 +1447,8 @@ if detect_on[ci][0]: min_ival = argmin(x[c][ival:ival_pl])+ival if verbose: - print "Possible min:" - print x[c][max([0,min_ival-lookahead])], x[c][min_ival], x[c][min([max_ix,min_ival+lookahead])] + print("Possible min:") + print(x[c][max([0,min_ival-lookahead])], x[c][min_ival], x[c][min([max_ix,min_ival+lookahead])]) if x[c][min([max_ix,min_ival+lookahead])] - x[c][min_ival] > lookahead_tol and \ x[c][max([0,min_ival-lookahead])] - x[c][min_ival] > lookahead_tol: if do_fit: @@ -1463,7 +1463,7 @@ min_tval = x['t'][min_ival] min_xval = x[c][min_ival] if verbose: - print "found min for %s at "%c, min_tval + print("found min for %s at "%c, min_tval) mins_t[c].append(min_tval) mins_v[c].append(min_xval) last_t[c][0]=min_tval @@ -1477,8 +1477,8 @@ if detect_on[ci][1]: max_ival = argmax(x[c][ival:ival_pl])+ival if verbose: - print "Possible max:" - print x[c][max([0,max_ival-lookahead])], x[c][max_ival], x[c][min([max_ix,max_ival+lookahead])] + print("Possible max:") + print(x[c][max([0,max_ival-lookahead])], x[c][max_ival], x[c][min([max_ix,max_ival+lookahead])]) if x[c][max_ival] - x[c][min([max_ix,max_ival+lookahead])] > lookahead_tol and \ x[c][max_ival] - x[c][max([0,max_ival-lookahead])] > lookahead_tol: if do_fit: @@ -1493,7 +1493,7 @@ max_tval = x['t'][max_ival] max_xval = x[c][max_ival] if verbose: - print "found max for %s at "%c, max_tval + print("found max for %s at "%c, max_tval) maxs_t[c].append(max_tval) maxs_v[c].append(max_xval) last_t[c][1]=max_tval @@ -1550,7 +1550,7 @@ if tval < tmin or tval > tmax: continue if verbose: - print "******* t = ", tval + print("******* t = ", tval) for ci, c in enumerate(coords): for m in [0,1]: if not detect_on[ci][m]: @@ -1559,7 +1559,7 @@ if tval>(last_t[c][1-m]+halfper-detect_tol): detect_on[ci][m] = True if verbose: - print " + %s detect (>half per of %s) for %s now True:"%(ms[m],ms[1-m],c), last_t[c][1-m], last_t[c][1-m]+halfper-detect_tol + print(" + %s detect (>half per of %s) for %s now True:"%(ms[m],ms[1-m],c), last_t[c][1-m], last_t[c][1-m]+halfper-detect_tol) # The next segment allows consecutive local extrema of the # same type without an intermediate of the other type. # This is generally not desirable! @@ -1573,13 +1573,13 @@ ## print " + %s detect (>half per) for %s now True:"%(ms[1-m],c), last_t[c][m], last_t[c][m]+halfper-detect_tol do_anything = detect_on[coord_ix][0] or detect_on[coord_ix][1] if verbose: - print "Detecting for %s? (min=%i) (max=%i)"%(c, int(detect_on[ci][0]), int(detect_on[ci][1])) + print("Detecting for %s? (min=%i) (max=%i)"%(c, int(detect_on[cRefactoringTool: Refactored ./PyDSTool/Toolbox/PySCes_SBML.py i][0]), int(detect_on[ci][1]))) if do_anything: if ex_type == 'min': if detect_on[coord_ix][0]: min_tval = tval if verbose: - print "... found min for %s at "%coord, min_tval + print("... found min for %s at "%coord, min_tval) mins_t[coord].append(min_tval) mins_v[coord].append(evdict['min_ev_'+coord][ei][coord]) last_t[coord][0]=min_tval @@ -1590,7 +1590,7 @@ if detect_on[coord_ix][1]: max_tval = tval if verbose: - print "... found max for %s at "%coord, max_tval + print("... found max for %s at "%coord, max_tval) maxs_t[coord].append(max_tval) maxs_v[coord].append(evdict['max_ev_'+coord][ei][coord]) last_t[coord][1]=max_tval @@ -1611,11 +1611,11 @@ num_mins = [min([len(test_mins_t[c]), len(data_mins_t[c])]) for c in coords] num_maxs = [min([len(test_maxs_t[c]), len(data_maxs_t[c])]) for c in coords] except TypeError: - print "Problem with mins and maxs in coords %s in generator %s"%(str(coords),gen.name) - print "Number of events found =", len(gen.getEvents()) - print per, pertolfrac, tdetect - print type(test_mins_t), type(test_maxs_t) - print type(data_mins_t), type(data_maxs_t) + print("Problem with mins and maxs in coords %s in generator %s"%(str(coords),gen.name)) + print("Number of events found =", len(gen.getEvents())) + print(per, pertolfrac, tdetect) + print(type(test_mins_t), type(test_maxs_t)) + print(type(data_mins_t), type(data_maxs_t)) raise res_mins_t = [] res_maxs_t = [] @@ -1624,8 +1624,8 @@ for ci,c in enumerate(coords): nmin = num_mins[ci] if len(data_mins_t[c]) != num_expected_mins or len(test_mins_t[c]) < num_expected_mins: - print "Wrong number of minima for %s (expected %i)"%(c, num_expected_mins) - print data_mins_t[c], test_mins_t[c] + print("Wrong number of minima for %s (expected %i)"%(c, num_expected_mins)) + print(data_mins_t[c], test_mins_t[c]) raise RuntimeError("Wrong number of minima") # assume 0:num_expected is good t1 = array(data_mins_t[c])-array(test_mins_t[c])[:num_expected_mins] @@ -1635,8 +1635,8 @@ # max nmax = num_maxs[ci] if len(data_maxs_t[c]) != num_expected_maxs or len(test_maxs_t[c]) < num_expected_maxs: - print "Wrong number of maxima for %s (expected %i)"%(c, num_expected_maxs) - print data_maxs_t[c], test_maxs_t[c] + print("Wrong number of maxima for %s (expected %i)"%(c, num_expected_maxs)) + print(data_maxs_t[c], test_maxs_t[c]) raise RuntimeError("Wrong number of maxima") # assume 0:num_expected is good t1 = array(data_maxs_t[c])-array(test_maxs_t[c])[:num_expected_maxs] --- ./PyDSTool/Toolbox/PySCes_SBML.py (original) +++ ./PyDSTool/Toolbox/PySCes_SBML.py (refactored) @@ -5,7 +5,7 @@ R. Clewley, 2012 """ -from __future__ import division + from PyDSTool import Generator from PyDSTool.common import args, remain @@ -82,11 +82,11 @@ max_t = np.Inf parlist = m.__fixed_species__ + m.__parameters__ - pardict = dict([(pname, p['initial']) for pname, p in m.__pDict__.items()]) + pardict = dict([(pname, p['initial']) for pname, p in list(m.__pDict__.items())]) varlist = m.__species__ # list ['s0', 's1', 's2'] - icdict = dict([(vname, v['initial']) for vname, v in m.__sDict__.items() if not v['fixed']]) - fixed_species = dict([(pname, p['initial']) for pname, p in m.__sDict__.items() if p['fixed']]) + icdict = dict([(vname, v['initial']) for vname, v in list(m.__sDict__.items()) if not v['fixed']]) + fixeRefactoringTool: No changes to ./PyDSTool/Toolbox/__init__.py RefactoringTool: Refactored ./PyDSTool/Toolbox/adjointPRC.py RefactoringTool: Refactored ./PyDSTool/Toolbox/data_analysis.py d_species = dict([(pname, p['initial']) for pname, p in list(m.__sDict__.items()) if p['fixed']]) pardict.update(fixed_species) fnspecs = {} @@ -104,7 +104,7 @@ varspecs = make_varspecs(m, fnspecs) - for fname, fspec in m.__userfuncs__.items(): + for fname, fspec in list(m.__userfuncs__.items()): # Don't know how these are implemented yet fnspec[fname] = fspec --- ./PyDSTool/Toolbox/adjointPRC.py (original) +++ ./PyDSTool/Toolbox/adjointPRC.py (refactored) @@ -31,7 +31,7 @@ try: MDCont = ContClass(model) except: - print "Problem with model argument" + print("Problem with model argument") raise # If given an LC, use it for continuation @@ -52,10 +52,10 @@ PCargs.verbosity = 2 MDCont.newCurve(PCargs) - print 'Computing curve...' + print('Computing curve...') start = clock() MDCont['EQ1'].forward() - print 'done in %.3f seconds!' % (clock()-start) + print('done in %.3f seconds!' % (clock()-start)) #PCargs.name = 'LC1' #PCargs.type = 'LC-C' @@ -137,13 +137,13 @@ MDCont['LC1'].forward() pt = MDCont['LC1'].getSpecialPoint('RG1') if verbosity > 1: - print "\nRegular point chosen:", pt, "\n" + print("\nRegular point chosen:", pt, "\n") J = getFlowJac(pt, verbose=verbosity>1) # n = dimension of system n = J.shape[0] if verbosity > 1: - print "Computing flow maps..." + print("Computing flow maps...") maps, ntst = getFlowMaps(n, pt, 'RG', method=method) cycle_true = pt.labels['RG']['cycle'] @@ -158,8 +158,8 @@ cycle_true[idxs]]) if verbosity > 1: - print "Computing left eigenvetors corresponding to the unit ", \ - "eigenvalue along flow" + print("Computing left eigenvetors corresponding to the unit ", \ + "eigenvalue along flow") evec1 = getLeftEvecs(n, ntst, maps, flow_vecs, method=method, verbose=verbosity>1) t = cycle_true['t'][idxs] @@ -180,9 +180,9 @@ PRC = rotate_phase(PRC, phase0_ix) phase0_t = PRC['t'][phase0_ix]*t[-1] if verbosity > 1: - print "spike_est_ix =", spike_est_ix - print "phase0_ix =", phase0_ix - print "phase0_t =", phase0_t + print("spike_est_ix =", spike_est_ix) + print("phase0_ix =", phase0_ix) + print("phase0_t =", phase0_t) # PRC pointset used a uniform sampling of # cycle's time mesh points, so get ix in cycle by # multiplying up phase0_ix by the sampling rate @@ -220,7 +220,7 @@ saveObjects(objlist=save_objs, filename=savefile, force=force) except ValueError: - print "File already exists -- not saving return objects" + print("File already exists -- not saving return objects") return_objs = save_objs return_objs['PyCont'] = MDCont --- ./PyDSTool/Toolbox/data_analysis.py (original) +++ ./PyDSTool/Toolbox/data_analysis.py (refactored) @@ -4,7 +4,7 @@ Robert Clewley, August 2006 """ -from __future__ import division + from PyDSTool.Points import Point, Pointset from PyDSTool.Interval import Interval from PyDSTool.utils import intersect, filteredDict @@ -86,8 +86,7 @@ #x must be bigger than edge if x.size < edge: - raise ValueError, \ - "Input vector needs to be bigger than 3 * max(len(a),len(b)." + raise ValueError("Input vector needs to be bigger than 3 * max(len(a),len(b).") if len(a) < ntaps: a=r_[a,zeros(len(b)-len(a))] @@ -132,8 +131,8 @@ if type(refpt) != int: refpt = refpt[0] pca[refpt] = doPCA(nhd(data, covering, refpt), tol) - print "PCA eigenvalues for nhd #%i:"%refpt - print pca[refpt].d + print("PCA eigenvalues for nhd #%i:"%refpt) + print(pca[refpt].d) return len(pca[refpt].d) @@ -156,7 +155,7 @@ spec[i] = norm(p.d[:i]) res = transpose(sqrt(spec[-1]**2-spec**2)/spec[-1])[0] if not silent: - print "L2-norm of PCA spectrum =", spec[-1] + print("L2-norm of PCA spectrum =", spec[-1]) if newfig: figure() style='k'+marker @@ -197,7 +196,7 @@ assert sampleix >= 0 d = zeros((npts-1,), 'd') if rank(m) == 3: - for i in xrange(npts): + for i in range(npts): if sampleix != i: try: d[i] = norm(m[sampleix,:,:]-m[i,:,:]) @@ -206,7 +205,7 @@ # so use the empty i=pix position (ordering doesn't matter) d[sampleix] = norm(m[sampleix,:,:]-m[i,:,:]) elif rank(m) == 2: - for i in xrange(npts): + for i in range(npts): if sampleix != i: try: d[i] = norm(m[sampleix,:]-m[i,:]) @@ -225,11 +224,11 @@ # just sort d.sort() if not quiet: - print "Chose reference point %i"%sampleix - print "Min distance = %f, max distance = %f"%(d[0], d[-1]) + print("Chose reference point %i"%sampleix) + print("Min distance = %f, max distance = %f"%(d[0], d[-1])) logd = log(d).ravel() if logv is None: - logv = log(range(1,len(d)+1)) + logv = log(list(range(1,len(d)+1))) nan_ixs = isfinite(logd) # mask, not a list of indices logd = extract(nan_ixs, logd) logv = extract(nan_ixs, logv) @@ -268,7 +267,7 @@ # but offset second stage indices in dk so there's a total of n-1 # this is basically a slightly unrolled loop to make it a little faster if rank(m) == 3: - for i in xrange(sampleix): + for i in range(sampleix): dk[i] = norm(m[sampleix,:,:]-m[i,:,:]) if dk[i] in d_inv: # ensure we find a unique distance for dictionary key @@ -294,7 +293,7 @@ d_inv[u[0]] = i else: d_inv[dk[i]] = i - for i in xrange(sampleix+1, npts): + for i in range(sampleix+1, npts): ki = i-1 dk[ki] = norm(m[sampleix,:,:]-m[i,:,:]) if dk[ki] in d_inv: @@ -322,7 +321,7 @@ else: d_inv[dk[ki]] = i elif rank(m) == 2: - for i in xrange(sampleix): + for i in range(sampleix): dk[i] = norm(m[sampleix,:]-m[i,:]) if dk[i] in d_inv: # ensure we find a unique distance for dictionary key @@ -348,7 +347,7 @@ d_inv[u[0]] = i else: d_inv[dk[i]] = i - for i in xrange(sampleix+1, npts): + for i in range(sampleix+1, npts): ki = i-1 dk[ki] = norm(m[sampleix,:]-m[i,:]) if dk[ki] in d_inv: @@ -389,7 +388,7 @@ d.sort() logd = log(d).ravel() if logv is None: - logv = log(range(1,len(d)+1)) + logv = log(list(range(1,len(d)+1))) nan_ixs = isfinite(logd) # mask, not a list of indices logd = extract(nan_ixs, logd) logv = extract(nan_ixs, logv) @@ -463,7 +462,7 @@ else: raise ValueError("Invalid low and high fit limits") if not quiet: - print "lo ix %d, hi ix %d, max ix %d"%(loix, hiix, lendat-1) + print("lo ix %d, hi ix %d, max ix %d"%(loix, hiix, lendat-1)) pfit = polyfit(x[loix:hiix],y[loix:hiix],1) # print pfit if doplot: @@ -499,7 +498,7 @@ self.num_bins = len(bin_ords)-1 assert self.num_bins > 0, "Must be more than 2 ordinates to define bins" self.bin_ords = array(bin_ords) - self.bins = dict(zip(range(self.num_bins),[0]*self.num_bins)) + self.bins = dict(list(zip(list(range(self.num_bins)),[0]*self.num_bins))) self.coordinate = coordinate self.tolerance = tolerance self.intervals = [Interval('bin_%s'%i, float, @@ -507,7 +506,7 @@ abseps=tolerance) for i in range(self.num_bins)] self.midpoints = (self.bin_ords[1:]+self.bin_ords[:-1])/2. if valuedict is not None: - for RefactoringTool: Refactored ./PyDSTool/Toolbox/dssrt.py k, v in valuedict.iteritems(): + for k, v in valuedict.items(): self[self.resolve_bin_index(k)] = v def resolve_bin_index(self, ordinate): @@ -576,7 +575,7 @@ def clear(self): """Reset all bins to have zero contents.""" - self.bins = dict(zip(range(self.num_bins),[0]*self.num_bins)) + self.bins = dict(list(zip(list(range(self.num_bins)),[0]*self.num_bins))) def __str__(self): return "Binned data with intervals %s:\n By bin number: %s"%(str([i.get() \ @@ -586,8 +585,8 @@ def to_pointset(self): """Convert to a pointset""" - bin_ixs = xrange(self.num_bins) - return Pointset(indepvararray=range(self.num_bins), + bin_ixs = range(self.num_bins) + return Pointset(indepvararray=list(range(self.num_bins)), coorddict={self.coordinate: [self.bins[ix] \ for ix in bin_ixs], 'bin_limit_lo': [self.intervals[ix][0] \ @@ -635,11 +634,11 @@ nearby = [] refpt = data[refix] if include_ref: - for i in xrange(size(data,0)): + for i in range(size(data,0)): if norm(refpt-data[i], which_norm) <= r: nearby.append(i) else: - for i in xrange(size(data,0)): + for i in range(size(data,0)): if i != refix: if norm(refpt-data[i], which_norm) <= r: nearby.append(i) @@ -651,7 +650,7 @@ """ assert rlo > 0 and rhi > rlo nearby = [] - for i in xrange(size(data,0)): + for i in range(size(data,0)): if i != refix: d = norm(data[refix]-data[i], which_norm) if d > rlo and d < rhi: @@ -834,11 +833,11 @@ except ZeroDivisionError: frac = Inf if verbose: - print i, data[i], frac + print(i, data[i], frac) if frac > tol and frac < Inf: knee_ixs.append((i,frac)) if verbose: - print "High second derivatives at: ", knee_ixs, "\n" + print("High second derivatives at: ", knee_ixs, "\n") knees = [] found = False # in a contiguous segment of high second derivatives curr_kixs = [] @@ -847,7 +846,7 @@ process = False kix, frac = knee_ixs[i] if verbose: - print "Processing knee at index", kix + print("Processing knee at index", kix) if kix-1 == old_kix: if i == len(knee_ixs)-1: # this is the last index so have to process @@ -860,13 +859,13 @@ else: process = old_kix is not None if verbose: - print old_kix, found, curr_kixs + print(old_kix, found, curr_kixs) if process: if found: found = False if verbose: - print "Current knee indices:", curr_kixs, - print [knee_ixs[k] for k in curr_kixs] + print("Current knee indices:", curr_kixs, end=' ') + print([knee_ixs[k] for k in curr_kixs]) all_d2 = array([knee_ixs[k][1] for k in curr_kixs]) ixs_sort = argsort(all_d2) max_ix = ixs_sort[-1] @@ -874,13 +873,13 @@ curr_kixs = [] else: if verbose: - print "Appending knee index", old_kix + print("Appending knee index", old_kix) knees.append(old_kix) old_kix = kix # add final singleton index of high derivative, if any if not found and old_kix not in knees: if verbose: - print "Appending knee index", old_kix + print("Appending knee index", old_kix) knees.append(old_kix) return knees --- ./PyDSTool/Toolbox/dssrt.py (original) +++ ./PyDSTool/Toolbox/dssrt.py (refactored) @@ -7,7 +7,7 @@ Robert Clewley, 2009 """ -from __future__ import division + from PyDSTool import common from PyDSTool import utils @@ -21,7 +21,8 @@ import numpy as np import scipy as sp import copy -import cStringIO, operator +import io, operator +from functools import reduce ############# @@ -338,7 +339,7 @@ trans_earliest_t0s = [min_tstart]*len(criteria_list) glob_earliest_t0_ixs = [None]*len(criteria_list) glob_earliest_t0s = [min_tstart]*len(criteria_list) - crit_ixs = range(len(criteria_list)) + crit_ixs = list(range(len(criteria_list))) re_run = crit_ixs[:] # initial copy re_run_glob = [] re_run_trans = [] @@ -623,7 +624,7 @@ return str1 + str2 + str3 def info(self, verboselevel=1): - print self._infostr(verboselevel) + print(self._infostr(verboselevel)) def __str__(self): return self._infostr(0) @@ -754,14 +755,14 @@ def check_opts(opts): def_vals = {'use_order': True, 'speed_fussy': True} - ok_keys = def_vals.keys() + ok_keys = list(def_vals.keys()) if opts is None: return common.args(**def_vals) else: for k in ok_keys: - if k not in opts.keys(): + if k not in list(opts.keys()): opts[k] = def_vals[k] - rem_keys = common.remain(opts.keys(), ok_keys) + rem_keys = common.remain(list(opts.keys()), ok_keys) if rem_keys != []: raise ValueError("Invalid options passed in opts argument: %s" % rem_keys) else: @@ -818,7 +819,7 @@ all_modulatory = {} ep_start = 0 complete_epoch = False - for i in xrange(self.num_pts): + for i in range(self.num_pts): # ignore_change is used to avoid single time-point epochs: # it ensures 'old' actives and time scale sets don't get updated for # the single time-point change @@ -859,7 +860,7 @@ # ignore epoch made up of single time point ignore_change = True act_vars = old_actives - mod_vars = all_modulatory.keys() + mod_vars = list(all_modulatory.keys()) i_stop = i if ignore_change: old_fast = fast @@ -868,12 +869,12 @@ old_fast = common.makeSeqUnique(utils.union(old_fast,fast)) old_slow = common.makeSeqUnique(utils.union(old_slow,slow)) if old_actives == actives and i < self.num_pts-1: - all_modulatory.update(dict(zip(modulatory,enumerate(modulatory)))) + all_modulatory.update(dict(list(zip(modulatory,enumerate(modulatory))))) else: # epoch changed or we reached the last point if old_actives == [] and self.num_pts > 1: # first epoch: don't make an epoch object until it ends - all_modulatory.update(dict(zip(modulatory,enumerate(modulatory)))) + all_modulatory.update(dict(list(zip(modulatory,enumerate(modulatory))))) elif ignore_singleton and i - ep_start == 1 and i < self.num_pts-1: # ignore epoch made up of single time point if common.intersect(modulatory, old_actives) != []: @@ -882,7 +883,7 @@ # continue #raise ValueError("Reduce step size! Single time-point epochs are not allowed") old_actives = common.remain(old_actives, common.intersect(modulatory, old_actives)) - all_modulatory.update(dict(zip(modulatory,enumerate(modulatory)))) + all_modulatory.update(dict(list(zip(modulatory,enumerate(modulatory))))) ignore_change = True else: if self.num_pts == 1: @@ -891,7 +892,7 @@ i_stop = 1 else: act_vars = old_actives - mod_vars = all_modulatory.keys() + mod_vars = list(all_modulatory.keys()) i_stop = i complete_epoch = True if ignore_change: @@ -951,8 +952,8 @@ focus_taus = taus[self.focus_var] rel_taus = taus/focus_taus cs = taus.coordnames - ixs = xrange(len(cs)) - n = xrange(len(taus)) + ixs = range(len(cs)) + n = range(len(taus)) # these tests can never select focus_var which has # been normalized to tau = 1 slow_test = rel_taus/gamma > 1 @@ -1110,12 +1111,12 @@ if isinstance(model, HybridModel): # check that there is a single sub-model (not a true hybrid system) assert len(model.registry) == 1 - self.model = model.registry.values()[0] - self.gen = self.model.registry.values()[0] + self.model = list(model.registry.values())[0] + self.gen = list(self.model.registry.values())[0] elif isinstance(model, NonHybridModel): assert len(model.registry) == 1 self.model = model - self.gen = self.model.registry.values()[0] + self.gen = list(self.model.registry.values())[0] else: # assume generator self.model = None @@ -1132,7 +1133,7 @@ # has no activation variable, will not be present in # the FScompatMap, so use this opportunity to update # the mapping - for k, gam_inps in inputs.items(): + for k, gam_inps in list(inputs.items()): gamma1 = [] try: for i in gam_inps.gamma1: @@ -1159,7 +1160,7 @@ self.gamma2[k] = gamma2 # all_vars includes 'mock' variables # given by auxiliary functions - self.all_vars = inputs.keys() + self.all_vars = list(inputs.keys()) else: # deduce them from the dependencies in the # ModelSpec dict @@ -1170,9 +1171,9 @@ #self.gamma1 = ? #self.gamma2 = ? # Can expect only mspec - self._init_from_MSpec(self.model._mspecdict.values()[0]['modelspec']) + self._init_from_MSpec(list(self.model._mspecdict.values())[0]['modelspec']) all_inputs = [] - for ins in self.gamma1.values() + self.gamma2.values(): + for ins in list(self.gamma1.values()) + list(self.gamma2.values()): try: all_inputs.extend(ins) except TypeError: @@ -1223,7 +1224,7 @@ d = {} fspecs = self.gen.funcspec._auxfnspecs fn_base = 'dssrt_fn_' - for var, tau in self.tau_refs.items(): + for var, tau in list(self.tau_refs.items()): if tau is None: continue # signature for the aux fn is in the Generator's FuncSpec, e.g. @@ -1258,7 +1259,7 @@ sig[ix] = inp d[tau.replace('.','_')] = fname+'(' + ",".join(sig) + ')' - for var, inf in self.inf_refs.items(): + for var, inf in list(self.inf_refs.items()): if inf is None: continue # signature for the aux fn is in the Generator's FuncSpec, e.g. @@ -1297,23 +1298,23 @@ FScMap = self._FScompatMap self.taus = {} self.taus_direct = {} - for k, v in self.tau_refs.items(): + for k, v in list(self.tau_refs.items()): self.taus[k], self.taus_direct[k] = self._process_expr(FScMap(v)) self.infs = {} self.infs_direct = {} - for k, v in self.inf_refs.items(): + for k, v in list(self.inf_refs.items()): self.infs[k], self.infs_direct[k] = self._process_expr(FScMap(v)) self.psis = {} self.psis_direct = {} - for k, vdict in self.psi_refs.items(): + for k, vdict in list(self.psi_refs.items()): if vdict is None: self.psis[k], self.psis_direct[k] = (None, None) else: self.psis[k] = {} self.psis_direct[k] = {} - for inp, psiv in vdict.items(): + for inp, psiv in list(vdict.items()): self.psis[k][inp], self.psis_direct[k][inp] = \ self._process_expr(FScMap(psiv)) @@ -1363,11 +1364,11 @@ else: # test for valid math expression # - may include auxiliary function call (with arguments) - fnames = self.gen.auxfns.keys() - themap = dict(self.gen.auxfns.items()) - themap.update(dict(self.gen.inputs.items())) + fnames = list(self.gen.auxfns.keys()) + themap = dict(list(self.gen.auxfns.items())) + themap.update(dict(list(self.gen.inputs.items()))) defs = {'refpars': self.pars} - pnames = self.pars.keys() + pnames = list(self.pars.keys()) pvals = ['refpars["%s"]' % pn for pn in pnames] # parmap = dict(zip(pnames, # [Symbolic.expr2fun(v, **defs) for v in pvals])) @@ -1375,9 +1376,9 @@ val = expr # retained in case revert to replaceCallsWithDummies(...) #dummies = {} val_q = Symbolic.QuantSpec('__expr__', val) - mapping = dict(zip(pnames, pvals)) + mapping = dict(list(zip(pnames, pvals))) used_inputs = utils.intersect(val_q.parser.tokenized, - self.gen.inputs.keys()) + list(self.gen.inputs.keys())) for inp in used_inputs: # turn into a function of t mapping[inp] = inp + '(t)' @@ -1454,8 +1455,8 @@ try: return f(**common.filteredDict(ptFS, args)) except: - print f._args - print f._call_spec + print(f._args) + print(f._call_spec) raise @@ -1474,8 +1475,8 @@ try: return f(**common.filteredDict(ptFS, args)) except: - print f._args - print f._call_spec + print(f._args) + print(f._call_spec) raise @@ -1500,8 +1501,8 @@ try: return f(**common.filteredDict(ptFS, args)) except: - print f._args - print f._call_spec + print(f._args) + print(f._call_spec) raise @@ -1515,7 +1516,7 @@ if focus: vars = [self.focus_var] else: - vars = self.taus.keys() + vars = list(self.taus.keys()) pts = self._FScompatMap(self.pts) # ptvals = dict(self.pts) # # permit access from external inputs or other autonomous functions @@ -1531,8 +1532,8 @@ vals['tau_'+k] = np.array([f(**common.filteredDict(pt, args)) \ for pt in pts]) except: - print f._args - print f._call_spec + print(f._args) + print(f._call_spec) raise inf_info = self.infs[k] if inf_info is None: @@ -1543,8 +1544,8 @@ vals['inf_'+k] = np.array([f(**common.filteredDict(pt, args)) \ for pt in pts]) except: - print f._args - print f._call_spec + print(f._args) + print(f._call_spec) raise # we know that taus and infs have same set of keys -- the variable names self.tau_inf_vals.update(vals) @@ -1597,8 +1598,8 @@ psis[inp] = np.array([f(*val_array.flatten()) \ for val_array in all_coords[:,[arg_ixs]]]) except: - print f._args - print f._call_spec + print(f._args) + print(f._call_spec) raise self.psi_vals[fv] = psis @@ -1611,7 +1612,7 @@ all_vals = {} all_vals.update(self.tau_inf_vals) base='psi_'+fv - for inp, psis in self.psi_vals[fv].items(): + for inp, psis in list(self.psi_vals[fv].items()): all_vals[base+'_'+inp] = psis self.psi_pts = Pointset(indepvararray=self.times, coorddict=all_vals) @@ -1644,7 +1645,7 @@ ics=common.filteredDict(gen.initialconditions,vars), varspecs=varspecs, auxvars=gen.funcspec._initargs['auxvars'], fnspecs=gen.funcspec._initargs['fnspecs']) - nan_auxs = [xname for xname, val in gen.initialconditions.iteritems() if not np.isfinite(val)] + nan_auxs = [xname for xname, val in gen.initialconditions.items() if not np.isfinite(val)] sysargs.pars.update(common.filteredDict(gen.initialconditions, vars+nan_auxs, neg=True)) return Vode_ODEsystem(sysargs) @@ -1654,7 +1655,7 @@ def get_taus(pts, tau_names): """pts can be a Point or Pointset""" # filter this way in case there are None entries in tau_names.values() - clist = [cname for cname in pts.coordnames if cname in tau_names.values()] + clist = [cname for cname in pts.coordnames if cname in list(tau_names.values())] t = pts[clist] t.mapNames(parseUtils.symbolMapClass(common.invertMap(tau_names))) return t @@ -1662,7 +1663,7 @@ def get_infs(pts, inf_names): """pts can be a Point or Pointset""" # filter this way in case there are None entries in inf_names.values() - clist = [cname for cname in pts.coordnames if cname in inf_names.values()] + clist = [cname for cname in pts.coordnames if cname in list(inf_names.values())] i = pts[clist] i.mapNames(parseUtils.symbolMapClass(common.invertMap(inf_names))) return i @@ -1684,7 +1685,7 @@ try: vals = pts[ix0:ix1].coordarray.copy() except ValueError: - print ix0, ix1 + print(ix0, ix1) raise ts = pts.indepvararray[ix0:ix1].copy() if reset_t0 is not None: @@ -1700,10 +1701,10 @@ # don't start i at 0 b/c will be in middle of an epoch for i, ep0 in enumerate(epochs[1:-1]): if verbose: - print "start epoch = ", i+1 + print("start epoch = ", i+1) for j, ep in enumerate(epochs[i+1:]): if verbose: - print "end epoch =", i+j+1 + print("end epoch =", i+j+1) try: res = [epochs[k]==epochs[k+j+1] for k in range(i,j)] except IndexError: @@ -1711,10 +1712,10 @@ continue else: if verbose: - print i, j, res + print(i, j, res) if np.all(res) and j > i+1: if verbose: - print "Found period between epochs", i+1, j+2+i, " len=", j+1 + print("Found period between epochs", i+1, j+2+i, " len=", j+1) cycle_len = j+1 ixs = [i+1, i+j+2] return cycle_len, ixs @@ -1811,7 +1812,7 @@ # split_ixs is a list if not range_tuple[0] < range_tuple[1]: raise ValueError("Range tuple not in increasing order") - if not np.alltrue(ix in xrange(range_tuple[0],range_tuple[1]) \ + if not np.alltrue(ix in range(range_tuple[0],range_tuple[1]) \ for ix in split_ixs): raise ValueError("Split indices out of range") if range_tuple[0] in split_ixs or range_tuple[1] in split_ixs: @@ -1880,7 +1881,7 @@ def show_epochs(eps): "Small utility to print more detailed information about epochs" for i, ep in enumerate(eps): - print i, + print(i, end=' ') ep.info() @@ -1912,16 +1913,16 @@ cols.append(c+s) if len(do_vars) > len(cols): raise ValueError("Max number of permitted variables for these colors/styles is %i"%len(cols)) - RefactoringTool: Refactored ./PyDSTool/Toolbox/event_driven_simulator.py print "Color scheme:" + print("Color scheme:") if do_log: for i, v in enumerate(do_vars): if root+v in pts.coordnames: - print " ", v, cols[i] + print(" ", v, cols[i]) plot(ts, np.log(pts[root+v]), cols[i]) else: for i, v in enumerate(do_vars): if root+v in pts.coordnames: - print " ", v, cols[i] + print(" ", v, cols[i]) plot(ts, pts[root+v], cols[i]) # --------------------------------------------------------------------------- @@ -2016,7 +2017,7 @@ s2[(a,a)] = MATCH #VCLOSE s2[(a,'_')] = CLOSE - for k, v in s1.score_dict.iteritems(): + for k, v in s1.score_dict.items(): if v is None: d_common = len(common.intersect(alphabet.dynamic_vars, strip_speed(k))) # s.score_dict[k] = MISMATCH @@ -2376,7 +2377,7 @@ d = [] # Table with the full distance matrix - current = range(n+1) + current = list(range(n+1)) d.append(current) for i in range(1,m+1): @@ -2496,9 +2497,9 @@ workstr1 = workstr1[:index]+JARO_MARKER_CHAR+workstr1[index+1:] if (common1 != common2): - print 'Jaro: Wrong common values for strings "%s" and "%s"' % \ + print('Jaro: Wrong common values for strings "%s" and "%s"' % \ (str1, str2) + ', common1: %i, common2: %i' % (common1, common2) + \ - ', common should be the same.' + ', common should be the same.') common1 = float(common1+common2) / 2.0 ##### This is just a fix ##### if (common1 == 0): @@ -2529,7 +2530,7 @@ eps1 = epseq1[i] eps2 = epseq2[i] str_table.append([",".join(eps1), ",".join(eps2)]) - print indent(str_table) + print(indent(str_table)) def indent(rows, hasHeader=False, headerChar='-', delim=' | ', justify='left', separateRows=False, prefix='', postfix='', wrapfunc=lambda x:x): @@ -2550,26 +2551,25 @@ # closure for breaking logical rows to physical, using wrapfunc def rowWrapper(row): newRows = [wrapfunc(item).split('\n') for item in row] - return [[substr or '' for substr in item] for item in map(None,*newRows)] + return [[substr or '' for substr in item] for item in list(*newRows)] # break each logical row into one or more physical ones logicalRows = [rowWrapper(row) for row in rows] # columns of physical rows - columns = map(None,*reduce(operator.add,logicalRows)) + columns = list(*reduce(operator.add,logicalRows)) # get the maximum of each column by the string length of its items maxWidths = [max([len(str(item)) for item in column]) for column in columns] rowSeparator = headerChar * (len(prefix) + len(postfix) + sum(maxWidths) + \ len(delim)*(len(maxWidths)-1)) # select the appropriate justify method justify = {'center':str.center, 'right':str.rjust, 'left':str.ljust}[justify.lower()] - output=cStringIO.StringIO() - if separateRows: print >> output, rowSeparator + output=io.StringIO() + if separateRows: print(rowSeparator, file=output) for physicalRows in logicalRows: for row in physicalRows: - print >> output, \ - prefix \ + print(prefix \ + delim.join([justify(str(item),width) for (item,width) in zip(row,maxWidths)]) \ - + postfix - if separateRows or hasHeader: print >> output, rowSeparator; hasHeader=False + + postfix, file=output) + if separateRows or hasHeader: print(rowSeparator, file=output); hasHeader=False return output.getvalue() --- ./PyDSTool/Toolbox/event_driven_simulator.py (original) +++ ./PyDSTool/Toolbox/event_driven_simulator.py (refactored) @@ -60,7 +60,7 @@ #print "\n ** ", self.name, "received state:", state self.in_vals.update(state) # poll inputs - for name, connxn in self.inputs.items(): + for name, connxn in list(self.inputs.items()): self.in_vals[connxn.input.name] = connxn.poll() #print "... passing input values", self.in_vals self.next_t = self.map(self.in_vals) @@ -129,17 +129,17 @@ nodes[n] = new_node # fill in inputs and outputs dictionaries for each type - for cn, c in connxns.items(): + for cn, c in list(connxns.items()): cobj = mspec.components[cn] targs = [head(t) for t in cobj.connxnTargets] - c.outputs = dict(zip(targs, [nodes[t] for t in targs])) + c.outputs = dict(list(zip(targs, [nodes[t] for t in targs]))) for t in targs: nodes[t].inputs[cn] = c - for nn, n in nodes.items(): + for nn, n in list(nodes.items()): nobj = mspec.components[nn] targs = [head(t) for t in nobj.connxnTargets] - n.outputs = dict(zip(targs, [connxns[t] for t in targs])) + n.outputs = dict(list(zip(targs, [connxns[t] for t in targs]))) for t in targs: connxns[t].input = n @@ -207,22 +207,22 @@ # don't really need the connections, but just as a reference self.connections = connections if state is None: - self.state = dict(zip(nodes.keys(), [NaN for n in nodes])) + self.state = dict(list(zip(list(nodes.keys()), [NaN for n in nodes]))) else: self.state = state self.curr_t = 0 self.history = {} self.verbosity = 0 - self.Q = FIFOqueue_uniquenode(nodes.keys()) + self.Q = FIFOqueue_uniquenode(list(nodes.keys())) def set_node_state(self): - for name, n in self.nodes.items(): + for name, n in list(self.nodes.items()): n.last_t = self.state[name] def validate(self): - for name, n in self.nodes.items(): + for name, n in list(self.nodes.items()): assert isinstance(n, node) - for name, connxn in self.connections.items(): + for name, connxn in list(self.connections.items()): assert isinstance(connxn, connection) assert sortedDictKeys(self.state) == sortedDictKeys(self.nodes), \ "Invalid or missing node state in history argument" @@ -244,7 +244,7 @@ while not done: last_state = self.state.copy() - print "\n ***", self.curr_t, self.history[self.curr_t][0], self.state + print("\n ***", self.curr_t, self.history[self.curr_t][0], self.state) next_t = Inf iters = 1 @@ -255,17 +255,17 @@ try: proj_state = self.compile_next_state(nodes) except PyDSTool_BoundsError: - print "Maps borked at", self.curr_t + print("Maps borked at", self.curr_t) done = True break - print "Projected:", proj_state - for node, t in proj_state.items(): + print("Projected:", proj_state) + for node, t in list(proj_state.items()): if t > self.curr_t: self.Q.push(t, node) # self.state[next_node] = self.Q.next_t if self.verbosity > 0: - print "Took %i iterations to stabilize" % iters + print("Took %i iterations to stabilize" % iters) self.display() t, next_node = self.Q.pop() @@ -281,7 +281,7 @@ self.state = next_state.copy() if self.verbosity > 0: - print "Next node is", next_node, "at time ", self.curr_t + print("Next node is", next_node, "at time ", self.curr_t) done = self.curr_t >= t_end continue @@ -305,7 +305,7 @@ ## min_ix = i if min_ix is None: # no further events possible - print "No further events possible, stopping!" + print("No further events possible, stopping!") break ## if min_valRefactoringTool: Refactored ./PyDSTool/Toolbox/fracdim.py < self.curr_t: ## # clear later history @@ -321,7 +321,7 @@ self.state = (next_node, next_state) if self.verbosity > 0: - print "Next node is", next_node, "at time ", self.curr_t + print("Next node is", next_node, "at time ", self.curr_t) done = self.curr_t >= t_end ts, state_dicts = sortedDictLists(self.history, byvalue=False) @@ -335,23 +335,23 @@ def compile_next_state(self, nodes): vals = {} - for name, n in nodes.items(): + for name, n in list(nodes.items()): vals[name] = n.poll(self.state) return vals def display(self): - print "\n****** t =", self.curr_t + print("\n****** t =", self.curr_t) info(self.state, "known state") - print "\nNodes:" - for name, n in self.nodes.items(): + print("\nNodes:") + for name, n in list(self.nodes.items()): #n.poll(self.state) - print name - for in_name, in_val in n.in_vals.items(): - print " Input", in_name, ": ", in_val + print(name) + for in_name, in_val in list(n.in_vals.items()): + print(" Input", in_name, ": ", in_val) def extract_history_events(self): - node_names = self.nodes.keys() - node_events = dict(zip(node_names, [None]*len(node_names))) + node_names = list(self.nodes.keys()) + node_events = dict(list(zip(node_names, [None]*len(node_names)))) ts = sortedDictKeys(self.history) old_node, old_state = self.history[ts[0]] # deal with initial conditions first @@ -366,8 +366,8 @@ def display_raster(self, new_figure=True): h = self.history ts = sortedDictKeys(h) - node_names = self.nodes.keys() - print "\n\nNode order in plot (bottom to top) is", node_names + node_names = list(self.nodes.keys()) + print("\n\nNode order in plot (bottom to top) is", node_names) if new_figure: figure() t0 = ts[0] @@ -387,7 +387,7 @@ """seq_dict maps string symbols to increasing-ordered sequences of times. Returns a single list of (symbol, time) pairs ordered by time.""" out_seq = [] - symbs = seq_dict.keys() + symbs = list(seq_dict.keys()) next_s = None indices = {} for s in symbs: --- ./PyDSTool/Toolbox/fracdim.py (original) +++ ./PyDSTool/Toolbox/fracdim.py (refactored) @@ -6,7 +6,7 @@ (c) 2005, 2006. Robert Clewley, John Guckenheimer. """ -from __future__ import division + from PyDSTool import * from PyDSTool.common import _seq_types from PyDSTool.Toolbox.data_analysis import * @@ -34,12 +34,12 @@ npts = size(data,0) d = zeros((npts*(npts-1)/2,), 'd') # size of upper triangle (no diagonal) of m vs. m matrix # max ix for each i in expression for d is (i-1)*(i-2)/2 + (i-2) - for i in xrange(1,npts): - for j in xrange(i-1): + for i in range(1,npts): + for j in range(i-1): d[(i-1)*(i-2)/2+j] = norm(data[i]-data[j], which_norm) d.sort() logd = log(d).ravel() - logv = log(range(1,len(d)+1)) + logv = log(list(range(1,len(d)+1))) nan_ixs = isfinite(logd) logd = extract(nan_ixs, logd) logv = extract(nan_ixs, logv) @@ -55,15 +55,15 @@ dsize = npts*(npts-1)/2 d = zeros((dsize,), 'd') # size of upper triangle (no diagonal) of m vs. m matrix # max ix for each i in expression for d is (i-1)*(i-2)/2 + (i-2) - for i in xrange(1,npts): - for j in xrange(i-1): + for i in range(1,npts): + for j in range(i-1): ix = (i-1)*(i-2)/2+j if mod(ix,inforate) == 0: dump_progress(ix, dsize) d[ix] = norm(data[i]-data[j]) d.sort() logd = log(d).ravel() - logv = log(range(1,len(d)+1)) + logv = log(list(range(1,len(d)+1))) nan_ixs = isfinite(logd) logd = extract(nan_ixs, logd) logv = extract(nan_ixs, logv) @@ -73,7 +73,7 @@ def timeseq(time, covering, refpt): """Extract time sequence from a covering""" ts = time.take(covering[refpt][3], 0) - print "time sequence min = %f, max = %f"%(min(ts),max(ts)) + print("time sequence min = %f, max = %f"%(min(ts),max(ts))) return ts @@ -94,8 +94,8 @@ point -> reference points whose neighbourhoods include it """ covering = {} - covered = {}.fromkeys(range(len(data)),None) - not_covered = covered.keys() + covered = {}.fromkeys(list(range(len(data))),None) + not_covered = list(covered.keys()) if remain_tol > len(data): remain_tol = 0 makerefpt_ixs = [] @@ -105,8 +105,8 @@ refptix = 0 # initial value N = size(data,0) start_ix = int(round(sqrt(N))) - print "N = ", N, "start ix = ", start_ix - logv_raw = log(range(1,N+1)) + print("N = ", N, "start ix = ", start_ix) + logv_raw = log(list(range(1,N+1))) done = False unsuccessful = [] if step is None: @@ -116,21 +116,21 @@ # treat as %age of # data points ixstep = int(math.ceil(len(d)*step)) if not quiet: - print "Using index step %i out of %i points"%(ixstep, len(d)) + print("Using index step %i out of %i points"%(ixstep, len(d))) else: ixstep = step else: raise ValueError("Invalid step argument") while not done: if not quiet: - print "\n*************\nCalculating distances and point-wise dimension around pt %i ..."%refptix + print("\n*************\nCalculating distances and point-wise dimension around pt %i ..."%refptix) logv, logd, d, d_inv_dict = log_distances_with_D(data, refptix, logv_raw) d_inv_keys = sortedDictKeys(d_inv_dict) d_inv_vals = sortedDictValues(d_inv_dict) d_inv = Pointset(indepvararray=d_inv_keys, indepvartype=Float, coordarray=d_inv_vals, coordtype=Int, tolerance=5e-5) if not quiet: - print "Finding self-consistent neighbourhood", + print("Finding self-consistent neighbourhood", end=' ') # search from min_ix -> end, increasing hiix from loix+1 until dimensionality # (slope) stabilizes to within an absolute tolerance and does not grow larger # than a different tolerance @@ -139,7 +139,7 @@ old_dim = None hiix = start_ix if not quiet: - print "Start ix = ", start_ix + print("Start ix = ", start_ix) loix=start_ix-2 nhd_too_small = False ref_dim = -1 @@ -154,7 +154,7 @@ weight='') all_res.append(residual) if not quiet and mod(hiix,50) == 0: - print ".", + print(".", end=' ') if old_dim is not None: sd = std(all_res) ## if residual > max_res: @@ -174,10 +174,10 @@ weight='lo', w=wlo) all_res.append(residual) if not quiet: - print "(%i,%i)"%(loix,hiix), - print "dim=%.4f, residual = %.4f"%(dim,residual) + print("(%i,%i)"%(loix,hiix), end=' ') + print("dim=%.4f, residual = %.4f"%(dim,residual)) if not quiet and mod(hiix,50) == 0: - print ".", + print(".", end=' ') try: sd = std(all_res) except: @@ -188,20 +188,20 @@ ## not_done = False if sd > max_std: if not quiet: - print "residuals s.d. > max_std" + print("residuals s.d. > max_std") not_done = False old_dim = dim nhd_too_small = hiix-loix < min_nhd_size if not quiet: - print "nhd_too_small = ", nhd_too_small + print("nhd_too_small = ", nhd_too_small) if nhd_too_small: if not quiet: - print "Neighbourhood too small. Moving to a different reference point..." + print("Neighbourhood too small. Moving to a different reference point...") unsuccessful.append(refptix) else: if not quiet: - print "\nDimension = %f"%dim - print "Found best fit line from relative ix %i to %i (radius %f)"%(loix, hiix, d[hiix]) + print("\nDimension = %f"%dim) + print("Found best fit line from relative ix %i to %i (radius %f)"%(loix, hiix, d[hiix])) # consolidate results in terms of global index positions in data covered_ixs = [d_inv(d[ix])[0] for ix in range(loix, hiix+1)] covered_ixs.append(refptix) @@ -225,7 +225,7 @@ # find new ref pt in not_covered and repeat num_uncovered = len(not_covered) ## if not quiet: - print "%i points left to cover"%(num_uncovered+len(makerefpt_ixs)) + print("%i points left to cover"%(num_uncovered+len(makerefpt_ixs))) if num_uncovered < remain_tol: if len(makerefpt_ixs) == 0: done = True @@ -252,14 +252,14 @@ max_radius_ratio=1.5): """Find a single neighbourhood around a reference point.""" covering = {} - covered = {}.fromkeys(range(len(data)),None) + covered = {}.fromkeys(list(range(len(data))),None) if initref is not None: refptix = initref else: refptix = 0 # initial value - logv_raw = log(range(1,size(data,0)+1)) + logv_raw = log(list(range(1,size(data,0)+1))) if not quiet: - print "\n*************\nCalculating distances and point-wise dimension around pt %i ..."%refptix + print("\n*************\nCalculating distances and point-wise dimension around pt %i ..."%refptix) doplot = 1 else: doplot = 0 @@ -269,7 +269,7 @@ d_inv = Pointset(indepvararray=d_inv_keys, indepvartype=Float, coordarray=d_inv_vals, coordtype=Int, tolerance=5e-5) if not quiet: - print "Finding self-consistent neighbourhood", + print("Finding self-consistent neighbourhood", end=' ') # search from min_ix -> end, increasing hiix from loix+1 until dimensionality # (slope) stabilizes to within an absolute tolerance and does not grow larger # than a different tolerance @@ -286,7 +286,7 @@ # treat as %age of # data points ixstep = int(math.ceil(len(d)*step)) if not quiet: - print "Using index step %i out of %i points"%(ixstep, len(d)) + print("Using index step %i out of %i points"%(ixstep, len(d))) else: ixstep = step else: @@ -307,7 +307,7 @@ ## if hiix - loix > min_nhd_size: all_res.append(residual) if not quiet: - print "Dim = %.3f in [%i,%i], Residual = %.4f "%(dim,loix,hiix,residual), + print("Dim = %.3f in [%i,%i], Residual = %.4f "%(dim,loix,hiix,residual), end=' ') plot([logd[loix],logd[hiix]],[logd[loix]*pfit[0]+pfit[1],logd[hiix]*pfit[0]+pfit[1]]) ## if mod(hiix,50) == 0: ## print ".", @@ -315,12 +315,12 @@ ## err = abs(dim-old_dim)/dim sd = std(all_res) if not quiet: - print "S.d. = %.4f "%sd + print("S.d. = %.4f "%sd) if residual > max_res: - print "residual > max_res" + print("residual > max_res") not_done = False if sd > max_std: - print "residuals s.d. > max_std" + print("residuals s.d. > max_std") not_done = False ## if err > max_err and hiix-loix > min_nhd_size/4: ## if not quiet: @@ -345,13 +345,13 @@ old_dim = dim nhd_too_small = nhd_too_small or hiix-loix < min_nhd_size if nhd_too_small: - print "Neighbourhood too small. Try a different starting index or a new reference point ..." - print "Dim found over ixs [%i, %i] = %.4f"%(loix,hiix,dim) + print("Neighbourhood too small. Try a different starting index or a new reference point ...") + print("Dim found over ixs [%i, %i] = %.4f"%(loix,hiix,dim)) raise RuntimeError else: if not quiet: - print "\nDimension = %f"%dim - print "Found best fit line from relative ix %i to %i (radius %f)"%(loix, hiix, d[hiix]) + print("\nDimension = %f"%dim) + print("Found best fit line from relative ix %i to %i (radius %f)"%(loix, hiix, d[hiix])) # consolidate results in terms of global index positions in data covered_ixs = [d_inv(d[ix])[0] for ix in range(loix, hiix+1)] covered_ixs.append(refptix) @@ -446,15 +446,15 @@ rhiy = zeros((len(covering),1),'f') drange = arange(0, maxD+1, bin_width, 'd').tolist() dbins = data_bins('D', drange) - cover_by_dimix = {}.fromkeys(range(len(drange))) + cover_by_dimix = {}.fromkeys(list(range(len(drange)))) for dix in range(len(drange)): cover_by_dimix[dix] = [] - cover_by_size_dict = {}.fromkeys(range(len(covered)+1)) + cover_by_size_dict = {}.fromkeys(list(range(len(covered)+1))) ix = 0 integral = 0 largest = 0 try: - for p, (d, rlo, rhi, l) in covering.iteritems(): + for p, (d, rlo, rhi, l) in covering.items(): dx[ix] = d rloy[ix] = rlo rhiy[ix] = rhi @@ -471,7 +471,7 @@ except ValueError: # No max radius information available! # compatible with old version of covering that does not return rhi - for p, (d, rlo, l) in covering.iteritems(): + for p, (d, rlo, l) in covering.items(): dx[ix] = d rloy[ix] = rlo rhiy[ix] = 0 @@ -485,19 +485,19 @@ ly[ix] = lenl integral += lenl ix += 1 - print "\nNeighbourhood statistics:" - print "There are %i neighbourhoods to this covering"%len(covering) - print "Largest neighbourhood has %i points"%largest - cover_by_size = [di for di in cover_by_size_dict.iteritems() if di[1] is not None] + print("\nNeighbourhood statistics:") + print("There are %i neighbourhoods to this covering"%len(covering)) + print("Largest neighbourhood has %i points"%largest) + cover_by_size = [di for di in cover_by_size_dict.items() if di[1] is not None] cover_by_size.sort() csizes = [c[0] for c in cover_by_size] if nhd_size_thresh is None: s = std(csizes) sm = s_frac*s m = mean(csizes) - print "Std. dev. of cover_by_size =", s - print "Max size found =", max(csizes) - print "Mean size found =", m + print("Std. dev. of cover_by_size =", s) + print("Max size found =", max(csizes)) + print("Mean size found =", m) ## # find largest index of set of covering nhds such that its size ## # is smaller than s_frac% of the std deviation of the sizes ## for i in range(len(cover_by_size)): @@ -510,11 +510,11 @@ ## print "N'hood size threshold used = mean(cover_by_sizes restricted to %.3f of 1st std. dev.)"%s_frac ## print " =", nhd_size_thresh nhd_size_thresh = m-sm - print "N'hood size threshold used = mean - %.3f of std. dev."%s_frac - print " =", nhd_size_thresh + print("N'hood size threshold used = mean - %.3f of std. dev."%s_frac) + print(" =", nhd_size_thresh) else: if nhd_size_thresh > 0: - print "N'hood size threshold set by user =", nhd_size_thresh + print("N'hood size threshold set by user =", nhd_size_thresh) if nhd_max_plot_size is None: ## # 2 * original set sizes mean ## try: @@ -523,14 +523,14 @@ ## nhd_max_plot_size = largest ## print "Using max plot nhd size = 2*mean(cover_by_sizes) =", nhd_max_plot_size nhd_max_plot_size = largest - print "Using max plot nhd size of largest neighbourhood found =", nhd_max_plot_size - else: - print "Using max plot nhd size set by user =", nhd_max_plot_size + print("Using max plot nhd size of largest neighbourhood found =", nhd_max_plot_size) + else: + print("Using max plot nhd size set by user =", nhd_max_plot_size) # reverse so that largest first for returning to user cover_by_size.reverse() filtered_ixs = [] try: - for p, (d, rlo, rhi, l) in covering.iteritems(): + for p, (d, rlo, rhi, l) in covering.items(): if d <= maxD: dix = dbins.resolve_bin_index(d) if len(l) > nhd_size_thresh: @@ -543,7 +543,7 @@ cover_by_dimix[dix].append(p) except ValueError: # compatible with old version of covering that does not return rhi - for p, (d, rlo, l) in covering.iteritems(): + for p, (d, rlo, l) in covering.items(): if d <= maxD: dix = dbins.resolve_bin_index(d) if len(l) > nhd_size_thresh: @@ -595,7 +595,7 @@ fontmath = args(fontsize=22,fontname='Times') fonttext = args(fontsize=18,fontname='Times') # make plot - print "Plotting histograms to figure", fignum + print("Plotting histograms to figure", fignum) assert num_panels in [2,4], "num_panels argument must be 2 or 4" figure(fignum) if num_panels == 4: @@ -637,7 +637,7 @@ else: subplot(2,1,2) dbx = dbins.midpoints.tolist() - dby = dbins.values() + dby = list(dbins.values()) bar(dbx, dby, color='b', width=dbx[1]-dbx[0]) for panel in range(num_panels): figure(fignum).axes[panel].set_xlim([dmin,dmax]) @@ -649,7 +649,7 @@ # assumes will not be more than 100 times! cbins = zeros((100,),'i') max_used = 0 - for clist in covered.itervalues(): + for clist in covered.values(): try: n = len(clist) except TypeError: @@ -698,13 +698,13 @@ m = dbins[:tail_ix].mean() s = dbins[:tail_ix].std() except: - print "Tail found at index %i and D = %.3f"%(tail_ix,d_est) - print " -- problem computing mean and std dev for this mode" - print " so calculating for whole data set" + print("Tail found at index %i and D = %.3f"%(tail_ix,d_est)) + print(" -- problem computing mean and std dev for this mode") + print(" so calculating for whole data set") m = dbins.mean() s = dbins.std() - print "Estimate dimension to be (to resolution of histogram bin width):", d_est - print " with histogram mean D = %.5f and std dev D = %.5f"%(m, s) + print("Estimate dimension to be (to resolution of histogram bin width):", d_est) + print(" with histogram mean D = %.5f and std dev D = %.5f"%(m, s)) return {"D_tail": d_est, "D_mean": m, "D_std": s}, \ dbins, cover_by_dimix, cover_by_size, cbu, filtered_ixs, integral @@ -713,7 +713,7 @@ """Returns the list of indices in covering for which the neighbourhood size was larger than the threshold for dimension binning.""" fixs=[] - for p, ixlist in cover_by_dimix.iteritems(): + for p, ixlist in cover_by_dimix.items(): fixs.extend(ixlist) fixs.sort() return fixs @@ -743,7 +743,7 @@ for i, cdata in enumerate(central_data): dc[i]=norm(c_mean-cdata) ds = [] - for i in xrange(len(data)): + for i in range(len(data)): if i not in outliers: ds.append(norm(data[i]-data[outliers[0]])) ds = array(ds) @@ -765,10 +765,10 @@ rfun = lambda rh, rl: rh-rl radii = {} if ixs is None: - for p, (d, rlo, rhi, l) in covering.iteritems(): + for p, (d, rlo, rhi, l) in covering.items(): radii[p] = rfun(rhi,rlo) else: - for p, (d, rlo, rhi, l) in covering.iteritems(): + for p, (d, rlo, rhi, l) in covering.items(): if p in ixs: radii[p] = rfun(rhi,rlo) return radii @@ -785,14 +785,14 @@ test = lambda r: r < rhi else: test = lambda r: r > rlo and r < rhi - rfilt = [(ix,r) for (ix, r) in radii.iteritems() if test(r)] + rfilt = [(ix,r) for (ix, r) in radii.items() if test(r)] return rfilt, [covering[rinfo[0]][0] for rinfo in rfilt] def plot_radius_distribution(radii, max_radius, radius_bin_width): """Expects radii dictionary, as returned by get_cover_radii. Returns figure handle.""" - rads = array(radii.values()) + rads = array(list(radii.values())) dbins = data_bins('r', arange(0, max_radius+radius_bin_width, radius_bin_width)) dbins.bin(rads) dbx, dby = dbins.to_array() @@ -811,7 +811,7 @@ If rwidth=0 (default) then no data binning is done. Returns figure handle.""" - rlo, rhi = extent(radii.values()) + rlo, rhi = extent(list(radii.values())) assert rlo > 0 and rhi > rlo f=figure() if rwidth > 0: @@ -837,7 +837,7 @@ r_max - r_min. Returns figure handle.""" - rlo, rhi = extent(radii.values()) + rlo, rhi = extent(list(radii.values())) assert rlo > 0 and rhi > rlo f = figure() rs, ds = filter_by_radius(covering, radii, 0, rhi) @@ -1054,7 +1054,7 @@ N=size(data,0) assert Delta > 1 assert N > Delta*startix - logv_raw = log(range(1,N+1)) + logv_raw = log(list(range(1,N+1))) logv, logd, d, d_inv_dict = log_distances_with_D(data, refptix, logv_raw) hi_slope = 0 lo_slope = 1e10 @@ -1116,10 +1116,10 @@ col = array([0.3,0.3,0.3]) else: raise "invalid color source" - print "Expect %i dots when finished:"%int(num_refpts/50) + print("Expect %i dots when finished:"%int(num_refpts/50)) for i in range(num_refpts): if mod(i,50) == 49: - print ".", + print(".", end=' ') slope_by_loix, lo, loix, hi, hiix, logv, logd = slope_range(data, refpts[i], startix=startix, stopix=stopix, Delta=Delta, step=step, maxD=maxD) @@ -1163,19 +1163,19 @@ stats['max_slope']['min']=min(plotdata[:,1]) stats['min_slope']['max']=max(plotdata[:,0]) stats['max_slope']['max']=max(plotdata[:,1]) - print "\n" + print("\n") return (plotdata, s, colors, c, ixdata, stats, handle) def sorted_by_slope(plotdata, select=0): """select: 0 = rmin, 1 = rmax""" ixs = argsort(plotdata, 0)[:,select] - return zip(take(plotdata, ixs, 0)[:,select], ixs) + return list(zip(take(plotdata, ixs, 0)[:,select], ixs)) def sorted_by_radius(colors, select=0): """select: 0 = rmin, 1 = rmax""" ixs = argsort(colors, 0)[:,select] - return zip(take(colors, ixs, 0)[:,select], ixs) + return list(zip(take(colors, ixs, 0)[:,select], ixs)) def find_from_sorted(x, v, next_largest=1, indices=None): if isinstance(v, _seq_types): @@ -1252,8 +1252,8 @@ Engineering, 2007. """ pde_name = 'PD_E-'+a.name - if 'N' in a.keys(): - if 'stopix' in a.keys(): + if 'N' in list(a.keys()): + if 'stopix' in list(a.keys()): if a.stopix is not None: a.stopix = int(round(0.7*a.N)) else: @@ -1262,14 +1262,14 @@ a.step = int(round(0.005*a.N)) else: a.N = None - if 'stopix' not in a.keys(): + if 'stopix' not in list(a.keys()): a.stopix = None try: if force: raise ValueError data, pde_args, plotdata, ssorted, colors, \ csorted, ixdata, sstats = loadObjects(pde_name) - print "Loaded data set and stats for %s"%a.name + print("Loaded data set and stats for %s"%a.name) # don't check the data field if filteredDict(a, ['data','bin_width'], neg=True) != \ filteredDict(pde_args, ['data','bin_width'], neg=True): @@ -1283,10 +1283,10 @@ try: data = eval(a.data_gen_str, globals(), a.data_gen_fun) except: - print "Problem re-calculating data fromRefactoringTool: Refactored ./PyDSTool/Toolbox/makeSloppyModel.py given information" + print("Problem re-calculating data from given information") else: data = a.data - print "Recalculating PD-E for %s"%a.name + print("Recalculating PD-E for %s"%a.name) try: csource=a.color_source except AttributeError: @@ -1313,7 +1313,7 @@ save_info='result_'+a.name else: save_info='' - if 'show_seq' in a.keys(): + if 'show_seq' in list(a.keys()): show_seq = a['show_seq'] else: show_seq = False --- ./PyDSTool/Toolbox/makeSloppyModel.py (original) +++ ./PyDSTool/Toolbox/makeSloppyModel.py (refactored) @@ -13,25 +13,25 @@ def makeSloppyModel(modelName, modelDict, targetGen, globalRefs=None, algParams=None, silent=False): if targetGen not in allODEgens: - print 'Valid target ODE solvers: ' + ", ".join(allODEgens) + print('Valid target ODE solvers: ' + ", ".join(allODEgens)) raise ValueError('Invalid target ODE solver') sModelSpec = sloppyModel(modelName) if not silent: - print "Building sloppy model '%s'"%modelName + print("Building sloppy model '%s'"%modelName) # first pass to collect names varnames = [] - for odeName in modelDict['odes'].keys(): + for odeName in list(modelDict['odes'].keys()): varnames.append(odeName) parnames = [] if 'parameters' in modelDict: - for parName in modelDict['parameters'].keys(): + for parName in list(modelDict['parameters'].keys()): parnames.append(parName) pdomains = {} xdomains = {} if 'domains' in modelDict: - for name, dom in modelDict['domains'].iteritems(): + for name, dom in modelDict['domains'].items(): if name in parnames: pdomains[name] = dom elif name in varnames: @@ -40,9 +40,9 @@ raise ValueError("Name %s unknown in domain specs"%name) - for odeName, expr in modelDict['odes'].iteritems(): + for odeName, expr in modelDict['odes'].items(): if not silent: - print 'Adding ODE: ', odeName + print('Adding ODE: ', odeName) if odeName in xdomains: sModelSpec.add(Var(expr, odeName, specType='RHSfuncSpec', domain=xdomains[odeName])) @@ -51,40 +51,40 @@ auxvarnames = [] if 'assignments' in modelDict: - for assgnName, expr in modelDict['assignments'].iteritems(): + for assgnName, expr in modelDict['assignments'].items(): if not silent: - print 'Adding assignment: ', assgnName + print('Adding assignment: ', assgnName) sModelSpec.add(Var(expr, assgnName, specType='ExpFuncSpec')) auxvarnames.append(assgnName) if 'parameters' in modelDict: - for parName, val in modelDict['parameters'].iteritems(): + for parName, val in modelDict['parameters'].items(): if not silent: - print 'Adding parameter: ', parName, "=", val + print('Adding parameter: ', parName, "=", val) if parName in pdomains: sModelSpec.add(Par(str(val), parName, domain=pdomains[parName])) else: sModelSpec.add(Par(str(val), parName)) auxfndict = {} - for funSig, expr in modelDict['functions'].iteritems(): + for funSig, expr in modelDict['functions'].items(): assert ')' == funSig[-1] assert '(' in funSig major = funSig.replace(')','').replace(' ','').split('(') args = major[1].split(',') name = major[0] if not silent: - print 'Adding function: ', name, " of arguments:", args + print('Adding function: ', name, " of arguments:", args) sModelSpec.add(Fun(expr, args, name)) auxfndict[name] = (args, expr) if globalRefs is None: globalRefs = [] if not sModelSpec.isComplete(globalRefs): - print "Model retains free names: " + RefactoringTool: No changes to ./PyDSTool/Toolbox/mechmatlib.py RefactoringTool: No changes to ./PyDSTool/Toolbox/model_primitives.py RefactoringTool: Refactored ./PyDSTool/Toolbox/neuralcomp.py RefactoringTool: Refactored ./PyDSTool/Toolbox/neuro_data.py ", ".join(sModelSpec.freeSymbols) - print "These must be resolved in the specification before continuing." - print "If one of these is time, then include it explicitly as an" - print "entry in the argument list ('globalRefs' key)" + print("Model retains free names: " + ", ".join(sModelSpec.freeSymbols)) + print("These must be resolved in the specification before continuing.") + print("If one of these is time, then include it explicitly as an") + print("entry in the argument list ('globalRefs' key)") raise ValueError('Incomplete model specification') targetlang = theGenSpecHelper(targetGen).lang # single-generator model so give both same name @@ -96,11 +96,11 @@ 'target': targetGen, 'algparams': algParams}}) if not silent: - print "Adding events with default tolerances..." + print("Adding events with default tolerances...") argDict={'precise': True, 'term': True} evcount = 0 if 'events' in modelDict: - for evspec, mappingDict in modelDict['events'].iteritems(): + for evspec, mappingDict in modelDict['events'].items(): if evspec[:2] == 'lt': dircode = -1 elif evspec[:2] == 'gt': @@ -121,6 +121,6 @@ 'pars': parnames}) sModel.mapEvent(genName, evname, genName, evmap) if not silent: - print "Building target model with default settings" + print("Building target model with default settings") return sModel.getModel() --- ./PyDSTool/Toolbox/neuralcomp.py (original) +++ ./PyDSTool/Toolbox/neuralcomp.py (refactored) @@ -10,7 +10,7 @@ Rob Clewley, September 2005. """ -from __future__ import division + from PyDSTool import * from copy import copy @@ -1004,13 +1004,13 @@ return inp else: return c.name+'.'+inp - for targ, inputs in c.gamma1.items(): + for targ, inputs in list(c.gamma1.items()): proc_targ = process_targ_name(targ) if proc_targ not in dssrt_inputs: dssrt_inputs[proc_targ] = args(gamma1=[], gamma2=[]) dssrt_inputs[proc_targ].gamma1.extend([process_targ_name(i) \ for i in inputs]) - for targ, inputs in c.gamma2.items(): + for targ, inputs in list(c.gamma2.items()): proc_targ = process_targ_name(targ) if proc_targ not in dssrt_inputs: dssrt_inputs[proc_targ] = args(gamma1=[], gamma2=[]) @@ -1195,7 +1195,7 @@ raise TypeError("threshold function must be a string or a " "QuantSpec") if threshfun[0] not in funbody: - print "Warning: voltage name %s does not appear in function body!"%threshfun[0] + print("Warning: voltage name %s does not appear in function body!"%threshfun[0]) f = Fun(funbody, [threshfun[0]], 'thresh') assert len(f.signature) == 1, \ 'threshold function must be a function of a single argument (voltage)' --- ./PyDSTool/Toolbox/neuro_data.py (original) +++ ./PyDSTool/Toolbox/neuro_data.py (refactored) @@ -112,7 +112,7 @@ thi=self.pars.tlo+self.pars.width_tol) loc_extrema = find_internal_extrema(pts) if self.pars.verbose_level > 0: - print loc_extrema + print(loc_extrema) max_val_ix, xmax = loc_extrema['local_max'] global_max_val_ix, global_xmax = loc_extrema['global_max'] min_val_ix, xmin = loc_extrema['local_min'] @@ -182,7 +182,7 @@ self.pars.thi = pts.indepvararray[-1] loc_extrema = find_internal_extrema(pts, self.pars.noise_tol) if self.pars.verbose_level > 0: - print loc_extrema + print(loc_extrema) ## plot spike and quadratic fit #plot(pts.indepvararray, pts[self.super_pars.burst_coord], 'go-') #show() @@ -211,8 +211,8 @@ thresh_pc = 0.15 thresh = (xmin + thresh_pc*(xmax-xmin)) if self.pars.verbose_level > 0: - print "xmin used =", xmin - print "thresh = ", thresh + print("xmin used =", xmin) + print("thresh = ", thresh) # Define extent of spike for purposes of quadratic fit ... evs_found = self.pars.ev.searchForEvents(trange=[self.pars.tlo, self.pars.thi], @@ -233,10 +233,10 @@ ixlo = pts.find(tmax-dt, end=0) ixhi = pts.find(tmax+dt, end=1) if self.pars.verbose_level > 0: - print "ixlo =", ixlo, "ixhi =", ixhi - print "tlo =",tmax-dt, "thi =",tmax+dt - print pts[ixlo], pts[ixhi] - print "\nget_spike tests:", test1, test2, test3 + print("ixlo =", ixlo, "ixhi =", ixhi) + print("tlo =",tmax-dt, "thi =",tmax+dt) + print(pts[ixlo], pts[ixhi]) + print("\nget_spike tests:", test1, test2, test3) self.results.ixlo = ixlo self.results.ixhi = ixhi self.results.ixmax = max_val_ix @@ -249,7 +249,7 @@ def finish(self, traj): # function of traj, not target if self.pars.verbose_level > 0: - print "Finishing spike processing..." + print("Finishing spike processing...") pts = self.results.spike_pts coord = self.pars.coord xlo = pts[0][0] @@ -477,7 +477,7 @@ xrs = burst_pts[self.pars.burst_coord] trs = burst_pts.indepvararray if max(x)-min(x) < 5: - print "\n\n Not a bursting trajectory!!" + print("\n\n Not a bursting trajectory!!") raise ValueError("Not a bursting trajectory") b, a = self.pars.filt_coeffs_LP xf = filtfilt(b, a, xrs) @@ -504,7 +504,7 @@ # get_burst_spikes if done accurately #self.results.spike_times = self.results.burst_est.spike_ts if self.pars.verbose_level > 0: - print "Spikes found at (approx) t=", self.results.burst_est.spike_ts + print("Spikes found at (approx) t=", self.results.burst_est.spike_ts) if self.results.burst_est.spike_ts[0] < self.pars.shrink_end_time_thresh: # kludgy way to ensure that another burst doesn't encroach if not hasattr(self.pars, 'shrunk'): @@ -548,7 +548,7 @@ """ def _local_init(self): assert len(self.subfeatures) == 2 - assert remain(self.subfeatures.keys(), + assert remain(list(self.subfeatures.keys()), ['is_spike_data', 'is_spike_model']) == [] def postprocess_ref_traj(self): @@ -574,7 +574,7 @@ satisfied = True for spike_num, spike_ix in enumerate(burst_est.spike_ixs): if self.pars.verbose_level > 0: - print "\n Starting spike", spike_num+1 + print("\n Starting spike", spike_num+1) is_spike.super_pars.burst_coord = self.super_pars.burst_coord # step back 10% of estimated period try: @@ -586,7 +586,7 @@ is_spike.pars.tlo = burst_est.t[spike_ix] - \ is_spike.pars.width_tol / 2. if self.pars.verbose_level > 0: - print "new tlo =", is_spike.pars.tlo + print("new tlo =", is_spike.pars.tlo) # would prefer to work this out self-consistently... #is_spike.pars.fit_width_max = ? new_sat = is_spike(traj) @@ -596,7 +596,7 @@ spike_times.append(is_spike.results.spike_time) spike_vals.append(is_spike.results.spike_val) if self.pars.verbose_level > 0: - print "Spike times:", spike_times + print("Spike times:", spike_times) return spike_times, spike_vals @@ -669,7 +669,7 @@ vaRefactoringTool: Refactored ./PyDSTool/Toolbox/phaseplane.py ls = burst_pts[self.super_pars.burst_coord] inter_spike_ixs = [(burst_est.spike_ixs[i-1], burst_est.spike_ixs[i]) \ - for i in xrange(1, len(burst_est.spike_ixs))] + for i in range(1, len(burst_est.spike_ixs))] # should really use quadratic fit to get an un-biased minimum trough_ixs = [npy.argmin(vals[ix_lo:ix_hi])+ix_lo for ix_lo, ix_hi in \ inter_spike_ixs] @@ -696,7 +696,7 @@ spike_ixs.append(tix) inter_spike_ixs = [(spike_ixs[i-1], spike_ixs[i]) \ - for i in xrange(1, len(ts))] + for i in range(1, len(ts))] # min and max events in model mean that these are recorded # accurately in the pointsets already trough_ixs = [npy.argmin(vals[ix_lo:ix_hi])+ix_lo for ix_lo, ix_hi in \ @@ -730,10 +730,10 @@ burst_est = self.super_pars.ref_burst_est # find approximate (integer) mid-point index between spikes mid_isi_ixs = [int(0.5*(burst_est.spike_ixs[i-1]+burst_est.spike_ixs[i])) \ - for i in xrange(1, len(burst_est.spike_ixs))] + for i in range(1, len(burst_est.spike_ixs))] isi_t = [ts[i] for i in mid_isi_ixs] isi_vals = [ts[burst_est.spike_ixs[i]]-ts[burst_est.spike_ixs[i-1]] for \ - i in xrange(1, len(burst_est.spike_ixs))] + i in range(1, len(burst_est.spike_ixs))] self.ref_traj = numeric_to_traj([isi_vals], 'isi_envelope', self.super_pars.burst_coord, isi_t, burst_pts.indepvarname, discrete=False) @@ -746,7 +746,7 @@ # ignore target ts = self.super_results.spike_times tname = self.super_pars.burst_coord_pts.indepvarname - isi_vals = [ts[i]-ts[i-1] for i in xrange(1, len(ts))] + isi_vals = [ts[i]-ts[i-1] for i in range(1, len(ts))] self.results.burst_isi_env = numeric_to_traj([isi_vals], 'isi_envelope', self.super_pars.burst_coord, @@ -927,7 +927,7 @@ self.spike_ixs = spike_ixs self.spike_ts = t[spike_ixs] self.ISIs = [self.spike_ts[i]-self.spike_ts[i-1] for \ - i in xrange(1, len(spike_ixs))] + i in range(1, len(spike_ixs))] self.mean_ISI = npy.mean(self.ISIs) self.std_ISI = npy.std(self.ISIs) self.num_spikes = len(spike_ixs) --- ./PyDSTool/Toolbox/phaseplane.py (original) +++ ./PyDSTool/Toolbox/phaseplane.py (refactored) @@ -13,7 +13,7 @@ R. Clewley, 2006 - 2011 """ -from __future__ import division + # itertools, operator used for _filter_consecutive function import itertools, operator @@ -243,7 +243,7 @@ test = q-self.history[2] # a Point except: # problem with self.history[2] (externally tampered with?) - print "History is: ", self.history + print("History is: ", self.history) raise RuntimeError("Invalid history object in " "distance_to_pointset class instance") try: @@ -405,10 +405,10 @@ dmax = (d, i) elif ge(d, dmax_old[0]): dmax_old = (d,i) - return {'min': {1: dict(zip(self._keys,dmin)), - 2: dict(zip(self._keys,dmin_old))}, - 'max': {1: dict(zip(self._keys,dmax)), - 2: dict(zip(self._keys,dmax_old))}} + return {'min': {1: dict(list(zip(self._keys,dmin))), + 2: dict(list(zip(self._keys,dmin_old)))}, + 'max': {1: dict(list(zip(self._keys,dmax))), + 2: dict(list(zip(self._keys,dmax_old)))}} def search_min(self, q, pts, fn, le, dmin, dmin_old): for i, p in enumerate(pts): @@ -418,8 +418,8 @@ dmin = (d, i) elif le(d, dmin_old[0]): dmin_old = (d, i) - return {'min': {1: dict(zip(self._keys,dmin)), - 2: dict(zip(self._keys,dmin_old))}} + return {'min': {1: dict(list(zip(self._keys,dmin))), + 2: dict(list(zip(self._keys,dmin_old)))}} def search_max(self, q, pts, fn, ge, dmax, dmax_old): for i, p in enumerate(pts): @@ -429,8 +429,8 @@ dmax = (d, i) elif ge(d, dmax_old[0]): dmax_old = (d,i) - return {'max': {1: dict(zip(self._keys,dmax)), - 2: dict(zip(self._keys,dmax_old))}} + return {'max': {1: dict(list(zip(self._keys,dmax))), + 2: dict(list(zip(self._keys,dmax_old)))}} def make_Jac(DS, varnames=None): @@ -550,8 +550,8 @@ subdomain = filteredDict(gen.xdomain, gen.funcspec.vars) else: subdomain = gen._FScompatibleNames(subdomain) - assert remain(subdomain.keys(),gen.funcspec.vars) == [] and \ - remain(gen.funcspec.vars,subdomain.keys()) == [] + assert remain(list(subdomain.keys()),gen.funcspec.vars) == [] and \ + remain(gen.funcspec.vars,list(subdomain.keys())) == [] if only_var is None: do_vars = [xname, yname] else: @@ -570,7 +570,7 @@ y_dom = gen.xdomain[yname] if not (isfinite(y_dom[0]) and isfinite(y_dom[1])): raise PyDSTool_ExistError("Must specify finite range for %s"%yname) - for varname, dom in subdomain.iteritems(): + for varname, dom in subdomain.items(): if isinstance(dom, (tuple,list)): if not (isfinite(dom[0]) and isfinite(dom[1])): raise RuntimeError("Must specify a finite range for %s" % varname) @@ -822,7 +822,7 @@ if 'fnspecs' in gen.funcspec._initargs: old_fnspecs = gen.funcspec._initargs['fnspecs'] fnspecs, new_varspecs = resolveClashingAuxFnPars(old_fnspecs, varspecs, - sysargs_y.pars.keys()) + list(sysargs_y.pars.keys())) # TEMP # process any Jacobian functions to remove un-needed terms if 'Jacobian' in fnspecs: @@ -875,7 +875,7 @@ except PyDSTool_ExistError: tries += 1 if tries == max_tries: - print 'null_curve_y failed in forward direction' + print('null_curve_y failed in forward direction') raise else: # try a different starting point @@ -915,7 +915,7 @@ except PyDSTool_ExistError: tries += 1 if tries == max_tries: - print 'null_curve_y failed in backward direction' + print('null_curve_y failed in backward direction') raise else: # try a different starting point @@ -963,9 +963,9 @@ try: fp_ixs = [findClosestPointIndex(pt, y_null) for pt in add_fp_pts] except ValueError: - print "Non-monotonic data computed. Try (1) reducing max_step, (2) crop_tol_pc down to zero if non-monotonicity" - print " is at domain endpoints, or (3) normalize tolerances for fixed points with that of nullclines." - print " Not including fixed points in nullcline data" + print("Non-monotonic data computed. Try (1) reducing max_step, (2) crop_tol_pc down to zero if non-monotonicity") + print(" is at domain endpoints, or (3) normalize tolerances for fixed points with that of nullclines.") + print(" Not including fixed points in nullcline data") else: for n, ix in enumerate(fp_ixs): # +n offsets fact that n entries were already added @@ -1023,7 +1023,7 @@ if 'fnspecs' in gen.funcspec._initargs: old_fnspecs = gen.funcspec._initargs['fnspecs'] fnspecs, new_varspecs = resolveClashingAuxFnPars(old_fnspecs, varspecs, - sysargs_x.pars.keys()) + list(sysargs_x.pars.keys())) # TEMP # process any Jacobian functions to remove un-needed terms if 'Jacobian' in fnspecs: @@ -1073,7 +1073,7 @@ except PyDSTool_ExistError: tries += 1 if tries == max_tries: - print 'null_curve_x failed in forward direction' + print('null_curve_x failed in forward direction') raise else: # try a different starting point @@ -1099,7 +1099,7 @@ except PyDSTool_ExistError: tries += 1 if tries == max_tries: - print 'null_curve_x failed in backward direction' + print('null_curve_x failed in backward direction') raise else: # try a different starting point @@ -1135,9 +1135,9 @@ try: fp_ixs = [findClosestPointIndex(pt, x_null) for pt in add_fp_pts] except ValueError: - print "Non-monotonic data computed. Try (1) reducing max_step, (2) crop_tol_pc down to zero if non-monotonicity" - print " is at domain endpoints, or (3) normalize tolerances for fixed points with that of nullclines." - print " Not including fixed points in nullcline data" + print("Non-monotonic data computed. Try (1) reducing max_step, (2) crop_tol_pc down to zero if non-monotonicity") + print(" is at domain endpoints, or (3) normalize tolerances for fixed points with that of nullclines.") + print(" Not including fixed points in nullcline data") else: for n, ix in enumerate(fp_ixs): # +n offsets fact that n entries were already added @@ -1174,14 +1174,14 @@ subdomain = filteredDict(gen.xdomain, gen.funcspec.vars) else: subdomain = gen._FScompatibleNames(subdomain) - assert remain(subdomain.keys(),gen.funcspec.vars) == [] and \ - remain(gen.funcspec.vars,subdomain.keys()) == [] + assert remain(list(subdomain.keys()),gen.funcspec.vars) == [] and \ + remain(gen.funcspec.vars,list(subdomain.keys())) == [] # only vary over domains that are given as ranges: fixed values # are not counted D = 0 xdict = {}.fromkeys(gen.funcspec.vars) fixed_vars = {} - for xname, dom in subdomain.iteritems(): + for xname, dom in subdomain.items(): if isinstance(dom, (tuple,list)): if not (isfinite(dom[0]) and isfinite(dom[1])): raise RuntimeError("Must specify a finite range for %s"%xname) @@ -1223,7 +1223,7 @@ fprime = make_Jac_wrap(gen, xdict, x0_names) elif jac is not None: def Jac_wrap(x, t, pdict): - xdict.update(dict(zip(x0_names, x))) + xdict.update(dict(list(zip(x0_names, x)))) argdict = filteredDict(xdict, jac._args) argdict['t'] = t try: @@ -1240,8 +1240,8 @@ fp_listdict = [] d_posns = base_n_counter(n,D) xtol = eps/10. - for dummy_ix in xrange(n**D): - x0 = array([x0_coords[i][d_posns[i]] for i in xrange(D)]) + for dummy_ix in range(n**D): + x0 = array([x0_coords[i][d_posns[i]] for i in range(D)]) res = fsolve(Rhs_wrap,x0,(t,gen.pars),xtol=xtol, fprime=fprime,full_output=True) xinf_val = res[0] @@ -1258,7 +1258,7 @@ xintervals[ix].contains(xinf_val[ix]) is not notcontained if ok: fps.append(xinf_val) - fp_pt = dict(zip(x0_names, xinf_val)) + fp_pt = dict(list(zip(x0_names, xinf_val))) fp_pt.update(fixed_vars) fp_listdict.append(gen._FScompatibleNamesInv(fp_pt)) d_posns.inc() @@ -1410,9 +1410,9 @@ def info(self, verboselevel=1): if verboselevel == 1: - print self.__str__() + print(self.__str__()) elif verboselvel > 1: - print self.__repr__() + print(self.__repr__()) def __copy__(self): return Point2D(self.x, self.y, self.xname, self.yname, self._normord, @@ -1720,8 +1720,8 @@ return nullcline(self.xname, self.yname, np.array(sample_vals), x_relative_scale=self.x_relative_scale_fac) except: - print "Error cropping nullcline at sample points", sample_vals - print "MAYBE TOO FEW VALUES SAMPLED: number was", len(sample_vals) + print("Error cropping nullcline at sample points", sample_vals) + print("MAYBE TOO FEW VALUES SAMPLED: number was", len(sample_vals)) raise def is_monotonic(self): @@ -1758,7 +1758,7 @@ in the given norm. """ # start with all indices, and remove those that are unwanted - remaining = range(len(pts)) + remaining = list(range(len(pts))) for i, p in enumerate(pts): for j in range(i+1, len(pts)): if norm(p-pts[j],normord) < eps: @@ -1935,8 +1935,8 @@ var_ixs.append(gen.query('vars').index(v)) fp_evaluated = array(gen.Rhs(0, gen._FScompatibleNames(pt), gen.pars))[var_ixs] if sometrue([abs(fp_i) > eps for fp_i in fp_evaluated]): - print "Tolerance =", eps - print "vector field is", fp_evaluated + print("Tolerance =", eps) + print("vector field is", fp_evaluated) raise PyDSTool_ValueError("Given point is not a fixed point of the system at given tolerance") self.coordnames = pt.coordnames self._classify() @@ -2015,7 +2015,7 @@ dict_str = "{" + ",".join(entries) + "})\n" jac_def_str = "def jac_fn(t, " + arg_str + "):\n\t" + \ "return self.gen.Jacobian(t, " + dict_str - exec jac_def_str in locals(), globals() + exec(jac_def_str, locals(), globals()) return jac_fn else: raise NotImplementedError('Jacobian is not the right shape') @@ -2030,7 +2030,7 @@ def _classify(self): if self.dimension == 2: - print "Use fixedpoint_2D class" + print("Use fixedpoint_2D class") real_evals = (isreal(self.evals[0]), isreal(self.evals[1])) equal_evals = abs(self.evals[0] - self.evals[1]) < self.eps @@ -2130,7 +2130,7 @@ self.xvar = x varsPP = [x, 'v'] if isinstance(model, NonHybridModel): - self.gen = model.registry.values()[0] + self.gen = list(model.registry.values())[0] elif isinstance(model, Generator.Generator): self.gen = model else: @@ -2217,7 +2217,7 @@ ) DSargs.events = [thresh_ev] if targlang == 'c': - print "Warning! Did you delete any existing linear systems?" + print("Warning! Did you delete any existing linear systems?") self.lin = Generator.Dopri_ODEsystem(DSargs) else: self.lin = Generator.Vode_ODEsystem(DSargs) @@ -2713,7 +2713,7 @@ assert Bmon, "Nullcline B must be monotonic" else: if not Bmon: - print "Warning: nullcline B is not monotonic in closest_perp_distance_between splines" + print("Warning: nullcline B is not monotonic in closest_perp_distance_between splines") # search interior sample points of spline A first, and 1% inside endpoints xa_search_vals = _sample_array_interior(NullcA.array[:,0], 0.01) dists = [closest_perp_distance_on_spline(NullcA, NullcB, xa) for xa in xa_search_vals] @@ -2950,7 +2950,7 @@ dxscaled = dx_scaled_2D(dx, rel_scale) if isinstance(dx_gamma, dict): assert len(dx_gamma) == 2, "Invalid value for dx_gamma" - assert remain(dx_gamma.keys(), [1,-1]) == [], \ + assert remain(list(dx_gamma.keys()), [1,-1]) == [], \ "Invalid value for dx_gamma" else: try: @@ -2960,7 +2960,7 @@ def test_fn(x, dircode): if verboselevel>1: - print "Test point", x[x.coordnames[0]], x[x.coordnames[1]], "in direction", dircode, "\n" + print("Test point", x[x.coordnames[0]], x[x.coordnames[1]], "in direction", dircode, "\n") gen.set(ics=x) try: test = gen.compute('test', dirn=dircode) @@ -2974,26 +2974,26 @@ if events['Gamma_out_minus'] is None: if verboselevel>1: pts=test.sample(coords=x.coordnames) - print "Last computed point was\n", pts[-1] - print "...after time", pts['t'][-1] + print("Last computed point was\n", pts[-1]) + print("...after time", pts['t'][-1]) plot(pts[x.coordnames[0]],pts[x.coordnames[1]],'b-') raise RuntimeError("Did not reach Gamma surfaces") else: # hit Gamma_out_minus if verboselevel>1: - print "Reached Gamma minus at t=", events['Gamma_out_minus']['t'][0] + print("Reached Gamma minus at t=", events['Gamma_out_minus']['t'][0]) sgn = -1 else: if events['Gamma_out_minus'] is None: # hit Gamma_out_plus if verboselevel>1: - print "Reached Gamma plus at t=", events['Gamma_out_plus']['t'][0] + print("Reached Gamma plus at t=", events['Gamma_out_plus']['t'][0]) sgn = 1 else: if verboselevel>1: pts=test.sample(coords=x.coordnames) - print "Last computed point was\n", pts[-1] - print "...after time", pts['t'][-1] + print("Last computed point was\n", pts[-1]) + print("...after time", pts['t'][-1]) plot(pts[x.coordnames[0]],pts[x.coordnames[1]],'b-') raise RuntimeError("Did not reach Gamma surfaces") return sgn @@ -3030,7 +3030,7 @@ ### w = 's' => stable branch ### w = 'u' => unstable branch if verboselevel>0: - print "Starting %s branch" % man_names[w] + print("Starting %s branch" % man_names[w]) if w == 's': col = 'g' w_sgn = -1 @@ -3055,7 +3055,7 @@ # determines which is "before" and which is "after" the # event surface (time may be reversed depending on which # manifold is being computed) - print "Set these event directions according to your problem..." + print("Set these event directions according to your problem...") gen.eventstruct.setEventDir('Gamma_out_plus', -1) gen.eventstruct.setEventDir('Gamma_out_minus', 1) gen.set(pars={'Gamma_out_plus_p_'+var_x: p0_plus[var_x], @@ -3104,7 +3104,7 @@ f_ic = -w_sgn * gen.Rhs(0, ic, gen.pars) # array for sgn in directions: if verboselevel>0: - print "Starting direction", sgn + print("Starting direction", sgn) # PREDICTION x0_ic = ic+w_sgn*sgn*ic_dx*f_ic/norm(f_ic, normord) if verboselevel>1: @@ -3126,14 +3126,14 @@ try: x = onto_manifold(x0_ic, dx_perp, norm_to_flow, dircode=integ_dircode) - except RuntimeError, e: + except RuntimeError as e: dx_perp *= dx_perp_fac else: break if dx_perp <= dx_perp_eps: # RuntimeError was raised and could not continue reducing dx_perp - print "dx_perp reached lower tolerance =", dx_perp_eps - print e + print("dx_perp reached lower tolerance =", dx_perp_eps) + print(e) raise RuntimeError("Initial point did not converge") else: curve_len += norm(x-ic, normord) @@ -3141,8 +3141,8 @@ num_pts = 1 last_x = x if verboselevel>0: - print "Initial point converged to (%.6f, %.6f)\n" % \ - (x[var_x], x[var_y]) + print("Initial point converged to (%.6f, %.6f)\n" % \ + (x[var_x], x[var_y])) dx_perp = dx_perp_default last_f = f_ic # step backwards along flow @@ -3163,23 +3163,23 @@ x_ic = last_x + w_sgn*sgn*dxscaled*f/norm(f,normord) last_f = f if verboselevel>1: - print "\nStarting from point ", last_x + print("\nStarting from point ", last_x) delta = w_sgn*sgn*dxscaled*f/norm(f,normord) - print "Trying point ", x_ic, "in direction (%.6f, %.6f)\n" % (delta[0], delta[1]) + print("Trying point ", x_ic, "in direction (%.6f, %.6f)\n" % (delta[0], delta[1])) dx_perp = dx_perp_default # CORRECTION while dx_perp > dx_perp_eps: try: x = onto_manifold(x_ic, dx_perp, get_perp(f/norm(f,normord)), dircode=integ_dircode) - except RuntimeError, e: + except RuntimeError as e: dx_perp *= 0.75 else: break if dx_perp <= dx_perp_eps: # RuntimeError was raised and could not continue reducing dx_perp - print "dx_perp reached lower tolerance =", dx_perp_eps - print e + print("dx_perp reached lower tolerance =", dx_perp_eps) + print(e) break # end while search else: curve_len += norm(x-last_x, normord) @@ -3187,13 +3187,13 @@ last_x = x num_pts += 1 if verboselevel>1: - print "\nManifold has %i points" % num_pts + print("\nManifold has %i points" % num_pts) elif verboselevel>0: - print ".", + print(".", end=' ') sys.stdout.flush() if verboselevel>0: # finish the line - print " " + print(" ") indepvar, piece_sorted = sortedDictLists(piece, byvalue=False) manifold[w] = pointsToPointset(piece_sorted, indepvarname='arc_len', indepvararray=indepvar, norm=normord) @@ -3351,7 +3351,7 @@ except: raise TypeError("thresh must be a 1D Point object or dictionary") assert len(threshdict)==1, "thresh must be a 1D Point object or dictionary" - var = thresh.keys()[0] + var = list(thresh.keys())[0] a = pts[var] t = pts['t'] ts = [] @@ -3384,7 +3384,7 @@ else: return ts[-1]-ts[-2] else: - print len(ts), "is not enough periods", + print(len(ts), "is not enough periods", end=' ') return NaN @@ -3401,8 +3401,8 @@ minimize_values=range(max_index,0,-1) """ ## Find clusters - clusters = [map(operator.itemgetter(1), g) for k, g in \ - itertools.groupby(enumerate(indices), lambda (i,x):i-x)] + clusters = [list(map(operator.itemgetter(1), g)) for k, g in \ + itertools.groupby(enumerate(indices), lambda i_x:i_x[0]-i_x[1])] ## Minimize on clusters result = [] for c in clusters: @@ -3517,7 +3517,7 @@ zone_width = self.pars.zone_width except AttributeError: zone_width = np.inf # may fail unexpectedly - print "Warning: zone_width parameter defaulted to infinity" + print("Warning: zone_width parameter defaulted to infinity") min_zone_x = x_center - zone_width max_zone_x = x_center + zone_width # Grow domain of zone past known sample points with same property @@ -4000,7 +4000,7 @@ while t <= t_end: pt = traj(t) i += 1 - print "Frame %i, t = %.4f: step %.4f until %.4f" % (i, t, t_step, t_end) + print("Frame %i, t = %.4f: step %.4f until %.4f" % (i, t, t_step, t_end)) if moviename is not None: saveplot = 'pp_fig_%03d' % i format = 'png' @@ -4161,8 +4161,8 @@ try: res[i] = f(p) except: - print "Problem evaluating supplied function on mesh patch at " \ - "point ", p + print("Problem evaluating supplied function on mesh patch at " \ + "point ", p) raise return res @@ -4199,7 +4199,7 @@ ## print "Min grad using ixs", ixs use_vals = [vals[i] for i in ixs] else: - ixs = range(1,self.n) + ixs = list(range(1,self.n)) use_vals = vals return vals, ixs, use_vals @@ -4272,12 +4272,12 @@ if return_type == 0: raise RuntimeError("No valid directions to point in") else: - return Point(dict(zip(self.p0.coordnames, [x,y]))) + return Point(dict(list(zip(self.p0.coordnames, [x,y])))) elif degen_exterior_higher: if return_type == 0: raise RuntimeError("No valid directions to point in") else: - return Point(dict(zip(self.p0.coordnames, [0,0]))) + return Point(dict(list(zip(self.p0.coordnames, [0,0])))) d1 = (Inf, NaN) d2 = (Inf, NaN) for i, v in enumerate(use_vals): @@ -4378,12 +4378,12 @@ if return_type == 0: raise RuntimeError("No valid directions to point in") else: - return Point(dict(zip(self.p0.coordnames, [x,y]))) + return Point(dict(list(zip(self.p0.coordnames, [x,y])))) elif degen_exterior_lower: if return_type == 0: raise RuntimeError("No valid directions to point in") else: - return Point(dict(zip(self.p0.coordnames, [0,0]))) + return Point(dict(list(zip(self.p0.coordnames, [0,0])))) d1 = (0, NaN) d2 = (0, NaN) for i, v in enumerate(use_vals): @@ -4438,7 +4438,7 @@ try: test_traj = gen.compute('test') except: - print "Problem integrating test trajectory at i.c. ", ic + print("Problem integrating test trajectory at i.c. ", ic) raise test_pts = test_traj.sample(coords=dist_pts.all_pts.coordnames) # distance of endpoint to pointset @@ -4467,7 +4467,7 @@ try: test_traj = gen.compute('test') except: - print "Problem integrating test trajectory at i.c. ", ic + print("Problem integrating test trajectory at i.c. ", ic) raise test_pts = test_traj.sample(coords=dist_pts.all_pts.coordnames) # distance of endpoint to pointset @@ -4497,7 +4497,7 @@ except (ValueError, TypeError, OverflowError): xinf_val = NaN except: - print "Error in fsolve:", sys.exc_info()[0], sys.exc_info()[1] + RefactoringTool: Refactored ./PyDSTool/Toolbox/prep_boxplot.py RefactoringTool: Refactored ./PyDSTool/Toolbox/synthetic_data.py RefactoringTool: Refactored ./PyDSTool/Toolbox/syntheticdata.py print("Error in fsolve:", sys.exc_info()[0], sys.exc_info()[1]) xinf_val = NaN else: if result[2] in (1,2,3): #,4,5): @@ -4541,7 +4541,7 @@ for evn in other_evnames: gen.eventstruct.setActiveFlag(evn, False) qpars = {} - for parname, varname in pars_to_vars.items(): + for parname, varname in list(pars_to_vars.items()): qpars[parname] = q[varname] gen.set(ics=p, tdata=tdata_local, pars=qpars) ## # temp @@ -4564,8 +4564,8 @@ assert len(perp_ev) == 1 t_ev = perp_ev['t'][0] + tdata_local[0] except: - print "Event name:", iso_ev - print perp_ev + print("Event name:", iso_ev) + print(perp_ev) raise ValueError("No nearest point found with event") return (perp_ev, t_ev) --- ./PyDSTool/Toolbox/prep_boxplot.py (original) +++ ./PyDSTool/Toolbox/prep_boxplot.py (refactored) @@ -59,11 +59,11 @@ order = {} # `pos` position runs from 1 to n, `ns` runs from 0 to n-1 ns = [] - for k, v in data.iteritems(): + for k, v in data.items(): order[v['pos']] = k ns.append(v['pos']-1) ns.sort() - assert ns == range(n) + assert ns == list(range(n)) maxD = 0 max_dimval_markers = 0 labels = [] --- ./PyDSTool/Toolbox/synthetic_data.py (original) +++ ./PyDSTool/Toolbox/synthetic_data.py (refactored) @@ -40,7 +40,7 @@ rho = x/L*(roll_num*2*pi) return (r*cos(rho), r*sin(rho)) theta = 0 - for i in xrange(N): + for i in range(N): theta += cycle_rate x = r*cos(theta)+bias_x*i x_rolled, z_rolled = roll(x) @@ -69,7 +69,7 @@ X[i,2:D] = array([random.normal(0,noise)]*(D-2), float) # now do the spiral(s) theta = sqrt(radius*radius-1) - for i in xrange(N2): + for i in range(N2): theta += cycle_rate r = sqrt(theta*theta+0.8) X[N1+i,:] = array([r*cos(theta)+random.normal(0,noise), @@ -95,7 +95,7 @@ assert num_spirals in [0,1,2] X = zeros((num_spirals*N, D), float) theta = sqrt(radius*radius-1) - for i in xrange(N): + for i in range(N): theta += cycle_rate r = sqrt(theta*theta+0.8)*expand_rate X[i,:] = array([r*cos(theta)+random.normal(0,noise), @@ -115,12 +115,12 @@ """ X = zeros((N, D), float) if fromcentre: - for i in xrange(N): - X[i,:] = array([random.uniform(-length/2., length/2.) for j in xrange(D)], + for i in range(N): + X[i,:] = array([random.uniform(-length/2., length/2.) for j in range(D)], float) else: - for i in xrange(N): - X[i,:] = array([random.uniform(0, length) for j in xrange(D)], + for i in range(N): + X[i,:] = array([random.uniform(0, length) for j in range(D)], float) return X @@ -148,7 +148,7 @@ else: outsidepts += 1 ## print x, xr, "outside" - print "Number of points outside ball that were discarded = ", outsidepts + print("Number of points outside ball that were discarded = ", outsidepts) return X @@ -170,7 +170,7 @@ """ if lengths is None: lengths = [1.] * len(p) - a = array([max([p[i],lengths[i]-p[i]]) for i in xrange(len(p))]) + a = array([max([p[i],lengths[i]-p[i]]) for i in range(len(p))]) a.sort() return a @@ -180,7 +180,7 @@ """ if lengths is None: lengths = [1.] * len(p) - a = array([min([p[i],lengths[i]-p[i]]) for i in xrange(len(p))]) + a = array([min([p[i],lengths[i]-p[i]]) for i in range(len(p))]) a.sort() return a --- ./PyDSTool/Toolbox/syntheticdata.py (original) +++ ./PyDSTool/Toolbox/syntheticdata.py (refactored) @@ -40,7 +40,7 @@ rho = x/L*(roll_num*2*pi) return (r*cos(rho), r*sin(rho)) theta = 0 - for i in xrange(N): + for i in range(N): theta += cycle_rate x = r*cos(theta)+bias_x*i x_rolled, z_rolled = roll(x) @@ -69,7 +69,7 @@ RefactoringTool: Refactored ./PyDSTool/Toolbox/optimizers/__init__.py RefactoringTool: No changes to ./PyDSTool/Toolbox/optimizers/defaults.py RefactoringTool: Refactored ./PyDSTool/Toolbox/optimizers/tests/test_powell.py RefactoringTool: No changes to ./PyDSTool/Toolbox/optimizers/tests/test_quadratic.py RefactoringTool: No changes to ./PyDSTool/Toolbox/optimizers/tests/test_rosenbrock.py RefactoringTool: Refactored ./PyDSTool/Toolbox/optimizers/step/__init__.py X[i,2:D] = array([random.normal(0,noise)]*(D-2), float) # now do the spiral(s) theta = sqrt(radius*radius-1) - for i in xrange(N2): + for i in range(N2): theta += cycle_rate r = sqrt(theta*theta+0.8) X[N1+i,:] = array([r*cos(theta)+random.normal(0,noise), @@ -95,7 +95,7 @@ assert num_spirals in [0,1,2] X = zeros((num_spirals*N, D), float) theta = sqrt(radius*radius-1) - for i in xrange(N): + for i in range(N): theta += cycle_rate r = sqrt(theta*theta+0.8)*expand_rate X[i,:] = array([r*cos(theta)+random.normal(0,noise), @@ -115,12 +115,12 @@ """ X = zeros((N, D), float) if fromcentre: - for i in xrange(N): - X[i,:] = array([random.uniform(-length/2., length/2.) for j in xrange(D)], + for i in range(N): + X[i,:] = array([random.uniform(-length/2., length/2.) for j in range(D)], float) else: - for i in xrange(N): - X[i,:] = array([random.uniform(0, length) for j in xrange(D)], + for i in range(N): + X[i,:] = array([random.uniform(0, length) for j in range(D)], float) return X @@ -148,7 +148,7 @@ else: outsidepts += 1 ## print x, xr, "outside" - print "Number of points outside ball that were discarded = ", outsidepts + print("Number of points outside ball that were discarded = ", outsidepts) return X @@ -170,7 +170,7 @@ """ if lengths is None: lengths = [1.] * len(p) - a = array([max([p[i],lengths[i]-p[i]]) for i in xrange(len(p))]) + a = array([max([p[i],lengths[i]-p[i]]) for i in range(len(p))]) a.sort() return a @@ -180,7 +180,7 @@ """ if lengths is None: lengths = [1.] * len(p) - a = array([min([p[i],lengths[i]-p[i]]) for i in xrange(len(p))]) + a = array([min([p[i],lengths[i]-p[i]]) for i in range(len(p))]) a.sort() return a --- ./PyDSTool/Toolbox/optimizers/__init__.py (original) +++ ./PyDSTool/Toolbox/optimizers/__init__.py (refactored) @@ -14,12 +14,12 @@ mod_path() -import defaults -import criterion -import line_search -import optimizer -import step -import helpers +from . import defaults +from . import criterion +from . import line_search +from . import optimizer +from . import step +from . import helpers __all__= ['defaults', 'criterion', 'line_search', 'optimizer', 'step', 'helpers'] --- ./PyDSTool/Toolbox/optimizers/tests/test_powell.py (original) +++ ./PyDSTool/Toolbox/optimizers/tests/test_powell.py (refactored) @@ -34,7 +34,7 @@ """ Evaluates the gradient of the function """ - print x, self(x) + print(x, self(x)) return numpy.array([[2 + 120 * (x[0] - x[3]) ** 2, 20, 0, -120 * (x[0] - x[3]) ** 2], [20, 200 + 12 * (x[1] - 2 * x[2]) ** 2, -24 * (x[1] - 2 * x[2]) ** 2, 0], [0, -24 * (x[1] - 2 * x[2]) ** 2, 10 + 48 * (x[1] - 2 * x[2]) ** 2, -10], [-120 * (x[0] - x[3]) ** 2, 0, -10, -10 + 120 * (x[0] - x[3])**2]], dtype = numpy.float) class test_Powell(NumpyTestCase): --- ./PyDSTool/Toolbox/optimizers/step/__init__.py (original) +++ ./PyDSTool/Toolbox/optimizers/step/__init__.py (refactored) @@ -43,19 +43,19 @@ - local brute force step in 1D (experimental) """ -from gradient_step import * -from conjugate_gradient_step import * +from .gradient_step import * +from .conjugate_gradient_step import * -from newton_step import * -from marquardt_step import * -from quasi_newton_step import * -from goldfeld_step import * -from goldstein_price_step import * +from .newton_step import * +from .marquardt_step import * +from .quasi_newton_step import * +from .goldfeld_step import * +from .goldstein_price_step import * -from partial_step import * -from restart_conjugate_gradient import * +from .partial_step import * +from .restart_conjugate_gradient import * -from local_brute_force_1dstep import * +from .local_brute_force_1dstep import * step__all__ = ['GradientStep', 'CWConjugatRefactoringTool: No changes to ./PyDSTool/Toolbox/optimizers/step/conjugate_gradient_step.py RefactoringTool: Refactored ./PyDSTool/Toolbox/optimizers/step/goldfeld_step.py RefactoringTool: No changes to ./PyDSTool/Toolbox/optimizers/step/goldstein_price_step.py RefactoringTool: No changes to ./PyDSTool/Toolbox/optimizers/step/gradient_step.py RefactoringTool: No changes to ./PyDSTool/Toolbox/optimizers/step/local_brute_force_1dstep.py RefactoringTool: No changes to ./PyDSTool/Toolbox/optimizers/step/marquardt_step.py RefactoringTool: No changes to ./PyDSTool/Toolbox/optimizers/step/newton_step.py RefactoringTool: No changes to ./PyDSTool/Toolbox/optimizers/step/partial_step.py RefactoringTool: No changes to ./PyDSTool/Toolbox/optimizers/step/quasi_newton_step.py RefactoringTool: No changes to ./PyDSTool/Toolbox/optimizers/step/restart_conjugate_gradient.py RefactoringTool: No changes to ./PyDSTool/Toolbox/optimizers/step/tests/test_conjugate_gradient_step.py RefactoringTool: No changes to ./PyDSTool/Toolbox/optimizers/step/tests/test_goldstein_price_step.py RefactoringTool: No changes to ./PyDSTool/Toolbox/optimizers/step/tests/test_gradient_step.py RefactoringTool: No changes to ./PyDSTool/Toolbox/optimizers/step/tests/test_marquardt_step.py RefactoringTool: No changes to ./PyDSTool/Toolbox/optimizers/step/tests/test_newton_step.py RefactoringTool: No changes to ./PyDSTool/Toolbox/optimizers/step/tests/test_partial_step.py RefactoringTool: No changes to ./PyDSTool/Toolbox/optimizers/step/tests/test_quasi_newton_step.py RefactoringTool: No changes to ./PyDSTool/Toolbox/optimizers/step/tests/test_restart_conjugate_gradient.py RefactoringTool: Refactored ./PyDSTool/Toolbox/optimizers/optimizer/__init__.py RefactoringTool: No changes to ./PyDSTool/Toolbox/optimizers/optimizer/optimizer.py RefactoringTool: Refactored ./PyDSTool/Toolbox/optimizers/optimizer/standard_optimizer.py RefactoringTool: Refactored ./PyDSTool/Toolbox/optimizers/optimizer/standard_optimizer_modifying.py RefactoringTool: Refactored ./PyDSTool/Toolbox/optimizers/line_search/__init__.py RefactoringTool: No changes to ./PyDSTool/Toolbox/optimizers/line_search/adaptive_last_step_modifier.py RefactoringTool: No changes to ./PyDSTool/Toolbox/optimizers/line_search/backtracking_search.py RefactoringTool: Refactored ./PyDSTool/Toolbox/optimizers/line_search/barzilai_borwein_non_monotone_search.py eGradientStep', 'DYConjugateGradientStep', 'DConjugateGradientStep', 'FRConjugateGradientStep', 'PRPConjugateGradientStep', 'FRPRPConjugateGradientStep', --- ./PyDSTool/Toolbox/optimizers/step/goldfeld_step.py (original) +++ ./PyDSTool/Toolbox/optimizers/step/goldfeld_step.py (refactored) @@ -37,7 +37,7 @@ shift = -minEig + c #avoiding sparse case with big nVars - for i in xrange(point): G[i,i] += shift + for i in range(point): G[i,i] += shift step = n_solve(G, -g) --- ./PyDSTool/Toolbox/optimizers/optimizer/__init__.py (original) +++ ./PyDSTool/Toolbox/optimizers/optimizer/__init__.py (refactored) @@ -16,8 +16,8 @@ - modifies the resulting parameters """ -from standard_optimizer import * -from standard_optimizer_modifying import * +from .standard_optimizer import * +from .standard_optimizer_modifying import * optimizer__all__ = ['StandardOptimizer', 'StandardOptimizerModifying'] --- ./PyDSTool/Toolbox/optimizers/optimizer/standard_optimizer.py (original) +++ ./PyDSTool/Toolbox/optimizers/optimizer/standard_optimizer.py (refactored) @@ -6,7 +6,7 @@ A standard optimizer """ -import optimizer +from . import optimizer class StandardOptimizer(optimizer.Optimizer): """ @@ -60,7 +60,7 @@ else: # this would include self.optimalPoint if the lowest was found by the linesearch new_pars = pest.pars_dict_to_array(pest.log[pest._lowest_res_log_ix].pars) - print "*** CHOSE pars with residual %.8f" % pest.log[pest._lowest_res_log_ix].residual_norm + print("*** CHOSE pars with residual %.8f" % pest.log[pest._lowest_res_log_ix].residual_norm) self.state['new_parameters'] = new_pars self.state['new_value'] = self.function(new_pars) --- ./PyDSTool/Toolbox/optimizers/optimizer/standard_optimizer_modifying.py (original) +++ ./PyDSTool/Toolbox/optimizers/optimizer/standard_optimizer_modifying.py (refactored) @@ -6,7 +6,7 @@ A standard optimizer with a special object that modifies the resulting set of parameters """ -import optimizer +from . import optimizer class StandardOptimizerModifying(optimizer.Optimizer): """ --- ./PyDSTool/Toolbox/optimizers/line_search/__init__.py (original) +++ ./PyDSTool/Toolbox/optimizers/line_search/__init__.py (refactored) @@ -35,24 +35,24 @@ - modified the last step length with a fixed factor """ -from simple_line_search import * -from hyperbolic_line_search import * -from damped_line_search import * -from backtracking_search import * +from .simple_line_search import * +from .hyperbolic_line_search import * +from .damped_line_search import * +from .backtracking_search import * -from wolfe_powell_rule import * -from strong_wolfe_powell_rule import * -from goldstein_rule import * +from .wolfe_powell_rule import * +from .strong_wolfe_powell_rule import * +from .goldstein_rule import * -from golden_section import * -from fibonacci_section import * -from quadratic_interpolation import * -from cubic_interpolation import * +from .golden_section import * +from .fibonacci_section import * +from .quadratic_interpolation import * +from .cubic_interpolation import * -from adaptive_last_step_modifier import * -from fixed_last_step_modifier import * +from .adaptive_last_step_modifier import * +from .fixed_last_step_modifier import * -from scaled_line_search import * +from .scaled_line_search import * line_search__all__ = ['SimpleLineSearch', 'HyperbolicLineSearch', 'DampedLineSearch', 'BacktrackingSearch', 'WolfePowellRule', 'StrongWolfePowellRule', 'GoldsteinRule', --- ./PyDSTool/Toolbox/optimizers/line_search/barzilai_borwein_non_monotone_search.py (original) +++ ./PyDSTool/Toolbox/optimizers/line_search/barzilai_borwein_non_monotone_search.py (refactored) @@ -42,7 +42,7 @@ xk = x0.copy() last_M_iter_objFun_values = [] - for k in xrange(maxIter): + for k in range(maxIter): gk = function.gradient(xk) if norm(gk) <= gradtol: break @@ -77,6 +77,6 @@ x0 = sin(arange(3RefactoringTool: Refactored ./PyDSTool/Toolbox/optimizers/line_search/barzilai_borwein_search.py RefactoringTool: No changes to ./PyDSTool/Toolbox/optimizers/line_search/cubic_interpolation.py RefactoringTool: No changes to ./PyDSTool/Toolbox/optimizers/line_search/damped_line_search.py RefactoringTool: No changes to ./PyDSTool/Toolbox/optimizers/line_search/fibonacci_section.py RefactoringTool: No changes to ./PyDSTool/Toolbox/optimizers/line_search/fixed_last_step_modifier.py RefactoringTool: No changes to ./PyDSTool/Toolbox/optimizers/line_search/golden_section.py RefactoringTool: No changes to ./PyDSTool/Toolbox/optimizers/line_search/goldstein_rule.py RefactoringTool: No changes to ./PyDSTool/Toolbox/optimizers/line_search/hyperbolic_line_search.py RefactoringTool: No changes to ./PyDSTool/Toolbox/optimizers/line_search/quadratic_interpolation.py RefactoringTool: Refactored ./PyDSTool/Toolbox/optimizers/line_search/scaled_line_search.py RefactoringTool: No changes to ./PyDSTool/Toolbox/optimizers/line_search/simple_line_search.py RefactoringTool: No changes to ./PyDSTool/Toolbox/optimizers/line_search/strong_wolfe_powell_rule.py RefactoringTool: No changes to ./PyDSTool/Toolbox/optimizers/line_search/wolfe_powell_rule.py RefactoringTool: No changes to ./PyDSTool/Toolbox/optimizers/line_search/tests/test_adaptive_last_step_modifier.py RefactoringTool: No changes to ./PyDSTool/Toolbox/optimizers/line_search/tests/test_backtracking_search.py RefactoringTool: No changes to ./PyDSTool/Toolbox/optimizers/line_search/tests/test_cubic_interpolation.py RefactoringTool: No changes to ./PyDSTool/Toolbox/optimizers/line_search/tests/test_damped_line_search.py RefactoringTool: No changes to ./PyDSTool/Toolbox/optimizers/line_search/tests/test_fibonacci_section.py RefactoringTool: No changes to ./PyDSTool/Toolbox/optimizers/line_search/tests/test_fixed_last_step_modifier.py RefactoringTool: No changes to ./PyDSTool/Toolbox/optimizers/line_search/tests/test_golden_section.py RefactoringTool: No changes to ./PyDSTool/Toolbox/optimizers/line_search/tests/test_goldstein_rule.py RefactoringTool: No changes to ./PyDSTool/Toolbox/optimizers/line_search/tests/test_quadratic_interpolation.py RefactoringTool: No changes to ./PyDSTool/Toolbox/optimizers/line_search/tests/test_simple_line_search.py RefactoringTool: No changes to ./PyDSTool/Toolbox/optimizers/line_search/tests/test_strong_wolfe_powell_rule.py RefactoringTool: No changes to ./PyDSTool/Toolbox/optimizers/line_search/tests/test_wolfe_powell_rule.py RefactoringTool: Refactored ./PyDSTool/Toolbox/optimizers/helpers/__init__.py RefactoringTool: Refactored ./PyDSTool/Toolbox/optimizers/helpers/finite_difference.py RefactoringTool: Refactored ./PyDSTool/Toolbox/optimizers/helpers/levenberg_marquardt.py RefactoringTool: No changes to ./PyDSTool/Toolbox/optimizers/helpers/quadratic.py RefactoringTool: No changes to ./PyDSTool/Toolbox/optimizers/helpers/tests/test_finite_difference.py RefactoringTool: No changes to ./PyDSTool/Toolbox/optimizers/helpers/tests/test_levenberg_marquardt.py RefactoringTool: No changes to ./PyDSTool/Toolbox/optimizers/helpers/tests/test_quadratic.py RefactoringTool: Refactored ./PyDSTool/Toolbox/optimizers/criterion/__init__.py RefactoringTool: Refactored ./PyDSTool/Toolbox/optimizers/criterion/composite_criteria.py 00)) fun = Function() x_opt = BarzilaiBorwein_nonmonotone(fun, x0) - print x_opt - print fun(x_opt) + print(x_opt) + print(fun(x_opt)) --- ./PyDSTool/Toolbox/optimizers/line_search/barzilai_borwein_search.py (original) +++ ./PyDSTool/Toolbox/optimizers/line_search/barzilai_borwein_search.py (refactored) @@ -24,7 +24,7 @@ state0 = {'direction' : g0} x1 = lineSearch(origin = x0, state = state0, function = function) - print x1 + print(x1) s0 = x1 - x0 y0 = state['gradient'] - g0 @@ -37,7 +37,7 @@ yk_ = y0 gk_ = state['gradient'] - for k in xrange(maxIter): + for k in range(maxIter): alpha_k = dot(sk_, sk_) / dot(sk_,yk_) sk_ = -alpha_k * gk_ xk += sk_ @@ -46,7 +46,7 @@ yk_ = gk_ - gk_prev #if norm(gk_) < self.gradtol: return xk if norm(gk_) <= 1e-6: - print 'k=', k + print('k=', k) return xk return xk @@ -58,6 +58,6 @@ x0 = sin(arange(1000)) fun = Function() x_opt = BarzilaiBorwein(fun, x0) - print x_opt - print fun(x_opt) + print(x_opt) + print(fun(x_opt)) --- ./PyDSTool/Toolbox/optimizers/line_search/scaled_line_search.py (original) +++ ./PyDSTool/Toolbox/optimizers/line_search/scaled_line_search.py (refactored) @@ -89,9 +89,9 @@ # stepSize = 0.0005 init_step = stepSize while not_done: - print "\nLinestep: i =", i, "step size =", stepSize, "direction =\n", direction + print("\nLinestep: i =", i, "step size =", stepSize, "direction =\n", direction) p = origin + i * stepSize * direction - print "Testing p = ", p + print("Testing p = ", p) new_value = fun(p) if new_value < old_value: i += 1 --- ./PyDSTool/Toolbox/optimizers/helpers/__init__.py (original) +++ ./PyDSTool/Toolbox/optimizers/helpers/__init__.py (refactored) @@ -15,9 +15,9 @@ - also, versions with in-built caching of previous values """ -from quadratic import * +from .quadratic import * -from finite_difference import * +from .finite_difference import * helpers__all__ = ['Quadratic', 'FiniteDifferencesFunction', 'ForwardFiniteDifferences', --- ./PyDSTool/Toolbox/optimizers/helpers/finite_difference.py (original) +++ ./PyDSTool/Toolbox/optimizers/helpers/finite_difference.py (refactored) @@ -1,4 +1,4 @@ -from __future__ import division + from PyDSTool import common import numpy as np --- ./PyDSTool/Toolbox/optimizers/helpers/levenberg_marquardt.py (original) +++ ./PyDSTool/Toolbox/optimizers/helpers/levenberg_marquardt.py (refactored) @@ -2,7 +2,7 @@ # Matthieu Brucher # Last Change : 2007-08-23 10:12 -import quadratic +from . import quadratic import numpy class LMQuadratic(quadratic.Quadratic): --- ./PyDSTool/Toolbox/optimizers/criterion/__init__.py (original) +++ ./PyDSTool/Toolbox/optimizers/criterion/__init__.py (refactored) @@ -38,10 +38,10 @@ - Identical to AICCriterion except that a number of increases are tolerated """ -from criteria import * -from composite_criteria import * -from information_criteria import * -from facilities import * +from .criteria import * +from .composite_criteria import * +from .information_criteria import * +from .facilities import * criterion__all__ = ['IterationCriterion', 'MonotonyCriterion', 'RelativeValueCriterion', 'AbsoluteValueCriterion', 'RelativeParametersCriterion', 'AbsoluteParametersCriterion', 'GradientCriterion', 'OrComposition', 'AndComposition', --- ./PyDSTool/Toolbox/optimizers/criterion/composite_criteria.py (original) +++ ./PyDSTool/Toolbox/optimizers/criterion/composite_criteria.py (refactored) @@ -29,7 +29,7 @@ """ Collects the different criteria """ - self.criteria = kwargs.values() + list(args) + self.criteria = list(kwargs.values()) + list(args) def __call__(self, state, **kwargs): """ @@ -46,7 +46,7 @@ """ Collects the different criteria """ - self.critRefactoringTool: No changes to ./PyDSTool/Toolbox/optimizers/criterion/criteria.py RefactoringTool: Refactored ./PyDSTool/Toolbox/optimizers/criterion/facilities.py RefactoringTool: No changes to ./PyDSTool/Toolbox/optimizers/criterion/information_criteria.py RefactoringTool: No changes to ./PyDSTool/Toolbox/optimizers/criterion/tests/test_composite_criteria.py RefactoringTool: No changes to ./PyDSTool/Toolbox/optimizers/criterion/tests/test_criteria.py RefactoringTool: No changes to ./PyDSTool/Toolbox/optimizers/criterion/tests/test_facilities.py RefactoringTool: No changes to ./PyDSTool/Toolbox/optimizers/criterion/tests/test_information_criteria.py RefactoringTool: Refactored ./PyDSTool/PyCont/BifPoint.py eria = kwargs.values() + list(args) + self.criteria = list(kwargs.values()) + list(args) def __call__(self, state, **kwargs): """ --- ./PyDSTool/Toolbox/optimizers/criterion/facilities.py (original) +++ ./PyDSTool/Toolbox/optimizers/criterion/facilities.py (refactored) @@ -8,8 +8,8 @@ __all__ = ['criterion'] -from criteria import IterationCriterion, RelativeValueCriterion, RelativeParametersCriterion, GradientCriterion -from composite_criteria import OrComposition +from .criteria import IterationCriterion, RelativeValueCriterion, RelativeParametersCriterion, GradientCriterion +from .composite_criteria import OrComposition def criterion(**kwargs): """ --- ./PyDSTool/PyCont/BifPoint.py (original) +++ ./PyDSTool/PyCont/BifPoint.py (refactored) @@ -3,9 +3,9 @@ Drew LaMar, March 2006 """ -from misc import * +from .misc import * from PyDSTool.common import args -from TestFunc import DiscreteMap, FixedPointMap +from .TestFunc import DiscreteMap, FixedPointMap from numpy import Inf, NaN, isfinite, r_, c_, sign, mod, mat, \ subtract, divide, transpose, eye, real, imag, \ @@ -65,29 +65,29 @@ def info(self, C, ind=None, strlist=None): if ind is None: - ind = range(len(self.found)) + ind = list(range(len(self.found))) elif isinstance(ind, int): ind = [ind] if C.verbosity >= 1: - print self.label + ' Point found ' + print(self.label + ' Point found ') if C.verbosity >= 2: - print '========================== ' + print('========================== ') for n, i in enumerate(ind): - print n, ': ' + print(n, ': ') Xd = self.found[i].X - for k, j in Xd.iteritems(): - print k, ' = ', j - print '' + for k, j in Xd.items(): + print(k, ' = ', j) + print('') if hasattr(self.found[i], 'eigs'): - print 'Eigenvalues = \n' + print('Eigenvalues = \n') for x in self.found[i].eigs: - print ' (%f,%f)' % (x.real, x.imag) - print '\n' + print(' (%f,%f)' % (x.real, x.imag)) + print('\n') if strlist is not None: for string in strlist: - print string - print '' + print(string) + print('') class SPoint(BifPoint): @@ -131,7 +131,7 @@ def info(self, C, ind=None): if ind is None: - ind = range(len(self.found)) + ind = list(range(len(self.found))) elif isinstance(ind, int): ind = [ind] @@ -207,7 +207,7 @@ def info(self, C, ind=None): if ind is None: - ind = range(len(self.found)) + ind = list(range(len(self.found))) elif isinstance(ind, int): ind = [ind] @@ -244,29 +244,29 @@ numzero = len([eig for eig in W if abs(eig) < 1e-4]) if numzero > 1: if C.verbosity >= 2: - print 'Fold-Fold!\n' + print('Fold-Fold!\n') del self.found[-1] return False elif numzero == 0: if C.verbosity >= 2: - print 'False positive!\n' + print('False positive!\n') del self.found[-1] return False if C.verbosity >= 2: - print '\nChecking...' - print ' |q| = %f' % linalg.norm(q) - print ' = %f' % matrixmultiply(p,q) - print ' |Aq| = %f' % linalg.norm(matrixmultiply(J_coords,q)) - print ' |transpose(A)p| = %f\n' % linalg.norm(matrixmultiply(transpose(J_coords),p)) - - self.info(C, -1) - - return True - - def info(self, C, ind=None): - if ind is None: - ind = range(len(self.found)) + print('\nChecking...') + print(' |q| = %f' % linalg.norm(q)) + print(' = %f' % matrixmultiply(p,q)) + print(' |Aq| = %f' % linalg.norm(matrixmultiply(J_coords,q))) + print(' |transpose(A)p| = %f\n' % linalg.norm(matrixmultiply(transpose(J_coords),p))) + + self.info(C, -1) + + return True + + def info(self, C, ind=None): + if ind is None: + ind = list(range(len(self.found))) elif isinstance(ind, int): ind = [ind] @@ -296,9 +296,9 @@ for j in range(i+1,len(eigs)): if C.verbosity >= 2: if abs(eigs[i]) < 1e-5 and abs(eigs[j]) < 1e-5: - print 'Fold-Fold point found in Hopf!\n' + print('Fold-Fold point found in Hopf!\n') elif abs(imag(eigs[j])) < 1e-5 and abs(real(eigs[i]) + real(eigs[j])) < 1e-5: - print 'Neutral saddle found!\n' + print('Neutral saddle found!\n') elif abs(real(eigs[i])) < 1e-5: for j in range(i+1, len(eigs)): if abs(real(eigs[j])) < 1e-5 and abs(real(eigs[i]) - real(eigs[j])) < 1e-5: @@ -333,7 +333,7 @@ def info(self, C, ind=None): if ind is None: - ind = range(len(self.found)) + ind = list(range(len(self.found))) elif isinstance(ind, int): ind = [ind] @@ -367,17 +367,17 @@ else: b = C.CorrFunc.testfunc.data.w[:,0] c = C.CorrFunc.testfunc.data.v[:,0] - print '\nChecking...' - print ' = %f' % matrixmultiply(transpose(b), c) - print '\n' - - self.info(C, -1) - - return True - - def info(self, C, ind=None): - if ind is None: - ind = range(len(self.found)) + print('\nChecking...') + print(' = %f' % matrixmultiply(transpose(b), c)) + print('\n') + + self.info(C, -1) + + return True + + def info(self, C, ind=None): + if ind is None: + ind = list(range(len(self.found))) elif isinstance(ind, int): ind = [ind] @@ -404,7 +404,7 @@ def info(self, C, ind=None): if ind is None: - ind = range(len(self.found)) + ind = list(range(len(self.found))) elif isinstance(ind, int): ind = [ind] @@ -432,17 +432,17 @@ a = 0.5*matrixmultiply(transpose(p), reshape([bilinearform(B[i,:,:], q, q) \ for i in range(B.shape[0])],(B.shape[0],1)))[0][0] if C.verbosity >= 2: - print '\nChecking...' - print ' |a| = %f' % a - print '\n' - - self.info(C, -1) - - return True - - def info(self, C, ind=None): - if ind is None: - ind = range(len(self.found)) + print('\nChecking...') + print(' |a| = %f' % a) + print('\n') + + self.info(C, -1) + + return True + + def info(self, C, ind=None): + if ind is None: + ind = list(range(len(self.found))) elif isinstance(ind, int): ind = [ind] @@ -468,7 +468,7 @@ def info(self, C, ind=None): if ind is None: - ind = range(len(self.found)) + ind = list(range(len(self.found))) elif isinstance(ind, int): ind = [ind] @@ -493,9 +493,9 @@ for j in range(i+1,len(eigs)): if C.verbosity >= 2: if abs(eigs[i]) < 1e-5 and abs(eigs[j]) < 1e-5: - print 'Fold-Fold point found in Hopf!\n' + print('Fold-Fold point found in Hopf!\n') elif abs(imag(eigs[j])) < 1e-5 and abs(real(eigs[i]) + real(eigs[j])) < 1e-5: - print 'Neutral saddle found!\n' + print('Neutral saddle found!\n') RefactoringTool: Refactored ./PyDSTool/PyCont/ContClass.py elif abs(real(eigs[i])) < 1e-5: for j in range(i+1, len(eigs)): if abs(real(eigs[j])) < 1e-5 and abs(real(eigs[i]) - real(eigs[j])) < 1e-5: @@ -530,7 +530,7 @@ def info(self, C, ind=None): if ind is None: - ind = range(len(self.found)) + ind = list(range(len(self.found))) elif isinstance(ind, int): ind = [ind] @@ -564,7 +564,7 @@ def info(self, C, ind=None): if ind is None: - ind = range(len(self.found)) + ind = list(range(len(self.found))) elif isinstance(ind, int): ind = [ind] @@ -619,7 +619,7 @@ def info(self, C, ind=None): if ind is None: - ind = range(len(self.found)) + ind = list(range(len(self.found))) elif isinstance(ind, int): ind = [ind] @@ -662,7 +662,7 @@ def info(self, C, ind=None): if ind is None: - ind = range(len(self.found)) + ind = list(range(len(self.found))) elif isinstance(ind, int): ind = [ind] --- ./PyDSTool/PyCont/ContClass.py (original) +++ ./PyDSTool/PyCont/ContClass.py (refactored) @@ -3,10 +3,10 @@ Drew LaMar, March 2006 """ -from Continuation import EquilibriumCurve, FoldCurve, HopfCurveOne, HopfCurveTwo, \ +from .Continuation import EquilibriumCurve, FoldCurve, HopfCurveOne, HopfCurveTwo, \ FixedPointCurve, LimitCycleCurve, UserDefinedCurve -from misc import * -from Plotting import pargs, initializeDisplay +from .misc import * +from .Plotting import pargs, initializeDisplay from PyDSTool.Model import Model, findTrajInitiator from PyDSTool.Generator import Generator @@ -67,7 +67,7 @@ def __init__(self, model): if isinstance(model, Generator): self.model = embed(model, make_copy=False) - self.gensys = self.model.registry.values()[0] + self.gensys = list(self.model.registry.values())[0] else: self.model = model mi, swRules, globalConRules, nextModelName, reused, \ @@ -120,7 +120,7 @@ # Check parameters if (curvetype != 'UD-C' and self.model.pars == {}) or \ - (curvetype == 'UD-C' and not initargs.has_key('userpars')): + (curvetype == 'UD-C' and 'userpars' not in initargs): raise ValueError('No parameters defined for this system!') # Process initial point @@ -129,8 +129,8 @@ # Default to initial conditions for model if self.model.icdict == {}: raise ValueError('No initial point defined for this system!') - elif initargs.has_key('uservars'): - if remain(initargs['uservars'], self.model.icdict.keys()) == []: + elif 'uservars' in initargs: + if remain(initargs['uservars'], list(self.model.icdict.keys())) == []: # uservars just used to select a subset of system's regular state vars initargs['initpoint'] = filteredDict(self.model.icdict, initargs['uservars']) @@ -149,7 +149,7 @@ elif isinstance(initargs['initpoint'], str): curvename, pointname = initargs['initpoint'].split(':') pointtype = pointname.strip('0123456789') - if not self.curves.has_key(curvename): + if curvename not in self.curves: raise KeyError('No curve of name ' + curvename + ' exists.') else: point = self.curves[curvename].getSpecialPoint(pointtype, pointname) @@ -162,8 +162,8 @@ if isinstance(initargs['initpoint'], Point): # Check to see if point contains a cycle. If it does, assume # we are starting at a cycle and save it in initcycle - for v in initargs['initpoint'].labels.itervalues(): - if v.has_key('cycle'): + for v in initargs['initpoint'].labels.values(): + if 'cycle' in v: initargs['initcycle'] = v # Dictionary w/ cycle, name, and tangent information # Save initial point information @@ -206,11 +206,11 @@ savedict = {} - print self.__dict__['curves'].keys() + print(list(self.__dict__['curves'].keys())) # Save data for each curve with different prefix - for name in self.__dict__['curves'].keys(): + for name in list(self.__dict__['curves'].keys()): if self[name].curvetype not in ['EP-C', 'LC-C']: - print "Can't save curve type", self[name].curvetype, "yet. (", name, ")" + print("Can't save curve type", self[name].curvetype, "yet. (", name, ")") continue # Can save equilibrium curves else: @@ -228,7 +228,7 @@ savedict[name+'_'+key] = array(curve[key]) # Add stabilities - if 'stab' in curve[0].labels[label].keys(): + if 'stab' in list(curve[0].labels[label].keys()): savedict[name+'_stab'] = [curve[x].labels[label]['stab'] for x in range(N)] temp = zeros(N) for x in range(N): @@ -239,7 +239,7 @@ savedict[name+'_stab'] = array(temp) # Add domain - if 'domain' in curve[0].labels[label].keys(): + if 'domain' in list(curve[0].labels[label].keys()): savedict[name+'_domain'] = [curve[x].labels[label]['domain'] for x in range(N)] temp = zeros(N) for x in range(N): @@ -250,9 +250,9 @@ savedict[name+'_domain'] = array(temp) # Add data - if 'data' in curve[0].labels[label].keys(): + if 'data' in list(curve[0].labels[label].keys()): # Add eigenvalues - if 'evals' in curve[0].labels[label]['data'].keys(): + if 'evals' in list(curve[0].labels[label]['data'].keys()): dim = len(curve[0].labels[label]['data']['evals']) evltmp = [[] for x in range(dim)] for x in range(dim): @@ -260,11 +260,11 @@ savedict[name+'_evals'] = array(evltmp) # Add ds - if 'ds' in curve[0].labels[label]['data'].keys(): + if 'ds' in list(curve[0].labels[label]['data'].keys()): savedict[name+'_ds'] = array([curve[y].labels[label]['data']['ds'] for y in range(N)]) # Add eigenvectors - if 'evecs' in curve[0].labels[label]['data'].keys(): + if 'evecs' in list(curve[0].labels[label]['data'].keys()): #dim = len(curve.coordnames) - 1 dim = len(curve[0].labels[label]['data']['evecs'][0]) evectmp = [] @@ -274,8 +274,8 @@ savedict[name+'_evecs'] = array(evectmp) # Add V - if 'V' in curve[0].labels[label]['data'].keys(): - for key in curve[0].labels[label]['data']['V'].keys(): + if 'V' in list(curve[0].labels[label]['data'].keys()): + for key in list(curve[0].labels[label]['data']['V'].keys()): savedict[name+'_V_'+key] = array([curve[x].labels[label]['data']['V'][key] for x in range(N)]) # Save the dictionary in matlab format @@ -285,13 +285,13 @@ def exportGeomview(self, coords=None, filename="geom.dat"): if coords is not None and len(coords) == 3: GeomviewOutput = "(progn (geometry " + self.model.name + " { LIST {: axes_" + self.model.name + "}" - for cname, curve in self.curves.iteritems(): + for cname, curve in self.curves.items(): GeomviewOutput += " {: " + cname + "}" GeomviewOutput += "}))\n\n" # Get axes limits alim = [[Inf,-Inf],[Inf,-Inf],[Inf,-Inf]] - for cname, curve in self.curves.iteritems(): + for cname, curve in self.curves.items(): for n in range(len(coords)): alim[n][0] = min(alim[n][0], min(curve.sol[coords[n]].toarray())) alim[n][1] = max(alim[n][1], max(curve.sol[coords[n]].toarray())) @@ -300,7 +300,7 @@ "0 0 0 1 0 0 0 1 0 0 0 1 " + \ "2 0 1 1 0 0 1 2 0 2 0 1 0 1 2 0 3 0 0 1 1})\n\n" - for cname, curve in self.curves.iteritems(): + for cname, curve in self.curves.items(): GeomviewOutput += "(hdefine geometry " + cname + " { LIST {: curve_" + cname + "} {: specpts_" + cname + "}})\n\n" GeomviewOutput += "(hdefine geometry curve_" + cname + " { appearance { linewidth 2 } SKEL " + \ @@ -336,14 +336,14 @@ return if curves is None: - curves = self.curves.keys() + curves = list(self.curves.keys()) plot_curves = [] for curve in curves: - if self.curves.has_key(curve): + if curve in self.curves: plot_curves.append(curve) else: - print "Warning: Curve " + curve + " does not exist." + print("Warning: Curve " + curve + " does not exist.") if len(plot_curves) > 0: initializeDisplay(self.plot, figure=figure, axes=axes) @@ -352,24 +352,24 @@ self.curves[curve].display(coords, figure=figure, axes=axes, stability=stability, domain=domain, init_display=False, **plot_args) def computeEigen(self): - for curve in self.curves.itervalues(): + for curve in self.curves.values(): curve.computeEigen() def info(self): - print self.__repr__() + print(self.__repr__()) #print " Variables : %s"%', '.join(self.model.allvars) #print " Parameters: %s\n"%', '.join(self.model.pars.keys()) - print "Containing curves: " + print("Containing curves: ") for c in self.curves: - print " " + c + " (type " + self.curves[c].curvetype + ")" + print(" " + c + " (type " + self.curves[c].curvetype + ")") def update(self, args): """Update parameters for all curves.""" - for c in args.keys(): + for c in list(args.keys()): if c not in curve_args_list: args.pop(c) - for v in self.curves.values(): + for v in list(self.curves.values()): v.update(args) def loadAutoMod(self): @@ -379,9 +379,9 @@ elif thisplatform in ['Linux', 'IRIX', 'Solaris', 'SunOS', 'Darwin', 'FreeBSD']: self._dllext = '.so' else: - print "Shared library extension not tested on this platform." - print "If this process fails please report the errors to the" - print "developers." + print("Shared library extension not tested on this platform.") + print("If this process fails please report the errors to the") + print("developers.") self._dllext = '.so' self._compilation_tempdir = os.path.join(os.getcwd(), @@ -392,8 +392,8 @@ "A file already exists with the same name" os.mkdir(self._compilation_tempdir) except: - print "Could not create compilation temp directory " + \ - self._compilation_tempdir + print("Could not create compilation temp directory " + \ + self._compilation_tempdir) raise self._compilation_sourcedir = os.path.join(_pydstool_path,"PyCont/auto/module") self._vf_file = self.gensys.name+"_vf.c" @@ -407,13 +407,13 @@ self.makeAutoLibSource() self.compileAutoLib() else: - print "Build the library using the makeLib method, or in " - print "stages using the makeLibSource and compileLib methods." + print("Build the library using the makeLib method, or in ") + print("stages using the makeLibSource and compileLib methods.") try: self._autoMod = __import__("auto"+self._vf_filename_ext, globals()) except: - print "Error loading auto module." + print("Error loading auto module.") raise def forceAutoLibRefresh(self): @@ -433,9 +433,9 @@ if delfiles: gc.collect() # still not able to delete these files!!!!! Argh! - print "Cannot rebuild library without restarting session. Sorry." - print "Try asking the Python developers to make a working module" - print "unimport function!" + print("Cannot rebuild library without restarting session. Sorry.") + print("Try asking the Python developers to make a working module") + print("unimport function!") def makeAutoLib(self, libsources=[], libdirs=[], include=[]): """makeAutoLib calls makeAutoLibSource and then the compileAutoLib method. @@ -457,7 +457,7 @@ ('string.h', STDLIB), ('autovfield.h', USERLIB), ('auto_c.h', USERLIB)]) include_str = '#include "auto_f2c.h"\n' # This must come first - for libstr, libtype in libinclude.iteritems(): + for libstr, libtype in libinclude.items(): if libtype == STDLIB: quoteleft = '<' quoteright = '>' @@ -470,8 +470,8 @@ for libstr in include: if libstr in libinclude: # don't repeat libraries - print "Warning: library '" + libstr + "' already appears in list"\ - + " of imported libraries" + print("Warning: library '" + libstr + "' already appears in list"\ + + " of imported libraries") else: include_str += "#include " + '"' + libstr + '"\n' @@ -501,7 +501,7 @@ inames = self.funcspec.inputs pnames.sort() inames.sort() - for i in xrange(self.gensys.numpars): + for i in range(self.gensys.numpars): p = pnames[i] # add to defines (WATCH OUT FOR PERIOD _T!!!) if (i < 10): @@ -510,13 +510,13 @@ pardefines += self.funcspec._defstr+" "+p+"\tp_["+str(i+40)+"]\n" # add period _T pardefines += self.funcspec._defstr+" _T\tp_[10]\n" - for i in xrange(self.gensys.dimension): + for i in range(self.gensys.dimension): v = vnames[i] # add to defines vardefines += self.funcspec._defstr+" "+v+"\tY_["+str(i)+"]\n" ## # add to undefines ## varundefines += self.funcspec._undefstr+" "+v+"\n" - for i in xrange(len(self.funcspec.inputs)): + for i in range(len(self.funcspec.inputs)): inp = inames[i] # add to defines inpdefines += self.funcspec._defstr+" "+inp+"\txv_["+str(i)+"]\n" @@ -527,7 +527,7 @@ # add signature for auxiliary functions if self.funcspec.auxfns: allfilestr += "\n" - for finfo in self.funcspec.auxfns.values(): + for finfo in list(self.funcspec.auxfns.values()): allfilestr += finfo[1] + ";\n" allfilestr += "\nvoid auxvars(unsigned, unsigned, double, double*, double*, " \ + "double*, unsigned, double*, unsigned, double*);\n" \ @@ -542,11 +542,11 @@ allfilestr += self.funcspec.spec[0] + "\n\n" if self.funcspec.auxfns: - for fname, finfo in self.funcspec.auxfns.iteritems(): + for fname, finfo in self.funcspec.auxfns.items(): fbody = finfo[0] # subs _p into auxfn-to-auxfn calls (but not to the signature) fbody_parsed = addArgToCalls(fbody, - self.funcspec.auxfns.keys(), + list(self.funcspec.auxfns.keys()), "p_, wk_, xv_", notFirst=fname) if 'initcond' in self.funcspec.auxfns: # convert 'initcond(x)' to 'initcond("x")' for @@ -578,9 +578,9 @@ #allfilestr = allfilestr.replace("double**","doublereal **") file.write(allfilestr) file.close() - except IOError, e: - print "Error opening file "+self._vf_file+" for writing" - raise IOError, e + except IOError as e: + print("Error opening file "+self._vf_file+" for writing") + raise IOError(e) def compileAutoLib(self, libsources=[], libdirs=[]): """compileAutoLib generates a python extension DLL with continuer and vector @@ -595,21 +595,21 @@ # then DLL file already exists and we can't overwrite it at this # time proceed = False - print "\n" - print "-----------------------------------------------------------" - print "Present limitation of Python: Cannot rebuild library" - print "without exiting Python and deleting the shared library" - print " " + str(os.path.join(os.getcwd(), - "_auto"+self._vf_filename_ext+self._dllext)) - print "by hand! If you made any changes to the system you should" - print "not proceed with running the integrator until you quit" - print "and rebuild." - print "-----------------------------------------------------------" - print "\n" + print("\n") + print("-----------------------------------------------------------") + print("Present limitation of Python: Cannot rebuild library") + print("without exiting Python and deleting the shared library") + print(" " + str(os.path.join(os.getcwd(), + "_auto"+self._vf_filename_ext+self._dllext))) + print("by hand! If you made any changes to the system you should") + print("not proceed with running the integrator until you quit") + print("and rebuild.") + print("-----------------------------------------------------------") + print("\n") else: proceed = True if not proceed: - print "Did not compile shared library." + print("Did not compile shared library.") return if self._autoMod is not None: self.forceAutoLibRefresh() @@ -626,7 +626,7 @@ ifacefile_orig.close() ifacefile_copy.close() except IOError: - print "automod.i copying error in auto compilation directory" + print("automod.i copying error in auto compilation directory") raise swigfile = os.path.join(self._compilation_tempdir, @@ -688,8 +688,8 @@ library_dirs=libdirs+['./'], libraries=libsources)]) except: - print "\nError occurred in generating Auto system..." - print sys.exc_info()[0], sys.exc_info()[1] + print("\nError occurred in generating Auto system...") + print(sys.exc_info()[0], sys.exc_info()[1]) raise RuntimeError rout.stop() # restore stdout try: @@ -705,9 +705,9 @@ os.path.join(os.getcwd(), "auto"+self._vf_filename_ext+".py")) except: - print "\nError occurred in generating Auto system" - print "(while moving library extension modules to CWD)" - print sys.exc_info()[0], sys.exc_info()[1] + print("\nError occurred in generating Auto system") + print("(while moving library extension modules to CWD)") + print(sys.exc_info()[0], sys.exc_info()[1]) raiseRefactoringTool: Refactored ./PyDSTool/PyCont/Continuation.py RuntimeError def __repr__(self): --- ./PyDSTool/PyCont/Continuation.py (original) +++ ./PyDSTool/PyCont/Continuation.py (refactored) @@ -9,10 +9,10 @@ # ----------------------------------------------------------------------------------------- -from misc import * -from TestFunc import * -from BifPoint import * -from Plotting import * +from .misc import * +from .TestFunc import * +from .BifPoint import * +from .Plotting import * from PyDSTool import Point, Pointset, PointInfo, args from PyDSTool.common import pickle, sortedDictValues, sortedDictKeys @@ -22,8 +22,8 @@ from PyDSTool.matplotlib_import import * except ImportError: from PyDSTool.matplotlib_unavailable import * - print "Warning: matplotlib failed to import properly and so is not" - print " providing a graphing interface" + print("Warning: matplotlib failed to import properly and so is not") + print(" providing a graphing interface") from numpy.random import random from numpy import dot as matrixmultiply @@ -88,7 +88,7 @@ 6: 'BP', 7: 'PD', 8: 'NS', 9: 'P', -9: 'MX'} solution_measures_list = ['max', 'min', 'avg', 'nm2'] # Ordering is important -solution_measures = dict(zip(solution_measures_list,[0, 0, 1, 2])) +solution_measures = dict(list(zip(solution_measures_list,[0, 0, 1, 2]))) all_args_list = unique(cont_args_list + equilibrium_args_list + fold_args_list + hopf_args_list + fixedpoint_args_list + @@ -179,14 +179,14 @@ else: if len(self.freepars) == Jquant0.dim: # Supplied Jac w.r.t. params is custom-made for only the free params in this continuation - self.parsindices = arange(range(Jquant0.dim)) + self.parsindices = arange(list(range(Jquant0.dim))) else: # Assume supplied Jac w.r.t. params is for all params in the original system # therefore there should be fewer free params than # system parameters assert len(self.freepars) < Jquant0.dim - self.parsindices = array([self.parsdict.keys().index(p) for p in self.freepars]) + self.parsindices = array([list(self.parsdict.keys()).index(p) for p in self.freepars]) else: - self.parsindices = array([self.parsdict.keys().index(p) for p in self.freepars]) + self.parsindices = array([list(self.parsdict.keys()).index(p) for p in self.freepars]) self.varsdim = len(self.varslist) self.freeparsdim = len(self.freepars) self.auxparsdim = len(self.auxpars) @@ -223,7 +223,7 @@ # Initialize vars and pars based on initpoint self.initpoint = self.model.query('ics') - for k, v in args['initpoint'].iteritems(): + for k, v in args['initpoint'].items(): if k in self.varslist or k in args['auxpars']: self.initpoint[k] = v elif k in self.model.query('pars'): @@ -310,7 +310,7 @@ def update(self, args): """Update parameters for Continuation.""" if args is not None: - for k, v in args.iteritems(): + for k, v in args.items(): if k in cont_args_list: if k == 'LocBifPoints': if isinstance(v, str): @@ -321,7 +321,7 @@ # Handle stopping points w = [] - if args.has_key('StopAtPoints'): + if 'StopAtPoints' in args: w = args['StopAtPoints'] if isinstance(w, str): if w.lower() == 'all': @@ -338,7 +338,7 @@ elif k != 'StopAtPoints': exec('self.' + k + ' = ' + repr(v)) elif k not in all_args_list: - print "Warning: " + k + " is either not a valid parameter or immutable." + print("Warning: " + k + " is either not a valid parameter or immutable.") def _preTestFunc(self, X, V): @@ -384,7 +384,7 @@ if self.SPOut is not None: # add simple "user"-defined function to catch parameter values # during continuation - for par, par_vals in self.SPOut.items(): + for par, par_vals in list(self.SPOut.items()): try: par_ix = self.params[self.freepars.index(par)] except IndexError: @@ -399,7 +399,7 @@ def _system(self, X): - VARS = dict(zip(self.varslist, array(X)[self.coords])) + VARS = dict(list(zip(self.varslist, array(X)[self.coords]))) for i, par in enumerate(self.freepars): self.parsdict[par] = X[self.params[i]] try: @@ -411,7 +411,7 @@ def _systemjac(self, x0, ind=None): - VARS = dict(zip(self.varslist, array(x0)[self.coords])) + VARS = dict(list(zip(self.varslist, array(x0)[self.coords]))) for i, par in enumerate(self.freepars): self.parsdict[par] = x0[self.params[i]] try: @@ -428,7 +428,7 @@ def _systemjac_withpars(self, x0, ind=None): - VARS = dict(zip(self.varslist, array(x0)[self.coords])) + VARS = dict(list(zip(self.varslist, array(x0)[self.coords]))) for i, par in enumerate(self.freepars): self.parsdict[par] = x0[self.params[i]] try: @@ -447,7 +447,7 @@ def _systemuser(self, X): """Calls self._userfunc, which is assumed to return an array of RHS values for the relevant (possibly subset of) variables.""" - VARS = dict(zip(self.varslist, array(X)[self.coords])) + VARS = dict(list(zip(self.varslist, array(X)[self.coords]))) for i, par in enumerate(self.freepars): self.parsdict[par] = X[self.params[i]] return self._userfunc(self, VARS, self.parsdict) @@ -456,7 +456,7 @@ def _systemjacuser(self, x0, ind=None): """Calls self._userjac, which is assumed to return an array of [Jac_x, Jac_p].""" - VARS = dict(zip(self.varslist, array(X)[self.coords])) + VARS = dict(list(zip(self.varslist, array(X)[self.coords]))) for i, par in enumerate(self.freepars): self.parsdict[par] = X[self.params[i]] return self._userjac(self, VARS, self.parsdict) @@ -471,7 +471,7 @@ # store commonly referenced values for efficiency V_loc = V[loc] curve_loc = curve[loc] - for bftype, bfinfo in self.BifPoints.iteritems(): + for bftype, bfinfo in self.BifPoints.items(): flag_list = [] for i, testfunc in enumerate(bfinfo.testfuncs): for k in range(testfunc.m): @@ -605,11 +605,11 @@ X[n] = self.sol[coords[n]] if origin is not None: X[n] = X[n] - origin[coords[n]] - elif coords[n] in self.parsdict.keys(): + elif coords[n] in list(self.parsdict.keys()): X[n] = array([self.parsdict[coords[n]]]*len(self.sol)) if origin is not None: X[n] = X[n] - origin[coords[n]] - elif dirs is not None and coords[n] in dirs.keys(): + elif dirs is not None and coords[n] in list(dirs.keys()): # Project curve onto plane spanned by coordinate directions # spanning variables and free parameters X[n] = array([matrixmultiply(x-aorigin, dirs[coords[n]]) \ @@ -628,7 +628,7 @@ name = self.name if name in self.plot[cfl][cal]: num = 0 - for k, v in self.plot[cfl][cal].iteritems(): + for k, v in self.plot[cfl][cal].items(): if isinstance(v, pargs) and k.split('_')[0] == name: num += 1 name = name + '_' + repr(num) @@ -643,7 +643,7 @@ disp_args['label'] = '_nolegend_' stabdict = partition([x.labels[label]['stab'] \ for x in self.sol],['S','U','N']) - for stabtype, stablist in stabdict.iteritems(): + for stabtype, stablist in stabdict.items(): for curve in stablist: self.plot[cfl][cal][name].curve.extend(plt.plot(X[0][curve[0]:curve[1]], \ X[1][curve[0]:curve[1]], \ @@ -677,18 +677,18 @@ bflist = self.sol.bylabel(bftype) if bflist is not None: for point in bflist: - if point.labels[bftype].has_key('name'): + if 'name' in point.labels[bftype]: X = zeros(2, float) for n in range(2): if coords[n] in self.sol.coordnames: X[n] = point[coords[n]] if origin is not None: X[n] = X[n] - origin[coords[n]] - elif coords[n] in self.parsdict.keys(): + elif coords[n] in list(self.parsdict.keys()): X[n] = self.parsdict[coords[n]] if origin is not None: X[n] = X[n] - origin[coords[n]] - elif dirs is not None and coords[n] in dirs.keys(): + elif dirs is not None and coords[n] in list(dirs.keys()): # Project point onto plane spanned by coordinate directions # spanning variables and free parameters X[n] = matrixmultiply(point-aorigin, @@ -783,16 +783,16 @@ B = r_[A,[V]] R = r_[matrixmultiply(A,V),0] Q = r_[fun(X),0] - if self.curvetype == 'UD-C' and self._userdata.has_key('problem') \ + if self.curvetype == 'UD-C' and 'problem' in self._userdata \ and self._userdata.problem: problem = 1 break if self.verbosity >= 10: - print " [%d]" % k + print(" [%d]" % k) u, s, vh = linalg.svd(B) cond = s[0]/s[-1] diag.cond.append(cond) - print " Log(Condition #) = %lf" % log10(cond) + print(" Log(Condition #) = %lf" % log10(cond)) WX = linalg.solve(B,mat([R,Q]).T) subtract(V, WX[:,0], V) divide(V, linalg.norm(V), V) @@ -803,7 +803,7 @@ Vnrm = linalg.norm(WX[:,1]) converged = Fnrm < self.FuncTol and Vnrm < self.VarTol if self.verbosity >= 10: - print ' (Fnrm, Vnrm) = (%.12f,%.12f)' % (Fnrm, Vnrm) + print(' (Fnrm, Vnrm) = (%.12f,%.12f)' % (Fnrm, Vnrm)) x0 = x1 x1 = linalg.norm(X-Xold) Xold = X.copy() @@ -834,16 +834,16 @@ A = jac(X) B = r_[A,[vi]] Q = r_[fun(X), X[ind] - xi] - if self.curvetype == 'UD-C' and self._userdata.has_key('problem') \ + if self.curvetype == 'UD-C' and 'problem' in self._userdata \ and self._userdata.problem: problem = 1 break if self.verbosity >= 10: - print " [%d]" % k + print(" [%d]" % k) u, s, vh = linalg.svd(B) cond = s[0]/s[-1] diag.cond.append(cond) - print " Log(Condition #) = %lf" % log10(cond) + print(" Log(Condition #) = %lf" % log10(cond)) W = linalg.solve(B, Q) subtract(X, W, X) @@ -852,7 +852,7 @@ Vnrm = linalg.norm(W) converged = Fnrm < self.FuncTol and Vnrm < self.VarTol if self.verbosity >= 10: - print ' (Fnrm, Vnrm) = (%.12f,%.12f)' % (Fnrm, Vnrm) + print(' (Fnrm, Vnrm) = (%.12f,%.12f)' % (Fnrm, Vnrm)) x0 = x1 x1 = linalg.norm(X-Xold) Xold = X.copy() @@ -880,16 +880,16 @@ B = r_[A,[V]] Q = r_[fun(X), matrixmultiply(X-self.curve[self.loc-1],V)-self.StepSize] - if self.curvetype == 'UD-C' and self._userdata.has_key('problem') \ + if self.curvetype == 'UD-C' and 'problem' in self._userdata \ and self._userdata.problem: problem = 1 break if self.verbosity >= 10: - print " [%d]" % k + print(" [%d]" % k) u, s, vh = linalg.svd(B) cond = s[0]/s[-1] diag.cond.append(cond) - print " Log(Condition #) = %lf" % log10(cond) + print(" Log(Condition #) = %lf" % log10(cond)) W = linalg.solve(B, Q) subtract(X, W, X) @@ -898,7 +898,7 @@ Vnrm = linalg.norm(W) converged = Fnrm < self.FuncTol and Vnrm < self.VarTol if self.verbosity >= 10: - print ' (Fnrm, Vnrm) = (%.12f,%.12f)' % (Fnrm, Vnrm) + print(' (Fnrm, Vnrm) = (%.12f,%.12f)' % (Fnrm, Vnrm)) x0 = x1 x1 = linalg.norm(X-Xold) Xold = X.copy() @@ -942,7 +942,7 @@ elif isinstance(x0, Point): x0 = x0.todict() for p in self.freepars: - if p not in x0.keys(): + if p not in list(x0.keys()): x0[p] = self.parsdict[p] x0 = tocoords(self, x0) @@ -1001,7 +1001,7 @@ k, converged, problem, diag = self.Corrector(curve[0], V[0]) except: converged = False - print "Error occurred in dynamical system computation" + print("Error occurred in dynamical system computation") else: val = linalg.norm(self.CorrFunc(curve[0])) attempts += 1 @@ -1011,7 +1011,7 @@ # Initialize index location on curve data set self.loc = 0 if self.verbosity >= 3: - print ' Found initial point on curve.' + print(' Found initial point on curve.') # Initialize test functions self._createTestFuncs() @@ -1040,12 +1040,12 @@ SSC_c, SSC_C = 0.8, 1.2 if self.verbosity >= 3: - print ' Beginning continuation...' + print(' Beginning continuation...') # Continuation loop closed = False stop = False problem = False - if self.curvetype == 'UD-C' and self._userdata.has_key('problem'): + if self.curvetype == 'UD-C' and 'problem' in self._userdata: self._userdata.problem = False # de-references to improve efficiency @@ -1066,9 +1066,9 @@ # self._userdata.problem = False # problem = False if self.verbosity >= 10: - print "Step #%d:" % loc - print " Corrector steps: %d/%d" % (k, self.MaxCorrIters) - print " Converged: %d" % (converged and not problem) + print("Step #%d:" % loc) + print(" Corrector steps: %d/%d" % (k, self.MaxCorrIters)) + print(" Converged: %d" % (converged and not problem)) if problem: stop = True @@ -1077,11 +1077,11 @@ if self.StepSize > self.MinStepSize: # Reduce stepsize and try again if self.verbosity >= 3: - print "Trouble converging. Reducing stepsize. (ds=%lf)" % self.StepSize + print("Trouble converging. Reducing stepsize. (ds=%lf)" % self.StepSize) self.StepSize = max(self.MinStepSize, self.StepSize*SSC_c) else: # Stop continuation - print "Did not converge. Stopping continuation. Reduce MinStepSize to continue." + print("Did not converge. Stopping continuation. Reduce MinStepSize to continue.") raise PyDSTool_ExistError("Did not converge. Stopping continuation. Reduce MinStepSize to continue") else: # Increase stepsize for fast convergence @@ -1120,8 +1120,8 @@ # Print information if self.verbosity >= 4: - print "Loc = %4d %s = %lf" % (loc, self.freepars[0], - curve[loc][-1]) + print("Loc = %4d %s = %lf" % (loc, self.freepars[0], + curve[loc][-1])) # Save information self._savePointInfo(loc) @@ -1134,7 +1134,7 @@ # V[self.loc]), ds=self.StepSize)}) self.CurveInfo[loc] = ('MX', {'data': args(V = todict(self, V[loc]), ds=self.StepSize)}) - elif not closed and not self.CurveInfo[loc].has_key('P'): + elif not closed and 'P' not in self.CurveInfo[loc]: self.CurveInfo[loc] = ('P', {'data': args(V = todict(self, V[loc])), 'plot': args()}) @@ -1160,7 +1160,7 @@ pt.labels[pttype]['name'] = pttype + repr(num) else: pt.labels[pttype] = {'name': pttype + repr(num)} - if pt.labels[pttype].has_key('cycle'): + if 'cycle' in pt.labels[pttype]: pt.labels[pttype]['cycle'].name = pttype + repr(num) num += 1 self.new_sol_segment = copy(self.sol) @@ -1182,7 +1182,7 @@ i -= 1 # Set start point (if bif point, set to startx) - if sol1.labels[pt_type].has_key('startx'): + if 'startx' in sol1.labels[pt_type]: x0 = sol1.labels[pt_type]['startx'] else: x0 = sol1 @@ -1192,7 +1192,7 @@ except: v0 = None - if sol1.labels[self.curvetype.split('-')[0]]['data'].has_key('ds'): + if 'ds' in sol1.labels[self.curvetype.split('-')[0]]['data']: self.StepSize = min(self.StepSize, sol1.labels[self.curvetype.split('-')[0]]['data'].ds) @@ -1222,7 +1222,7 @@ pt.labels[pttype]['name'] = pttype + repr(num) else: pt.labels[pttype] = {'name': pttype + repr(num)} - if pt.labels[pttype].has_key('cycle'): + if 'cycle' in pt.labels[pttype]: pt.labels[pttype]['cycle'].name = pttype + repr(num) num += 1 @@ -1249,11 +1249,11 @@ sol0 = self.sol[0] # Type of end point - if sol0.labels.has_key('P'): + if 'P' in sol0.labels: etype0 = 'P' else: etype0 = 'MX' - if self.sol[-1].labels.has_key('P'): + if 'P' in self.sol[-1].labels: etype1 = 'P' else: etype1 = 'MX' @@ -1261,16 +1261,16 @@ # Turn tangent vectors around (for non auto only) if not self.UseAuto: # Turn tangent vectors at end point type around - for k, v in sol0.labels[etype0]['data'].V.iteritems(): + for k, v in sol0.labels[etype0]['data'].V.items(): sol0.labels[etype0]['data'].V[k] = -1*v - for k, v in self.sol[-1].labels[etype1]['data'].V.iteritems(): + for k, v in self.sol[-1].labels[etype1]['data'].V.items(): self.sol[-1].labels[etype1]['data'].V[k] = -1*v # Turn tangent vectors at curve type around ctype = self.curvetype.split('-')[0] for pt in self.sol: - for k, v in pt.labels[ctype]['data'].V.iteritems(): + for k, v in pt.labels[ctype]['data'].V.items(): pt.labels[ctype]['data'].V[k] = -1*v for pttype in self.LocBifPoints + other_special_points: @@ -1282,14 +1282,14 @@ pt.labels[pttype]['name'] = pttype + repr(num) else: pt.labels[pttype] = {'name': pttype + repr(num)} - if pt.labels[pttype].has_key('cycle'): + if 'cycle' in pt.labels[pttype]: pt.labels[pttype]['cycle'].name = pttype + repr(num) num += 1 self.new_sol_segment = copy(self.sol) else: sol0 = self.sol[0] # Set start point (if bif point, set to startx) - if sol0.labels['P'].has_key('startx'): + if 'startx' in sol0.labels['P']: x0 = sol0.labels['P']['startx'] else: x0 = sol0 @@ -1307,7 +1307,7 @@ # self.StepSize = self.sol[0].labels[ctype]['data'].ds #except: # pass - if sol0.labels[self.curvetype.split('-')[0]]['data'].has_key('ds'): + if 'ds' in sol0.labels[self.curvetype.split('-')[0]]['data']: self.StepSize = min(self.StepSize, sol0.labels[self.curvetype.split('-')[0]]['data'].ds) @@ -1319,24 +1319,24 @@ sol0 = sol[0] # Type of end point - etype = sol0.labels.has_key('P') and 'P' or 'MX' + etype = 'P' in sol0.labels and 'P' or 'MX' if etype in sol0.labels: sol0.labels[etype]['name'] = etype+'1' else: sol0.labels[etype] = {'name': etype+'1'} - if sol0.labels[etype].has_key('cycle'): + if 'cycle' in sol0.labels[etype]: sol0.labels[etype]['cycle'].name = etype+'1' # Turn tangent vectors around (for non auto only) if not self.UseAuto: # Turn tangent vector around at point type endtype and change name - for k, v in sol0.labels[etype]['data'].V.iteritems(): + for k, v in sol0.labels[etype]['data'].V.items(): sol0.labels[etype]['data'].V[k] = -1*v # Turn tangent vectors at curve type around for pt in sol: - for k, v in pt.labels[ctype]['data'].V.iteritems(): + for k, v in pt.labels[ctype]['data'].V.items(): pt.labels[ctype]['data'].V[k] = -1*v # Fix labels @@ -1358,7 +1358,7 @@ pt.labels[pttype]['name'] = pttype + repr(num) else: pt.labels[pttype] = {'name': pttype + repr(num)} - if pt.labels[pttype].has_key('cycle'): + if 'cycle' in pt.labels[pttype]: pt.labels[pttype]['cycle'].name = pttype + repr(num) num += 1 @@ -1374,7 +1374,7 @@ x0 = ic.copy() x0 = x0.todict() for p in self.freepars: - if p not in x0.keys(): + if p not in list(x0.keys()): x0[p] = self.parsdict[p] x0 = tocoords(self, x0) @@ -1392,7 +1392,7 @@ if icv is None: # Get Jacobian information - print "Creating vector...\n" + print("Creating vector...\n") J_coords = self.CorrFunc.jac(x0, self.coords) J_params = self.CorrFunc.jac(x0, self.params) @@ -1411,26 +1411,26 @@ #while (abs(x0[ind] - ic[ind]) < 1.0): out = [] while (dy >= 1e-4): - print "%s = %lf" % (self.varslist[ind], x0[ind]) + print("%s = %lf" % (self.varslist[ind], x0[ind])) # Get Jacobian information #J_coords = self.CorrFunc.jac(x0, self.coords) #J_params = self.CorrFunc.jac(x0, self.params) k, converged, problem, diag = self.Corrector(x0, v0) - print 'x0 = ', x0 + print('x0 = ', x0) if not converged: - print " Did not converge." + print(" Did not converge.") if (Dy >= dy): - print " Changing stepsize." + print(" Changing stepsize.") Dy -= dy dy *= 0.5 else: - print " Minimum reached. Stopping simulation." + print(" Minimum reached. Stopping simulation.") raise PyDSTool_ExistError("Failed to converge") else: out.append((Dy, diag)) #print " Converged. Avg. cond. # = %lf" % (csum/k) - print " Converged. Avg. cond. # = %lf" % (sum(diag.cond)/len(diag.cond)) + print(" Converged. Avg. cond. # = %lf" % (sum(diag.cond)/len(diag.cond))) # Takes care of "infinite" domains if (Dy >= 5.0): @@ -1457,7 +1457,7 @@ x0 = ic.copy() x0 = x0.todict() for p in self.freepars: - if p not in x0.keys(): + if p not in list(x0.keys()): x0[p] = self.parsdict[p] x0 = tocoords(self, x0) @@ -1473,7 +1473,7 @@ if icv is None: # Get Jacobian information - print "Creating vector...\n" + print("Creating vector...\n") J_coords = self.CorrFunc.jac(x0, self.coords) J_params = self.CorrFunc.jac(x0, self.params) @@ -1518,7 +1518,7 @@ x0[ind[0]] = xmin + j*dx x0[ind[1]] = ymax - i*dy ix0 = x0.copy() - print "(%d, %d) -- (%s, %s) = (%lf, %lf)" % (i, j, key[ind[0]], key[ind[1]], x0[ind[0]], x0[ind[1]]) + print("(%d, %d) -- (%s, %s) = (%lf, %lf)" % (i, j, key[ind[0]], key[ind[1]], x0[ind[0]], x0[ind[1]])) # Get Jacobian information #J_coords = self.CorrFunc.jac(x0, self.coords) @@ -1532,11 +1532,11 @@ k, converged, problem, diag = self.Corrector(x0, v0) - print 'x0 = ', x0 + print('x0 = ', x0) if not converged: - print " Did not converge." + print(" Did not converge.") if len(diag.cond) > 0: - print " Avg. cond. # = %lf" % (sum(diag.cond)/len(diag.cond)) + print(" Avg. cond. # = %lf" % (sum(diag.cond)/len(diag.cond))) if problem: # Did not converge due to failure in backward integration out[i].append(('XB', ix0, x0, diag)) @@ -1549,7 +1549,7 @@ # Did not converge for unknown reason out[i].append(('X', ix0, x0, diag)) else: - print " Converged. Avg. cond. # = %lf" % (sum(diag.cond)/len(diag.cond)) + print(" Converged. Avg. cond. # = %lf" % (sum(diag.cond)/len(diag.cond))) # Converged out[i].append(('C', ix0, x0, diag)) @@ -1568,7 +1568,7 @@ x0 = ic.copy() x0 = x0.todict() for p in self.freepars: - if p not in x0.keys(): + if p not in list(x0.keys()): x0[p] = self.parsdict[p] x0 = tocoords(self, x0) @@ -1584,7 +1584,7 @@ if icv is None: # Get Jacobian information - print "Creating vector...\n" + print("Creating vector...\n") J_coords = self.CorrFunc.jac(x0, self.coords) J_params = self.CorrFunc.jac(x0, self.params) @@ -1602,34 +1602,34 @@ v1[2] = 1.0 v1 = v1 - v0[2]*v0 v1 = v1/linalg.norm(v1) - print "Checking orthonormal..." - print " |v0| = %lf" % linalg.norm(v0) - print " |v1| = %lf" % linalg.norm(v1) - print " = %lf" % matrixmultiply(v0,v1) + print("Checking orthonormal...") + print(" |v0| = %lf" % linalg.norm(v0)) + print(" |v1| = %lf" % linalg.norm(v1)) + print(" = %lf" % matrixmultiply(v0,v1)) out = [] d0 = Dx/(2*step) d1 = Dy/(2*step) - print "Start x = ", x0 + print("Start x = ", x0) for i in range(step, -1*(step+1), -1): out.append([]) for j in range(-1*step, step+1): x = x0 + j*d0*v0 + i*d1*v1 - print "(%d, %d) -- (y, theta, a) = (%lf, %lf, %lf)" % (i, j, x[0], x[1], x[2]) + print("(%d, %d) -- (y, theta, a) = (%lf, %lf, %lf)" % (i, j, x[0], x[1], x[2])) ix = x.copy() v = v0.copy() k, converged, problem, diag = self.Corrector(x, v) - print 'x = ', x + print('x = ', x) if not converged: if len(diag.cond) > 0: - print " Avg. cond. # = %lf" % (sum(diag.cond)/len(diag.cond)) + print(" Avg. cond. # = %lf" % (sum(diag.cond)/len(diag.cond))) if problem: # Did not converge due to failure in backward integration - print " Did not converge (XB)." + print(" Did not converge (XB).") out[step-i].append(('XB', ix, x, diag)) elif k >= self.MaxCorrIters: Fnm_flag = monotone([nm[0] for nm in diag.nrm], -3, @@ -1639,14 +1639,14 @@ cond_flag = monotone(diag.cond, -3, direc=-1) if Fnm_flag and Vnm_flag and cond_flag: # Did not converge but may have converged with more time steps - print " Did not converge (XC)." + print(" Did not converge (XC).") out[step-i].append(('XC', ix, x, diag)) else: # Did not converge for unknown reason - print " Did not converge (X)." + print(" Did not converge (X).") out[step-i].append(('X', ix, x, diag)) else: - print " Converged. Avg. cond. # = %lf" % (sum(diag.cond)/len(diag.cond)) + print(" Converged. Avg. cond. # = %lf" % (sum(diag.cond)/len(diag.cond))) # Converged out[step-i].append(('C', ix, x, diag)) @@ -1765,42 +1765,42 @@ num = 1; for pt in self.sol.bylabel(pttype): pt.labels[pttype]['name'] = pttype + repr(num) - if pt.labels[pttype].has_key('cycle'): + if 'cycle' in pt.labels[pttype]: pt.labels[pttype]['cycle'].name = pttype + repr(num) num += 1 def info(self): - print self.__repr__() - print "Using model: %s\n"%self.model.name + print(self.__repr__()) + print("Using model: %s\n"%self.model.name) if self.description is not 'None': - print 'Description' - print '----------- \n' - print self.description, '\n' - print 'Model Info' - print '---------- \n' - print " Variables : %s"%', '.join(self.varslist) - print " Parameters: %s\n"%', '.join(self.parsdict.keys()) - print 'Continuation Parameters' - print '----------------------- \n' + print('Description') + print('----------- \n') + print(self.description, '\n') + print('Model Info') + print('---------- \n') + print(" Variables : %s"%', '.join(self.varslist)) + print(" Parameters: %s\n"%', '.join(list(self.parsdict.keys()))) + print('Continuation Parameters') + print('----------------------- \n') args_list = cont_args_list[:] exclude = ['description'] args_list.insert(2, 'auxpars') for arg in args_list: if hasattr(self, arg) and arg not in exclude: - print arg, ' = ', eval('self.' + arg) - print '\n' + print(arg, ' = ', eval('self.' + arg)) + print('\n') spts = '' if self.sol is not None: for pttype in all_point_types: if self.sol.bylabel(pttype) is not None: for pt in self.sol.bylabel(pttype): - if pt.labels[pttype].has_key('name'): + if 'name' in pt.labels[pttype]: spts = spts + pt.labels[pttype]['name'] + ', ' - print 'Special Points' - print '-------------- \n' - print spts[:-2] + print('Special Points') + print('-------------- \n') + print(spts[:-2]) def __repr__(self): @@ -1843,7 +1843,7 @@ Continuation.update(self, args) if args is not None: - for k, v in args.iteritems(): + for k, v in args.items(): if k in equilibrium_args_list: if k == 'LocBifPoints': if isinstance(v, str): @@ -1854,7 +1854,7 @@ # Handle stopping points w = [] - if args.has_key('StopAtPoints'): + if 'StopAtPoints' in args: w = args['StopAtPoints'] if isinstance(w, str): if w.lower() == 'all': @@ -1866,10 +1866,10 @@ if bftype not in cont_bif_points and \ bftype not in equilibrium_bif_points: if self.verbosity >= 1: - print "Warning: Detection of " + bftype + " points not implemented for curve EP-C." + print("Warning: Detection of " + bftype + " points not implemented for curve EP-C.") elif bftype == 'H' and self.varsdim == 1: if self.verbosity >= 1: - print "Warning: Variable dimension must be larger than 1 to detect Hopf points." + print("Warning: Variable dimension must be larger than 1 to detect Hopf points.") else: if bftype not in self.LocBifPoints: self.LocBifPoints.append(bftype) @@ -1906,7 +1906,7 @@ save=True, numpoints=self.MaxNumPoints+1) #method1 = Fold_Det(self.CorrFunc, self, save=True, numpoints=self.MaxNumPoints+1) self.TestFuncs.append(method1) - if 'BP' not in self.BifPoints.keys(): + if 'BP' not in list(self.BifPoints.keys()): method2 = Branch_Det(self.CorrFunc, self, save=True, numpoints=self.MaxNumPoints+1) self.TestFuncs.append(method2) @@ -1970,15 +1970,15 @@ """Update parameters for FoldCurve.""" Continuation.update(self, args) if 'BP' in self.LocBifPoints: - print "BP point detection not implemented: ignoring this type of point" + print("BP point detection not implemented: ignoring this type of point") self.LocBifPoints.remove('BP') if 'BP' in self.StopAtPoints: - print "BP point detection not implemented: ignoring this type of point" + print("BP point detection not implemented: ignoring this type of point") self.StopAtPoints.remove('BP') #self.LocBifPoints = [] # Temporary fix: Delete after branch point implementation for fold curve if args is not None: - for k, v in args.iteritems(): + for k, v in args.items(): if k in fold_args_list: if k == 'LocBifPoints': if isinstance(v, str): @@ -1989,7 +1989,7 @@ # Handle stopping points w = [] - if args.has_key('StopAtPoints'): + if 'StopAtPoints' in args: w = args['StopAtPoints'] if isinstance(w, str): if w.lower() == 'all': @@ -2001,7 +2001,7 @@ if bftype == 'BP' or bftype not in cont_bif_points \ and bftype not in fold_bif_points: if self.verbosity >= 1: - print "Warning: Detection of " + bftype + " points not implemented for curve LP-C." + print("Warning: Detection of " + bftype + " points not implemented for curve LP-C.") else: if bftype not in self.LocBifPoints: self.LocBifPoints.append(bftype) @@ -2041,7 +2041,7 @@ method1 = Hopf_Det(self.CorrFunc.sysfunc, self, save=True, numpoints=self.MaxNumPoints+1) self.TestFuncs.append(method1) - if 'BT' not in self.BifPoints.keys(): + if 'BT' not in list(self.BifPoints.keys()): method2 = BT_Fold(self.CorrFunc, self, save=True, numpoints=self.MaxNumPoints+1) self.TestFuncs.append(method2) @@ -2107,7 +2107,7 @@ #self.LocBifPoints = [] # Temporary fix: Delete after branch point implementation for hopf curve if args is not None: - for k, v in args.iteritems(): + for k, v in args.items(): if k in hopf_args_list: if k == 'LocBifPoints': if isinstance(v, str): @@ -2118,7 +2118,7 @@ # Handle stopping points w = [] - if args.has_key('StopAtPoints'): + if 'StopAtPoints' in args: w = args['StopAtPoints'] if isinstance(w, str): if w.lower() == 'all': @@ -2130,10 +2130,10 @@ if bftype == 'BP' or bftype not in cont_bif_points \ and bftype not in hopf_bif_points: if self.verbosity >= 1: - print "Warning: Detection of " + bftype + " points not implemented for curve H-C1." + print("Warning: Detection of " + bftype + " points not implemented for curve H-C1.") elif bftype == 'DH' and self.varsdim <= 3: if self.verbosity >= 1: - print "Warning: Variable dimension must be larger than 3 to detect Double Hopf points." + print("Warning: Variable dimension must be larger than 3 to detect Double Hopf points.") else: if bftype not in self.LocBifPoints: self.LocBifPoints.append(bftype) @@ -2266,7 +2266,7 @@ #self.LocBifPoints = [] # Temporary fix: Delete after branch point implementation for hopf curve if args is not None: - for k, v in args.iteritems(): + for k, v in args.items(): if k in hopf_args_list: if k == 'LocBifPoints': if isinstance(v, str): @@ -2277,7 +2277,7 @@ # Handle stopping points w = [] - if args.has_key('StopAtPoints'): + if 'StopAtPoints' in args: w = args['StopAtPoints'] if isinstance(w, str): if w.lower() == 'all': @@ -2288,7 +2288,7 @@ for bftype in v: if bftype in ['BP', 'DH'] or bftype not in cont_bif_points and bftype not in hopf_bif_points: if self.verbosity >= 1: - print "Warning: Detection of " + bftype + " points not implemented for curve H-C2." + print("Warning: Detection of " + bftype + " points not implemented for curve H-C2.") else: if bftype not in self.LocBifPoints: self.LocBifPoints.append(bftype) @@ -2380,7 +2380,7 @@ if bftype is 'LPC': method1 = LPC_Det(self.sysfunc, self, save=True, numpoints=self.MaxNumPoints+1) self.TestFuncs.append(method1) - if 'BP' not in self.BifPoints.keys(): + if 'BP' not in list(self.BifPoints.keys()): method2 = Branch_Det(self.CorrFunc, self, save=True, numpoints=self.MaxNumPoints+1) self.TestFuncs.append(method2) else: @@ -2404,7 +2404,7 @@ Continuation.update(self, args) if args is not None: - for k, v in args.iteritems(): + for k, v in args.items(): if k in fixedpoint_args_list: if k == 'LocBifPoints': if isinstance(v, str): @@ -2415,7 +2415,7 @@ # Handle stopping points w = [] - if args.has_key('StopAtPoints'): + if 'StopAtPoints' in args: w = args['StopAtPoints'] if isinstance(w, str): if w.lower() == 'all': @@ -2426,10 +2426,10 @@ for bftype in v: if bftype not in cont_bif_points and bftype not in fixedpoint_bif_points: if self.verbosity >= 1: - print "Warning: Detection of " + bftype + " points not implemented for curve FP-C." + print("Warning: Detection of " + bftype + " points not implemented for curve FP-C.") elif bftype == 'NS' and self.varsdim == 1: if self.verbosity >= 1: - print "Warning: Variable dimension must be larger than 1 to detect NS points." + print("Warning: Variable dimension must be larger than 1 to detect NS points.") else: if bftype not in self.LocBifPoints: self.LocBifPoints.append(bftype) @@ -2484,20 +2484,20 @@ """Update parameters for LimitCycleCurve.""" Continuation.update(self, args) if args is not None: - for k, v in args.iteritems(): + for k, v in args.items(): if k in limitcycle_args_list: if k == 'SolutionMeasures': self.SolutionMeasures = ['max', 'min'] if isinstance(v, str): if v.lower() == 'all': - v = solution_measures.keys() + v = list(solution_measures.keys()) else: v = [v] for smtype in v: - if smtype not in solution_measures.keys(): + if smtype not in list(solution_measures.keys()): if self.verbosity >= 1: - print "Warning: Solution measure " + smtype + " is not valid." + print("Warning: Solution measure " + smtype + " is not valid.") elif smtype not in self.SolutionMeasures: self.SolutionMeasures.append(smtype) @@ -2513,7 +2513,7 @@ # Handle stopping points w = [] - if args.has_key('StopAtPoints'): + if 'StopAtPoints' in args: w = args['StopAtPoints'] if isinstance(w, str): if w.lower() == 'all': @@ -2525,8 +2525,8 @@ if bftype not in cont_bif_points \ and bftype not in limitcycle_bif_points: if self.verbosity >= 1: - print "Warning: Detection of %s"%bftype, - print " points not implemented for curve LC-C." + print("Warning: Detection of %s"%bftype, end=' ') + print(" points not implemented for curve LC-C.") else: if bftype not in self.LocBifPoints: self.LocBifPoints.append(bftype) @@ -2551,8 +2551,8 @@ if cycles is None: cycles = [] for pt in self.sol: - for ptdata in pt.labels.itervalues(): - if ptdata.has_key('cycle'): + for ptdata in pt.labels.values(): + if 'cycle' in ptdata: cycles.append(ptdata['cycle'].name) elif not isinstance(cycles, list): cycles = [cycles] @@ -2592,7 +2592,7 @@ elif isinstance(cyclename, Pointset): pts.append(cyclename) else: - print 'Point must be type(str) or type(Pointset).' + print('Point must be type(str) or type(Pointset).') cycles = pts # Get maximal period @@ -2842,7 +2842,7 @@ # CHECK ME (Moved from below) parsdim = len(self.parsdict) - ipar = range(min(parsdim,10)) + [10] + range(50,parsdim+40) + ipar = list(range(min(parsdim,10))) + [10] + list(range(50,parsdim+40)) parkeys = sortedDictKeys(self.parsdict) # INSERT SPOut STUFF HERE @@ -2853,7 +2853,7 @@ else: iuz = [] vuz = [] - for k, v in self.SPOut.iteritems(): + for k, v in self.SPOut.items(): pind = ipar[parkeys.index(k)] iuz.extend(len(v)*[pind]) vuz.extend(v) @@ -2903,7 +2903,7 @@ # FIX ME x0n = x0.copy() - for k, v in x0.iteritems(): + for k, v in x0.items(): kn = k for smtype in self.SolutionMeasures: if k.rfind('_'+smtype) > 0: @@ -2916,8 +2916,8 @@ elif isinstance(x0, Point): # Check to see if point contains a cycle. If it does, assume # we are starting at a cycle and save it in initcycle - for v in x0.labels.itervalues(): - if v.has_key('cycle'): + for v in x0.labels.values(): + if 'cycle' in v: c0 = v # Dictionary w/ cycle, name, and tangent information try: T = x0['_T'] @@ -2925,12 +2925,12 @@ RefactoringTool: Refactored ./PyDSTool/PyCont/Plotting.py T = None x0 = x0.todict() for p in self.freepars: - if p not in x0.keys(): + if p not in list(x0.keys()): x0[p] = self.parsdict[p] # FIX ME x0n = x0.copy() - for k, v in x0.iteritems(): + for k, v in x0.items(): kn = k for smtype in self.SolutionMeasures: if k.rfind('_'+smtype) > 0: @@ -3073,8 +3073,8 @@ if sp_endpt < self.loc: if self.verbosity > 0: - print 'Warning: NaNs in solution from AUTO. ', - print 'Reduce stepsize and try again.' + print('Warning: NaNs in solution from AUTO. ', end=' ') + print('Reduce stepsize and try again.') self.loc = sp_endpt self.curve = self.curve[0:self.loc+1] self.CurveInfo[self.loc] = ('MX', \ @@ -3102,14 +3102,14 @@ def info(self): Continuation.info(self) - print '\nLimit Cycle Curve Parameters' - print '------------------------------\n' + print('\nLimit Cycle Curve Parameters') + print('------------------------------\n') args_list = limitcycle_args_list[:] args_list.remove('LocBifPoints') for arg in args_list: if hasattr(self, arg): - print arg, ' = ', eval('self.' + arg) - print '\n' + print(arg, ' = ', eval('self.' + arg)) + print('\n') @@ -3125,15 +3125,15 @@ self.parsdict = initargs['userpars'].copy() self._userfunc = initargs['userfunc'] self._userdata = args() - if initargs.has_key('userjac'): + if 'userjac' in initargs: self._userjac = initargs['userjac'] - if initargs.has_key('usertestfuncs'): + if 'usertestfuncs' in initargs: self._usertestfuncs = initargs['usertestfuncs'] - if initargs.has_key('userbifpoints'): + if 'userbifpoints' in initargs: self._userbifpoints = initargs['userbifpoints'] else: self._userbifpoints = [] - if initargs.has_key('userdomain'): + if 'userdomain' in initargs: self._userdomain = initargs['userdomain'] [initargs.pop(i) for i in ['uservars','userpars','userjac','userfunc', @@ -3148,7 +3148,7 @@ Continuation.update(self, args) if args is not None: - for k, v in args.iteritems(): + for k, v in args.items(): if k in userdefined_args_list: exec('self.' + k + ' = ' + repr(v)) --- ./PyDSTool/PyCont/Plotting.py (original) +++ ./PyDSTool/PyCont/Plotting.py (refactored) @@ -5,6 +5,7 @@ from PyDSTool.common import args from PyDSTool.matplotlib_import import * +from functools import reduce # THESE ARE REPEATS FROM CONTINUATION! MAKE SURE AND UPDATE!!! all_point_types = ['P', 'RG', 'LP', 'BP', 'H', 'BT', 'ZH', 'CP', 'GH', 'DH', 'LPC', 'PD', @@ -34,9 +35,9 @@ # This is so I can make things alphabetical all_pargs = [] all_args = [] - deleted = self.has_key('deleted') and self.deleted + deleted = 'deleted' in self and self.deleted if not deleted: - for k, v in self.iteritems(): + for k, v in self.items(): if k in ['point', 'curve', 'cycle']: if v[0].get_label() != '_nolegend_': all_args.append(('Legend', v[0].get_label())) @@ -49,7 +50,7 @@ all_pargs.append((k, v)) if len(all_args) == 0 and len(all_pargs) == 0: - if self.has_key('deleted'): + if 'deleted' in self: res.append(ct*4*' ' + 'Deleted\n') else: res.append(ct*4*' ' + 'Empty\n') @@ -73,11 +74,11 @@ def fromLabel(self, label, key=None): point = None - if self.has_key('text') and self.text.get_text().lstrip(' ') == label or \ - self.has_key('point') and self.point[0].get_label() == label or \ - self.has_key('curve') and self.curve[0].get_label() == label: + if 'text' in self and self.text.get_text().lstrip(' ') == label or \ + 'point' in self and self.point[0].get_label() == label or \ + 'curve' in self and self.curve[0].get_label() == label: return (key, self) - for k, v in self.iteritems(): + for k, v in self.items(): if isinstance(v, pargs): point = v.fromLabel(label, key=k) if point is not None: @@ -105,13 +106,13 @@ bytype = all_point_types elif objtype == 'curve': bytype = all_curve_types - for k, v in self.iteritems(): + for k, v in self.items(): if isinstance(v, pargs): - if v.has_key(objtype): - if bylabel is not None and v.has_key('text') and v.text.get_text().lstrip(' ') in bylabel or \ + if objtype in v: + if bylabel is not None and 'text' in v and v.text.get_text().lstrip(' ') in bylabel or \ byname is not None and k in byname or \ bytype is not None and k.strip('0123456789') in bytype or \ - bylegend is not None and ((v.has_key('curve') and v.curve[0].get_label() in bylegend) or (v.has_key('cycle') and v.cycle[0].get_label() in bylegend)): + bylegend is not None and (('curve' in v and v.curve[0].get_label() in bylegend) or ('cycle' in v and v.cycle[0].get_label() in bylegend)): obj.append((k,v[objtype])) v.get(objtype, bylabel=bylabel, byname=byname, bytype=bytype, bylegend=bylegend, obj=obj, ct=ct) @@ -119,7 +120,7 @@ return obj def toggleLabel(self, visible='on', refresh=True): - if self.has_key('text'): + if 'text' in self: self.text.set_visible(visible == 'on') if refresh: @@ -136,10 +137,10 @@ if bylabel is None and byname is None and bytype is None: bytype = all_point_types # Turn off all points - for k, v in self.iteritems(): + for k, v in self.items(): if bytype is not None and k.strip('0123456789') in bytype or \ byname is not None and k in byname or \ - bylabel is not None and isinstance(v, pargs) and v.has_key('text') and v.text.get_text().lstrip(' ') in bylabel: + bylabel is not None and isinstance(v, pargs) and 'text' in v and v.text.get_text().lstrip(' ') in bylabel: v.toggleLabel(visible=visible, refresh=False) elif isinstance(v, pargs): v.toggleLabels(visible=visible, bylabel=bylabel, byname=byname, bytype=bytype, ct=ct) @@ -148,7 +149,7 @@ self.refresh() def togglePoint(self, visible='on', refresh=True): - if self.has_key('point'): + if 'point' in self: self.point[0].set_visible(visible == 'on') if refresh: @@ -165,10 +166,10 @@ if bylabel is None and byname is None and bytype is None: bytype = all_point_types # Turn off all points - for k, v in self.iteritems(): + for k, v in self.items(): if bytype is not None and k.strip('0123456789') in bytype or \ byname is not None and k in byname or \ - bylabel is not None and isinstance(v, pargs) and v.has_key('text') and v.text.get_text().lstrip(' ') in bylabel: + bylabel is not None and isinstance(v, pargs) and 'text' in v and v.text.get_text().lstrip(' ') in bylabel: v.togglePoint(visible=visible, refresh=False) elif isinstance(v, pargs): v.togglePoints(visible=visible, bylabel=bylabel, byname=byname, bytype=bytype, ct=ct) @@ -177,8 +178,8 @@ self.refresh() def toggleCurve(self, visible='on', refresh=True): - if self.has_key('curve'): - for k, v in self.iteritems(): + if 'curve' in self: + for k, v in self.items(): if isinstance(v, pargs): v.toggleLabel(visible=visible, refresh=False) v.togglePoint(visible=visible, refresh=False) @@ -199,10 +200,10 @@ if bylegend is None and byname is None and bytype is None: bytype = all_curve_types - for k, v in self.iteritems(): - if bytype is not None and isinstance(v, pargs) and v.has_key('type') and v.type in bytype or \ + for k, v in self.items(): + if bytype is not None and isinstance(v, pargs) and 'type' in v and v.type in bytype or \ byname is not None and k in byname or \ - bylegend is not None and isinstance(v, pargs) and v.has_key('curve') and v.curve[0].get_label() in bylegend: + bylegend is not None and isinstance(v, pargs) and 'curve' in v and v.curve[0].get_label() in bylegend: v.toggleCurve(visible=visible, refresh=False) elif isinstance(v, pargs): v.toggleCurves(visible=visible, bylegend=bylegend, byname=byname, bytype=bytype, ct=ct) @@ -211,7 +212,7 @@ self.refresh() def toggleCycle(self, visible='on', refresh=True): - if self.has_key('cycle'): + if 'cycle' in self: for line in self.cycle: line.set_visible(visible == 'on') @@ -229,10 +230,10 @@ if bylegend is None and byname is None and bytype is None: bytype = all_point_types - for k, v in self.iteritems(): + for k, v in self.items(): if bytype is not None and k.strip('0123456789') in bytype or \ byname is not None and k in byname or \ - bylegend is not None and isinstance(v, pargs) and v.has_key('cycle') and v.cycle[0].get_label() in bylegend: + bylegend is not None and isinstance(v, pargs) and 'cycle' in v and v.cycle[0].get_label() in bylegend: v.toggleCycle(visible=visible, refresh=False) elif isinstance(v, pargs): v.toggleCycles(visible=visible, bylegend=bylegend, byname=byname, bytype=bytype, ct=ct) @@ -251,10 +252,10 @@ if bylabel is None and byname is None and bytype is None: bytype = all_point_types - for k, v in self.iteritems(): + for k, v in self.items(): if bytype is not None and k.strip('0123456789') in bytype or \ byname is not None and k in byname or \ - bylabel is not None and isinstance(v, pargs) and ((v.has_key('text') and v.text.get_text().lstrip(' ') in bylabel) or (v.has_key('curve') and v.curve[0].get_label() in bylabel) or (v.has_key('cycle') and v.cycle[0].get_label() in bylabel)): + bylabel is not None and isinstance(v, pargs) and (('text' in v and v.text.get_text().lstrip(' ') in bylabel) or ('curve' in v and v.curve[0].get_label() in bylabel) or ('cycle' in v and v.cycle[0].get_label() in bylabel)): v.toggleLabel(visible=visible, refresh=False) v.togglePoint(visible=visible, refresh=False) v.toggleCycle(visible=visible, refresh=False) @@ -265,7 +266,7 @@ self.refresh() def setLabel(self, label, refresh=True): - if self.has_key('text'): + if 'text' in self: self.text.set_text(' '+label) if refresh: @@ -282,10 +283,10 @@ if bylabel is None and byname is None and bytype is None: bytype = all_point_types # Turn off all points - for k, v in self.iteritems(): + for k, v in self.items(): if bytype is not None and k.strip('0123456789') in bytype or \ byname is not None and k in byname or \ - bylabel is not None and isinstance(v, pargs) and v.has_key('text') and v.text.get_text().lstrip(' ') in bylabel: + bylabel is not None and isinstance(v, pargs) and 'text' in v and v.text.get_text().lstrip(' ') in bylabel: v.setLabel(label, refresh=False) elif isinstance(v, pargs): v.setLabels(label, bylabel=bylabel, byname=byname, bytype=bytype, ct=ct) @@ -294,10 +295,10 @@ self.refresh() def setLegend(self, legend, refresh=True): - if self.has_key('curve'): + if 'curve' in self: for piece in self.curve: piece.set_label(legend) - elif self.has_key('cycle'): + elif 'cycle' in self: for piece in self.cycle: piece.set_label(legend) @@ -314,14 +315,14 @@ bytype = [bytype] if bylegend is None and byname is None and bytype is None: - if v.has_key('curve'): + if 'curve' in v: bytype = all_curve_types else: bytype = all_point_types # Turn off all points - for k, v in self.iteritems(): - if bytype is not None and isinstance(v, pargs) and ((v.has_key('curve') and v.type in bytype) or (v.has_key('cycle') and k.strip('0123456789') in bytype)) or \ + for k, v in self.items(): + if bytype is not None and isinstance(v, pargs) and (('curve' in v and v.type in bytype) or ('cycle' in v and k.strip('0123456789') in bytype)) or \ byname is not None and k in byname or \ - bylegend is not None and isinstance(v, pargs) and ((v.has_key('curve') and v.curve[0].get_label() in bylegend) or (v.has_key('cycle') and v.cycle[0].get_label() in bylegend)): + bylegend is not None and isinstance(v, pargs) and (('curve' in v and v.curve[0].get_label() in bylegend) or ('cycle' in v and v.cycle[0].get_label() in bylegend)): v.setLegend(legend, refresh=False) elif isinstance(v, pargs): v.setLegends(legend, bylegend=bylegend, byname=byname, bytype=bytype, ct=ct) @@ -332,26 +333,26 @@ def refresh(self): fig = None # Used to save current figure (reset when done) - if not self.has_key('deleted'): - if 'fig' in self.keys(): + if 'deleted' not in self: + if 'fig' in list(self.keys()): plt.figure(self.fig.number) plt.draw() - elif 'axes' in self.keys(): + elif 'axes' in list(self.keys()): plt.figure(self.axes.figure.number) #Would like to say: plt.axes(self.axes) Doesn't work, though. plt.draw() - elif 'curve' in self.keys(): + elif 'curve' in list(self.keys()): plt.figure(self.curve[0].figure.number) plt.draw() - elif 'point' in self.keys(): + elif 'point' in list(self.keys()): plt.figure(self.point[0].figure.number) plt.draw() - elif 'cycle' in self.keys(): + elif 'cycle' in list(self.keys()): plt.figure(self.cycle[0].figure.number) plt.draw() else: # Only here in plot structure fig = plt.gcf() - for k, v in self.iteritems(): + for k, v in self.items(): if isinstance(v, pargs): v.refresh() @@ -363,19 +364,19 @@ if they've been deleted by an outside source. This method is a little clumsy since it has to spawn a dummy plot if a plot has been deleted, but who cares, it works.""" deleted = [] - for k, v in self.iteritems(): + for k, v in self.items(): recursive_clean = True if isinstance(v, pargs): - if v.has_key('deleted'): + if 'deleted' in v: deleted.append(k) recursive_clean = False - elif v.has_key('fig'): + elif 'fig' in v: fig_check = plt.figure(v.fig.number) if fig_check != v.fig: plt.close(fig_check) deleted.append(k) recursive_clean = False - elif v.has_key('axes'): + elif 'axes' in v: try: fig_axes = plt.axes(v.axes) except: @@ -385,24 +386,24 @@ deleted.append(k) recursive_clean = False elif fig_axes not in v.axes.figure.axes: - print 'Warning: Axes were deleted without using plt.delaxes().' + print('Warning: Axes were deleted without using plt.delaxes().') v.axes.figure.axes.append(fig_axes) plt.draw() - elif v.has_key('curve'): + elif 'curve' in v: for piece in v.curve: if piece not in piece.axes.lines: deleted.append(k) v.delete() # Remove remaining pieces of curve in pyplot recursive_clean = False break - elif v.has_key('cycle'): + elif 'cycle' in v: for piece in v.cycle: if piece not in piece.axes.lines: deleted.append(k) v.delete() recursive_clean = False break - elif v.has_key('point'): + elif 'point' in v: if v.point[0] not in v.point[0].axes.lines or v.text not in v.text.axes.texts: deleted.append(k) if v.text in v.text.axes.texts: @@ -418,32 +419,32 @@ self.pop(k) def clear(self, refresh=True): - if not self.has_key('deleted'): - if self.has_key('fig'): + if 'deleted' not in self: + if 'fig' in self: plt.figure(self.fig.number) plt.clf() - remove = [k for k in self.keys() if k != 'fig'] - elif self.has_key('axes'): + remove = [k for k in list(self.keys()) if k != 'fig'] + elif 'axes' in self: title = self.axes.title.get_text() self.axes.clear() plt.axes(self.axes) plt.title(title) - remove = [k for k in self.keys() if k != 'axes'] + remove = [k for k in list(self.keys()) if k != 'axes'] if refresh: self.refresh() - elif self.has_key('curve'): - remove = [k for k in self.keys() if k != 'curve'] + elif 'curve' in self: + remove = [k for k in list(self.keys()) if k != 'curve'] for k in remove: if isinstance(self[k], pargs): self[k].clear(refresh=False) if refresh: self.refresh() - elif self.has_key('point'): + elif 'point' in self: if self.point[0] in self.point[0].axes.lines: self.point[0].axes.lines.remove(self.point[0]) if self.text in self.point[0].axes.texts: self.point[0].axes.texts.remove(self.text) - remove = [k for k in self.keys() if k != 'point'] + remove = [k for k in list(self.keys()) if k != 'point'] if refresh: self.refresh() self.deleted = True @@ -454,25 +455,25 @@ for k in remove: self.pop(k) else: - print 'Object is deleted.' + print('Object is deleted.') def clearall(self): - for v in self.itervalues(): + for v in self.values(): if isinstance(v, pargs): v.clear(refresh=False) self.refresh() def delete(self, refresh=True): - if not self.has_key('deleted'): - if self.has_key('fig'): + if 'deleted' not in self: + if 'fig' in self: self.clear(refresh=False) plt.close() self.deleted = True - elif self.has_key('axes'): + elif 'axes' in self: self.clear(refresh=False) plt.delaxes() self.deleted = True - elif self.has_key('curve'): + elif 'curve' in self: self.clear(refresh=False) for curve in self.curve: if curve in self.curve[0].axes.lines: @@ -480,7 +481,7 @@ if refresh: self.refresh() self.deleted = True - elif self.has_key('cycle'): + elif 'cycle' in self: self.clear(refresh=False) for cycle in self.cycle: if cycle in self.cycle[0].axes.lines: @@ -488,17 +489,17 @@ if refresh: self.refresh() self.deleted = True - elif self.has_key('point'): + elif 'point' in self: self.clear(refresh=refresh) else: - for v in self.itervalues(): + for v in self.values(): if isinstance(v, pargs): v.delete(refresh=refresh) else: - print 'Object is already deleted.' + print('Object is already deleted.') def deleteall(self): - for v in self.itervalues(): + for v in self.values(): if isinstance(v, pargs): v.delete(refresh=False) self.refresh() @@ -510,7 +511,7 @@ self.axes = paxes.axes # Get list of cycles from pargs class axes - cycles = [thing.cycle[0] for k, thing in paxes.iteritems() if isinstance(thing, pargs) and thing.has_key('cycle')] + cycles = [thing.cycle[0] for k, thing in paxes.items() if isinstance(thing, pargs) and 'cycle' in thing] # Put in order as in axes.lines (this should be same as order along curve, or user # specified in cycles when plot_cycles was called) self.cycles = [] @@ -552,7 +553,7 @@ line.set(linewidth=self.bgd_lw) plt.draw() - print 'Background linewidth = %f' % self.bgd_lw + print('Background linewidth = %f' % self.bgd_lw) def change_fgd(self, up): if up == 1: @@ -566,7 +567,7 @@ self.cycles[self.curr].set(linewidth=self.fgd_lw) plt.draw() - print 'Foreground linewidth = %f' % self.fgd_lw + print('Foreground linewidth = %f' % self.fgd_lw) def change_curr(self, up): self.cycles[self.curr].set(linewidth=self.bgd_lw) @@ -596,7 +597,7 @@ cfl = None if isinstance(figure, plt.Figure): - for k, v in plot.iteritems(): + for k, v in plot.items(): if isinstance(v, pargs) and v.fig == figure: cfl = k break @@ -605,13 +606,13 @@ figure = plt.figure() else: cfl = figure - if cfl not in plot.keys(): + if cfl not in list(plot.keys()): plot[cfl] = pargs() plot[cfl].fig = plt.figure() elif isinstance(figure, int): fighandle = plt.figure(figure) cfl = 'fig' + str(figure) - if cfl not in plot.keys(): + if cfl not in list(plot.keys()): plot[cfl] = pargs() plot[cfl].fig = fighandle else: @@ -620,7 +621,7 @@ if cfl is None: cfl = 'fig1' ct = 1 - while cfl in plot.keys(): + while cfl in list(plot.keys()): ct += 1 cfl = 'fig'+repr(ct) plot[cfl] = pargs() @@ -642,7 +643,7 @@ cal = None if isinstance(axes, plt.Axes): - for k, v in plot[cfl].iteritems(): + for k, v in plot[cfl].items(): if isinstance(v, pargs) and v.axes == axes: cal = k break @@ -650,7 +651,7 @@ RefactoringTool: Refactored ./PyDSTool/PyCont/TestFunc.py if cal is None: cal = 'axes1' ct = 1 - while cal in plot[cfl].keys(): + while cal in list(plot[cfl].keys()): ct += 1 cal = 'axes'+repr(ct) plot[cfl][cal] = pargs() @@ -658,7 +659,7 @@ plot[cfl][cal].axes.set_title(cal) elif isinstance(axes, str): cal = axes - if cal not in plot[cfl].keys(): + if cal not in list(plot[cfl].keys()): plot[cfl][cal] = pargs() plot[cfl][cal].axes = plt.axes() plot[cfl][cal].axes.set_title(cal) --- ./PyDSTool/PyCont/TestFunc.py (original) +++ ./PyDSTool/PyCont/TestFunc.py (refactored) @@ -19,7 +19,7 @@ # # ---------------------------------------------------------------------------- -from misc import * +from .misc import * from PyDSTool.common import args, copy from scipy import optimize, linalg @@ -48,7 +48,8 @@ the function as acting on a 1 dimensional array, i.e. reference x[0] NOT x. This is so numjac works without having to test cases (most generality).""" - def __init__(self, (n, m), func=None, save=False, numpoints=None): + def __init__(self, xxx_todo_changeme, func=None, save=False, numpoints=None): + (n, m) = xxx_todo_changeme if not hasattr(self, 'data'): self.data = None @@ -89,7 +90,7 @@ n = len(ind) except: n = self.n - ind = range(n) + ind = list(range(n)) J = zeros((self.m, n), float) for i in range(n): @@ -110,13 +111,13 @@ n1 = len(ind1) except: n1 = self.n - ind1 = range(n1) + ind1 = list(range(n1)) try: n2 = len(ind2) except: n2 = self.n - ind2 = range(n2) + ind2 = list(range(n2)) H = zeros((self.m,n1,n2), float) for i in range(n1): @@ -136,7 +137,8 @@ class TestFunc(Function): """You need to define the function yourself within an inherited class.""" - def __init__(self, (n, m), F, C, save=False, numpoints=None): + def __init__(self, xxx_todo_changeme1, F, C, save=False, numpoints=None): + (n, m) = xxx_todo_changeme1 Function.__init__(self, (n, m), func=None, save=save, numpoints=numpoints) if not hasattr(self, "F"): @@ -189,7 +191,7 @@ T1 = T if self.C.verbosity >= 2 and i == self.C.MaxTestIters-1: - print 'Maximum test function iterations reached.\n' + print('Maximum test function iterations reached.\n') return X, V @@ -202,7 +204,7 @@ n = len(ind) except: n = self.n - ind = range(n) + ind = list(range(n)) J = zeros((self.m, n), float) for i in range(n): @@ -259,13 +261,14 @@ """ - def __init__(self, (a,b), (n,m), F, C, r=1, update=False, corr=False, save=False, numpoints=None): + def __init__(self, xxx_todo_changeme2, xxx_todo_changeme3, F, C, r=1, update=False, corr=False, save=False, numpoints=None): """F: R^a --> R^b Note: I did not assign b automatically (although I could - it would just be b = p*q) since you may not want to use all of the entries of S. Some bordering methods are not minimally augmented systems and thus only require certain entries of S.""" - + (a,b) = xxx_todo_changeme2 + (n,m) = xxx_todo_changeme3 TestFunc.__init__(self, (a,b), F, C, save=save, numpoints=numpoints) self.update = update @@ -312,7 +315,7 @@ B = BC[:,0:self.data.p] except: if self.C.verbosity >= 1: - print 'Warning: Problem updating border vectors. Using svd...' + print('Warning: Problem updating border vectors. Using svd...') U, S, Vh = linalg.svd(A) B = U[:,-1*self.data.p:] C = transpose(Vh)[:,-1*self.daRefactoringTool: Refactored ./PyDSTool/PyCont/__init__.py RefactoringTool: Refactored ./PyDSTool/PyCont/misc.py ta.q:] @@ -346,7 +349,8 @@ return V, W class BiAltMethod(TestFunc): - def __init__(self, (n,m), F, C, save=False, numpoints=None): + def __init__(self, xxx_todo_changeme4, F, C, save=False, numpoints=None): + (n,m) = xxx_todo_changeme4 TestFunc.__init__(self, (n,m), F, C, save=save, numpoints=numpoints) if self.data is None: @@ -446,7 +450,7 @@ n = len(ind) except: n = self.n - ind = range(n) + ind = list(range(n)) F_n = zeros((self.period, self.n), float) F_n[0] = X @@ -478,7 +482,7 @@ n = len(ind) except: n = self.n - ind = range(n) + ind = list(range(n)) return self.F.jac(X, ind) - eye(self.F.m, self.F.n)[:,ind[0]:ind[-1]+1] @@ -497,7 +501,7 @@ upper = {} for par in C.freepars: if C.curvetype == 'UD-C': - if hasattr(C, '_userdomain') and par in C._userdomain.keys(): + if hasattr(C, '_userdomain') and par in list(C._userdomain.keys()): domain = C._userdomain[par] else: domain = [-1*Inf, Inf] @@ -508,7 +512,7 @@ for par in C.varslist: if C.curvetype == 'UD-C': - if hasattr(C, '_userdomain') and par in C._userdomain.keys(): + if hasattr(C, '_userdomain') and par in list(C._userdomain.keys()): domain = C._userdomain[par] else: domain = [-1*Inf, Inf] @@ -585,7 +589,7 @@ n = len(ind) except: n = self.n - ind = range(n) + ind = list(range(n)) V, W = self.getVW(self.F.jac(X, self.F.coords)) H = self.F.hess(X, self.F.coords, ind) @@ -621,7 +625,7 @@ n = len(ind) except: n = self.n - ind = range(n) + ind = list(range(n)) self.bialtprodeye(2*self.F.jac(X, self.F.coords)) V, W = self.getVW(self.data.P) @@ -690,7 +694,7 @@ B = BC[:,:1] except: if self.C.verbosity >= 1: - print 'Warning: Problem updating border vectors. Using svd...' + print('Warning: Problem updating border vectors. Using svd...') U, S, Vh = linalg.svd(A) B = U[:,-1:] C = transpose(Vh)[:,-1:] @@ -880,7 +884,8 @@ # Test function for UserDefinedCurve class UserDefinedTestFunc(TestFunc): - def __init__(self, (n, m), C, tfunc, save=False, numpoints=None): + def __init__(self, xxx_todo_changeme5, C, tfunc, save=False, numpoints=None): + (n, m) = xxx_todo_changeme5 TestFunc.__init__(self, (n, m), C.sysfunc, C, save=save, numpoints=numpoints) self.tfunc = tfunc --- ./PyDSTool/PyCont/__init__.py (original) +++ ./PyDSTool/PyCont/__init__.py (refactored) @@ -1 +1 @@ -from ContClass import ContClass +from .ContClass import ContClass --- ./PyDSTool/PyCont/misc.py (original) +++ ./PyDSTool/PyCont/misc.py (refactored) @@ -75,11 +75,11 @@ in 'x' if num < 0. """ if num is None: - ind = range(len(x)-1) + ind = list(range(len(x)-1)) elif num > 1: - ind = range(num-1) + ind = list(range(num-1)) elif num < -1: - ind = range(num, -1) + ind = list(range(num, -1)) else: raise 'Number of indices must be larger than 1.' @@ -93,7 +93,7 @@ def todict(C, X): # Variables - VARS = dict(zip(C.varslist,array(X)[C.coords])) + VARS = dict(list(zip(C.varslist,array(X)[C.coords]))) # Free parameters for i, par in enumerate(C.freepars): @@ -195,12 +195,12 @@ def testindij(n): bn = n*(n-1)/2 - print "Testing %d..." % n + print("Testing %d..." % n) for ind in range(bn): i, j = indtoij(ind) ind2 = ijtoind(i, j) if ind != ind2: - print "DAMNIT!\n" + print("DAMNIT!\n") #print " %d ---> (%d,RefactoringTool: No changes to ./PyDSTool/PyCont/auto/dev/setup.py RefactoringTool: Refactored ./PyDSTool/Generator/ADMC_ODEsystem.py %d) ---> %d" % (ind,i,j,ind2) def wedge(u, v): @@ -282,12 +282,12 @@ p = direc*p if check: - print 'Checking...' - print ' |q| = %f' % linalg.norm(q) + print('Checking...') + print(' |q| = %f' % linalg.norm(q)) temp = matrixmultiply(conjugate(p),q) - print ' | - 1| = ', abs(temp-1) - print ' |Aq - iwq| = %f' % linalg.norm(matrixmultiply(J_coords,q) - 1j*w*q) - print ' |A*p + iwp| = %f\n' % linalg.norm(matrixmultiply(transpose(J_coords),p) + 1j*w*p) + print(' | - 1| = ', abs(temp-1)) + print(' |Aq - iwq| = %f' % linalg.norm(matrixmultiply(J_coords,q) - 1j*w*q)) + print(' |A*p + iwp| = %f\n' % linalg.norm(matrixmultiply(transpose(J_coords),p) + 1j*w*p)) # Compute first lyapunov coefficient B = F.hess(X, F.coords, F.coords) @@ -365,7 +365,7 @@ except TypeError: del u # move on to the next method else: - return u.keys() + return list(u.keys()) # We can't hash all the elements. Second fastest is to sort, # which brings the equal elements together; then duplicates are @@ -433,7 +433,7 @@ def negate(x): if isinstance(x, dict): - for k, v in x.iteritems(): + for k, v in x.items(): x[k] = -1*v elif isinstance(x, Point): for i in range(len(x)): @@ -445,7 +445,7 @@ elif isinstance(x, ndarray): x = -1*x elif isinstance(x, args): - for k, v in x.iteritems(): + for k, v in x.items(): x[k] = negate(x[k]) else: raise TypeError("Invalid argument type given") @@ -462,15 +462,15 @@ J = linalg.solve(jac1, jac0) if verbose: - print "Jacobian J*x" - print "------------\n" - print J - print "\n" - - print "Check Jacobian" - print "--------------\n" - print " eigs = ", linalg.eig(J)[0] - print " eigs = ", pt.labels['LC']['data'].evals + print("Jacobian J*x") + print("------------\n") + print(J) + print("\n") + + print("Check Jacobian") + print("--------------\n") + print(" eigs = ", linalg.eig(J)[0]) + print(" eigs = ", pt.labels['LC']['data'].evals) return J @@ -514,10 +514,10 @@ evals.append(w) levecs.append(vl) revecs.append(vr) # unused unless verbose (for debugging) - idxs = range(ntst) + idxs = list(range(ntst)) if verbose: - print "Eigenvalues:", [evals[i] for i in idxs] + print("Eigenvalues:", [evals[i] for i in idxs]) check1 = linalg.norm(matrixmultiply(maps[i], revecs[i][:,ind]) - \ evals[i][ind]*revecs[i][:,ind]) check2 = linalg.norm(matrixmultiply(transpose(levecs[i][:,ind]), --- ./PyDSTool/Generator/ADMC_ODEsystem.py (original) +++ ./PyDSTool/Generator/ADMC_ODEsystem.py (refactored) @@ -1,9 +1,9 @@ # ADMC++ ODE system -from __future__ import division - -from allimports import * + + +from .allimports import * from PyDSTool.Generator import ODEsystem as ODEsystem -from baseclasses import Generator, theGenSpecHelper +from .baseclasses import Generator, theGenSpecHelper from PyDSTool.utils import * from PyDSTool.common import * from PyDSTool.integrator import integrator @@ -62,7 +62,7 @@ algparams_def = {'evtols' : 0.0001, 'vftype' : 'vfieldts'} # Remove this later - for k, v in algparams_def.iteritems(): + for k, v in algparams_def.items(): if k not in self.algparams: self.algparams[k] = v @@ -70,7 +70,7 @@ # defaults are added above if len(self.algparams) != len(algparams_def): raise ValueError("Invalid keys present in algparams argument: " \ - + str(remain(self.algparams.keys(),algparams_def.keys()))) + + str(remain(list(self.algparams.keys()),list(algparams_def.keys())))) thisplatform = platform.system() @@ -82,8 +82,8 @@ "A file already exists with the same name" os.mkdir(self._compilation_tempdir) except: - print "Could not create compilation temp directory " + \ - self._compilation_tempdir + print("Could not create compilation temp directory " + \ + self._compilation_tempdir) raise # ADMC targets must go in their own directories with appropriate names @@ -96,8 +96,8 @@ "A file already exists with the same name" os.mkdir(self._target_dir) except: - print "Could not creat target ADMC model directory " + \ - self._target_dir + print("Could not creat target ADMC model directory " + \ + self._target_dir) raise @@ -121,8 +121,8 @@ if not nobuild: self.makeLibSource() else: - print "Build the library using the makeLib method, or in " - print "stages using the makeLibSource and compileLib methods." + print("Build the library using the makeLib method, or in ") + print("stages using the makeLibSource and compileLib methods.") def _prepareEventSpecs(self): @@ -184,7 +184,7 @@ fbody += ev._LLfuncstr if self.funcspec.auxfns: - fbody_parsed = addArgToCalls(fbody, self.funcspec.auxfns.keys(), "p_") + fbody_parsed = addArgToCalls(fbody, list(self.funcspec.auxfns.keys()), "p_") else: fbody_parsed = fbody @@ -253,11 +253,11 @@ pnames = self.funcspec.pars pnames.sort() - for i in xrange(self.numpars): + for i in range(self.numpars): p = pnames[i] pardefines += "\t" + p + " = p_(" + str(i+1) + ");\n" - for i in xrange(self.dimension): + for i in range(self.dimension): v = vnames[i] vardefines += "\t" + v + " = x_(" + str(i+1) + ");\n" @@ -288,11 +288,11 @@ allfilestr = "" if self.funcspec.auxfns: - for finfo in self.funcspec.auxfns.values(): + for finfo in list(self.funcspec.auxfns.values()): fbody = finfo[0] # subs _p into auxfn-to-auxfn calls (but not to the signature) fbody_parsed = addArgToCalls(fbody, - self.funcspec.auxfns.keys(), + list(self.funcspec.auxfns.keys()), "p_", notFirst=True) allfilestr += "\n" + fbody_parsed + "\n\n" @@ -337,7 +337,7 @@ bodystr = "ics_ = [ ...\n" if self.initialconditions: - icnames = self.initialconditions.keys() + icnames = list(self.initialconditions.keys()) icnames.sort() for i in range(len(icnames)-1): @@ -368,7 +368,7 @@ bodystr = "pars_ = [ ...\n" if self.pars: - pnames = self.pars.keys() + pnames = list(self.pars.keys()) pnames.sort() for i in range(len(pnames)-1): @@ -403,7 +403,7 @@ # NEED TO CHECK WHETHER THIS IS APPROPRIATELY DEFINED # check for calls to user-defined functions and add hidden p_ argument if self.funcspec.auxfns: - fbody_parsed = addArgToCalls(fbody, self.funcspec.auxfns.keys(), "p_") + fbody_parsed = addArgToCalls(fbody, list(self.funcspec.auxfns.keys()), "p_") if 'initcond' in self.funcspec.auxfns: fbody_parsed = wrapArgInCall(fbody_parsed, 'initcond', ' ') @@ -441,9 +441,9 @@ file = open(modelfile, 'w') file.write(allfilestr) file.close() - except IOError, e: - print "Error opening file "+self._model_file+" for writing" - raise IOError, e + except IOError as e: + print("ErrorRefactoringTool: Refactored ./PyDSTool/Generator/DDEsystem.py RefactoringTool: Refactored ./PyDSTool/Generator/Dopri_ODEsystem.py opening file "+self._model_file+" for writing") + raise IOError(e) # Write the events.m file if len(self._eventNames) > 0: @@ -453,9 +453,9 @@ file = open(eventsfile, 'w') file.write(allfilestr) file.close() - except IOError, e: - print "Error opening file "+self._events_file+" for writing" - raise IOError, e + except IOError as e: + print("Error opening file "+self._events_file+" for writing") + raise IOError(e) # Write the initialconditions.m file @@ -465,9 +465,9 @@ file = open(icfile, 'w') file.write(allfilestr) file.close() - except IOError, e: - print "Error opening file "+self._ic_file+" for writing" - raise IOError, e + except IOError as e: + print("Error opening file "+self._ic_file+" for writing") + raise IOError(e) # Write the pars.m file allfilestr = self._prepareParamContents() @@ -476,9 +476,9 @@ file = open(paramfile, 'w') file.write(allfilestr) file.close() - except IOError, e: - print "Error opening file "+self._param_file+" for writing" - raise IOError, e + except IOError as e: + print("Error opening file "+self._param_file+" for writing") + raise IOError(e) # Write the get.m file allfilestr = self._prepareGetFileContents() @@ -487,9 +487,9 @@ file = open(getfile, 'w') file.write(allfilestr) file.close() - except IOError, e: - print "Error opening file "+self._get_file+" for writing" - raise IOError, e + except IOError as e: + print("Error opening file "+self._get_file+" for writing") + raise IOError(e) # Write the set.m file allfilestr = self._prepareSetFileContents() @@ -498,9 +498,9 @@ file = open(setfile, 'w') file.write(allfilestr) file.close() - except IOError, e: - print "Error opening file "+self._set_file+" for writing" - raise IOError, e + except IOError as e: + print("Error opening file "+self._set_file+" for writing") + raise IOError(e) # Write the vfield.m file # vfdefines = self._prepareVfieldDefines() @@ -511,9 +511,9 @@ file = open(vffile, 'w') file.write(allfilestr) file.close() - except IOError, e: - print "Error opening file "+self._vfield_file+" for writing" - raise IOError, e + except IOError as e: + print("Error opening file "+self._vfield_file+" for writing") + raise IOError(e) # We have omitted methods: RHS, compute, etc. because this --- ./PyDSTool/Generator/DDEsystem.py (original) +++ ./PyDSTool/Generator/DDEsystem.py (refactored) @@ -1,7 +1,7 @@ # Differential-delay system (incomplete) -from allimports import * -from baseclasses import ctsGen +from .allimports import * +from .baseclasses import ctsGen from PyDSTool.utils import * from PyDSTool.common import * --- ./PyDSTool/Generator/Dopri_ODEsystem.py (original) +++ ./PyDSTool/Generator/Dopri_ODEsystem.py (refactored) @@ -1,9 +1,9 @@ # Dopri ODE system -from __future__ import division - -from allimports import * + + +from .allimports import * from PyDSTool.Generator import ODEsystem as ODEsystem -from baseclasses import Generator, theGenSpecHelper, genDB, _pollInputs +from .baseclasses import Generator, theGenSpecHelper, genDB, _pollInputs from PyDSTool.utils import * from PyDSTool.common import * from PyDSTool.integrator import integrator @@ -48,8 +48,8 @@ try: self._integMod = __import__(modname, globals()) except: - print "Error in importing compiled vector field and integrator." - print "Did you compile the RHS C code?" + print("Error in importing compiled vector field and integrator.") + print("Did you compile the RHS C code?") raise # check module's directory assert 'Integrate' in dir(self._integMod), \ @@ -358,23 +358,23 @@ 'boundsCheckMaxSteps': 1000, 'checkBounds': self.checklevel } - for k, v in algparams_def.iteritems(): + for k, v in algparams_def.items(): if k not in self.algparams: self.algparams[k] = v # verify that no additional keys are present in algparams, after # defaults are added above if len(self.algparams) != len(algparams_def): raise ValueError("Invalid keys present in algparams argument: " \ - + str(remain(self.algparams.keys(),algparams_def.keys()))) + + str(remain(list(self.algparams.keys()),list(algparams_def.keys())))) thisplatform = platform.system() if thisplatform == 'Windows': self._dllext = ".pyd" elif thisplatform in ['Linux', 'IRIX', 'Solaris', 'SunOS', 'MacOS', 'Darwin', 'FreeBSD']: self._dllext = '.so' else: - print "Shared library extension not tested on this platform." - print "If this process fails please report the errors to the" - print "developers." + print("Shared library extension not tested on this platform.") + print("If this process fails please report the errors to the") + print("developers.") self._dllext = '.so' self._compilation_tempdir = os.path.join(os.getcwd(), "dopri853_temp") @@ -384,8 +384,8 @@ "A file already exists with the same name" os.mkdir(self._compilation_tempdir) except: - print "Could not create compilation temp directory " + \ - self._compilation_tempdir + print("Could not create compilation temp directory " + \ + self._compilation_tempdir) raise self._compilation_sourcedir = os.path.join(_pydstool_path,"integrator") self._vf_file = self.name+"_vf.c" @@ -399,8 +399,8 @@ self.makeLibSource() self.compileLib() else: - print "Build the library using the makeLib method, or in " - print "stages using the makeLibSource and compileLib methods." + print("Build the library using the makeLib method, or in ") + print("stages using the makeLibSource and compileLib methods.") self._inputVarList = [] self._inputTimeList = [] @@ -432,9 +432,9 @@ ## "_dop853"+self._vf_filename_ext+self._dllext)): ## os.remove(os.path.join(os.getcwd(), ## "_dop853"+self._vf_filename_ext+self._dllext)) - print "Cannot rebuild library without restarting session. Sorry." - print "Try asking the Python developers to make a working module" - print "unimport function!" + print("Cannot rebuild library without restarting session. Sorry.") + print("Try asking the Python developers to make a working module") + print("unimport function!") ## self.makeLibSource() @@ -498,7 +498,7 @@ ('stdlib.h', STDLIB), ('string.h', STDLIB), ('vfield.h', USERLIB), ('events.h', USERLIB), ('signum.h', USERLIB), ('maxmin.h', USERLIB)]) include_str = '' - for libstr, libtype in libinclude.iteritems(): + for libstr, libtype in libinclude.items(): if libtype == STDLIB: quoteleft = '<' quoteright = '>' @@ -511,8 +511,8 @@ for libstr in include: if libstr in libinclude: # don't repeat libraries - print "Warning: library '" + libstr + "' already appears in list"\ - + " of imported libraries" + print("Warning: library '" + libstr + "' already appears in list"\ + + " of imported libraries") else: include_str += "#include " + '"' + libstr + '"\n' allfilestr = "/* Vector field function and events for Dopri853 integrator.\n " \ @@ -552,17 +552,17 @@ inames = self.funcspec.inputs pnames.sort() inames.sort() - for i in xrange(self.numpars): + for i in range(self.numpars): p = pnames[i] # add to defines pardefines += self.funcspec._defstr+" "+p+"\tp_["+str(i)+"]\n" - for i in xrange(self.dimension): + for i in range(self.dimension): v = vnames[i] # add to defines vardefines += self.funcspec._defstr+" "+v+"\tY_["+str(i)+"]\n" for i, v in enumerate(self.funcspec.auxvars): auxvardefines += self.funcspec._defstr+" "+v+"\t("+self.funcspec._auxdefs_parsed[v]+")\n" - for i in xrange(len(self.funcspec.inputs)): + for i in range(len(self.funcspec.inputs)): inp = inames[i] # add to defines inpdefines += self.funcspec._defstr+" "+inp+"\txv_["+str(i)+"]\n" @@ -588,7 +588,7 @@ # and add hidden p argument if self.funcspec.auxfns: fbody_parsed = addArgToCalls(fbody, - self.funcspec.auxfns.keys(), + list(self.funcspec.auxfns.keys()), "p_, wk_, xv_") if 'initcond' in self.funcspec.auxfns: # convert 'initcond(x)' to 'initcond("x")' for @@ -603,7 +603,7 @@ # add signature for auxiliary functions if self.funcspec.auxfns: allfilestr += "\n" - for finfo in self.funcspec.auxfns.values(): + for finfo in list(self.funcspec.auxfns.values()): allfilestr += finfo[1] + ";\n" assignEvBody = "" for evix in range(numevs): @@ -627,11 +627,11 @@ + ";\n\n\n" allfilestr += self.funcspec.spec[0] + "\n\n" if self.funcspec.auxfns: - for fname, finfo in self.funcspec.auxfns.iteritems(): + for fname, finfo in self.funcspec.auxfns.items(): fbody = finfo[0] # subs _p into auxfn-to-auxfn calls (but not to the signature) fbody_parsed = addArgToCalls(fbody, - self.funcspec.auxfns.keys(), + list(self.funcspec.auxfns.keys()), "p_, wk_, xv_", notFirst=fname) if 'initcond' in self.funcspec.auxfns: # convert 'initcond(x)' to 'initcond("x")' for @@ -668,9 +668,9 @@ file = open(vffile, 'w') file.write(allfilestr) file.close() - except IOError, e: - print "Error opening file "+self._vf_file+" for writing" - raise IOError, e + except IOError as e: + print("Error opening file "+self._vf_file+" for writing") + raise IOError(e) def compileLib(self, libsources=[], libdirs=[]): @@ -686,21 +686,21 @@ # then DLL file already exists and we can't overwrite it at this # time proceed = False - print "\n" - print "-----------------------------------------------------------" - print "Present limitation of Python: Cannot rebuild library" - print "without exiting Python and deleting the shared library" - print " " + str(os.path.join(os.getcwd(), - "_dop853"+self._vf_filename_ext+self._dllext)) - print "by hand! If you made any changes to the system you should" - print "not proceed with running the integrator until you quit" - print "and rebuild." - print "-----------------------------------------------------------" - print "\n" + print("\n") + print("-----------------------------------------------------------") + print("Present limitation of Python: Cannot rebuild library") + print("without exiting Python and deleting the shared library") + print(" " + str(os.path.join(os.getcwd(), + "_dop853"+self._vf_filename_ext+self._dllext))) + print("by hand! If you made any changes to the system you should") + print("not proceed with running the integrator until you quit") + print("and rebuild.") + print("-----------------------------------------------------------") + print("\n") else: proceed = True if not proceed: - print "Did not compile shared library." + print("Did not compile shared library.") return if self._solver is not None: self.forceLibRefresh() @@ -717,7 +717,7 @@ ifacefile_orig.close() ifacefile_copy.close() except IOError: - print "dop853.i copying error in dopri853 compilation directory" + print("dop853.i copying error in dopri853 compilation directory") raise swigfile = os.path.join(self._compilation_tempdir, "dop853"+self._vf_filename_ext+".i") @@ -769,8 +769,8 @@ extra_compile_args=['-w', '-D__DOPRI__', '-m32'], extra_link_args=['-w', '-m32'])]) except: - print "\nError occurred in generating Dopri system..." - print sys.exc_info()[0], sys.exc_info()[1] + print("\nError occurred in generating Dopri system...") + print(sys.exc_info()[0], sys.exc_info()[1]) raise RuntimeError # Attempt to unload module through a shutdown() function being # added to the SWIG module file. But it didn't work! @@ -814,9 +814,9 @@ "dop853"+self._vf_filename_ext+".py")) except: rout.stop() - print "\nError occurred in generating Dopri system" - print "(while moving library extension modules to CWD)" - print sys.exc_info()[0], sys.exc_info()[1] + print("\nError occurred in generating Dopri system") + print("(while moving library extension modules to CWD)") + print(sys.exc_info()[0], sys.exc_info()[1]) raise RuntimeError rout.stop() # restore stdout @@ -850,13 +850,13 @@ raise ValueError('rtol list must have same length as phase dimension') else: rtol = self.algparams['rtol'] - self.algparams['rtol'] = [rtol for dimix in xrange(self.dimension)] + self.algparams['rtol'] = [rtol for dimix in range(self.dimension)] if isinstance(self.algparams['atol'], list): if len(self.algparams['atol']) != self.dimension: raise ValueError('atol list must have same length as phase dimension') else: atol = self.algparams['atol'] - self.algparams['atol'] = [atol for dimix in xrange(self.dimension)] + self.algparams['atol'] = [atol for dimix in range(self.dimension)] anames = self.funcspec.auxvars # Check i.c.'s are well defined (finite) self.checkInitialConditions() @@ -1035,12 +1035,12 @@ numevs = len(Evtimes[evix]) if self.algparams['eventTerm'][evix]: if numevs > 1: - print "Event info:", Evpoints, Evtimes + print("Event info:", Evpoints, Evtimes) assert numevs <= 1, ("Internal error: more than one " "terminal event of same type found") # For safety, we should assert that this event # also appears in termevents, but we don't - if Evtimes[evix][0] in termevtimes.keys(): + if Evtimes[evix][0] in list(termevtimes.keys()): # append event name to this warning warning_ix = termevtimes[Evtimes[evix][0]] self.diagnostics.warnings[warning_ix][1][1].append(evname) @@ -1052,7 +1052,7 @@ [self._eventNames[evix]]))) else: for ev in range(numevs): - if Evtimes[evix][ev] in nontermevtimes.keys(): + if Evtimes[evix][ev] in list(nontermevtimes.keys()): # append event name to this warning warning_ix = nontermevtimes[Evtimes[evix][ev]] self.diagnostics.warnings[warning_ix][1][1].append(evname) @@ -1064,9 +1064,9 @@ (Evtimes[evix][ev], [evname]))) except IndexError: - print "Events returned from integrator are the wrong size." - print " Did you change the system and not refresh the C " \ - + "library using the forcelibrefresh() method?" + print("Events returned from integrator are the wrong size.") + print(" Did you change the system and not refresh the C " \ + + "library using the forcelibrefresh() method?") raise termcount = 0 for (w,i) in self.diagnostics.warnings: @@ -1086,10 +1086,10 @@ last_t = Inf if self.algparams['checkBounds'] > 0: # temp storage for repeatedly used object attributes (for lookup efficiency) - depdomains = dict(zip(range(self.dimension), - [self.variables[xn].depdomain for xn in xnames])) + depdomains = dict(list(zip(list(range(self.dimension)), + [self.variables[xn].depdomain for xn in xnames]))) offender_ix = None - for xi in xrange(self.dimension): + for xi in range(self.dimension): if not any(depdomains[xi].isfinite()): # no point in checking when the bounds are +/- infinity continue @@ -1106,7 +1106,7 @@ elif last_ix >= 0 and last_ix < highest_ix: # truncate data last_t = alltData[last_ix] - print "Warning; domain bound reached (because algparams['checkBounds'] > 0)" + print("Warning; domain bound reached (because algparams['checkBounds'] > 0)") self.diagnostics.warnings.append((W_TERMSTATEBD, (last_t, xnames[offender_ix], X[offender_ix, last_ix], @@ -1158,11 +1158,11 @@ X = X[:, :last_ix] alltData = alltData[:last_ix] try: - allxDataDict = dict(zip(xnames,X)) + allxDataDict = dict(list(zip(xnames,X))) except IndexError: - print "Integration returned variable values of unexpected dimensions." - print " Did you change the system and not refresh the C library" \ - + " using the forcelibrefresh() method?" + print("Integration returned variable values of unexpected dimensions.") + print(" Did you change the system and not refresh the C library" \ + + " using the forcelibrefresh() method?") raise # storage of all auxiliary variable data try: @@ -1170,14 +1170,14 @@ if last_ix < highest_ix: A = A[:, :last_ix] try: - allaDataDict = dict(zip(anames,A)) +RefactoringTool: Refactored ./PyDSTool/Generator/EmbeddedSysGen.py allaDataDict = dict(list(zip(anames,A))) except TypeError: - print "Internal error! Type of A: ", type(A) + print("Internal error! Type of A: ", type(A)) raise except IndexError: - print "Integration returned auxiliary values of unexpected dimensions." - print " Did you change the system and not refresh the C library" \ - + " using the forcelibrefresh() method?" + print("Integration returned auxiliary values of unexpected dimensions.") + print(" Did you change the system and not refresh the C library" \ + + " using the forcelibrefresh() method?") raise if int(Err) == 1 or (int(Err) == 2 and termcount == 1): # output OK @@ -1214,7 +1214,7 @@ # final checks #self.validateSpec() self.defined = True - return Trajectory(trajname, variables.values(), + return Trajectory(trajname, list(variables.values()), abseps=self._abseps, globalt0=self.globalt0, checklevel=self.checklevel, FScompatibleNames=self._FScompatibleNames, @@ -1226,7 +1226,7 @@ diagnost_info = self.diagnostics._errorcodes[int(Err)] except TypeError: # errcode messed up from Dopri - print "Error code: ", Err + print("Error code: ", Err) diagnost_info = self.diagnostics._errorcodes[0] if self._solver.verbose: info(self.diagnostics.outputStats, "Output statistics") @@ -1235,8 +1235,8 @@ if (len(alltData) == self.algparams['max_pts'] or \ self.diagnostics.outputStats['num_steps'] >= self.algparams['max_pts']) \ and alltData[-1] < tend: - print "max_pts algorithmic parameter too small: current " + \ - "value is %i"%self.algparams['max_pts'] + print("max_pts algorithmic parameter too small: current " + \ + "value is %i"%self.algparams['max_pts']) # avstep = (self.algparams['init_step']+self.diagnostics.outputStats['last_step'])/2. if self.diagnostics.outputStats['last_time']-tbegin > 0: ms = str(int(round(self.algparams['max_pts'] / \ @@ -1244,8 +1244,8 @@ tbegin)*(tend-tbegin)))) else: ms = 'Inf' - print "(recommended value for this trajectory segment is " + \ - "estimated to be %s (saved in diagnostics.errors attribute))"%str(ms) + print("(recommended value for this trajectory segment is " + \ + "estimated to be %s (saved in diagnostics.errors attribute))"%str(ms)) diagnost_info += " -- recommended value is " + ms self.diagnostics.errors.append((E_COMPUTFAIL, (self._solver.lastTime, diagnost_info))) --- ./PyDSTool/Generator/EmbeddedSysGen.py (original) +++ ./PyDSTool/Generator/EmbeddedSysGen.py (refactored) @@ -1,8 +1,8 @@ # Embedded dynamical system generator -from __future__ import division - -from allimports import * -from baseclasses import ctsGen, theGenSpecHelper + + +from .allimports import * +from .baseclasses import ctsGen, theGenSpecHelper from PyDSTool.utils import * from PyDSTool.common import * from PyDSTool.Interval import uncertain @@ -48,7 +48,7 @@ except (KeyError, AttributeError): raise PyDSTool_KeyError("Model-type system must be provided") self.funcspec = args(**self._kw_process_dispatch(dispatch_list, kw)) - self.funcspec.vars = kw['varspecs'].keys() + self.funcspec.vars = list(kw['varspecs'].keys()) self.funcspec.auxvars = [] # varspecs not specified by user and must be removed for checkArgs() del kw['varspecs'] @@ -71,11 +71,11 @@ Interval('t', self.indepvartype, self.tdata, self._abseps), 't') self._register(self.indepvariable) - for x in self.xdomain.keys(): + for x in list(self.xdomain.keys()): # aux vars? try: xinterval=Interval(x, self.xtype[x], self.xdomain[x], self._abseps) - except KeyError, e: + except KeyError as e: raise PyDSTool_KeyError('Mismatch between declared variables ' 'and xspecs: ' + str(e)) # placeholder variable so that this class can be @@ -103,7 +103,7 @@ try: traj = self._embed_spec(self._solver) except: - print "Error in user-provided embedded system" + print("Error in user-provided embedded system") raise self.defined = True traj.name = trajname @@ -123,7 +123,7 @@ def set(self, **kw): """Set ExplicitFnGen parameters""" - if remain(kw.keys(), self._validKeys) != []: + if remain(list(kw.keys()), self._validKeys) != []: raise KeyError("Invalid keys in argument") if 'globalt0' in kw: # pass up to generic treatment for this @@ -137,9 +137,9 @@ # optional keys for this call are # ['pars', 'tdomain', 'xdomain', 'pdomain'] if 'xdomain' in kw: - for k_temp, v in kw['xdomain'].iteritems(): - k = self._FScompatibleNames(k_temp) - if k in self.xdomain.keys(): + for k_temp, v in kw['xdomain'].items(): + k = self._FScompatibleNames(k_temp) + if k in list(self.xdomain.keys()): if isinstance(v, _seq_types): assert len(v) == 2, \ "Invalid size of domain specification for "+k @@ -162,9 +162,9 @@ ' names -> valid interval 2-tuples or ' 'singletons') if 'pdomain' in kw: - for k_temp, v in kw['pdomain'].iteritems(): - k = self._FScompatibleNames(k_temp) - if k in self.pars.keys(): + for k_temp, v in kw['pdomain'].items(): + k = self._FScompatibleNames(k_temp) + if k in list(self.pars.keys()): if isinstance(v, _seq_types): assert len(v) == 2, \ "Invalid size of domain specification for "+k @@ -197,29 +197,29 @@ self.diagnostics.warnings.append((W_UNCERTVAL, (self.tdata[0],self.tdomain))) else: - print 'tdata cannot be specified below smallest '\ + print('tdata cannot be specified below smallest '\ 'value in tdomain\n (possibly due to uncertain bounding).'\ ' It has been automatically adjusted from\n ', self.tdata[0], \ 'to', self.tdomain[0], '(difference of', \ - self.tdomain[0]-self.tdata[0], ')' + self.tdomain[0]-self.tdata[0], ')') self.tdata[0] = self.tdomain[0] if self.tdomain[1] < self.tdata[1]: if self.indepvariable.indepdomain.contains(self.tdata[1]) == uncertain: self.diagnostics.warnings.append((W_UNCERTVAL, (self.tdata[1],self.tdomain))) else: - print 'tdata cannot be specified above largest '\ + print('tdata cannot be specified above largest '\ 'value in tdomain\n (possibly due to uncertain bounding).'\ ' It has been automatically adjusted from\n ', \ self.tdomain[1], 'to', \ self.tdomain[1], '(difference of', \ - self.tdata[1]-self.tdomaRefactoringTool: Refactored ./PyDSTool/Generator/Euler_ODEsystem.py in[1], ')' + self.tdata[1]-self.tdomain[1], ')') self.tdata[1] = self.tdomain[1] self.indepvariable.depdomain.set(self.tdata) if 'ics' in kw: - for k_temp, v in kw['ics'].iteritems(): - k = self._FScompatibleNames(k_temp) - if k in self.xdomain.keys(): + for k_temp, v in kw['ics'].items(): + k = self._FScompatibleNames(k_temp) + if k in list(self.xdomain.keys()): self._xdatadict[k] = ensurefloat(v) else: raise ValueError('Illegal variable name') @@ -228,7 +228,7 @@ if not self.pars: raise ValueError('No pars were declared for this object' ' at initialization.') - for k_temp, v in kw['pars'].iteritems(): + for k_temp, v in kw['pars'].items(): k = self._FScompatibleNames(k_temp) if k in self.pars: cval = self.parameterDomains[k].contains(v) @@ -236,7 +236,7 @@ if cval is not notcontained: self.pars[k] = ensurefloat(v) if cval is uncertain and self.checklevel == 2: - print 'Warning: Parameter value at bound' + print('Warning: Parameter value at bound') else: raise PyDSTool_ValueError('Parameter value out of ' 'bounds') @@ -256,11 +256,11 @@ def validateSpec(self): ctsGen.validateSpec(self) try: - for v in self.variables.values(): + for v in list(self.variables.values()): assert isinstance(v, Variable) assert not self.inputs except AssertionError: - print 'Invalid system specification' + print('Invalid system specification') raise --- ./PyDSTool/Generator/Euler_ODEsystem.py (original) +++ ./PyDSTool/Generator/Euler_ODEsystem.py (refactored) @@ -1,10 +1,10 @@ """Euler integrator for ODE systems, with no step refinement for events. """ -from __future__ import division - -from allimports import * + + +from .allimports import * from PyDSTool.Generator import ODEsystem as ODEsystem -from baseclasses import Generator, theGenSpecHelper, _pollInputs +from .baseclasses import Generator, theGenSpecHelper, _pollInputs from PyDSTool.utils import * from PyDSTool.common import * @@ -87,7 +87,7 @@ 'init_step': 0.01, 'max_pts': 100000 } - for k, v in algparams_def.iteritems(): + for k, v in algparams_def.items(): if k not in self.algparams: self.algparams[k] = v @@ -125,7 +125,7 @@ indepdom0, indepdom1 = self.indepvariable.depdomain.get() if continue_integ: if indepdom0 > self._solver.t: - print "Previous end time is %f"%self._solver.t + print("Previous end time is %f"%self._solver.t) raise ValueError("Start time not correctly updated for " "continuing orbit") x0 = self._solver.y @@ -142,7 +142,7 @@ solver.dt = dt # wrap up each dictionary initial value as a singleton list alltData = [t0] - allxDataDict = dict(zip(xnames, map(listid, x0))) + allxDataDict = dict(list(zip(xnames, list(map(listid, x0))))) plist = sortedDictValues(self.pars) extralist = copy(plist) if self.inputs: @@ -165,11 +165,11 @@ if do_poly: rhsfn = getattr(self, self.funcspec.spec[1]) dx0 = rhsfn(t0, x0, extralist) - alldxDataDict = dict(zip(xnames, map(listid, dx0))) + alldxDataDict = dict(list(zip(xnames, list(map(listid, dx0))))) auxvarsfn = getattr(self,self.funcspec.auxspec[1]) # Make t mesh if it wasn't given as 'specialtimes' if not all(isfinite(self.indepvariable.depdomain.get())): - print "Time domain was: ", self.indepvariable.depdomain.get() + print("Time domain was: ", self.indepvariable.depdomain.get()) raise ValueError("Ensure time domain is finite") if dt == indepdom1 - indepdom0: # single-step integration required @@ -197,24 +197,24 @@ try: allaDataDict[aname] = [avals[aix]] except IndexError: - print "\nEuler generator: There was a problem evaluating " \ - + "an auxiliary variable" - print "Debug info: avals (length", len(avals), ") was ", avals - print "Index out of range was ", aix - print self.funcspec.auxspec[1] - print hasattr(self, self.funcspec.auxspec[1]) - print "Args were:", [t0, x0, extralist] + print("\nEuler generator: There was a problem evaluating " \ + + "an auxiliary variable") + print("Debug info: avals (length", len(avals), ") was ", avals) + print("Index out of range was ", aix) + print(self.funcspec.auxspec[1]) + print(hasattr(self, self.funcspec.auxspec[1])) + print("Args were:", [t0, x0, extralist]) raise # Initialize signs of event detection objects at IC self.setEventICs(self.initialconditions, self.globalt0) if self.inputs: parsinps = copy(self.pars) - parsinps.update(dict(zip(inames,ilist))) + parsinps.update(dict(list(zip(inames,ilist)))) else: parsinps = self.pars if eventslist != []: dataDict = copy(self.initialconditions) - dataDict.update(dict(zip(anames, avals))) + dataDict.update(dict(list(zip(anames, avals)))) dataDict['t'] = t0 evsflagged = self.eventstruct.pollHighLevelEvents(None, dataDict, @@ -260,8 +260,8 @@ Evtimes[evname] = [] Evpoints[evname] = [] # temp storage for repeatedly used object attributes (for lookup efficiency) - depdomains = dict(zip(range(self.dimension), - [self.variables[xn].depdomain for xn in xnames])) + depdomains = dict(list(zip(list(range(self.dimension)), + [self.variables[xn].depdomain for xn in xnames]))) # Main integration loop num_points = 0 breakwhile = False @@ -276,14 +276,14 @@ try: errcode = solver.integrate(dt) except: - print "Error calling right hand side function:" + print("Error calling right hand side function:") self.showSpec() - print "Numerical traceback information (current state, " \ - + "parameters, etc.)" - print "in generator dictionary 'traceback'" - self.traceback = {'vars': dict(zip(xnames,solver.y)), - 'pars': dict(zip(pnames,plist)), - 'inputs': dict(zip(inames,ilist)), + print("Numerical traceback information (current state, " \ + + "parameters, etc.)") + print("in generator dictionary 'traceback'") + self.traceback = {'vars': dict(list(zip(xnames,solver.y))), + 'pars': dict(list(zip(pnames,plist))), + 'inputs': dict(list(zip(inames,ilist))), self.indepvariable.name: new_t} raise avals = auxvarsfn(new_t, solver.y, extralist) @@ -291,14 +291,14 @@ # assert all([isfinite(a) for a in avals]), \ # "Some auxiliary variable values not finite" if eventslist != []: - dataDict = dict(zip(xnames,solver.y)) - dataDict.update(dict(zip(anames,avals))) + dataDict = dict(list(zip(xnames,solver.y))) + dataDict.update(dict(list(zip(anames,avals)))) dataDict['t'] = new_t if self.inputs: parsinps = copy(self.pars) - parsinps.update(dict(zip(inames, + parsinps.update(dict(list(zip(inames, _pollInputs(inputVarList, new_t+self.globalt0, - self.checklevel)))) + self.checklevel))))) else: parsinps = self.pars evsflagged = self.eventstruct.pollHighLevelEvents(None, @@ -307,9 +307,8 @@ eventslist) ## print new_t, evsflagged ## evsflagged = [ev for ev in evsflagged if solver.t-indepdom0 > ev[1].eventinterval] - termevsflagged = filter(lambda e: e in evsflagged, termevents) - nontermevsflagged = filter(lambda e: e not in termevsflagged, - evsflagged) + termevsflagged = [e for e in termevents if e in evsflagged] + nontermevsflagged = [e for e in evsflagged if e not in termevsflagged] # register any non-terminating events in the warnings # list, unless they are 'precise' in which case flag # them to be resolved after integration completes @@ -384,7 +383,7 @@ # much less accurately determined) if not breakwhile: # only here if a terminal event hasn't just flagged - for xi in xrange(self.dimension): + for xi in range(self.dimension): if not self.contains(depdomains[xi], solver.y[xi], self.checklevel): @@ -414,17 +413,17 @@ self.checklevel) \ for f in inputVarList] except ValueError: - print 'External input call caused value out of range error:',\ - 't = ', solver.t + print('External input call caused value out of range error:',\ + 't = ', solver.t) for f in inputVarList: if f.diagnostics.hasWarnings(): - print 'External input variable %s out of range:'%f.name - print ' t = ', repr(f.diagnostics.warnings[-1][0]), ', ', \ - f.name, ' = ', repr(f.diagnostics.warnings[-1][1]) + print('External input variable %s out of range:'%f.name) + print(' t = ', repr(f.diagnostics.warnings[-1][0]), ', ', \ + f.name, ' = ', repr(f.diagnostics.warnings[-1][1])) raise except AssertionError: - print 'External input call caused t out of range error: t = ', \ - solver.t + print('External input call caused t out of range error: t = ', \ + solver.t) raise solver.set_f_params(extralist) breakwhile = not solver.successful() @@ -437,8 +436,8 @@ try: if self.diagnostics.warnings[-1][0] not in [W_TERMEVENT, W_TERMSTATEBD]: - print "t =", solver.t - print "state =", dict(zip(xnames,solver.y)) + print("t =", solver.t) + print("state =", dict(list(zip(xnames,solver.y)))) raise RuntimeError("Event finding code for terminal event " "failed in Generator " + self.name + \ ": try decreasing eventdelay or " @@ -446,8 +445,8 @@ "atol and rtol parameters") except IndexError: info(self.diagnostics.outputStats, "Output statistics") - print "t =", solver.t - print "x =", solver.y + print("t =", solver.t) + print("x =", solver.y) raise RuntimeError("Event finding failed in Generator " + \ self.name + ": try decreasing eventdelay " "or eventinterval below eventtol") @@ -485,18 +484,18 @@ interp = interp1d(alltData, xvals) variables[x] = Variable(interp, 't', x, x) else: - print "Error in Generator:", self.name - print "t = ", alltData - print "x = ", allxDataDict + print("Error in Generator:", self.name) + print("t = ", alltData) + print("x = ", allxDataDict) raise PyDSTool_ValueError("Fewer than 2 data points computed") for a in anames: if len(alltData) > 1: variables[a] = Variable(interp1d(alltData, allaDataDict[a]), 't', a, a) else: - print "Error in Generator:", self.name - print "t = ", alltData - print "x = ", allxDataDict + print("Error in Generator:", self.name) + print("t = ", alltData) + print("x = ", allxDataDict) raise PyDSTool_ValueError("Fewer than 2 data points computed") self.diagnostics.outputStats = {'last_step': dt, 'num_fcns': num_points, @@ -505,7 +504,7 @@ } if solver.successful(): #self.validateSpec() - for evname, evtlist in Evtimes.iteritems(): + for evname, evtlist in Evtimes.items(): try: self.eventstruct.Evtimes[evname].extend([et+self.globalt0 \ for et in evtlist]) @@ -526,7 +525,7 @@ 'indepvararray': Evtimes[evname], 'indepvartype': float}) self.defined = True - return Trajectory(trajname, variables.values(), + return Trajectory(trajname, list(variables.values()), abseps=self._abseps, globalt0=self.globalt0, checklevel=self.checklevel, FScompatibleNames=self._FScompatibleNames, @@ -540,7 +539,7 @@ self.diagnostics._errorcodes[errcode]))) except TypeError: # e.g. when errcode has been used to return info list - print "Error information: ", errcode + print("Error information: ", errcode) self.diagnostics.errors.append((E_COMPUTFAIL, (solver.t, self.diagnostics._errorcodes[0]))) self.defined = False @@ -561,7 +560,7 @@ p = sortedDictValues(self._FScompatibleNames(pdict)) i = _pollInputs(sortedDictValues(self.inputs), t, self.checklevel) - return apply(getattr(self, self.funcspec.spec[1]), [t, x, p+i]) + return getattr(self, self.funcspec.spec[1])(*[t, x, p+i]) def Jacobian(self, t, xdict, pdict=None, asarray=True): @@ -579,8 +578,7 @@ p = sortedDictValues(self._FScompatibleNames(pdict)) i = _pollInputs(sortedDictValues(self.inputs), t, self.checklevel) - return apply(getattr(self, self.funcspec.auxfns["Jacobian"][1]), \ - [t, x, p+i]) + return getattRefactoringTool: Refactored ./PyDSTool/Generator/ExplicitFnGen.py r(self, self.funcspec.auxfns["Jacobian"][1])(*[t, x, p+i]) else: raise PyDSTool_ExistError("Jacobian not defined") @@ -600,8 +598,7 @@ p = sortedDictValues(self._FScompatibleNames(pdict)) i = _pollInputs(sortedDictValues(self.inputs), t, self.checklevel) - return apply(getattr(self, self.funcspec.auxfns["Jacobian_pars"][1]), \ - [t, x, p+i]) + return getattr(self, self.funcspec.auxfns["Jacobian_pars"][1])(*[t, x, p+i]) else: raise PyDSTool_ExistError("Jacobian w.r.t. parameters not defined") @@ -620,7 +617,7 @@ p = sortedDictValues(self._FScompatibleNames(pdict)) i = _pollInputs(sortedDictValues(self.inputs), t, self.checklevel) - return apply(getattr(self, self.funcspec.auxspec[1]), [t, x, p+i]) + return getattr(self, self.funcspec.auxspec[1])(*[t, x, p+i]) def __del__(self): --- ./PyDSTool/Generator/ExplicitFnGen.py (original) +++ ./PyDSTool/Generator/ExplicitFnGen.py (refactored) @@ -1,8 +1,8 @@ # Explicit function generator -from __future__ import division - -from allimports import * -from baseclasses import ctsGen, theGenSpecHelper, \ + + +from .allimports import * +from .baseclasses import ctsGen, theGenSpecHelper, \ auxfn_container, _pollInputs from PyDSTool.utils import * from PyDSTool.common import * @@ -65,7 +65,7 @@ for x in self.funcspec.vars + self.funcspec.auxvars: try: xinterval=Interval(x, self.xtype[x], self.xdomain[x], self._abseps) - except KeyError, e: + except KeyError as e: raise PyDSTool_KeyError('Mismatch between declared variables ' 'and xspecs: ' + str(e)) # placeholder variable so that this class can be @@ -87,9 +87,9 @@ # user-defined auxiliary functions # (built-ins are provided explicitly) try: - exec fninfo[0] + exec(fninfo[0]) except: - print 'Error in supplied auxiliary function code' + print('Error in supplied auxiliary function code') self._funcreg[fninfo[1]] = ('self', fninfo[0]) setattr(self, fninfo[1], types.MethodType(locals()[fninfo[1]], self, @@ -98,9 +98,9 @@ try: uafi_code = self.funcspec._user_auxfn_interface[auxfnname] try: - exec uafi_code + exec(uafi_code) except: - print 'Error in auxiliary function wrapper' + print('Error in auxiliary function wrapper') raise setattr(self.auxfns, auxfnname, types.MethodType(locals()[auxfnname], self.auxfns, @@ -122,9 +122,9 @@ if self.funcspec.targetlang == 'python': fninfo = self.funcspec.spec try: - exec fninfo[0] + exec(fninfo[0]) except: - print 'Error in supplied functional specification code' + print('Error in supplied functional specification code') raise self._funcreg[fninfo[1]] = ('self', fninfo[0]) setattr(self, fninfo[1], types.MethodType(locals()[fninfo[1]], @@ -137,9 +137,9 @@ if self.funcspec.auxspec != '': fninfo = self.funcspec.auxspec try: - exec fninfo[0] + exec(fninfo[0]) except: - print 'Error in supplied auxiliary variable code' + print('Error in supplied auxiliary variable code') raise self._funcreg[fninfo[1]] = ('self', fninfo[0]) setattr(self, fninfo[1], types.MethodType(locals()[fninfo[1]], @@ -271,12 +271,12 @@ continue if ev.activeFlag: if numevs > 1: - print "Event info:", Evtimes[evname] + print("Event info:", Evtimes[evname]) assert numevs <= 1, ("Internal error: more than one " "terminal event of same type found") # For safety, we should assert that this event # also appears in termevents, but we don't - if Evtimes[evname][0] in termevtimes.keys(): + if Evtimes[evname][0] in list(termevtimes.keys()): # append event name to this warning warning_ix = termevtimes[Evtimes[evname][0]] self.diagnostics.warnings[warning_ix][1][1].append(evname) @@ -289,7 +289,7 @@ [evname]))) else: for ev in range(numevs): - if Evtimes[evname][ev] in nontermevtimes.keys(): + if Evtimes[evname][ev] in list(nontermevtimes.keys()): # append event name to this warning warning_ix = nontermevtimes[Evtimes[evname][ev]] self.diagnostics.warnings[warning_ix][1][1].append(evname) @@ -316,7 +316,7 @@ self.diagnostics.warnings = warn_temp self.indepvariable.depdomain.set([self.indepvariable.depdomain[0], earliest_termtime]) - for v in tempvars.values(): + for v in list(tempvars.values()): v.indepdomain.set(self.indepvariable.depdomain.get()) ## print 'Time interval adjusted according to %s: %s' % \ ## (self._warnmessages[w], str(i[0])+", "+ str(i[1])) @@ -338,7 +338,7 @@ self._register(self.variables) self.validateSpec() self.defined = True - return Trajectory(trajname, tempvars.values(), + return Trajectory(trajname, list(tempvars.values()), abseps=self._abseps, globalt0=self.globalt0, checklevel=self.checklevel, FScompatibleNames=self._FScompatibleNames, @@ -361,7 +361,7 @@ else: p = sortedDictValues(self._FScompatibleNames(pdict)) i = _pollInputs(sortedDictValues(self.inputs), t, self.checklevel) - return apply(getattr(self, self.funcspec.auxspec[1]), [t, x, p+i]) + return getattr(self, self.funcspec.auxspec[1])(*[t, x, p+i]) def haveJacobian_pars(self): """Report whether generator has an explicit user-specified Jacobian @@ -376,7 +376,7 @@ def set(self, **kw): """Set ExplicitFnGen parameters""" - if remain(kw.keys(), self._validKeys) != []: + if remain(list(kw.keys()), self._validKeys) != []: raise KeyError("Invalid keys in argument") if 'globalt0' in kw: # pass up to generic treatment for this @@ -390,7 +390,7 @@ # optional keys for this call are # ['pars', 'tdomain', 'xdomain', 'pdomain'] if 'xdomain' in kw: - for k_temp, v in kw['xdomain'].iteritems(): + for k_temp, v in kw['xdomain'].items(): k = self._FScompatibleNames(k_temp) if k in self.funcspec.vars+self.funcspec.auxvars: if isinstance(v, _seq_types): @@ -414,10 +414,10 @@ raise TypeError('xdomain must be a dictionary of variable' ' names -> valid interval 2-tuples or ' 'singletons') - for ev in self.eventstruct.events.values(): + for ev in list(self.eventstruct.events.values()): ev.xdomain[k] = v if 'pdomain' in kw: - for k_temp, v in kw['pdomain'].iteritems(): + RefactoringTool: Refactored ./PyDSTool/Generator/ExtrapolateTable.py for k_temp, v in kw['pdomain'].items(): k = self._FScompatibleNames(k_temp) if k in self.funcspec.pars: if isinstance(v, _seq_types): @@ -442,7 +442,7 @@ raise TypeError('pdomain must be a dictionary of parameter' ' names -> valid interval 2-tuples or ' 'singletons') - for ev in self.eventstruct.events.values(): + for ev in list(self.eventstruct.events.values()): ev.pdomain[k] = v if 'tdata' in kw: self.tdata = kw['tdata'] @@ -454,27 +454,27 @@ self.diagnostics.warnings.append((W_UNCERTVAL, (self.tdata[0],self.tdomain))) else: - print 'tdata cannot be specified below smallest '\ + print('tdata cannot be specified below smallest '\ 'value in tdomain\n (possibly due to uncertain bounding).'\ ' It has been automatically adjusted from\n ', self.tdata[0], \ 'to', self.tdomain[0], '(difference of', \ - self.tdomain[0]-self.tdata[0], ')' + self.tdomain[0]-self.tdata[0], ')') self.tdata[0] = self.tdomain[0] if self.tdomain[1] < self.tdata[1]: if self.indepvariable.indepdomain.contains(self.tdata[1]) == uncertain: self.diagnostics.warnings.append((W_UNCERTVAL, (self.tdata[1],self.tdomain))) else: - print 'tdata cannot be specified above largest '\ + print('tdata cannot be specified above largest '\ 'value in tdomain\n (possibly due to uncertain bounding).'\ ' It has been automatically adjusted from\n ', \ self.tdomain[1], 'to', \ self.tdomain[1], '(difference of', \ - self.tdata[1]-self.tdomain[1], ')' + self.tdata[1]-self.tdomain[1], ')') self.tdata[1] = self.tdomain[1] self.indepvariable.depdomain.set(self.tdata) if 'ics' in kw: - for k_temp, v in kw['ics'].iteritems(): + for k_temp, v in kw['ics'].items(): k = self._FScompatibleNames(k_temp) if k in self.funcspec.vars+self.funcspec.auxvars: self._xdatadict[k] = ensurefloat(v) @@ -485,7 +485,7 @@ if not self.pars: raise ValueError('No pars were declared for this object' ' at initialization.') - for k_temp, v in kw['pars'].iteritems(): + for k_temp, v in kw['pars'].items(): k = self._FScompatibleNames(k_temp) if k in self.pars: cval = self.parameterDomains[k].contains(v) @@ -493,7 +493,7 @@ if cval is not notcontained: self.pars[k] = ensurefloat(v) if cval is uncertain and self.checklevel == 2: - print 'Warning: Parameter value at bound' + print('Warning: Parameter value at bound') else: raise PyDSTool_ValueError('Parameter value out of ' 'bounds') @@ -513,11 +513,11 @@ def validateSpec(self): ctsGen.validateSpec(self) try: - for v in self.variables.values(): + for v in list(self.variables.values()): assert isinstance(v, Variable) assert not self.inputs except AssertionError: - print 'Invalid system specification' + print('Invalid system specification') raise --- ./PyDSTool/Generator/ExtrapolateTable.py (original) +++ ./PyDSTool/Generator/ExtrRefactoringTool: Refactored ./PyDSTool/Generator/ImplicitFnGen.py apolateTable.py (refactored) @@ -1,8 +1,8 @@ # Interpolated lookup table with extrapolated end points -from __future__ import division - -from allimports import * -from baseclasses import ctsGen, theGenSpecHelper + + +from .allimports import * +from .baseclasses import ctsGen, theGenSpecHelper from PyDSTool.utils import * from PyDSTool.common import * @@ -21,7 +21,7 @@ try: self.tdata = kw['tdata'] self._xdatadict = {} - for k, v in dict(kw['ics']).iteritems(): + for k, v in dict(kw['ics']).items(): self._xdatadict[str(k)] = v self.foundKeys = 2 # check for other, invalid keys (but currently just ignored) @@ -174,7 +174,7 @@ def compute(self, trajname): - return Trajectory(trajname, [copy(v) for v in self.variables.values()], + return Trajectory(trajname, [copy(v) for v in list(self.variables.values())], abseps=self._abseps, globalt0=self.globalt0, checklevel=self.checklevel, FScompatibleNames=self._FScompatibleNames, @@ -202,11 +202,11 @@ ctsGen.validateSpec(self) try: assert isoutputcts(self.indepvariable) - for v in self.variables.values(): + for v in list(self.variables.values()): assert isinstance(v, Variable) assert not self.inputs except AssertionError: - print 'Invalid system specification' + print('Invalid system specification') raise --- ./PyDSTool/Generator/ImplicitFnGen.py (original) +++ ./PyDSTool/Generator/ImplicitFnGen.py (refactored) @@ -1,8 +1,8 @@ # Implicit function generator -from __future__ import division - -from allimports import * -from baseclasses import ctsGen, theGenSpecHelper + + +from .allimports import * +from .baseclasses import ctsGen, theGenSpecHelper from PyDSTool.utils import * from PyDSTool.common import * from PyDSTool.Interval import uncertain @@ -76,7 +76,7 @@ for x in self.funcspec.vars + self.funcspec.auxvars: try: xinterval=Interval(x, self.xtype[x], self.xdomain[x], self._abseps) - except KeyError, e: + except KeyError as e: raise PyDSTool_KeyError('Mismatch between declared variables' ' and xspecs: ' + str(e)) # placeholder variable so that this class can be @@ -125,9 +125,9 @@ tempfs.spec = tempspec # test supplied code try: - exec tempspec[0] in globals() + exec(tempspec[0], globals()) except: - print 'Error in supplied functional specification code' + print('Error in supplied functional specification code') raise # set up implicit function: utils.makeImplicitFunction gets # called finally in Variable.addMethods() method. @@ -272,7 +272,7 @@ self._register(self.variables) #self.validateSpec() self.defined = True - return Trajectory(trajname, tempvars.values(), + return Trajectory(trajname, list(tempvars.values()), abseps=self._abseps, globalt0=self.globalt0, checklevel=self.checklevel, FScompatibleNames=self._FScompatibleNames, @@ -293,7 +293,7 @@ def set(self, **kw): """Set ImplicitFnGen parameters""" - if remain(kw.keys(), self._validKeys) != []: + if remain(list(kw.keys()), self._validKeys) != []: raise KeyError("Invalid keys in argument") if 'globalt0' in kw: # pass up to generic treatment for this @@ -306,7 +306,7 @@ ctsGen.set(self, abseps=kw['abseps']) # optional keys for this call are ['pars', 'tdomain', 'xdomain', 'pdomain'] if 'xdomain' in kw: - for k_temp, v in kw['xdomain'].iteritems(): + for k_temp, v in kw['xdomain'].items(): k = self._FScompatibleNames(k_temp) if k in self.funcspec.vars+self.funcspec.auxvars: if isinstance(v, _seq_types): @@ -340,27 +340,27 @@ self.diagnostics.warnings.append((W_UNCERTVAL, (self.tdata[0],self.tdomain))) else: - print 'tdata cannot be specified below smallest '\ + print('tdata cannot be specified below smallest '\ 'value in tdomain\n (possibly due to uncertain bounding).'\ ' It has been automatically adjusted from\n ', self.tdata[0], \ 'to', self.tdomain[0], '(difference of', \ - self.tdomain[0]-self.tdata[0], ')' + self.tdomain[0]-self.tdata[0], ')') self.tdata[0] = self.tdomain[0] if self.tdomain[1] < self.tdata[1]: if self.indepvariable.indepdomain.contains(self.tdata[1]) == uncertain: self.diagnostics.warnings.append((W_UNCERTVAL, (self.tdata[1],self.tdomain))) else: - print 'tdata cannot be specified above largest '\ + print('tdata cannot be specified above largest '\ 'value in tdomain\n (possibly due to uncertain bounding).'\ ' It has been automatically adjusted from\n ', \ self.tdomain[1], 'to', \ self.tdomain[1], '(difference of', \ - self.tdata[1]-self.tdomain[1], ')' + self.tdata[1]-self.tdomain[1], ')') self.tdata[1] = self.tdomain[1] self.indepvariable.depdomain.set(self.tdata) if 'pdomain' in kw: - for k_temp, v in kw['pdomain'].iteritems(): + for k_temp, v in kw['pdomain'].items(): k = self._FScompatibleNames(k_temp) if k in self.funcspec.pars: if isinstance(v, _seq_types): @@ -386,7 +386,7 @@ ' names -> valid interval 2-tuples or ' 'singletons') if 'ics' in kw: - for k_temp, v in kw['ics'].iteritems(): + for k_temp, v in kw['ics'].items(): k = self._FScompatibleNames(k_temp) if k in self.funcspec.vars+self.funcspec.auxvars: self._xdatadict[k] = ensurefloat(v) @@ -397,7 +397,7 @@ if not self.pars: raise ValueError('No pars were declared for this object' ' at initialization.') - for k_temp, v in kw['pars'].iteritems(): + for k_temp, v in kw['pars'].items(): k = self._FScompatibleNames(k_temp) if k in self.pars: cval = self.parameterDomains[k].contains(v) @@ -405,7 +405,7 @@ if cval is not notcontained: self.pars[k] = ensurefloat(v) if cval is uncertain and self.checklevel == 2: - print 'Warning: Parameter value at bound' + print('Warning: Parameter value at bound') else: raise PyDSTool_ValueError('Parameter value out of bounds') else: @@ -418,7 +418,7 @@ else: raise PyDSTool_AttributeError('Illegal parameter name') if 'algparams' in kw: - for k, v in kw['algparams'].iteritems(): + for k, v in kw['algparams'].items(): self.algparams[k] = v if 'solvemethod' in self.algparams: if self.algparams['solvemethod'] not in _implicitSolveMethods: @@ -428,11 +428,11 @@ def validateSpec(self): ctsGen.validateSpec(self) try: - for v in self.variables.values(): + for v in list(self.variables.values()): RefactoringTool: Refactored ./PyDSTool/Generator/InterpolateTable.py RefactoringTool: Refactored ./PyDSTool/Generator/LookupTable.py RefactoringTool: Refactored ./PyDSTool/Generator/MapSystem.py assert isinstance(v, Variable) assert not self.inputs except AssertionError: - print 'Invalid system specification' + print('Invalid system specification') raise --- ./PyDSTool/Generator/InterpolateTable.py (original) +++ ./PyDSTool/Generator/InterpolateTable.py (refactored) @@ -1,8 +1,8 @@ # Interpolated lookup table -from __future__ import division -from allimports import * -from baseclasses import ctsGen, theGenSpecHelper + +from .allimports import * +from .baseclasses import ctsGen, theGenSpecHelper from PyDSTool.utils import * from PyDSTool.common import * @@ -20,7 +20,7 @@ try: self.tdata = kw['tdata'] self._xdatadict = {} - for k, v in dict(kw['ics']).iteritems(): + for k, v in dict(kw['ics']).items(): self._xdatadict[str(k)] = v self.foundKeys = 2 # check for other, invalid keys (but currently just ignored) @@ -90,7 +90,7 @@ def compute(self, trajname): - return Trajectory(trajname, [copy(v) for v in self.variables.values()], + return Trajectory(trajname, [copy(v) for v in list(self.variables.values())], abseps=self._abseps, globalt0=self.globalt0, checklevel=self.checklevel, FScompatibleNames=self._FScompatibleNames, @@ -119,11 +119,11 @@ ctsGen.validateSpec(self) try: assert isoutputcts(self.indepvariable) - for v in self.variables.values(): + for v in list(self.variables.values()): assert isinstance(v, Variable) assert not self.inputs except AssertionError: - print 'Invalid system specification' + print('Invalid system specification') raise --- ./PyDSTool/Generator/LookupTable.py (original) +++ ./PyDSTool/Generator/LookupTable.py (refactored) @@ -1,8 +1,8 @@ # Lookup table -from __future__ import division -from allimports import * -from baseclasses import discGen, theGenSpecHelper + +from .allimports import * +from .baseclasses import discGen, theGenSpecHelper from PyDSTool.utils import * from PyDSTool.common import * @@ -22,7 +22,7 @@ try: self.tdata = kw['tdata'] self._xdatadict = {} - for k, v in dict(kw['ics']).iteritems(): + for k, v in dict(kw['ics']).items(): self._xdatadict[str(k)] = v self.foundKeys = 2 # check for other, invalid keys (but currently just ignored) @@ -71,7 +71,7 @@ #self.validateSpec() self.diagnostics.clearWarnings() self.diagnostics.clearErrors() - return Trajectory(trajname, [copy(v) for v in self.variables.values()], + return Trajectory(trajname, [copy(v) for v in list(self.variables.values())], abseps=self._abseps, globalt0=self.globalt0, checklevel=self.checklevel, FScompatibleNames=self._FScompatibleNames, @@ -83,11 +83,11 @@ discGen.validateSpec(self) try: assert isoutputdiscrete(self.indepvariable) - for v in self.variables.values(): + for v in list(self.variables.values()): assert isinstance(v, Variable) assert not self.inputs except AssertionError: - print 'Invalid system specification' + print('Invalid system specification') raise --- ./PyDSTool/Generator/MapSystem.py (original) +++ ./PyDSTool/Generator/MapSystem.py (refactored) @@ -3,10 +3,10 @@ # values for x at a specifc "time". Purely abstract time (i.e., iteration # steps) is represented using integers. (We could make LookupTable a # 0-param sequence of maps with explicit time range?) -from __future__ import division - -from allimports import * -from baseclasses import Generator, discGen, theGenSpecHelper, \ + + +from .allimports import * +from .baseclasses import Generator, discGen, theGenSpecHelper, \ auxfn_container, _pollInputs from PyDSTool.utils import * from PyDSTool.common import * @@ -89,9 +89,9 @@ else: fnstr = fninfo[0] try: - exec fnstr + exec(fnstr) except: - print 'Error in supplied auxiliary function code' + print('Error in supplied auxiliary function code') self._funcreg[fninfo[1]] = ('self', fnstr) setattr(self, fninfo[1], types.MethodType(locals()[fninfo[1]], self, @@ -100,9 +100,9 @@ try: uafi_code = self.funcspec._user_auxfn_interface[auxfnname] try: - exec uafi_code + exec(uafi_code) except: - print 'Error in auxiliary function wrapper' + print('Error in auxiliary function wrapper') raise setattr(self.auxfns, auxfnname, types.MethodType(locals()[auxfnname], self.auxfns, @@ -127,9 +127,9 @@ else: fnstr = fninfo[0] try: - exec fnstr + exec(fnstr) except: - print 'Error in supplied functional specification code' + print('Error in supplied functional specification code') raise self._funcreg[fninfo[1]] = ('self', fnstr) setattr(self, fninfo[1], types.MethodType(locals()[fninfo[1]], @@ -146,9 +146,9 @@ else: fnstr = fninfo[0] try: - exec fnstr + exec(fnstr) except: - print 'Error in supplied auxiliary variable code' + print('Error in supplied auxiliary variable code') raise self._funcreg[fninfo[1]] = ('self', fnstr) setattr(self, fninfo[1], types.MethodType(locals()[fninfo[1]], @@ -161,7 +161,7 @@ # Method for pickling protocol (setstate same as default) def __getstate__(self): d = copy(self.__dict__) - for fname, finfo in self._funcreg.iteritems(): + for fname, finfo in self._funcreg.items(): try: del d[fname] except KeyError: @@ -194,7 +194,7 @@ def checkInitialConditions(self, checkauxvars=False): - for xname, val in self.initialconditions.iteritems(): + for xname, val in self.initialconditions.items(): if xname not in self.funcspec.vars and not checkauxvars: # auxvars do not need initial conditions unless # explicitly requested (e.g. for user call to RHS @@ -206,21 +206,21 @@ raise ValueError("Initial condition for "+xname+" has been " "incorrectly initialized") except TypeError: - print "Found: ", val - print "of type: ", type(val) + print("Found: ", val) + print("of type: ", type(val)) raise TypeError("Invalid type for %s`s initial"%xname \ + "condition value") if not self.contains(self.variables[xname].depdomain, val, self.checklevel): - print "Bounds: ", self.variables[xname].depdomain.get() - print "Variable value: ", val + print("Bounds: ", self.variables[xname].depdomain.get()) + print("Variable value: ", val) raise ValueError("Initial condition for "+xname+" has been " "set outside of prescribed bounds") def set(self, **kw): """Set map system parameters""" - if remain(kw.keys(), self._validKeys) != []: + if remain(list(kw.keys()), self._validKeys) != []: raise KeyError("Invalid keys in argument") if 'globalt0' in kw: # pass up to generic treatment for this @@ -234,7 +234,7 @@ # optional keys for this call are ['pars', 'tdomain', 'ics', # 'algparams', 'tdata', 'xdomain', 'inputs', 'pdomain'] if 'ics' in kw: - for k_temp, v in kw['ics'].iteritems(): + for k_temp, v in kw['ics'].items(): k = self._FScompatibleNames(k_temp) if k in self.funcspec.vars+self.funcspec.auxvars: self._xdatadict[k] = ensurefloat(v) @@ -255,27 +255,27 @@ self.diagnostics.warnings.append((W_UNCERTVAL, (self.tdata[0],self.tdomain))) else: - print 'tdata cannot be specified below smallest '\ + print('tdata cannot be specified below smallest '\ 'value in tdomain\n (possibly due to uncertain bounding).'\ ' It has been automatically adjusted from\n ', \ self.tdata[0], 'to', self.tdomain[0], '(difference of', \ - self.tdomain[0]-self.tdata[0], ')' + self.tdomain[0]-self.tdata[0], ')') self.tdata[0] = self.tdomain[0] if self.tdomain[1] < self.tdata[1]: if self.indepvariable.indepdomain.contains(self.tdata[1]) == uncertain: self.diagnostics.warnings.append((W_UNCERTVAL, (self.tdata[1],self.tdomain))) else: - print 'tdata cannot be specified above largest '\ + print('tdata cannot be specified above largest '\ 'value in tdomain\n (possibly due to uncertain bounding).'\ ' It has been automatically adjusted from\n ', \ self.tdomain[1], 'to', \ self.tdomain[1], '(difference of', \ - self.tdata[1]-self.tdomain[1], ')' + self.tdata[1]-self.tdomain[1], ')') self.tdata[1] = self.tdomain[1] self.indepvariable.depdomain.set(self.tdata) if 'xdomain' in kw: - for k_temp, v in kw['xdomain'].iteritems(): + for k_temp, v in kw['xdomain'].items(): k = self._FScompatibleNames(k_temp) if k in self.funcspec.vars+self.funcspec.auxvars: if isinstance(v, _seq_types): @@ -302,13 +302,13 @@ ' names -> valid interval 2-tuples or ' 'singletons') try: - evs = self.eventstruct.events.values() + evs = list(self.eventstruct.events.values()) except AttributeError: evs = [] for ev in evs: ev.xdomain[k] = v if 'pdomain' in kw: - for k_temp, v in kw['pdomain'].iteritems(): + for k_temp, v in kw['pdomain'].items(): k = self._FScompatibleNames(k_temp) if k in self.funcspec.pars: if isinstance(v, _seq_types): @@ -334,7 +334,7 @@ ' names -> valid interval 2-tuples or ' 'singletons') try: - evs = self.eventstruct.events.values() + evs = list(self.eventstruct.events.values()) except AttributeError: evs = [] for ev in evs: @@ -342,7 +342,7 @@ if 'pars' in kw: assert self.numpars > 0, ('No pars were declared for this ' 'model') - for k_temp, v in kw['pars'].iteritems(): + for k_temp, v in kw['pars'].items(): k = self._FScompatibleNames(k_temp) if k in self.pars: cval = self.parameterDomains[k].contains(v) @@ -350,7 +350,7 @@ if cval is not notcontained: self.pars[k] = ensurefloat(v) if cval is uncertain and self.checklevel == 2: - print 'Warning: Parameter value at bound' + print('Warning: Parameter value at bound') else: raise PyDSTool_ValueError('Parameter value out of bounds') else: @@ -365,7 +365,7 @@ # pass on parameter changes to embedded system, if present if self._solver: try: - shared_pars = intersect(kw['pars'].keys(), self._solver.pars) + shared_pars = intersect(list(kw['pars'].keys()), self._solver.pars) except AttributeError: # no pars for this kind of solver pass @@ -396,7 +396,7 @@ elif isinstance(inputs, dict): _inputs = self._FScompatibleNames(inputs) # ensure values are Variables - for v in _inputs.values(): + for v in list(_inputs.values()): if not isinstance(v, Variable): raise TypeError("Invalid specification of inputs") else: @@ -412,7 +412,7 @@ assert self.inputs, ('Cannot provide inputs after ' 'initialization without them') inputs_t0 = self._FScompatibleNames(kw['inputs_t0']) - for iname, t0 in inputs_t0.items(): + for iname, t0 in list(inputs_t0.items()): self.inputs[iname]._internal_t_offset = t0 self._extInputsChanged = True @@ -430,9 +430,9 @@ xnames = self._var_ixmap # ensures correct order # wrap up each dictionary initial value as a singleton list alltData = [self.indepvariable.depdomain[0]] - allxDataDict = dict(zip(xnames, map(listid, + allxDataDict = dict(list(zip(xnames, list(map(listid, sortedDictValues(self.initialconditions, - self.funcspec.vars)))) + self.funcspec.vars)))))) rhsfn = getattr(self,self.funcspec.spec[1]) # Check i.c.'s are well defined (finite) self.checkInitialConditions() @@ -450,19 +450,19 @@ f.diagnostics.clearWarnings() ilist.append(f(alltData[0], self.checklevel)) except AssertionError: - print 'External input call has t out of range: t = ', \ - self.indepvariable.depdomain[0] - print 'Maybe checklevel is 3 and initial time is not', \ - 'completely inside valid time interval' + print('External input call has t out of range: t = ', \ + self.indepvariable.depdomain[0]) + print('Maybe checklevel is 3 and initial time is not', \ + 'completely inside valid time interval') raise except ValueError: - print 'External input call has value out of range: t = ', \ - self.indepvariable.depdomain[0] + print('External input call has value out of range: t = ', \ + self.indepvariable.depdomain[0]) for f in inputVarList: if f.diagnostics.hasWarnings(): - print 'External input %s out of range:' % f.name - print ' t = ', repr(f.diagnostics.warnings[-1][0]), ', ', \ - f.name, ' = ', repr(f.diagnostics.warnings[-1][1]) + print('External input %s out of range:' % f.name) + print(' t = ', repr(f.diagnostics.warnings[-1][0]), ', ', \ + f.name, ' = ', repr(f.diagnostics.warnings[-1][1])) raise else: listend = self.numpars @@ -502,8 +502,7 @@ # storage of all auxiliary variable data allaDataDict = {} anames = self.funcspec.auxvars - avals = apply(getattr(self,self.funcspec.auxspec[1]), - [self.indepvariable.depdomain[0], + avals = getattr(self,self.funcspec.auxspec[1])(*[self.indepvariable.depdomain[0], sortedDictValues(self.initialconditions, self.funcspec.vars), extralist]) @@ -529,10 +528,10 @@ try: y = rhsfn(t, x, extralist) except: - print "Error in calling right hand side function:" + print("Error in calling right hand side function:") self.showSpec() raise - for xi in xrange(self.dimension): + for xi in range(self.dimension): xDataDict[xnames[xi]] = y[xi] if not self.contains(self.variables[xnames[xi]].depdomain, y[xi], self.checklevel): @@ -544,7 +543,7 @@ if breakwhile: notdone = False continue - avals = apply(getattr(self,self.funcspec.auxspec[1]), [t, + avals = getattr(self,self.funcspec.auxspec[1])(*[t, sortedDictValues(xDataDict), extralist]) if eventslist != []: @@ -554,9 +553,8 @@ dataDict, self.pars, eventslist) - termevsflagged = filter(lambda e: e in evsflagged, termevents) - nontermevsflagged = filter(lambda e: e not in termevsflagged, - evsflagged) + termevsflagged = [e for e in termevents if e in evsflagged] + nontermevsflagged = [e for e in evsflagged if e not in termevsflagged] # register any non-terminating events in the warnings list if len(nontermevsflagged) > 0: evnames = [ev[0] for ev in nontermevsflagged] @@ -589,20 +587,19 @@ aname = anames[aix] allaDataDict[aname].append(avals[aix]) try: - extralist[self.numpars:listend] = [apply(f, - [t, self.checklevel]) \ + extralist[self.numpars:listend] = [f(*[t, self.checklevel]) \ for f in inputVarList] except ValueError: - print 'External input call caused value out of range error:', \ - 't = ', t + print('External input call caused value out of range error:', \ + 't = ', t) for f in inputVarList: if f.hasWarnings(): - print 'External input variable %s out of range:' % f.name - print ' t = ', repr(f.diagnostics.warnings[-1][0]), ', ', \ - f.name, ' = ', repr(f.diagnostics.warnings[-1][1]) + print('External input variable %s out of range:' % f.name) + print(' t = ', repr(f.diagnostics.warnings[-1][0]), ', ', \ + f.name, ' = ', repr(f.diagnostics.warnings[-1][1])) raise except AssertionError: - print 'External input call caused t out of range error: t = ', t + print('External input call caused t out of range error: t = ', t) raise if i >= len(tmesh) - 1: notdone = False @@ -671,7 +66RefactoringTool: Refactored ./PyDSTool/Generator/ODEsystem.py 8,7 @@ if success: #self.validateSpec() self.defined = True - return Trajectory(trajname, variables.values(), + return Trajectory(trajname, list(variables.values()), abseps=self._abseps, globalt0=self.globalt0, checklevel=self.checklevel, FScompatibleNames=self._FScompatibleNames, @@ -680,7 +677,7 @@ modelNames=self.name, modelEventStructs=self.eventstruct) else: - print 'Trajectory computation failed' + print('Trajectory computation failed') self.diagnostics.errors.append((E_COMPUTFAIL, (t, self._errorcodes[errcode]))) self.defined = False @@ -701,7 +698,7 @@ p = sortedDictValues(self._FScompatibleNames(pdict)) i = _pollInputs(sortedDictValues(self.inputs), t, self.checklevel) - return apply(getattr(self,self.funcspec.spec[1]), [t, x, p+i]) + return getattr(self,self.funcspec.spec[1])(*[t, x, p+i]) def Jacobian(self, t, xdict, pdict=None, asarray=True): @@ -718,8 +715,7 @@ p = sortedDictValues(self._FScompatibleNames(pdict)) i = _pollInputs(sortedDictValues(self.inputs), t, self.checklevel) - return apply(getattr(self,self.funcspec.auxfns["Jacobian"][1]), \ - [t, x, p+i]) + return getattr(self,self.funcspec.auxfns["Jacobian"][1])(*[t, x, p+i]) else: raise PyDSTool_ExistError("Jacobian not defined") @@ -738,8 +734,7 @@ p = sortedDictValues(self._FScompatibleNames(pdict)) i = _pollInputs(sortedDictValues(self.inputs), t, self.checklevel) - return apply(getattr(self,self.funcspec.auxfns["Jacobian_pars"][1]), \ - [t, x, p+i]) + return getattr(self,self.funcspec.auxfns["Jacobian_pars"][1])(*[t, x, p+i]) else: raise PyDSTool_ExistError("Jacobian w.r.t. parameters not defined") @@ -757,7 +752,7 @@ p = sortedDictValues(self._FScompatibleNames(pdict)) i = _pollInputs(sortedDictValues(self.inputs), t, self.checklevel) - return apply(getattr(self,self.funcspec.auxspec[1]), [t, x, p+i]) + return getattr(self,self.funcspec.auxspec[1])(*[t, x, p+i]) def __del__(self): --- ./PyDSTool/Generator/ODEsystem.py (original) +++ ./PyDSTool/Generator/ODEsystem.py (refactored) @@ -1,7 +1,7 @@ # ODEsystem base class -from allimports import * -from baseclasses import ctsGen, theGenSpecHelper, auxfn_container +from .allimports import * +from .baseclasses import ctsGen, theGenSpecHelper, auxfn_container from PyDSTool.utils import * from PyDSTool.common import * from PyDSTool.Variable import Variable, iscontinuous @@ -51,7 +51,7 @@ self.funcspec = RHSfuncSpec(self._kw_process_dispatch(dispatch_list, kw)) self.indepvartype = float - for v in self.inputs.values(): + for v in list(self.inputs.values()): if not iscontinuous(v): raise ValueError("External inputs for ODE system must be " "continuously defined") @@ -109,9 +109,9 @@ # user-defined auxiliary functions # (built-ins are provided explicitly) try: - exec fninfo[0] + exec(fninfo[0]) except: - print 'Error in supplied auxiliary function code' + print('Error in supplied auxiliary function code') self._funcreg[fninfo[1]] = ('self', fninfo[0]) setattr(self, fninfo[1], types.MethodType(locals()[fninfo[1]], self, @@ -120,9 +120,9 @@ try: uafi_code = self.funcspec._user_auxfn_interface[auxfnname] try: - exec uafi_code + exec(uafi_code) except: - print 'Error in auxiliary function wrapper' + print('Error in auxiliary function wrapper') raise setattr(self.auxfns, auxfnname, types.MethodType(locals()[auxfnname], self.auxfns, @@ -144,9 +144,9 @@ if self.funcspec.targetlang == 'python': fninfo = self.funcspec.spec try: - exec fninfo[0] + exec(fninfo[0]) except: - print 'Error in supplied functional specification code' + print('Error in supplied functional specification code') raise self._funcreg[fninfo[1]] = ('self', fninfo[0]) setattr(self, fninfo[1], types.MethodType(locals()[fninfo[1]], @@ -159,9 +159,9 @@ if self.funcspec.auxspec != '': fninfo = self.funcspec.auxspec try: - exec fninfo[0] + exec(fninfo[0]) except: - print 'Error in supplied auxiliary variable code' + print('Error in supplied auxiliary variable code') raise self._funcreg[fninfo[1]] = ('self', fninfo[0]) setattr(self, fninfo[1], types.MethodType(locals()[fninfo[1]], @@ -190,7 +190,7 @@ def checkInitialConditions(self, checkauxvars=False): - for xname, val in self.initialconditions.iteritems(): + for xname, val in self.initialconditions.items(): if xname not in self.funcspec.vars and not checkauxvars: # auxvars do not need initial conditions unless # explicitly requested (e.g. for user call to RHS @@ -202,21 +202,21 @@ raise ValueError("Initial condition for "+xname+" has been " "incorrectly initialized") except TypeError: - print "Found: ", val - print "of type: ", type(val) + print("Found: ", val) + print("of type: ", type(val)) raise TypeError("Invalid type for %s`s initial"%xname \ + "condition value") if not self.contains(self.variables[xname].depdomain, val, self.checklevel): - print "Bounds: ", self.variables[xname].depdomain.get() - print "Variable value: ", val + print("Bounds: ", self.variables[xname].depdomain.get()) + print("Variable value: ", val) raise ValueError("Initial condition for "+xname+" has been " "set outside of prescribed bounds") def set(self, **kw): """Set ODE system parameters""" - if remain(kw.keys(), self._validKeys) != []: + if remain(list(kw.keys()), self._validKeys) != []: raise KeyError("Invalid keys in argument") if 'globalt0' in kw: # pass up to generic treatment for this @@ -233,7 +233,7 @@ # optional keys for this call are ['pars', 'tdomain', 'ics', # 'algparams', 'tdata', 'xdomain', 'pdomain', 'inputs'] if 'ics' in kw: - for k_temp, v in kw['ics'].iteritems(): + for k_temp, v in kw['ics'].items(): k = self._FScompatibleNames(k_temp) if k in self.funcspec.vars+self.funcspec.auxvars: self._xdatadict[k] = ensurefloat(v) @@ -254,31 +254,31 @@ self.diagnostics.warnings.append((W_UNCERTVAL, (self.tdata[0],self.tdomain))) else: - print 'tdata cannot be specified below smallest '\ + print('tdata cannot be specified below smallest '\ 'value in tdomain\n (possibly due to uncertain bounding).'\ ' It has been automatically adjusted from\n ', \ self.tdata[0], 'to', self.tdomain[0], '(difference of', \ - self.tdomain[0]-self.tdata[0], ')' + self.tdomain[0]-self.tdata[0], ')') if self._modeltag: - print 'Try reducing step size in model.' + print('Try reducing step size in model.') self.tdata[0] = self.tdomain[0] if self.tdomain[1] < self.tdata[1]: if self.indepvariable.indepdomain.contains(self.tdata[1]) == uncertain: self.diagnostics.warnings.append((W_UNCERTVAL, (self.tdata[1],self.tdomain))) else: - print 'tdata cannot be specified above largest '\ + print('tdata cannot be specified above largest '\ 'value in tdomain\n (possibly due to uncertain bounding).'\ ' It has been automatically adjusted from\n ', \ self.tdomain[1], 'to', \ self.tdomain[1], '(difference of', \ - self.tdata[1]-self.tdomain[1], ')' + self.tdata[1]-self.tdomain[1], ')') if self._modeltag: - print 'Try reducing step size in model.' + print('Try reducing step size in model.') self.tdata[1] = self.tdomain[1] self.indepvariable.depdomain.set(self.tdata) if 'xdomain' in kw: - for k_temp, v in kw['xdomain'].iteritems(): + for k_temp, v in kw['xdomain'].items(): k = self._FScompatibleNames(k_temp) if k in self.funcspec.vars+self.funcspec.auxvars: if isinstance(v, _seq_types): @@ -304,13 +304,13 @@ ' names -> valid interval 2-tuples or ' 'singletons') try: - evs = self.eventstruct.events.values() + evs = list(self.eventstruct.events.values()) except AttributeError: evs = [] for ev in evs: ev.xdomain[k] = self.xdomain[k] if 'pdomain' in kw: - for k_temp, v in kw['pdomain'].iteritems(): + for k_temp, v in kw['pdomain'].items(): k = self._FScompatibleNames(k_temp) if k in self.funcspec.pars: if isinstance(v, _seq_types): @@ -336,13 +336,13 @@ ' names -> valid interval 2-tuples or ' 'singletons') try: - evs = self.eventstruct.events.values() + evs = list(self.eventstruct.events.values()) except AttributeError: evs = [] for ev in evs: ev.pdomain[k] = self.pdomain[k] if 'pars' in kw: - for k_temp, v in kw['pars'].iteritems(): + for k_temp, v in kw['pars'].items(): k = self._FScompatibleNames(k_temp) if k in self.pars: cval = self.parameterDomains[k].contains(v) @@ -350,7 +350,7 @@ if cval is not notcontained: self.pars[k] = ensurefloat(v) if cval is uncertain and self.checklevel == 2: - print 'Warning: Parameter %s: value at bound'%str(k) + print('Warning: Parameter %s: value at bound'%str(k)) else: raise PyDSTool_ValueError('Parameter %s: value out of boRefactoringTool: Refactored ./PyDSTool/Generator/Radau_ODEsystem.py unds'%str(k)) else: @@ -363,7 +363,7 @@ else: raise PyDSTool_ValueError('Illegal parameter name '+str(k)) if 'algparams' in kw: - for k, v in kw['algparams'].iteritems(): + for k, v in kw['algparams'].items(): self.algparams[k] = v if k in ('eventActive', 'eventTol', 'eventDelay', 'eventDir', 'eventInt', 'eventTerm', 'maxbisect'): @@ -391,12 +391,12 @@ elif isinstance(inputs, dict): _inputs = self._FScompatibleNames(inputs) # ensure values are Variables - for v in _inputs.values(): + for v in list(_inputs.values()): if not isinstance(v, Variable): raise TypeError("Invalid specification of inputs") else: raise TypeError("Invalid specification of inputs") - for v in _inputs.values(): + for v in list(_inputs.values()): if not iscontinuous(v): raise ValueError("External inputs for ODE system must be " "continously defined") @@ -411,7 +411,7 @@ assert self.inputs, ('Cannot provide inputs after ' 'initialization without them') inputs_t0 = self._FScompatibleNames(kw['inputs_t0']) - for iname, t0 in inputs_t0.items(): + for iname, t0 in list(inputs_t0.items()): self.inputs[iname]._internal_t_offset = t0 self._extInputsChanged = True @@ -443,10 +443,10 @@ def validateICs(self): assert hasattr(self, 'initialconditions') - if remain(self.initialconditions.keys(), - self.variables.keys()) != []: - print "IC names defined:", self.initialconditions.keys() - print "Varnames defined:", self.variables.keys() + if remain(list(self.initialconditions.keys()), + list(self.variables.keys())) != []: + print("IC names defined:", list(self.initialconditions.keys())) + print("Varnames defined:", list(self.variables.keys())) raise ValueError("Mismatch between initial condition and variable " "names") for v in self.funcspec.vars: @@ -501,7 +501,7 @@ # Methods for pickling protocol def __getstate__(self): d = copy(self.__dict__) - for fname, finfo in self._funcreg.iteritems(): + for fname, finfo in self._funcreg.items(): try: del d[fname] except KeyError: --- ./PyDSTool/Generator/Radau_ODEsystem.py (original) +++ ./PyDSTool/Generator/Radau_ODEsystem.py (refactored) @@ -1,9 +1,9 @@ # Radau ODE system -from __future__ import division - -from allimports import * + + +from .allimports import * from PyDSTool.Generator import ODEsystem as ODEsystem -from baseclasses import Generator, theGenSpecHelper, genDB, _pollInputs +from .baseclasses import Generator, theGenSpecHelper, genDB, _pollInputs from PyDSTool.utils import * from PyDSTool.common import * from PyDSTool.ModelSpec import QuantSpec @@ -48,8 +48,8 @@ try: self._integMod = __import__(modname, globals()) except: - print "Error in importing compiled vector field and integrator." - print "Did you compile the RHS C code?" + print("Error in importing compiled vector field and integrator.") + print("Did you compile the RHS C code?") raise # check module's directory assert 'Integrate' in dir(self._integMod), \ @@ -477,14 +477,14 @@ 'hasJacP': 0, 'checkBounds': self.checklevel } - for k, v in algparams_def.iteritems(): + for k, v in algparams_def.items(): if k not in self.algparams: self.algparams[k] = v # verify that no additional keys are present in algparams, after # defaults are added above if len(self.algparams) != len(algparams_def): raise ValueError("Invalid keys present in algparams argument: " \ - + str(remain(self.algparams.keys(),algparams_def.keys()))) + + str(remain(list(self.algparams.keys()),list(algparams_def.keys())))) # Check for non-constant mass matrix if self.haveMass(): mspec = self.funcspec.auxfns['massMatrix'] @@ -502,9 +502,9 @@ elif thisplatform in ['Linux', 'IRIX', 'Solaris', 'SunOS', 'MacOS', 'Darwin', 'FreeBSD']: self._dllext = '.so' else: - print "Shared library extension not tested on this platform." - print "If this process fails please report the errors to the" - print "developers." + print("Shared library extension not tested on this platform.") + print("If this process fails please report the errors to the") + print("developers.") self._dllext = '.so' self._compilation_tempdir = os.path.join(os.getcwd(), "radau5_temp") @@ -514,8 +514,8 @@ "A file already exists with the same name" os.mkdir(self._compilation_tempdir) except: - print "Could not create compilation temp directory " + \ - self._compilation_tempdir + print("Could not create compilation temp directory " + \ + self._compilation_tempdir) raise self._compilation_sourcedir = os.path.join(_pydstool_path,"integrator") self._vf_file = self.name+"_vf.c" @@ -529,8 +529,8 @@ self.makeLibSource() self.compileLib() else: - print "Build the library using the makeLib method, or in " - print "stages using the makeLibSource and compileLib methods." + print("Build the library using the makeLib method, or in ") + print("stages using the makeLibSource and compileLib methods.") self._inputVarList = [] self._inputTimeList = [] @@ -562,9 +562,9 @@ ## "_radau5"+self._vf_filename_ext+self._dllext)): ## os.remove(os.path.join(os.getcwd(), ## "_radau5"+self._vf_filename_ext+self._dllext)) - print "Cannot rebuild library without restarting session. Sorry." - print "Try asking the Python developers to make a working module" - print "unimport function!" + print("Cannot rebuild library without restarting session. Sorry.") + print("Try asking the Python developers to make a working module") + print("unimport function!") ## self.makeLibSource() @@ -628,7 +628,7 @@ ('string.h', STDLIB), ('vfield.h', USERLIB), ('events.h', USERLIB), ('signum.h', USERLIB), ('maxmin.h', USERLIB)]) include_str = '' - for libstr, libtype in libinclude.iteritems(): + for libstr, libtype in libinclude.items(): if libtype == STDLIB: quoteleft = '<' quoteright = '>' @@ -641,8 +641,8 @@ for libstr in include: if libstr in libinclude: # don't repeat libraries - print "Warning: library '" + libstr + "' already appears in list"\ - + " of imported libraries" + print("Warning: library '" + libstr + "' already appears in list"\ + + " of imported libraries") else: include_str += "#include " + '"' + libstr + '"\n' allfilestr = "/* Vector field function and events for Radau integrator.\n" \ @@ -682,17 +682,17 @@ inames = self.funcspec.inputs pnames.sort() inames.sort() - for i in xrange(self.numpars): + for i in range(self.numpars): p = pnames[i] # add to defines pardefines += self.funcspec._defstr+" "+p+"\tp_["+str(i)+"]\n" - for i in xrange(self.dimension): + for i in range(self.dimension): v = vnames[i] # add to defines vardefines += self.funcspec._defstr+" "+v+"\tY_["+str(i)+"]\n" for i, v in enumerate(self.funcspec.auxvars): auxvardefines += self.funcspec._defstr+" "+v+"\t("+self.funcspec._auxdefs_parsed[v]+")\n" - for i in xrange(len(self.funcspec.inputs)): + for i in range(len(self.funcspec.inputs)): inp = inames[i] # add to defines inpdefines += self.funcspec._defstr+" "+inp+"\txv_["+str(i)+"]\n" @@ -718,7 +718,7 @@ # and add hidden p argument if self.funcspec.auxfns: fbody_parsed = addArgToCalls(fbody, - self.funcspec.auxfns.keys(), + list(self.funcspec.auxfns.keys()), "p_, wk_, xv_") if 'initcond' in self.funcspec.auxfns: # convert 'initcond(x)' to 'initcond("x")' for @@ -733,7 +733,7 @@ # add signature for auxiliary functions if self.funcspec.auxfns: allfilestr += "\n" - for finfo in self.funcspec.auxfns.values(): + for finfo in list(self.funcspec.auxfns.values()): allfilestr += finfo[1] + ";\n" assignEvBody = "" for evix in range(numevs): @@ -757,11 +757,11 @@ + ";\n\n\n" allfilestr += self.funcspec.spec[0] + "\n\n" if self.funcspec.auxfns: - for fname, finfo in self.funcspec.auxfns.iteritems(): + for fname, finfo in self.funcspec.auxfns.items(): fbody = finfo[0] # subs _p into auxfn-to-auxfn calls (but not to the signature) fbody_parsed = addArgToCalls(fbody, - self.funcspec.auxfns.keys(), + list(self.funcspec.auxfns.keys()), "p_, wk_, xv_", notFirst=fname) if 'initcond' in self.funcspec.auxfns: # convert 'initcond(x)' to 'initcond("x")' for @@ -795,9 +795,9 @@ file = open(vffile, 'w') file.write(allfilestr) file.close() - except IOError, e: - print "Error opening file "+self._vf_file+" for writing" - raise IOError, e + except IOError as e: + print("Error opening file "+self._vf_file+" for writing") + raise IOError(e) def compileLib(self, libsources=[], libdirs=[]): @@ -813,21 +813,21 @@ # then DLL file already exists and we can't overwrite it at this # time proceed = False - print "\n" - print "-----------------------------------------------------------" - print "Present limitation of Python: Cannot rebuild library" - print "without exiting Python and deleting the shared library" - print " " + str(os.path.join(os.getcwd(), - "_radau5"+self._vf_filename_ext+self._dllext)) - print "by hand! If you made any changes to the system you should" - print "not proceed with running the integrator until you quit" - print "and rebuild." - print "-----------------------------------------------------------" - print "\n" + print("\n") + print("-----------------------------------------------------------") + print("Present limitation of Python: Cannot rebuild library") + print("without exiting Python and deleting the shared library") + print(" " + str(os.path.join(os.getcwd(), + "_radau5"+self._vf_filename_ext+self._dllext))) + print("by hand! If you made any changes to the system you should") + print("not proceed with running the integrator until you quit") + print("and rebuild.") + print("-----------------------------------------------------------") + print("\n") else: proceed = True if not proceed: - print "Did not compile shared library." + print("Did not compile shared library.") return if self._solver is not None: self.forceLibRefresh() @@ -844,7 +844,7 @@ ifacefile_orig.close() ifacefile_copy.close() except IOError: - print "radau5.i copying error in radau compilation directory" + print("radau5.i copying error in radau compilation directory") raise swigfile = os.path.join(self._compilation_tempdir, "radau5"+self._vf_filename_ext+".i") @@ -915,8 +915,8 @@ 'library_dirs': radlibdirs+['./']})]) except: rout.stop() - print "\nError occurred in generating Radau system..." - print sys.exc_info()[0], sys.exc_info()[1] + print("\nError occurred in generating Radau system...") + print(sys.exc_info()[0], sys.exc_info()[1]) raise RuntimeError rout.stop() # restore stdout # Attempt to unload module through a shutdown() function being @@ -959,8 +959,8 @@ os.path.join(os.getcwd(), "radau5"+self._vf_filename_ext+".py")) except: - print "\nError occurred in generating Radau system" - print "(while moving library extension modules to CWD)" + print("\nError occurred in generating Radau system") + print("(while moving library extension modules to CWD)") #print sys.exc_info()[0], sys.exc_info()[1] raise #RuntimeError @@ -1032,8 +1032,8 @@ bounds[0].append(bds[0]) bounds[1].append(bds[1]) except TypeError: - print v, type(bds), bds - print self.xdomain + print(v, type(bds), bds) + print(self.xdomain) raise for p in self.funcspec.pars: bds = self.pdomain[p] @@ -1041,7 +1041,7 @@ bounds[0].append(bds[0]) bounds[1].append(bds[1]) except TypeError: - print type(bds), bds + print(type(bds), bds) raise if continue_integ: x0 = self._solver.lastPoint @@ -1182,12 +1182,12 @@ numevs = len(Evtimes[evix]) if self.algparams['eventTerm'][evix]: if numevs > 1: - print "Event info:", Evpoints, Evtimes + print("Event info:", Evpoints, Evtimes) assert numevs <= 1, ("Internal error: more than one " "terminal event of same type found") # For safety, we should assert that this event # also appears in termevents, but we don't - if Evtimes[evix][0] in termevtimes.keys(): + if Evtimes[evix][0] in list(termevtimes.keys()): # append event name to this warning warning_ix = termevtimes[Evtimes[evix][0]] self.diagnostics.warnings[warning_ix][1][1].append(evname) @@ -1200,7 +1200,7 @@ [evname]))) else: for ev in range(numevs): - if Evtimes[evix][ev] in nontermevtimes.keys(): + if Evtimes[evix][ev] in list(nontermevtimes.keys()): # append event name to this warning warning_ix = nontermevtimes[Evtimes[evix][ev]] self.diagnostics.warnings[warning_ix][1][1].append(evname) @@ -1212,9 +1212,9 @@ (Evtimes[evix][ev], [evname]))) except IndexError: - print "Events returned from integrator are the wrong size." - print " Did you change the system and not refresh the C " \ - + "library using the forcelibrefresh() method?" + print("Events returned from integrator are the wrong size.") + print(" Did you change the system and not refresh the C " \ + + "library using the forcelibrefresh() method?") raise termcount = 0 for (w,i) in self.diagnostics.warnings: @@ -1234,10 +1234,10 @@ last_t = Inf if self.algparams['checkBounds'] > 0: # temp storage for repeatedly used object attributes (for lookup efficiency) - depdomains = dict(zip(range(self.dimension), - [self.variables[xn].depdomain for xn in xnames])) + depdomains = dict(list(zip(list(range(self.dimension)), + [self.variables[xn].depdomain for xn in xnames]))) offender_ix = None - for xi in xrange(self.dimension): + for xi in range(self.dimension): if not any(depdomains[xi].isfinite()): # no point in checking when the bounds are +/- infinity continue @@ -1254,7 +1254,7 @@ elif last_ix >= 0 and last_ix < highest_ix: # truncate data last_t = alltData[last_ix] - print "Warning; domain bound reached (because algparams['checkBounds'] > 0)" + print("Warning; domain bound reached (because algparams['checkBounds'] > 0)") self.diagnostics.warnings.append((W_TERMSTATEBD, (last_t, xnames[offender_ix], X[offender_ix, last_ix], @@ -1306,11 +1306,11 @@ X = X[:, :last_ix] alltData = alltData[:last_ix] try: - allxDataDict = dict(zip(xnames,X)) + allxDataDict = dict(list(zip(xnames,X))) except IndexError: - print "Integration returned variable values of unexpected dimensions." - print " Did you change the system and not refresh the C library" \ - + " using the forcelibrefresh() method?" + print("Integration returned variable values of unexpected dimensions.") + print(" Did you change the system and not refresh the C library" \ + + " using the forcelibrefresh() method?") raise # storage of all auxiliary variable data anames = self.funcspec.auxvars @@ -1319,14 +1319,14 @@ if last_ix < highest_ix: A = A[:, :last_ix] try: - allaDataDict = dict(zip(anames,A)) + allaDataDict = dict(list(zip(anames,A))) except TypeError: - print "Internal error! Type of A: ", type(A) + print("Internal error! Type of A: ", type(A)) raise except IndexError: - print "Integration returned auxiliary values of unexpected dimensions." - print " Did you change the system and not refresh the C library" \ - + " using the forcelibrefresh() method?" + print("Integration returned auxiliary values of unexpected dimensions.") + print(" Did you change the system and not refresh the C library" \ + + " using the forcelibrefresh() method?") raise if int(Err) == 1 or (int(Err) == 2 and termcount == 1): # output OK @@ -1361,7 +1361,7 @@ # final checks RefactoringTool: Refactored ./PyDSTool/Generator/Vode_ODEsystem.py #self.validateSpec() self.defined = True - return Trajectory(trajname, variables.values(), + return Trajectory(trajname, list(variables.values()), abseps=self._abseps, globalt0=self.globalt0, checklevel=self.checklevel, FScompatibleNames=self._FScompatibleNames, @@ -1374,7 +1374,7 @@ diagnost_info = self.diagnostics._errorcodes[int(Err)] except TypeError: # errcode messed up from Radau - print "Error code: ", Err + print("Error code: ", Err) diagnost_info = self.diagnostics._errorcodes[0] if self._solver.verbose: info(self.diagnostics.outputStats, "Output statistics") @@ -1383,8 +1383,8 @@ if (len(alltData) == self.algparams['max_pts'] or \ self.diagnostics.outputStats['num_steps'] >= self.algparams['max_pts']) \ and alltData[-1] < tend: - print "max_pts algorithmic parameter too small: current " + \ - "value is %i"%self.algparams['max_pts'] + print("max_pts algorithmic parameter too small: current " + \ + "value is %i"%self.algparams['max_pts']) # avstep = (self.algparams['init_step']+self.diagnostics.outputStats['last_step'])/2. if self.diagnostics.outputStats['last_time']-tbegin > 0: ms = str(int(round(self.algparams['max_pts'] / \ @@ -1392,8 +1392,8 @@ tbegin)*(tend-tbegin)))) else: ms = 'Inf' - print "(recommended value for this trajectory segment is " + \ - "estimated to be %s (saved in diagnostics.errors attribute))"%str(ms) + print("(recommended value for this trajectory segment is " + \ + "estimated to be %s (saved in diagnostics.errors attribute))"%str(ms)) diagnost_info += " -- recommended value is " + ms self.diagnostics.errors.append((E_COMPUTFAIL, (self._solver.lastTime, diagnost_info))) --- ./PyDSTool/Generator/Vode_ODEsystem.py (original) +++ ./PyDSTool/Generator/Vode_ODEsystem.py (refactored) @@ -1,11 +1,11 @@ """VODE integrator for ODE systems, imported from a mild modification of the scipy-wrapped VODE Fortran solver. """ -from __future__ import division - -from allimports import * + + +from .allimports import * from PyDSTool.Generator import ODEsystem as ODEsystem -from baseclasses import Generator, theGenSpecHelper, _pollInputs +from .baseclasses import Generator, theGenSpecHelper, _pollInputs from PyDSTool.utils import * from PyDSTool.common import * from PyDSTool.scipy_ode import ode @@ -61,7 +61,7 @@ # note: VODE only supports array atol, not rtol. algparams_def = {'poly_interp': False, 'rtol': 1e-9, - 'atol': [1e-12 for dimix in xrange(self.dimension)], + 'atol': [1e-12 for dimix in range(self.dimension)], 'stiff': False, 'max_step': 0.0, 'min_step': 0.0, @@ -71,7 +71,7 @@ 'use_special': False, 'specialtimes': [] } - for k, v in algparams_def.iteritems(): + for k, v in algparams_def.items(): if k not in self.algparams: self.algparams[k] = v @@ -126,11 +126,11 @@ 'dimension') else: atol = self.algparams['atol'] - self.algparams['atol'] = [atol for dimix in xrange(self.dimension)] + self.algparams['atol'] = [atol for dimix in range(self.dimension)] indepdom0, indepdom1 = self.indepvariable.depdomain.get() if continue_integ: if indepdom0 > self._solver.t: - print "Previous end time is %f"%self._solver.t + print("Previous end time is %f"%self._solver.t) raise ValueError("Start time not correctly updated for " "continuing orbit") x0 = self._solver.y @@ -197,7 +197,7 @@ ## solver.set_initial_value(x0, indepdom1) # wrap up each dictionary initial value as a singleton list alltData = [t0] - allxDataDict = dict(zip(xnames, map(listid, x0))) + allxDataDict = dict(list(zip(xnames, list(map(listid, x0))))) plist = sortedDictValues(self.pars) extralist = copy(plist) if self.inputs: @@ -220,12 +220,12 @@ if do_poly: rhsfn = getattr(self, self.funcspec.spec[1]) dx0 = rhsfn(t0, x0, extralist) - alldxDataDict = dict(zip(xnames, map(listid, dx0))) + alldxDataDict = dict(list(zip(xnames, list(map(listid, dx0))))) auxvarsfn = getattr(self,self.funcspec.auxspec[1]) strict = self.algparams['strictdt'] # Make t mesh if it wasn't given as 'specialtimes' if not all(isfinite(self.indepvariable.depdomain.get())): - print "Time domain was: ", self.indepvariable.depdomain.get() + print("Time domain was: ", self.indepvariable.depdomain.get()) raise ValueError("Ensure time domain is finite") if dt == indepdom1 - indepdom0: # single-step integration required @@ -284,24 +284,24 @@ try: allaDataDict[aname] = [avals[aix]] except IndexError: - print "\nVODE generator: There was a problem evaluating " \ - + "an auxiliary variable" - print "Debug info: avals (length", len(avals), ") was ", avals - print "Index out of range was ", aix - print self.funcspec.auxspec[1] - print hasattr(self, self.funcspec.auxspec[1]) - print "Args were:", [t0, x0, extralist] + print("\nVODE generator: There was a problem evaluating " \ + + "an auxiliary variable") + print("Debug info: avals (length", len(avals), ") was ", avals) + print("Index out of range was ", aix) + print(self.funcspec.auxspec[1]) + print(hasattr(self, self.funcspec.auxspec[1])) + print("Args were:", [t0, x0, extralist]) raise # Initialize signs of event detection objects at IC self.setEventICs(self.initialconditions, self.globalt0) if self.inputs: parsinps = copy(self.pars) - parsinps.update(dict(zip(inames,ilist))) + parsinps.update(dict(list(zip(inames,ilist)))) else: parsinps = self.pars if eventslist != []: dataDict = copy(self.initialconditions) - dataDict.update(dict(zip(anames, avals))) + dataDict.update(dict(list(zip(anames, avals)))) dataDict['t'] = t0 evsflagged = self.eventstruct.pollHighLevelEvents(None, dataDict, @@ -352,8 +352,8 @@ Evtimes[evname] = [] Evpoints[evname] = [] # temp storage for repeatedly used object attributes (for lookup efficiency) - depdomains = dict(zip(range(self.dimension), - [self.variables[xn].depdomain for xn in xnames])) + depdomains = dict(list(zip(list(range(self.dimension)), + [self.variables[xn].depdomain for xn in xnames]))) # Main integration loop num_points = 0 breakwhile = False @@ -367,14 +367,14 @@ try: errcode = solver.integrate(new_t) except: - print "Error calling right hand side function:" + print("Error calling right hand side function:") self.showSpec() - print "Numerical traceback information (current state, " \ - + "parameters, etc.)" - print "in generator dictionary 'traceback'" - self.traceback = {'vars': dict(zip(xnames,solver.y)), - 'pars': dict(zip(pnames,plist)), - 'inputs': dict(zip(inames,ilist)), + print("Numerical traceback information (current state, " \ + + "parameters, etc.)") + print("in generator dictionary 'traceback'") + self.traceback = {'vars': dict(list(zip(xnames,solver.y))), + 'pars': dict(list(zip(pnames,plist))), + 'inputs': dict(list(zip(inames,ilist))), self.indepvariable.name: new_t} raise avals = auxvarsfn(new_t, solver.y, extralist) @@ -382,14 +382,14 @@ # assert all([isfinite(a) for a in avals]), \ # "Some auxiliary variable values not finite" if eventslist != []: - dataDict = dict(zip(xnames,solver.y)) - dataDict.update(dict(zip(anames,avals))) + dataDict = dict(list(zip(xnames,solver.y))) + dataDict.update(dict(list(zip(anames,avals)))) dataDict['t'] = new_t if self.inputs: parsinps = copy(self.pars) - parsinps.update(dict(zip(inames, + parsinps.update(dict(list(zip(inames, _pollInputs(inputVarList, new_t+self.globalt0, - self.checklevel)))) + self.checklevel))))) else: parsinps = self.pars evsflagged = self.eventstruct.pollHighLevelEvents(None, @@ -398,9 +398,8 @@ eventslist) ## print new_t, evsflagged ## evsflagged = [ev for ev in evsflagged if solver.t-indepdom0 > ev[1].eventinterval] - termevsflagged = filter(lambda e: e in evsflagged, termevents) - nontermevsflagged = filter(lambda e: e not in termevsflagged, - evsflagged) + termevsflagged = [e for e in termevents if e in evsflagged] + nontermevsflagged = [e for e in evsflagged if e not in termevsflagged] # register any non-terminating events in the warnings # list, unless they are 'precise' in which case flag # them to be resolved after integration completes @@ -557,7 +556,7 @@ # choose slightly smaller dt to fit trange exactly dt = trangewidth/numpoints - tmesh = [told + i*dt for i in xrange(1, numpoints+1)] + tmesh = [told + i*dt for i in range(1, numpoints+1)] # linspace version is *much* slower for numpoints ~ 10 and 100 #tmesh = list(told+linspace(dt, numpoints*dt, numpoints)) @@ -585,7 +584,7 @@ # much less accurately determined) if not breakwhile: # only here if a terminal event hasn't just flagged - for xi in xrange(self.dimension): + for xi in range(self.dimension): if not self.contains(depdomains[xi], solver.y[xi], self.checklevel): @@ -615,17 +614,17 @@ self.checklevel) \ for f in inputVarList] except ValueError: - print 'External input call caused value out of range error:',\ - 't = ', solver.t + print('External input call caused value out of range error:',\ + 't = ', solver.t) for f in inputVarList: if f.diagnostics.hasWarnings(): - print 'External input variable %s out of range:'%f.name - print ' t = ', repr(f.diagnostics.warnings[-1][0]), ', ', \ - f.name, ' = ', repr(f.diagnostics.warnings[-1][1]) + print('External input variable %s out of range:'%f.name) + print(' t = ', repr(f.diagnostics.warnings[-1][0]), ', ', \ + f.name, ' = ', repr(f.diagnostics.warnings[-1][1])) raise except AssertionError: - print 'External input call caused t out of range error: t = ', \ - solver.t + print('External input call caused t out of range error: t = ', \ + solver.t) raise solver.set_f_params(extralist) breakwhile = not solver.successful() @@ -643,8 +642,8 @@ try: if self.diagnostics.warnings[-1][0] not in [W_TERMEVENT, W_TERMSTATEBD]: - print "t =", solver.t - print "state =", dict(zip(xnames,solver.y)) + print("t =", solver.t) + print("state =", dict(list(zip(xnames,solver.y)))) raise RuntimeError("Event finding code for terminal event " "failed in Generator " + self.name + \ ": try decreasing eventdelay or " @@ -652,8 +651,8 @@ "atol and rtol parameters") except IndexError: info(self.diagnostics.outputStats, "Output statistics") - print "t =", solver.t - print "x =", solver.y + print("t =", solver.t) + print("x =", solver.y) raise RuntimeError("Event finding failed in Generator " + \ self.name + ": try decreasing eventdelay " "or eventinterval below eventtol, or the " @@ -692,18 +691,18 @@ interp = interp1d(alltData, xvals) variables[x] = Variable(interp, 't', x, x) else: - print "Error in Generator:", self.name - print "t = ", alltData - print "x = ", allxDataDict + print("Error in Generator:", self.name) + print("t = ", alltData) + print("x = ", allxDataDict) raise PyDSTool_ValueError("Fewer than 2 data points computed") for a in anames: if len(alltData) > 1: variables[a] = Variable(interp1d(alltData, allaDataDict[a]), 't', a, a) else: - print "Error in Generator:", self.name - print "t = ", alltData - print "x = ", allxDataDict + print("Error in Generator:", self.name) + print("t = ", alltData) + print("x = ", allxDataDict) raise PyDSTool_ValueError("Fewer than 2 data points computed") # Resolve non-terminal 'precise' events that were flagged, using the # variables created. Then, add them to a new version of the variables. @@ -739,17 +738,17 @@ else: lost_evt = True if lost_evt: - print "Error: A non-terminal, 'precise' event was lost -- did you reset", - print "events prior to integration?" + print("Error: A non-terminal, 'precise' event was lost -- did you reset", end=' ') + print("events prior to integration?") raise PyDSTool_ExistError("Internal error: A non-terminal, " "'precise' RefactoringTool: Refactored ./PyDSTool/Generator/__init__.py event '%s' was lost after integration!"%e[0]) # add non-terminal event points to variables if ntpe_tdict != {}: # find indices of times at which event times will be inserted tix = 0 - evts = ntpe_tdict.keys() + evts = list(ntpe_tdict.keys()) evts.sort() - for evix in xrange(len(evts)): + for evix in range(len(evts)): evt = evts[evix] evnames = ntpe_tdict[evt] self.diagnostics.warnings.append((W_NONTERMEVENT, (evt, evnames))) @@ -801,7 +800,7 @@ } if solver.successful(): #self.validateSpec() - for evname, evtlist in Evtimes.iteritems(): + for evname, evtlist in Evtimes.items(): try: self.eventstruct.Evtimes[evname].extend([et+self.globalt0 \ for et in evtlist]) @@ -822,7 +821,7 @@ 'indepvararray': Evtimes[evname], 'indepvartype': float}) self.defined = True - return Trajectory(trajname, variables.values(), + return Trajectory(trajname, list(variables.values()), abseps=self._abseps, globalt0=self.globalt0, checklevel=self.checklevel, FScompatibleNames=self._FScompatibleNames, @@ -836,7 +835,7 @@ self.diagnostics._errorcodes[errcode]))) except TypeError: # e.g. when errcode has been used to return info list - print "Error information: ", errcode + print("Error information: ", errcode) self.diagnostics.errors.append((E_COMPUTFAIL, (solver.t, self.diagnostics._errorcodes[0]))) self.defined = False @@ -857,7 +856,7 @@ p = sortedDictValues(self._FScompatibleNames(pdict)) i = _pollInputs(sortedDictValues(self.inputs), t, self.checklevel) - return apply(getattr(self, self.funcspec.spec[1]), [t, x, p+i]) + return getattr(self, self.funcspec.spec[1])(*[t, x, p+i]) def Jacobian(self, t, xdict, pdict=None, asarray=True): @@ -875,8 +874,7 @@ p = sortedDictValues(self._FScompatibleNames(pdict)) i = _pollInputs(sortedDictValues(self.inputs), t, self.checklevel) - return apply(getattr(self, self.funcspec.auxfns["Jacobian"][1]), \ - [t, x, p+i]) + return getattr(self, self.funcspec.auxfns["Jacobian"][1])(*[t, x, p+i]) else: raise PyDSTool_ExistError("Jacobian not defined") @@ -896,8 +894,7 @@ p = sortedDictValues(self._FScompatibleNames(pdict)) i = _pollInputs(sortedDictValues(self.inputs), t, self.checklevel) - return apply(getattr(self, self.funcspec.auxfns["Jacobian_pars"][1]), \ - [t, x, p+i]) + return getattr(self, self.funcspec.auxfns["Jacobian_pars"][1])(*[t, x, p+i]) else: raise PyDSTool_ExistError("Jacobian w.r.t. parameters not defined") @@ -916,7 +913,7 @@ p = sortedDictValues(self._FScompatibleNames(pdict)) i = _pollInputs(sortedDictValues(self.inputs), t, self.checklevel) - return apply(getattr(self, self.funcspec.auxspec[1]), [t, x, p+i]) + return getattr(self, self.funcspec.auxspec[1])(*[t, x, p+i]) def __del__(self): --- ./PyDSTool/Generator/__init__.py (original) +++ ./PyDSTool/Generator/__init__.py (refactored) @@ -3,20 +3,20 @@ Robert Clewley, September 2005 """ -from baseclasses import * -from ODEsystem import * -from Euler_ODEsystem import * -from Vode_ODEsystem import * -from Dopri_ODEsystem import * -from Radau_ODEsystem import * -from ADMC_ODEsRefactoringTool: Refactored ./PyDSTool/Generator/allimports.py RefactoringTool: Refactored ./PyDSTool/Generator/baseclasses.py ystem import * -from ExplicitFnGen import * -from ImplicitFnGen import * -from EmbeddedSysGen import * -from LookupTable import * -from InterpolateTable import * -from ExtrapolateTable import * -from MapSystem import * +from .baseclasses import * +from .ODEsystem import * +from .Euler_ODEsystem import * +from .Vode_ODEsystem import * +from .Dopri_ODEsystem import * +from .Radau_ODEsystem import * +from .ADMC_ODEsystem import * +from .ExplicitFnGen import * +from .ImplicitFnGen import * +from .EmbeddedSysGen import * +from .LookupTable import * +from .InterpolateTable import * +from .ExtrapolateTable import * +from .MapSystem import * def findGenSubClasses(superclass): @@ -25,7 +25,7 @@ "findGenSubClasses requires a string as the name of the class to search for subclasses." subclasslist = [] sc = eval(superclass) - for x in theGenSpecHelper.gshDB.keys(): + for x in list(theGenSpecHelper.gshDB.keys()): if compareClassAndBases(theGenSpecHelper.gshDB[x].genClass,sc): subclasslist.append(x) return subclasslist --- ./PyDSTool/Generator/allimports.py (original) +++ ./PyDSTool/Generator/allimports.py (refactored) @@ -10,6 +10,6 @@ from PyDSTool.Trajectory import * from PyDSTool.FuncSpec import * from PyDSTool.Events import * -from messagecodes import * +from .messagecodes import * from math import * import math, random, scipy --- ./PyDSTool/Generator/baseclasses.py (original) +++ ./PyDSTool/Generator/baseclasses.py (refactored) @@ -1,7 +1,7 @@ # Generator base classes: Generator, ctsGen, discGen -from __future__ import division - -from allimports import * + + +from .allimports import * from PyDSTool.utils import * from PyDSTool.common import * from PyDSTool.Symbolic import ensureStrArgDict, Quantity, QuantSpec, mathNameMap @@ -89,7 +89,7 @@ def __repr__(self): s = "Generator internal database class: " - s += str(self.database.keys()) + s += str(list(self.database.keys())) return s __str__ = __repr__ @@ -121,30 +121,30 @@ raise KeyError("Function %s not present"%k) def keys(self): - return [k for k in self.__dict__.keys() \ + return [k for k in list(self.__dict__.keys()) \ if k not in ['genref', 'map_ixs']] def __contains__(self, k): - return k in self.keys() + return k in list(self.keys()) def values(self): - return [self.__dict__[k] for k in self.__dict__.keys() \ + return [self.__dict__[k] for k in list(self.__dict__.keys()) \ if k not in ['genref', 'map_ixs']] def items(self): - return zip(self.keys(), self.values()) + return list(zip(list(self.keys()), list(self.values()))) def __repr__(self): - return "Aux functions: " + ", ".join(self.keys()) + return "Aux functions: " + ", ".join(list(self.keys())) class ixmap(dict): def __init__(self, genref): self.parixmap = {} self.pars = genref.pars - i = genref.inputs.keys() + i = list(genref.inputs.keys()) i.sort() - p = genref.pars.keys() + p = list(genref.pars.keys()) p.sort() allnames = p + i for pair in enumerate(allnames): @@ -237,7 +237,7 @@ self._abseps = 1e-13 # `Checklevel` code determining response to uncertain float comparisons if 'checklevel' in kw: - if kw['checklevel'] not in range(4): + if kw['checklevel'] not in list(range(4)): raise ValueError('Invalid interval endpoint checking option') self.checklevel = kw['checklevel'] self.foundKeys += 1 @@ -317,7 +317,7 @@ The events are not guaranteed to be ordered by the value of the independent variable. """ - compat_evnames = self._FScompatibleNamesInv(self.trajevents.keys()) + compat_evnames = self._FScompatibleNamesInv(list(self.trajevents.keys())) if evnames is None: evnames = compat_evnames if asGlobalTime: @@ -340,7 +340,7 @@ assert all([ev in compat_evnames for ev in evnames]), \ "Invalid event name(s) provided: %s"%str(evnames) result = {} - for (evname, evptset) in self.trajevents.iteritems(): + for (evname, evptset) in self.trajevents.items(): compat_evname = self._FScompatibleNamesInv(evname) if compat_evname not in evnames: continue @@ -370,7 +370,7 @@ t_offset = self.globalt0 else: t_offset = 0 - compat_evnames = self._FScompatibleNamesInv(self.trajevents.keys()) + compat_evnames = self._FScompatibleNamesInv(list(self.trajevents.keys())) if evnames is None: evnames = compat_evnames if isinstance(evnames, str): @@ -386,7 +386,7 @@ # assume a sequence of strings assert all([ev in compat_evnames for ev in evnames]), \ "Invalid event name(s) provided: %s"%str(evnames) - for (evname, evptset) in self.trajevents.iteritems(): + for (evname, evptset) in self.trajevents.items(): compat_evname = self._FScompatibleNamesInv(evname) if compat_evname not in compat_evnames: continue @@ -407,9 +407,9 @@ assert isinstance(querykey, str), \ ("Query argument must be a single string") if querykey not in self._querykeys: - print 'Valid query keys are:', self._querykeys - print "('events' key only queries model-level events, not those" - print " inside sub-models)" + print('Valid query keys are:', self._querykeys) + print("('events' key only queries model-level events, not those") + print(" inside sub-models)") raise ValueError('Query key '+querykey+' is not valid') if querykey in ['pars', 'parameters']: result = self._FScompatibleNamesInv(self.pars) @@ -426,12 +426,12 @@ result = self._FScompatibleNamesInv(self.funcspec.auxvars) elif querykey == 'vardomains': result = {} - for varname, var in self.variables.iteritems(): + for varname, var in self.variables.items(): result[self._FScompatibleNamesInv(varname)] = \ var.depdomain elif querykey == 'pardomains': result = {} - for parname, pardom in self.parameterDomains.iteritems(): + for parname, pardom in self.parameterDomains.items(): result[self._FScompatibleNamesInv(parname)] = \ pardom elif querykey == 'abseps': @@ -456,7 +456,7 @@ def info(self, verbose=1): - print self._infostr(verbose) + print(self._infostr(verbose)) def _kw_process_dispatch(self, keys, kw): @@ -478,12 +478,12 @@ def _kw_process_varspecs(self, kw, fs_args): if 'varspecs' in kw: - for varname, varspec in kw['varspecs'].items(): + for varname, varspec in list(kw['varspecs'].items()): if not isinstance(varname, (str, QuantSpec, Quantity)): - print "Expected string, QuantSpec, or Quantity to name variable, got type %s" %(type(varname)) + print("Expected string, QuantSpec, or Quantity to name variable, got type %s" %(type(varname))) raise PyDSTool_TypeError("Invalid type for Variable name: %s"%str(varname)) if not isinstance(varspec, (str, QuantSpec, Quantity)): - print "Expected string, QuantSpec, or Quantity definition for %s, got type %s" %(varname, type(varspec)) + print("Expected string, QuantSpec, or Quantity definition for %s, got type %s" %(varname, type(varspec))) raise PyDSTool_TypeError("Invalid type for Variable %s's specification."%varname) self.foundKeys += 1 fs_args['varspecs'] = \ @@ -494,7 +494,7 @@ all_vars = [] # record number of variables defined by macros for FuncSpec checks fs_args['_for_macro_info'] = args(totforvars=0, numfors=0, varsbyforspec={}) - for specname, specstr in fs_args['varspecs'].items(): + for specname, specstr in list(fs_args['varspecs'].items()): if not '[' in specname: all_vars.append(specname) fs_args['_for_macro_info'].varsbyforspec[specname] = [specname] @@ -526,8 +526,8 @@ if 'tdomain' in kw: self.tdomain = kw['tdomain'] if self.tdomain[0] >= self.tdomain[1]: - print "Time domain specified: [%s, %s]"%(self.tdomain[0], - self.tdomain[1]) + print("Time domain specified: [%s, %s]"%(self.tdomain[0], + self.tdomain[1])) raise PyDSTool_ValueError("tdomain values must be in order of " "increasing size") self.foundKeys += 1 @@ -607,7 +607,7 @@ elif isinstance(inputs, dict): self.inputs.update(self._FScompatibleNames(inputs)) # ensure values are Variables or Pointsets - for k, v in self.inputs.iteritems(): + for k, v in self.inputs.items(): if not isinstance(v, Variable): try: self.inputs[k]=Variable(v) @@ -621,22 +621,22 @@ # defined, e.g. inputs may be formally present in the keys but in # fact unused self._extInputsChanged = (self.inputs != {}) - fs_args['inputs'] = self.inputs.keys() + fs_args['inputs'] = list(self.inputs.keys()) else: self._extInputsChanged = False def _kw_process_ics(self, kw, fs_args): if 'ics' in kw: self._xdatadict = {} - for k, v in dict(kw['ics']).iteritems(): + for k, v in dict(kw['ics']).items(): self._xdatadict[self._FScompatibleNames(str(k))] = ensurefloat(v) self.initialconditions = self._xdatadict.copy() - unspecd = remain(self._xdatadict.keys(), self.__all_vars) + unspecd = remain(list(self._xdatadict.keys()), self.__all_vars) if unspecd != []: # ics were declared for variables not in varspecs raise ValueError("Missing varspec entries for declared ICs: " + str(unspecd)) for name in remain(self.__all_vars, - self._xdatadict.keys()): + list(self._xdatadict.keys())): self.initialconditions[name] = NaN self.foundKeys += 1 else: @@ -679,7 +679,7 @@ self.xtype = {} if 'xtype' in kw: xts = kw['xtype'] - for name_temp, xt in dict(xts).iteritems(): + for name_temp, xt in dict(xts).items(): if compareNumTypes(xt, _all_int): xt_actual = int elif compareNumTypes(xt, _all_float): @@ -696,7 +696,7 @@ self.xtype[base+str(name_i)] = xt_actual else: self.xtype[name] = xt_actual - for name in remain(fs_args['varspecs'].keys(), self.xtype.keys()): + for name in remain(list(fs_args['varspecs'].keys()), list(self.xtype.keys())): self.xtype[name] = float self.foundKeys += 1 else: @@ -714,7 +714,7 @@ def _kw_process_xdomain(self, kw, fs_args): if 'xdomain' in kw: self.xdomain = {} - for k, v in dict(kw['xdomain']).iteritems(): + for k, v in dict(kw['xdomain']).items(): name = self._FScompatibleNames(str(k)) if isinstance(v, _seq_types): assert len(v) == 2, \ @@ -729,7 +729,7 @@ else: raise PyDSTool_TypeError('Invalid type for xdomain spec' ' '+name) - for name in remain(fs_args['varspecs'].keys(), self.xdomain.keys()): + for name in remain(list(fs_args['varspecs'].keys()), list(self.xdomain.keys())): if name[-1] == ']': # for macro -- FuncSpec.py will double check for correct syntax base = name[:name.index('[')] @@ -781,9 +781,9 @@ except (AttributeError, TypeError): raise TypeError("Invalid parameter symbolic definition") else: - for k, v in dict(kw['pars']).iteritems(): + for k, v in dict(kw['pars']).items(): self.pars[self._FScompatibleNames(str(k))] = ensurefloat(v) - fs_args['pars'] = self.pars.keys() + fs_args['pars'] = list(self.pars.keys()) self._register(self.pars) self.foundKeys += 1 self.numpars = len(self.pars) @@ -792,14 +792,14 @@ if 'pdomain' in kw: if self.pars: self.pdomain = {} - for k, v in dict(kw['pdomain']).iteritems(): + for k, v in dict(kw['pdomain']).items(): assert len(v) == 2, \ "Invalid size of domain specification for "+k self.pdomain[self._FScompatibleNames(str(k))] = v for name in self.pdomain: if self.pdomain[name][0] >= self.pdomain[name][1]: raise PyDSTool_ValueError('pdomain values must be in order of increasing size') - for name in remain(self.pars.keys(), self.pdomain.keys()): + for name in remain(list(self.pars.keys()), list(self.pdomain.keys())): self.pdomain[name] = [-Inf, Inf] self.foundKeys += 1 else: @@ -822,9 +822,9 @@ if self.checklevel < 3: if cval is not notcontained: if cval is uncertain and self.checklevel == 2: - print 'Warning: Parameter value at bound' + print('Warning: Parameter value at bound') else: - print self.pars[pname], "not in", self.parameterDomains[pname].get() + print(self.pars[pname], "not in", self.parameterDomains[pname].get()) raise PyDSTool_ValueError('Parameter %s: value out of bounds'%pname) else: if cval is uncertain: @@ -841,7 +841,7 @@ fs_args['targetlang'] = theGenSpecHelper(self).lang if 'compiler' in kw: if fs_args['targetlang'] == 'python': - print "Warning: redundant option 'compiler' for python target" + print("Warning: redundant option 'compiler' for python target") self._compiler = kw['compiler'] self.foundKeys += 1 elif fs_args['targetlang'] != 'python': @@ -880,7 +880,7 @@ if self.pars: # automatically pass par values on to embedded system # when Rhs called - parlist = self.pars.keys() + parlist = list(self.pars.keys()) parstr = "".join(["'%s': %s, "%(parname,parname) \ for parname in parlist]) if 'codeinsert_start' in fs_args: @@ -914,11 +914,11 @@ outputStr += self.funcspec._infostr(verbose) if verbose == 2: outputStr += '\nVariables` validity intervals:' - for v in self.variables.values(): + for v in list(self.variables.values()): outputStr += '\n ' + str(v.depdomain) if self.eventstruct is not None: outputStr += '\nEvents defined:' - outputStr += '\n ' + str(self.eventstruct.events.keys()) + outputStr += '\n ' + str(list(self.eventstruct.events.keys())) if self._modeltag is not None: outputStr += '\nAssociated Model: ' + self._modeltag.name if verbose > 0: @@ -928,28 +928,28 @@ def showEventSpec(self): if self.eventstruct is not None: - for evname, ev in self.eventstruct.events.iteritems(): - print evname + ":\n" + ev._funcstr - print "\n" + for evname, ev in self.eventstruct.events.items(): + print(evname + ":\n" + ev._funcstr) + print("\n") def showSpec(self): - print self.funcspec.spec[0] + print(self.funcspec.spec[0]) def showAuxSpec(self): - print self.funcspec.auxspec[0] + print(self.funcspec.auxspec[0]) def showAuxFnSpec(self, auxfnname=None): if auxfnname is None: retdict = {} - for aname, aspec in self.funcspec.auxfns.iteritems(): + for aname, aspec in self.funcspec.auxfns.items(): retdict[aname] = aspec[0] info(retdict) else: try: - print self.funcspec.auxfns[auxfnname][0] + print(self.funcspec.auxfns[auxfnname][0]) except KeyError: raise NameError("Aux function %s not found"%auxfnname) @@ -975,7 +975,7 @@ assert isinstance(self.pars[name], _num_types) assert type(self.pars[name]) == self._registry[name] if self.inputs: - for subjectname, obj in self.inputs.iteritems(): + for subjectname, obj in self.inputs.items(): # test for containment of input's interval in independent # variable interval # (use checklevel = 1 for this o/w could get errors) @@ -989,7 +989,7 @@ # check consistency with FuncSpec type of self.funcspec # (unnecessary for dictionary version of FuncSpec) if isinstance(self.funcspec, FuncSpec): - varnames = self.variables.keys() + varnames = list(self.variables.keys()) fsvars = self.funcspec.vars if len(varnames) > 1: varnames.sort() @@ -998,7 +998,7 @@ 'variable names') else: assert varnames == fsvars - parnames = self.pars.keys() + parnames = list(self.pars.keys()) fspars = self.funcspec.pars if len(parnames) > 1: parnames.sort() @@ -1008,7 +1008,7 @@ else: assert parnames == fspars if self.inputs: - inputnames = self.inputs.keys() + inputnames = list(self.inputs.keys()) fsinputs = self.funcspec.inputs if len(inputnames) > 1: inputnames.sort() @@ -1020,7 +1020,7 @@ else: assert len(self.funcspec) == self.dimension except: - print 'Invalid system specification' + print('Invalid system specification') raise @@ -1034,10 +1034,10 @@ if name not in self._needKeys + self._optionalKeys: raise PyDSTool_KeyError('Key name ' + name + ' is invalid') else: - print 'Keywords supplied:\n\t' + str(kw.keys()) - print '# keywords found: ' + str(self.foundKeys) - print 'Needed:\n\t' + str(self._needKeys) - print 'Optional:\n\t' + str(self._optionalKeys) + print('Keywords supplied:\n\t' + str(list(kw.keys()))) + print('# keywords found: ' + str(self.foundKeys)) + print('Needed:\n\t' + str(self._needKeys)) + print('Optional:\n\t' + str(self._optionalKeys)) raise PyDSTool_KeyError('Invalid keyword arguments for this class') del self.foundKeys @@ -1057,7 +1057,7 @@ if isinstance(items, dict): # for parameter and variable dictionaries - for name, v in items.iteritems(): + for name, v in items.items(): if isinstance(self.funcspec, FuncSpec): assert name in self.funcspec.vars \ or name in self.funcspec.auxvars \ @@ -1108,7 +1108,7 @@ def _addEvents(self, evs): if isinstance(evs, list): - map(self.eventstruct.add, copy(evs)) + list(map(self.eventstruct.add, copy(evs))) elif isinstance(evs, Event): # singleton self.eventstruct.add(evs) @@ -1132,7 +1132,7 @@ allnames = self.funcspec.vars + nonEvtPars if activatedbounds in (None,{}): activatedbounds = {}.fromkeys(allnames, (False,False)) - for xname, xdom in alldoms.iteritems(): + for xname, xdom in alldoms.items(): if xname not in allnames: # don't make bound constraints for non-state variables continue @@ -1195,7 +1195,7 @@ self.algparams['checkBounds'] = kw['checklevel'] if 'abseps' in kw: self._abseps = kw['abseps'] - if remain(kw.keys(), ['globalt0', 'checklevel', 'abseps']) != []: + if remain(list(kw.keys()), ['globalt0', 'checklevel', 'abseps']) != []: raise PyDSTool_KeyError('Invalid keywords passed') @@ -1203,7 +1203,7 @@ """Set initialconditions attribute of all generator's events, in case event uses auxiliary functions that access this information.""" try: - evs = self.eventstruct.events.values() + evs = list(self.eventstruct.events.values()) except AttributeError: # no events present pass @@ -1329,7 +1329,7 @@ # Methods for pickling protocol def __getstate__(self): d = copy(self.__dict__) - for fname, finfo in self._funcreg.iteritems(): + for fname, finfo in self._funcreg.items(): try: del d[fname] except KeyError: @@ -1347,7 +1347,7 @@ # delete object-specific class methods etc. before deleting # to avoid crowding namespace try: - for fname, finfo in self._funcreg.iteritems(): + for fname, finfo in self._funcreg.items(): try: delattr(eval(finfo[0]), fname) except AttributeError: @@ -1362,10 +1362,10 @@ self.eventstruct.__del__() if self.indepvariable is not None: del self.indepvariable - for v in self.variables.values(): + for v in list(self.variables.values()): v.__del__() if hasattr(self, 'inputs'): - for v in self.inputs.values(): + for v in list(self.inputs.values()): v.__del__() except AttributeError: # self does not have _funcreg @@ -1467,18 +1467,18 @@ f.diagnostics.clearWarnings() ilist.append(f(t, checklevel)) except AssertionError: - print 'External input call has t out of range: t = ', t - print 'Maybe checklevel is 3 and initial time is not', \ - 'completely inside valid time interval' + print('External input call has t out of range: t = ', t) + print('Maybe checklevel is 3 and initial time is not', \ + 'completely inside valid time interval') raise except ValueError: - print 'External input call has value out of range: t = ', t - print 'Check beginning and end time of integration' + print('External input call has value out of range: t = ', t) + print('Check beginning and end time of integration') for f in inputVarList: if f.diagnostics.hasWarnings(): - print 'External input %s out of range:' % f.name - print ' t = ', repr(f.diagnostics.warnings[-1][0]), 'RefactoringTool: No changes to ./PyDSTool/Generator/messagecodes.py RefactoringTool: Files that were modified: RefactoringTool: ./PyDSTool/Events.py RefactoringTool: ./PyDSTool/FuncSpec.py RefactoringTool: ./PyDSTool/Interval.py RefactoringTool: ./PyDSTool/MProject.py RefactoringTool: ./PyDSTool/Model.py RefactoringTool: ./PyDSTool/ModelConstructor.py RefactoringTool: ./PyDSTool/ModelSpec.py RefactoringTool: ./PyDSTool/Points.py RefactoringTool: ./PyDSTool/Redirector.py RefactoringTool: ./PyDSTool/Symbolic.py RefactoringTool: ./PyDSTool/Trajectory.py RefactoringTool: ./PyDSTool/Variable.py RefactoringTool: ./PyDSTool/__init__.py RefactoringTool: ./PyDSTool/common.py RefactoringTool: ./PyDSTool/conf.py RefactoringTool: ./PyDSTool/errors.py RefactoringTool: ./PyDSTool/fixedpickle.py RefactoringTool: ./PyDSTool/integrator.py RefactoringTool: ./PyDSTool/matplotlib_import.py RefactoringTool: ./PyDSTool/parseUtils.py RefactoringTool: ./PyDSTool/scipy_ode.py RefactoringTool: ./PyDSTool/utils.py RefactoringTool: ./PyDSTool/tests/CIN.py RefactoringTool: ./PyDSTool/tests/DAE_example.py RefactoringTool: ./PyDSTool/tests/Dopri_backwards_test.py RefactoringTool: ./PyDSTool/tests/HH_DSSRTtest.py RefactoringTool: ./PyDSTool/tests/HH_adjointPRC.py RefactoringTool: ./PyDSTool/tests/HH_loaded.py RefactoringTool: ./PyDSTool/tests/HH_loaded_Cintegrator.py RefactoringTool: ./PyDSTool/tests/HH_model.py RefactoringTool: ./PyDSTool/tests/HH_model_Cintegrator.py RefactoringTool: ./PyDSTool/tests/HH_model_Cintegrator_testbounds.py RefactoringTool: ./PyDSTool/tests/HH_model_testbounds.py RefactoringTool: ./PyDSTool/tests/IF_delaynet.py RefactoringTool: ./PyDSTool/tests/IF_delaynet_syn.py RefactoringTool: ./PyDSTool/tests/IF_model_test.py RefactoringTool: ./PyDSTool/tests/IF_squarespike_model.py RefactoringTool: ./PyDSTool/tests/ML_adjointPRC.py RefactoringTool: ./PyDSTool/tests/ModelSpec_test.py RefactoringTool: ./PyDSTool/tests/MultiCompartments.py RefactoringTool: ./PyDSTool/tests/MultiCompartments2.py RefactoringTool: ./PyDSTool/tests/NineML_import_test.py RefactoringTool: ./PyDSTool/tests/PointInfo_test.py RefactoringTool: ./PyDSTool/tests/PyCont_ABCReaction.py RefactoringTool: ./PyDSTool/tests/PyCont_ABReaction.py RefactoringTool: ./PyDSTool/tests/PyCont_Brusselator.py RefactoringTool: ./PyDSTool/tests/PyCont_Catalytic.py RefactoringTool: ./PyDSTool/tests/PyCont_Catalytic_demo.py RefactoringTool: ./PyDSTool/tests/PyCont_DiscPredPrey.py RefactoringTool: ./PyDSTool/tests/PyCont_Hamiltonian.py RefactoringTool: ./PyDSTool/tests/PyCont_HindmarshRose.py RefactoringTool: ./PyDSTool/tests/PyCont_Hopfield.py RefactoringTool: ./PyDSTool/tests/PyCont_LPNeuron.py RefactoringTool: ./PyDSTool/tests/PyCont_LevelCurve.py RefactoringTool: ./PyDSTool/tests/PyCont_Logistic.py RefactoringTool: ./PyDSTool/tests/PyCont_Lorenz.py RefactoringTool: ./PyDSTool/tests/PyCont_MorrisLecar_TypeI.py RefactoringTool: ./PyDSTool/tests/PyCont_MorrisLecar_TypeII.py RefactoringTool: ./PyDSTool/tests/PyCont_NewLorenz.py RefactoringTool: ./PyDSTool/tests/PyCont_PredPrey.py RefactoringTool: ./PyDSTool/tests/PyCont_SaddleNode.py RefactoringTool: ./PyDSTool/tests/PyCont_hybrid_osc.py RefactoringTool: ./PyDSTool/tests/PyCont_vanDerPol.py RefactoringTool: ./PyDSTool/tests/PySCes_import_test.py RefactoringTool: ./PyDSTool/tests/SLIP_2D.py RefactoringTool: ./PyDSTool/tests/SLIP_2D_maps.py RefactoringTool: ./PyDSTool/tests/SLIP_2D_pdc.py RefactoringTool: ./PyDSTool/tests/SLIP_plot.py RefactoringTool: ./PyDSTool/tests/Symbolic_Diff_test.py RefactoringTool: ./PyDSTool/tests/Symbolic_test.py RefactoringTool: ./PyDSTool/tests/Tutorial_Calcium.py RefactoringTool: ./PyDSTool/tests/Tutorial_LorenzMap.py RefactoringTool: ./PyDSTool/tests/Tutorial_PredatorPrey.py RefactoringTool: ./PyDSTool/tests/Tutorial_SymbolicJac.py RefactoringTool: ./PyDSTool/tests/Tutorial_VdP.py RefactoringTool: ./PyDSTool/tests/Tutorial_compneuro.py RefactoringTool: ./PyDSTool/tests/Tutorial_linear.py RefactoringTool: ./PyDSTool/tests/basic_gen_tests.py RefactoringTool: ./PyDSTool/tests/basic_gen_tests_C.py RefactoringTool: ./PyDSTool/tests/dopri_event_test.py RefactoringTool: ./PyDSTool/tests/embedded_map_test.py RefactoringTool: ./PyDSTool/tests/expfn_test.py RefactoringTool: ./PyDSTool/tests/fingermodel_auxvartest.py RefactoringTool: ./PyDSTool/tests/fingermodel_vode.py RefactoringTool: ./PyDSTool/tests/forced_spring.py RefactoringTool: ./PyDSTool/tests/freefinger_noforce_radau.py RefactoringTool: ./PyDSTool/tests/funcspec_tests.py RefactoringTool: ./PyDSTool/tests/imp_load_test.py RefactoringTool: ./PyDSTool/tests/impfn_test.py RefactoringTool: ./PyDSTool/tests/imprecise_event_test.py RefactoringTool: ./PyDSTool/tests/interp_dopri_test.py RefactoringTool: ./PyDSTool/tests/interp_piecewise_test.py RefactoringTool: ./PyDSTool/tests/interp_vode_test.py RefactoringTool: ./PyDSTool/tests/joe_pest.py RefactoringTool: ./PyDSTool/tests/mapsystem_test.py RefactoringTool: ./PyDSTool/tests/numeric_diff_test.py RefactoringTool: ./PyDSTool/tests/objectdelete_test.py RefactoringTool: ./PyDSTool/tests/pest_test1.py RefactoringTool: ./PyDSTool/tests/pest_test2.py RefactoringTool: ./PyDSTool/tests/pest_test3.py RefactoringTool: ./PyDSTool/tests/pest_test3_Cintegrator.py RefactoringTool: ./PyDSTool/tests/pest_test4_Cintegrator.py RefactoringTool: ./PyDSTool/tests/phaseplane_HHtest.py RefactoringTool: ./PyDSTool/tests/poly_interp_test.py RefactoringTool: ./PyDSTool/tests/radau_event_test.py RefactoringTool: ./PyDSTool/tests/run_all_tests.py RefactoringTool: ./PyDSTool/tests/saveload_test.py RefactoringTool: ./PyDSTool/tests/sloppycell_example.py RefactoringTool: ./PyDSTool/tests/splinetest.py RefactoringTool: ./PyDSTool/tests/test_bd_containment.py RefactoringTool: ./PyDSTool/tests/test_context_spikes.py RefactoringTool: ./PyDSTool/tests/test_find_nearby_ball.py RefactoringTool: ./PyDSTool/tests/test_hybrid_extinputs.py RefactoringTool: ./PyDSTool/tests/test_hybrid_extinputs_Cintegrator.py RefactoringTool: ./PyDSTool/tests/test_interval.py RefactoringTool: ./PyDSTool/tests/test_pointsets.py RefactoringTool: ./PyDSTool/tests/test_variable_traj.py RefactoringTool: ./PyDSTool/tests/traj_gt0_test.py RefactoringTool: ./PyDSTool/tests/vode_event_test1.py RefactoringTool: ./PyDSTool/tests/vode_event_test2.py RefactoringTool: ./PyDSTool/tests/vode_withJac_test.py RefactoringTool: ./PyDSTool/Toolbox/DSSRT_tools.py RefactoringTool: ./PyDSTool/Toolbox/FR.py RefactoringTool: ./PyDSTool/Toolbox/FSM.py RefactoringTool: ./PyDSTool/Toolbox/InputProfile.py RefactoringTool: ./PyDSTool/Toolbox/ModelEst.py RefactoringTool: ./PyDSTool/Toolbox/ModelHelper.py RefactoringTool: ./PyDSTool/Toolbox/NineML.py RefactoringTool: ./PyDSTool/Toolbox/PRCtools.py RefactoringTool: ./PyDSTool/Toolbox/ParamEst.py RefactoringTool: ./PyDSTool/Toolbox/PySCes_SBML.py RefactoringTool: ./PyDSTool/Toolbox/__init__.py RefactoringTool: ./PyDSTool/Toolbox/adjointPRC.py RefactoringTool: ./PyDSTool/Toolbox/data_analysis.py RefactoringTool: ./PyDSTool/Toolbox/dssrt.py RefactoringTool: ./PyDSTool/Toolbox/event_driven_simulator.py RefactoringTool: ./PyDSTool/Toolbox/fracdim.py RefactoringTool: ./PyDSTool/Toolbox/makeSloppyModel.py RefactoringTool: ./PyDSTool/Toolbox/mechmatlib.py RefactoringTool: ./PyDSTool/Toolbox/model_primitives.py RefactoringTool: ./PyDSTool/Toolbox/neuralcomp.py RefactoringTool: ./PyDSTool/Toolbox/neuro_data.py RefactoringTool: ./PyDSTool/Toolbox/phaseplane.py RefactoringTool: ./PyDSTool/Toolbox/prep_boxplot.py RefactoringTool: ./PyDSTool/Toolbox/synthetic_data.py RefactoringTool: ./PyDSTool/Toolbox/syntheticdata.py RefactoringTool: ./PyDSTool/Toolbox/optimizers/__init__.py RefactoringTool: ./PyDSTool/Toolbox/optimizers/defaults.py RefactoringTool: ./PyDSTool/Toolbox/optimizers/tests/test_powell.py RefactoringTool: ./PyDSTool/Toolbox/optimizers/tests/test_quadratic.py RefactoringTool: ./PyDSTool/Toolbox/optimizers/tests/test_rosenbrock.py RefactoringTool: ./PyDSTool/Toolbox/optimizers/step/__init__.py RefactoringTool: ./PyDSTool/Toolbox/optimizers/step/conjugate_gradient_step.py RefactoringTool: ./PyDSTool/Toolbox/optimizers/step/goldfeld_step.py RefactoringTool: ./PyDSTool/Toolbox/optimizers/step/goldstein_price_step.py RefactoringTool: ./PyDSTool/Toolbox/optimizers/step/gradient_step.py RefactoringTool: ./PyDSTool/Toolbox/optimizers/step/local_brute_force_1dstep.py RefactoringTool: ./PyDSTool/Toolbox/optimizers/step/marquardt_step.py RefactoringTool: ./PyDSTool/Toolbox/optimizers/step/newton_step.py RefactoringTool: ./PyDSTool/Toolbox/optimizers/step/partial_step.py RefactoringTool: ./PyDSTool/Toolbox/optimizers/step/quasi_newton_step.py RefactoringTool: ./PyDSTool/Toolbox/optimizers/step/restart_conjugate_gradient.py RefactoringTool: ./PyDSTool/Toolbox/optimizers/step/tests/test_conjugate_gradient_step.py RefactoringTool: ./PyDSTool/Toolbox/optimizers/step/tests/test_goldstein_price_step.py RefactoringTool: ./PyDSTool/Toolbox/optimizers/step/tests/test_gradient_step.py RefactoringTool: ./PyDSTool/Toolbox/optimizers/step/tests/test_marquardt_step.py RefactoringTool: ./PyDSTool/Toolbox/optimizers/step/tests/test_newton_step.py RefactoringTool: ./PyDSTool/Toolbox/optimizers/step/tests/test_partial_step.py RefactoringTool: ./PyDSTool/Toolbox/optimizers/step/tests/test_quasi_newton_step.py RefactoringTool: ./PyDSTool/Toolbox/optimizers/step/tests/test_restart_conjugate_gradient.py RefactoringTool: ./PyDSTool/Toolbox/optimizers/optimizer/__init__.py RefactoringTool: ./PyDSTool/Toolbox/optimizers/optimizer/optimizer.py RefactoringTool: ./PyDSTool/Toolbox/optimizers/optimizer/standard_optimizer.py RefactoringTool: ./PyDSTool/Toolbox/optimizers/optimizer/standard_optimizer_modifying.py RefactoringTool: ./PyDSTool/Toolbox/optimizers/line_search/__init__.py RefactoringTool: ./PyDSTool/Toolbox/optimizers/line_search/adaptive_last_step_modifier.py RefactoringTool: ./PyDSTool/Toolbox/optimizers/line_search/backtracking_search.py RefactoringTool: ./PyDSTool/Toolbox/optimizers/line_search/barzilai_borwein_non_monotone_search.py RefactoringTool: ./PyDSTool/Toolbox/optimizers/line_search/barzilai_borwein_search.py RefactoringTool: ./PyDSTool/Toolbox/optimizers/line_search/cubic_interpolation.py RefactoringTool: ./PyDSTool/Toolbox/optimizers/line_search/damped_line_search.py RefactoringTool: ./PyDSTool/Toolbox/optimizers/line_search/fibonacci_section.py RefactoringTool: ./PyDSTool/Toolbox/optimizers/line_search/fixed_last_step_modifier.py RefactoringTool: ./PyDSTool/Toolbox/optimizers/line_search/golden_section.py RefactoringTool: ./PyDSTool/Toolbox/optimizers/line_search/goldstein_rule.py RefactoringTool: ./PyDSTool/Toolbox/optimizers/line_search/hyperbolic_line_search.py RefactoringTool: ./PyDSTool/Toolbox/optimizers/line_search/quadratic_interpolation.py RefactoringTool: ./PyDSTool/Toolbox/optimizers/line_search/scaled_line_search.py RefactoringTool: ./PyDSTool/Toolbox/optimizers/line_search/simple_line_search.py RefactoringTool: ./PyDSTool/Toolbox/optimizers/line_search/strong_wolfe_powell_rule.py RefactoringTool: ./PyDSTool/Toolbox/optimizers/line_search/wolfe_powell_rule.py RefactoringTool: ./PyDSTool/Toolbox/optimizers/line_search/tests/test_adaptive_last_step_modifier.py RefactoringTool: ./PyDSTool/Toolbox/optimizers/line_search/tests/test_backtracking_search.py RefactoringTool: ./PyDSTool/Toolbox/optimizers/line_search/tests/test_cubic_interpolation.py RefactoringTool: ./PyDSTool/Toolbox/optimizers/line_search/tests/test_damped_line_search.py RefactoringTool: ./PyDSTool/Toolbox/optimizers/line_search/tests/test_fibonacci_section.py RefactoringTool: ./PyDSTool/Toolbox/optimizers/line_search/tests/test_fixed_last_step_modifier.py RefactoringTool: ./PyDSTool/Toolbox/optimizers/line_search/tests/test_golden_section.py RefactoringTool: ./PyDSTool/Toolbox/optimizers/line_search/tests/test_goldstein_rule.py RefactoringTool: ./PyDSTool/Toolbox/optimizers/line_search/tests/test_quadratic_interpolation.py RefactoringTool: ./PyDSTool/Toolbox/optimizers/line_search/tests/test_simple_line_search.py RefactoringTool: ./PyDSTool/Toolbox/optimizers/line_search/tests/test_strong_wolfe_powell_rule.py RefactoringTool: ./PyDSTool/Toolbox/optimizers/line_search/tests/test_wolfe_powell_rule.py RefactoringTool: ./PyDSTool/Toolbox/optimizers/helpers/__init__.py RefactoringTool: ./PyDSTool/Toolbox/optimizers/helpers/finite_difference.py RefactoringTool: ./PyDSTool/Toolbox/optimizers/helpers/levenberg_marquardt.py RefactoringTool: ./PyDSTool/Toolbox/optimizers/helpers/quadratic.py RefactoringTool: ./PyDSTool/Toolbox/optimizers/helpers/tests/test_finite_difference.py RefactoringTool: ./PyDSTool/Toolbox/optimizers/helpers/tests/test_levenberg_marquardt.py RefactoringTool: ./PyDSTool/Toolbox/optimizers/helpers/tests/test_quadratic.py RefactoringTool: ./PyDSTool/Toolbox/optimizers/criterion/__init__.py RefactoringTool: ./PyDSTool/Toolbox/optimizers/criterion/composite_criteria.py RefactoringTool: ./PyDSTool/Toolbox/optimizers/criterion/criteria.py RefactoringTool: ./PyDSTool/Toolbox/optimizers/criterion/facilities.py RefactoringTool: ./PyDSTool/Toolbox/optimizers/criterion/information_criteria.py RefactoringTool: ./PyDSTool/Toolbox/optimizers/criterion/tests/test_composite_criteria.py RefactoringTool: ./PyDSTool/Toolbox/optimizers/criterion/tests/test_criteria.py RefactoringTool: ./PyDSTool/Toolbox/optimizers/criterion/tests/test_facilities.py RefactoringTool: ./PyDSTool/Toolbox/optimizers/criterion/tests/test_information_criteria.py RefactoringTool: ./PyDSTool/PyCont/BifPoint.py RefactoringTool: ./PyDSTool/PyCont/ContClass.py RefactoringTool: ./PyDSTool/PyCont/Continuation.py RefactoringTool: ./PyDSTool/PyCont/Plotting.py RefactoringTool: ./PyDSTool/PyCont/TestFunc.py RefactoringTool: ./PyDSTool/PyCont/__init__.py RefactoringTool: ./PyDSTool/PyCont/misc.py RefactoringTool: ./PyDSTool/PyCont/auto/dev/setup.py RefactoringTool: ./PyDSTool/Generator/ADMC_ODEsystem.py RefactoringTool: ./PyDSTool/Generator/DDEsystem.py RefactoringTool: ./PyDSTool/Generator/Dopri_ODEsystem.py RefactoringTool: ./PyDSTool/Generator/EmbeddedSysGen.py RefactoringTool: ./PyDSTool/Generator/Euler_ODEsystem.py RefactoringTool: ./PyDSTool/Generator/ExplicitFnGen.py RefactoringTool: ./PyDSTool/Generator/ExtrapolateTable.py RefactoringTool: ./PyDSTool/Generator/ImplicitFnGen.py RefactoringTool: ./PyDSTool/Generator/InterpolateTable.py RefactoringTool: ./PyDSTool/Generator/LookupTable.py RefactoringTool: ./PyDSTool/Generator/MapSystem.py RefactoringTool: ./PyDSTool/Generator/ODEsystem.py RefactoringTool: ./PyDSTool/Generator/Radau_ODEsystem.py RefactoringTool: ./PyDSTool/Generator/Vode_ODEsystem.py RefactoringTool: ./PyDSTool/Generator/__init__.py RefactoringTool: ./PyDSTool/Generator/allimports.py RefactoringTool: ./PyDSTool/Generator/baseclasses.py RefactoringTool: ./PyDSTool/Generator/messagecodes.py RefactoringTool: Warnings/messages while refactoring: RefactoringTool: ### In file ./PyDSTool/tests/test_hybrid_extinputs.py ### RefactoringTool: Line 35: could not convert: raise "Invalid target" RefactoringTool: Python 3 does not support string exceptions RefactoringTool: ### In file ./PyDSTool/Toolbox/ModelHelper.py ### RefactoringTool: Line 25: could not convert: raise 'No modelName specified' RefactoringTool: Python 3 does not support string exceptions RefactoringTool: Line 30: could not convert: raise 'No modelDict specified' RefactoringTool: Python 3 does not support string exceptions RefactoringTool: ### In file ./PyDSTool/Toolbox/dssrt.py ### RefactoringTool: Line 2107: could not convert: raise "Must specify at least one type of output" RefactoringTool: Python 3 does not support string exceptions RefactoringTool: Line 1622: could not convert: raise "Call make_pointsets first" RefactoringTool: Python 3 does not support string exceptions RefactoringTool: ### In file ./PyDSTool/Toolbox/fracdim.py ### RefactoringTool: Line 1102: could not convert: raise "too many sample points specified" RefactoringTool: Python 3 does not support string exceptions RefactoringTool: Line 1118: could not convert: raise "invalid color source" RefactoringTool: Python 3 does not support string exceptions RefactoringTool: Line 1202: could not convert: raise "invalid color source" RefactoringTool: Python 3 does not support string exceptions RefactoringTool: ### In file ./PyDSTool/PyCont/Plotting.py ### RefactoringTool: Line 89: could not convert: raise 'Object type must be point, text, cycle, or curve' RefactoringTool: Python 3 does not support string exceptions RefactoringTool: Line 636: could not convert: raise 'Please specify axes.' RefactoringTool: Python 3 does not support string exceptions RefactoringTool: Line 641: could not convert: raise 'Tuple must be of length 3' RefactoringTool: Python 3 does not support string exceptions RefactoringTool: ### In file ./PyDSTool/PyCont/misc.py ### RefactoringTool: Line 84: could not convert: raise 'Number of indices must be larger than 1.' RefactoringTool: Python 3 does not support string exceptions RefactoringTool: ### In file ./PyDSTool/Generator/EmbeddedSysGen.py ### RefactoringTool: Line 59: could not convert: raise "Must provide a function for the specification of this system" RefactoringTool: Python 3 does not support string exceptions RefactoringTool: ### In file ./PyDSTool/Generator/baseclasses.py ### RefactoringTool: Line 1111: You should use a for loop here RefactoringTool: ### In file ./PyDSTool/Generator/baseclasses.py ### RefactoringTool: Line 157: could not convert: raise "Cannot access external input values using ixmap class" RefactoringTool: Python 3 does not support string exceptions , ', \ - f.name, ' = ', repr(f.diagnostics.warnings[-1][1]) + print('External input %s out of range:' % f.name) + print(' t = ', repr(f.diagnostics.warnings[-1][0]), ', ', \ + f.name, ' = ', repr(f.diagnostics.warnings[-1][1])) raise return ilist + install -p -m644 /usr/src/RPM/SOURCES/PyDSTool.pth . + popd ~/RPM/BUILD + find /usr/src/tmp/python3-module-PyDSTool-buildroot '(' -name '*.DS_Store' -o -name '*.DS_Store.gz' ')' -print -delete /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/.DS_Store + /usr/lib/rpm/brp-alt Cleaning files in /usr/src/tmp/python3-module-PyDSTool-buildroot (auto) Verifying and fixing files in /usr/src/tmp/python3-module-PyDSTool-buildroot (binconfig,pkgconfig,libtool,desktop) Checking contents of files in /usr/src/tmp/python3-module-PyDSTool-buildroot/ (default) Compressing files in /usr/src/tmp/python3-module-PyDSTool-buildroot (auto) Adjusting library links in /usr/src/tmp/python3-module-PyDSTool-buildroot ./usr/lib: Verifying ELF objects in /usr/src/tmp/python3-module-PyDSTool-buildroot (arch=normal,fhs=normal,lfs=relaxed,lint=relaxed,rpath=normal,stack=normal,textrel=normal,unresolved=normal) Bytecompiling python modules in /usr/src/tmp/python3-module-PyDSTool-buildroot using /usr/bin/python2.7 Bytecompiling python modules with optimization in /usr/src/tmp/python3-module-PyDSTool-buildroot using /usr/bin/python2.7 -O Bytecompiling python3 modules in /usr/src/tmp/python3-module-PyDSTool-buildroot using /usr/bin/python3 compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/ADMC_ODEsystem.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/DDEsystem.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/Dopri_ODEsystem.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/EmbeddedSysGen.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/Euler_ODEsystem.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/ExplicitFnGen.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/ExtrapolateTable.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/ImplicitFnGen.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/InterpolateTable.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/LookupTable.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/MapSystem.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/ODEsystem.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/Radau_ODEsystem.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/Vode_ODEsystem.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/__init__.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/allimports.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/baseclasses.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/messagecodes.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/auto/dev/setup.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/BifPoint.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/ContClass.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/Continuation.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/Plotting.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/TestFunc.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/__init__.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/misc.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/criterion/tests/test_composite_criteria.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/criterion/tests/test_criteria.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/criterion/tests/test_facilities.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/criterion/tests/test_information_criteria.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/criterion/__init__.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/criterion/composite_criteria.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/criterion/criteria.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/criterion/facilities.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/criterion/information_criteria.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/helpers/tests/test_finite_difference.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/helpers/tests/test_levenberg_marquardt.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/helpers/tests/test_quadratic.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/helpers/__init__.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/helpers/finite_difference.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/helpers/levenberg_marquardt.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/helpers/quadratic.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/test_adaptive_last_step_modifier.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/test_backtracking_search.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/test_cubic_interpolation.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/test_damped_line_search.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/test_fibonacci_section.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/test_fixed_last_step_modifier.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/test_golden_section.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/test_goldstein_rule.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/test_quadratic_interpolation.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/test_simple_line_search.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/test_strong_wolfe_powell_rule.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/test_wolfe_powell_rule.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__init__.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/adaptive_last_step_modifier.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/backtracking_search.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/barzilai_borwein_non_monotone_search.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/barzilai_borwein_search.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/cubic_interpolation.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/damped_line_search.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/fibonacci_section.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/fixed_last_step_modifier.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/golden_section.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/goldstein_rule.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/hyperbolic_line_search.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/quadratic_interpolation.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/scaled_line_search.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/simple_line_search.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/strong_wolfe_powell_rule.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/wolfe_powell_rule.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/optimizer/__init__.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/optimizer/optimizer.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/optimizer/standard_optimizer.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/optimizer/standard_optimizer_modifying.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/tests/test_conjugate_gradient_step.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/tests/test_goldstein_price_step.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/tests/test_gradient_step.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/tests/test_marquardt_step.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/tests/test_newton_step.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/tests/test_partial_step.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/tests/test_quasi_newton_step.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/tests/test_restart_conjugate_gradient.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/__init__.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/conjugate_gradient_step.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/goldfeld_step.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/goldstein_price_step.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/gradient_step.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/local_brute_force_1dstep.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/marquardt_step.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/newton_step.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/partial_step.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/quasi_newton_step.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/restart_conjugate_gradient.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/tests/__init__.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/tests/test_powell.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/tests/test_quadratic.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/tests/test_rosenbrock.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/__init__.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/defaults.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/ActivationFuncs.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/DSSRT_tools.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/FR.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/FSM.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/InputProfile.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/ModelEst.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/ModelHelper.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/NineML.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/PRCtools.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/ParamEst.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/PySCes_SBML.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/__init__.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/adjointPRC.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/data_analysis.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/dssrt.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/event_driven_simulator.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/fracdim.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/makeSloppyModel.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/mechmatlib.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/model_primitives.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/neuralcomp.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/neuro_data.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/phaseplane.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/prep_boxplot.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/synthetic_data.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/syntheticdata.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/test_protocols.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/CIN.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/DAE_example.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/Dopri_backwards_test.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/HH_DSSRTtest.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/HH_adjointPRC.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/HH_loaded.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/HH_loaded_Cintegrator.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/HH_model.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/HH_model_Cintegrator.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/HH_model_Cintegrator_testbounds.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/HH_model_testbounds.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/IF_delaynet.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/IF_delaynet_syn.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/IF_model_test.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/IF_squarespike_model.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/ML_adjointPRC.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/ModelSpec_test.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/MultiCompartments.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/MultiCompartments2.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/NineML_import_test.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/PointInfo_test.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/PyCont_ABCReaction.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/PyCont_ABReaction.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/PyCont_Brusselator.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/PyCont_Catalytic.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/PyCont_Catalytic_demo.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/PyCont_DiscPredPrey.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/PyCont_Hamiltonian.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/PyCont_HindmarshRose.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/PyCont_Hopfield.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/PyCont_LPNeuron.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/PyCont_LevelCurve.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/PyCont_Logistic.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/PyCont_Lorenz.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/PyCont_MorrisLecar_TypeI.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/PyCont_MorrisLecar_TypeII.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/PyCont_NewLorenz.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/PyCont_PredPrey.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/PyCont_SaddleNode.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/PyCont_hybrid_osc.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/PyCont_vanDerPol.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/PySCes_import_test.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/SLIP_2D.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/SLIP_2D_maps.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/SLIP_2D_pdc.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/SLIP_plot.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/Symbolic_Diff_test.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/Symbolic_test.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/Tutorial_Calcium.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/Tutorial_LorenzMap.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/Tutorial_PredatorPrey.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/Tutorial_SymbolicJac.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/Tutorial_VdP.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/Tutorial_compneuro.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/Tutorial_linear.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/basic_gen_tests.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/basic_gen_tests_C.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/dopri_event_test.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/embedded_map_test.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/expfn_test.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/fingermodel_auxvartest.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/fingermodel_vode.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/forced_spring.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/freefinger_noforce_radau.py/usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/Continuation.py:370: SyntaxWarning: "is" with a literal. Did you mean "=="? if bftype is 'BP': /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/Continuation.py:377: SyntaxWarning: "is" with a literal. Did you mean "=="? elif bftype is 'B': /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/Continuation.py:1776: SyntaxWarning: "is not" with a literal. Did you mean "!="? if self.description is not 'None': /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/Continuation.py:1904: SyntaxWarning: "is" with a literal. Did you mean "=="? if bftype is 'LP': /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/Continuation.py:1919: SyntaxWarning: "is" with a literal. Did you mean "=="? elif bftype is 'H': /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/Continuation.py:2034: SyntaxWarning: "is" with a literal. Did you mean "=="? if bftype is 'BT': /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/Continuation.py:2040: SyntaxWarning: "is" with a literal. Did you mean "=="? elif bftype is 'ZH': /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/Continuation.py:2053: SyntaxWarning: "is" with a literal. Did you mean "=="? elif bftype is 'CP': /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/Continuation.py:2166: SyntaxWarning: "is" with a literal. Did you mean "=="? if bftype is 'BT': /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/Continuation.py:2172: SyntaxWarning: "is" with a literal. Did you mean "=="? if bftype is 'DH': /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/Continuation.py:2178: SyntaxWarning: "is" with a literal. Did you mean "=="? elif bftype is 'ZH': /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/Continuation.py:2184: SyntaxWarning: "is" with a literal. Did you mean "=="? elif bftype is 'GH': /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/Continuation.py:2320: SyntaxWarning: "is" with a literal. Did you mean "=="? if bftype is 'BT': /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/Continuation.py:2325: SyntaxWarning: "is" with a literal. Did you mean "=="? elif bftype is 'GH': /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/Continuation.py:2330: SyntaxWarning: "is" with a literal. Did you mean "=="? elif bftype is 'ZH': /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/Continuation.py:2380: SyntaxWarning: "is" with a literal. Did you mean "=="? if bftype is 'LPC': /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/Continuation.py:2390: SyntaxWarning: "is" with a literal. Did you mean "=="? elif bftype is 'PD': /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/Continuation.py:2395: SyntaxWarning: "is" with a literal. Did you mean "=="? elif bftype is 'NS': /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Variable.py:1027: SyntaxWarning: "is" with a literal. Did you mean "=="? elif fname is 'funcspec': /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Variable.py:1031: SyntaxWarning: "is" with a literal. Did you mean "=="? elif fname is 'outputdata': compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/funcspec_tests.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/imp_load_test.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/impfn_test.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/imprecise_event_test.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/interp_dopri_test.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/interp_piecewise_test.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/interp_vode_test.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/joe_pest.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/mapsystem_test.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/numeric_diff_test.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/objectdelete_test.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/pest_test1.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/pest_test2.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/pest_test3.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/pest_test3_Cintegrator.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/pest_test4_Cintegrator.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/phaseplane_HHtest.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/poly_interp_test.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/radau_event_test.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/run_all_tests.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/saveload_test.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/sloppycell_example.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/splinetest.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/test_bd_containment.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/test_context_spikes.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/test_find_nearby_ball.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/test_hybrid_extinputs.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/test_hybrid_extinputs_Cintegrator.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/test_interval.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/test_pointsets.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/test_variable_traj.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/traj_gt0_test.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/vode_event_test1.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/vode_event_test2.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/vode_withJac_test.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Events.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/FuncSpec.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Interval.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/MProject.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Model.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/ModelConstructor.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/ModelSpec.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Points.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Redirector.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Symbolic.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Trajectory.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Variable.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/__init__.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/common.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/conf.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/errors.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/fixedpickle.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/integrator.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/matplotlib_import.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/parseUtils.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/scipy_ode.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/utils.py Bytecompiling python3 modules with optimization in /usr/src/tmp/python3-module-PyDSTool-buildroot using /usr/bin/python3 -O compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/ADMC_ODEsystem.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/DDEsystem.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/Dopri_ODEsystem.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/EmbeddedSysGen.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/Euler_ODEsystem.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/ExplicitFnGen.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/ExtrapolateTable.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/ImplicitFnGen.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/InterpolateTable.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/LookupTable.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/MapSystem.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/ODEsystem.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/Radau_ODEsystem.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/Vode_ODEsystem.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/__init__.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/allimports.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/baseclasses.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/messagecodes.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/auto/dev/setup.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/BifPoint.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/ContClass.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/Continuation.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/Plotting.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/TestFunc.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/__init__.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/misc.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/criterion/tests/test_composite_criteria.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/criterion/tests/test_criteria.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/criterion/tests/test_facilities.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/criterion/tests/test_information_criteria.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/criterion/__init__.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/criterion/composite_criteria.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/criterion/criteria.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/criterion/facilities.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/criterion/information_criteria.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/helpers/tests/test_finite_difference.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/helpers/tests/test_levenberg_marquardt.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/helpers/tests/test_quadratic.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/helpers/__init__.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/helpers/finite_difference.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/helpers/levenberg_marquardt.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/helpers/quadratic.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/test_adaptive_last_step_modifier.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/test_backtracking_search.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/test_cubic_interpolation.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/test_damped_line_search.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/test_fibonacci_section.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/test_fixed_last_step_modifier.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/test_golden_section.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/test_goldstein_rule.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/test_quadratic_interpolation.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/test_simple_line_search.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/test_strong_wolfe_powell_rule.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/test_wolfe_powell_rule.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__init__.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/adaptive_last_step_modifier.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/backtracking_search.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/barzilai_borwein_non_monotone_search.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/barzilai_borwein_search.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/cubic_interpolation.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/damped_line_search.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/fibonacci_section.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/fixed_last_step_modifier.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/golden_section.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/goldstein_rule.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/hyperbolic_line_search.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/quadratic_interpolation.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/scaled_line_search.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/simple_line_search.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/strong_wolfe_powell_rule.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/wolfe_powell_rule.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/optimizer/__init__.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/optimizer/optimizer.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/optimizer/standard_optimizer.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/optimizer/standard_optimizer_modifying.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/tests/test_conjugate_gradient_step.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/tests/test_goldstein_price_step.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/tests/test_gradient_step.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/tests/test_marquardt_step.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/tests/test_newton_step.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/tests/test_partial_step.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/tests/test_quasi_newton_step.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/tests/test_restart_conjugate_gradient.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/__init__.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/conjugate_gradient_step.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/goldfeld_step.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/goldstein_price_step.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/gradient_step.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/local_brute_force_1dstep.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/marquardt_step.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/newton_step.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/partial_step.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/quasi_newton_step.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/restart_conjugate_gradient.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/tests/__init__.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/tests/test_powell.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/tests/test_quadratic.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/tests/test_rosenbrock.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/__init__.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/defaults.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/ActivationFuncs.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/DSSRT_tools.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/FR.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/FSM.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/InputProfile.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/ModelEst.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/ModelHelper.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/NineML.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/PRCtools.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/ParamEst.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/PySCes_SBML.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/__init__.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/adjointPRC.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/data_analysis.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/dssrt.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/event_driven_simulator.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/fracdim.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/makeSloppyModel.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/mechmatlib.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/model_primitives.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/neuralcomp.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/neuro_data.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/phaseplane.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/prep_boxplot.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/synthetic_data.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/syntheticdata.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/test_protocols.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/CIN.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/DAE_example.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/Dopri_backwards_test.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/HH_DSSRTtest.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/HH_adjointPRC.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/HH_loaded.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/HH_loaded_Cintegrator.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/HH_model.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/HH_model_Cintegrator.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/HH_model_Cintegrator_testbounds.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/HH_model_testbounds.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/IF_delaynet.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/IF_delaynet_syn.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/IF_model_test.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/IF_squarespike_model.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/ML_adjointPRC.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/ModelSpec_test.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/MultiCompartments.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/MultiCompartments2.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/NineML_import_test.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/PointInfo_test.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/PyCont_ABCReaction.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/PyCont_ABReaction.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/PyCont_Brusselator.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/PyCont_Catalytic.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/PyCont_Catalytic_demo.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/PyCont_DiscPredPrey.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/PyCont_Hamiltonian.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/PyCont_HindmarshRose.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/PyCont_Hopfield.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/PyCont_LPNeuron.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/PyCont_LevelCurve.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/PyCont_Logistic.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/PyCont_Lorenz.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/PyCont_MorrisLecar_TypeI.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/PyCont_MorrisLecar_TypeII.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/PyCont_NewLorenz.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/PyCont_PredPrey.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/PyCont_SaddleNode.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/PyCont_hybrid_osc.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/PyCont_vanDerPol.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/PySCes_import_test.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/SLIP_2D.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/SLIP_2D_maps.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/SLIP_2D_pdc.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/SLIP_plot.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/Symbolic_Diff_test.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/Symbolic_test.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/Tutorial_Calcium.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/Tutorial_LorenzMap.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/Tutorial_PredatorPrey.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/Tutorial_SymbolicJac.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/Tutorial_VdP.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/Tutorial_compneuro.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/Tutorial_linear.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/basic_gen_tests.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/basic_gen_tests_C.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/dopri_event_test.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/embedded_map_test.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/expfn_test.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/fingermodel_auxvartest.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/fingermodel_vode.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/forced_spring.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/freefinger_noforce_radau.py/usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/Continuation.py:370: SyntaxWarning: "is" with a literal. Did you mean "=="? if bftype is 'BP': /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/Continuation.py:377: SyntaxWarning: "is" with a literal. Did you mean "=="? elif bftype is 'B': /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/Continuation.py:1776: SyntaxWarning: "is not" with a literal. Did you mean "!="? if self.description is not 'None': /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/Continuation.py:1904: SyntaxWarning: "is" with a literal. Did you mean "=="? if bftype is 'LP': /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/Continuation.py:1919: SyntaxWarning: "is" with a literal. Did you mean "=="? elif bftype is 'H': /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/Continuation.py:2034: SyntaxWarning: "is" with a literal. Did you mean "=="? if bftype is 'BT': /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/Continuation.py:2040: SyntaxWarning: "is" with a literal. Did you mean "=="? elif bftype is 'ZH': /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/Continuation.py:2053: SyntaxWarning: "is" with a literal. Did you mean "=="? elif bftype is 'CP': /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/Continuation.py:2166: SyntaxWarning: "is" with a literal. Did you mean "=="? if bftype is 'BT': /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/Continuation.py:2172: SyntaxWarning: "is" with a literal. Did you mean "=="? if bftype is 'DH': /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/Continuation.py:2178: SyntaxWarning: "is" with a literal. Did you mean "=="? elif bftype is 'ZH': /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/Continuation.py:2184: SyntaxWarning: "is" with a literal. Did you mean "=="? elif bftype is 'GH': /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/Continuation.py:2320: SyntaxWarning: "is" with a literal. Did you mean "=="? if bftype is 'BT': /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/Continuation.py:2325: SyntaxWarning: "is" with a literal. Did you mean "=="? elif bftype is 'GH': /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/Continuation.py:2330: SyntaxWarning: "is" with a literal. Did you mean "=="? elif bftype is 'ZH': /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/Continuation.py:2380: SyntaxWarning: "is" with a literal. Did you mean "=="? if bftype is 'LPC': /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/Continuation.py:2390: SyntaxWarning: "is" with a literal. Did you mean "=="? elif bftype is 'PD': /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/Continuation.py:2395: SyntaxWarning: "is" with a literal. Did you mean "=="? elif bftype is 'NS': /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Variable.py:1027: SyntaxWarning: "is" with a literal. Did you mean "=="? elif fname is 'funcspec': /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Variable.py:1031: SyntaxWarning: "is" with a literal. Did you mean "=="? elif fname is 'outputdata': compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/funcspec_tests.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/imp_load_test.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/impfn_test.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/imprecise_event_test.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/interp_dopri_test.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/interp_piecewise_test.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/interp_vode_test.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/joe_pest.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/mapsystem_test.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/numeric_diff_test.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/objectdelete_test.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/pest_test1.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/pest_test2.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/pest_test3.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/pest_test3_Cintegrator.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/pest_test4_Cintegrator.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/phaseplane_HHtest.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/poly_interp_test.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/radau_event_test.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/run_all_tests.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/saveload_test.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/sloppycell_example.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/splinetest.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/test_bd_containment.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/test_context_spikes.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/test_find_nearby_ball.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/test_hybrid_extinputs.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/test_hybrid_extinputs_Cintegrator.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/test_interval.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/test_pointsets.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/test_variable_traj.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/traj_gt0_test.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/vode_event_test1.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/vode_event_test2.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/vode_withJac_test.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Events.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/FuncSpec.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Interval.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/MProject.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Model.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/ModelConstructor.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/ModelSpec.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Points.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Redirector.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Symbolic.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Trajectory.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Variable.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/__init__.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/common.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/conf.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/errors.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/fixedpickle.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/integrator.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/matplotlib_import.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/parseUtils.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/scipy_ode.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/utils.py Bytecompiling python3 modules with optimization-2 in /usr/src/tmp/python3-module-PyDSTool-buildroot using /usr/bin/python3 -OO compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/ADMC_ODEsystem.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/DDEsystem.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/Dopri_ODEsystem.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/EmbeddedSysGen.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/Euler_ODEsystem.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/ExplicitFnGen.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/ExtrapolateTable.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/ImplicitFnGen.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/InterpolateTable.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/LookupTable.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/MapSystem.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/ODEsystem.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/Radau_ODEsystem.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/Vode_ODEsystem.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/__init__.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/allimports.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/baseclasses.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/messagecodes.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/auto/dev/setup.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/BifPoint.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/ContClass.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/Continuation.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/Plotting.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/TestFunc.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/__init__.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/misc.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/criterion/tests/test_composite_criteria.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/criterion/tests/test_criteria.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/criterion/tests/test_facilities.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/criterion/tests/test_information_criteria.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/criterion/__init__.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/criterion/composite_criteria.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/criterion/criteria.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/criterion/facilities.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/criterion/information_criteria.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/helpers/tests/test_finite_difference.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/helpers/tests/test_levenberg_marquardt.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/helpers/tests/test_quadratic.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/helpers/__init__.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/helpers/finite_difference.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/helpers/levenberg_marquardt.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/helpers/quadratic.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/test_adaptive_last_step_modifier.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/test_backtracking_search.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/test_cubic_interpolation.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/test_damped_line_search.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/test_fibonacci_section.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/test_fixed_last_step_modifier.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/test_golden_section.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/test_goldstein_rule.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/test_quadratic_interpolation.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/test_simple_line_search.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/test_strong_wolfe_powell_rule.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/test_wolfe_powell_rule.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__init__.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/adaptive_last_step_modifier.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/backtracking_search.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/barzilai_borwein_non_monotone_search.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/barzilai_borwein_search.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/cubic_interpolation.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/damped_line_search.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/fibonacci_section.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/fixed_last_step_modifier.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/golden_section.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/goldstein_rule.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/hyperbolic_line_search.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/quadratic_interpolation.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/scaled_line_search.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/simple_line_search.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/strong_wolfe_powell_rule.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/wolfe_powell_rule.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/optimizer/__init__.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/optimizer/optimizer.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/optimizer/standard_optimizer.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/optimizer/standard_optimizer_modifying.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/tests/test_conjugate_gradient_step.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/tests/test_goldstein_price_step.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/tests/test_gradient_step.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/tests/test_marquardt_step.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/tests/test_newton_step.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/tests/test_partial_step.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/tests/test_quasi_newton_step.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/tests/test_restart_conjugate_gradient.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/__init__.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/conjugate_gradient_step.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/goldfeld_step.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/goldstein_price_step.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/gradient_step.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/local_brute_force_1dstep.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/marquardt_step.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/newton_step.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/partial_step.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/quasi_newton_step.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/restart_conjugate_gradient.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/tests/__init__.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/tests/test_powell.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/tests/test_quadratic.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/tests/test_rosenbrock.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/__init__.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/defaults.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/ActivationFuncs.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/DSSRT_tools.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/FR.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/FSM.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/InputProfile.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/ModelEst.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/ModelHelper.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/NineML.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/PRCtools.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/ParamEst.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/PySCes_SBML.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/__init__.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/adjointPRC.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/data_analysis.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/dssrt.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/event_driven_simulator.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/fracdim.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/makeSloppyModel.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/mechmatlib.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/model_primitives.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/neuralcomp.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/neuro_data.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/phaseplane.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/prep_boxplot.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/synthetic_data.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/syntheticdata.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/test_protocols.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/CIN.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/DAE_example.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/Dopri_backwards_test.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/HH_DSSRTtest.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/HH_adjointPRC.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/HH_loaded.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/HH_loaded_Cintegrator.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/HH_model.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/HH_model_Cintegrator.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/HH_model_Cintegrator_testbounds.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/HH_model_testbounds.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/IF_delaynet.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/IF_delaynet_syn.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/IF_model_test.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/IF_squarespike_model.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/ML_adjointPRC.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/ModelSpec_test.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/MultiCompartments.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/MultiCompartments2.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/NineML_import_test.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/PointInfo_test.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/PyCont_ABCReaction.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/PyCont_ABReaction.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/PyCont_Brusselator.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/PyCont_Catalytic.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/PyCont_Catalytic_demo.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/PyCont_DiscPredPrey.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/PyCont_Hamiltonian.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/PyCont_HindmarshRose.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/PyCont_Hopfield.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/PyCont_LPNeuron.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/PyCont_LevelCurve.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/PyCont_Logistic.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/PyCont_Lorenz.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/PyCont_MorrisLecar_TypeI.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/PyCont_MorrisLecar_TypeII.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/PyCont_NewLorenz.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/PyCont_PredPrey.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/PyCont_SaddleNode.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/PyCont_hybrid_osc.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/PyCont_vanDerPol.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/PySCes_import_test.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/SLIP_2D.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/SLIP_2D_maps.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/SLIP_2D_pdc.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/SLIP_plot.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/Symbolic_Diff_test.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/Symbolic_test.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/Tutorial_Calcium.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/Tutorial_LorenzMap.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/Tutorial_PredatorPrey.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/Tutorial_SymbolicJac.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/Tutorial_VdP.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/Tutorial_compneuro.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/Tutorial_linear.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/basic_gen_tests.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/basic_gen_tests_C.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/dopri_event_test.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/embedded_map_test.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/expfn_test.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/fingermodel_auxvartest.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/fingermodel_vode.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/forced_spring.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/freefinger_noforce_radau.py/usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/Continuation.py:370: SyntaxWarning: "is" with a literal. Did you mean "=="? if bftype is 'BP': /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/Continuation.py:377: SyntaxWarning: "is" with a literal. Did you mean "=="? elif bftype is 'B': /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/Continuation.py:1776: SyntaxWarning: "is not" with a literal. Did you mean "!="? if self.description is not 'None': /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/Continuation.py:1904: SyntaxWarning: "is" with a literal. Did you mean "=="? if bftype is 'LP': /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/Continuation.py:1919: SyntaxWarning: "is" with a literal. Did you mean "=="? elif bftype is 'H': /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/Continuation.py:2034: SyntaxWarning: "is" with a literal. Did you mean "=="? if bftype is 'BT': /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/Continuation.py:2040: SyntaxWarning: "is" with a literal. Did you mean "=="? elif bftype is 'ZH': /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/Continuation.py:2053: SyntaxWarning: "is" with a literal. Did you mean "=="? elif bftype is 'CP': /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/Continuation.py:2166: SyntaxWarning: "is" with a literal. Did you mean "=="? if bftype is 'BT': /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/Continuation.py:2172: SyntaxWarning: "is" with a literal. Did you mean "=="? if bftype is 'DH': /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/Continuation.py:2178: SyntaxWarning: "is" with a literal. Did you mean "=="? elif bftype is 'ZH': /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/Continuation.py:2184: SyntaxWarning: "is" with a literal. Did you mean "=="? elif bftype is 'GH': /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/Continuation.py:2320: SyntaxWarning: "is" with a literal. Did you mean "=="? if bftype is 'BT': /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/Continuation.py:2325: SyntaxWarning: "is" with a literal. Did you mean "=="? elif bftype is 'GH': /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/Continuation.py:2330: SyntaxWarning: "is" with a literal. Did you mean "=="? elif bftype is 'ZH': /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/Continuation.py:2380: SyntaxWarning: "is" with a literal. Did you mean "=="? if bftype is 'LPC': /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/Continuation.py:2390: SyntaxWarning: "is" with a literal. Did you mean "=="? elif bftype is 'PD': /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/Continuation.py:2395: SyntaxWarning: "is" with a literal. Did you mean "=="? elif bftype is 'NS': /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Variable.py:1027: SyntaxWarning: "is" with a literal. Did you mean "=="? elif fname is 'funcspec': /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Variable.py:1031: SyntaxWarning: "is" with a literal. Did you mean "=="? elif fname is 'outputdata': compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/funcspec_tests.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/imp_load_test.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/impfn_test.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/imprecise_event_test.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/interp_dopri_test.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/interp_piecewise_test.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/interp_vode_test.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/joe_pest.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/mapsystem_test.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/numeric_diff_test.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/objectdelete_test.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/pest_test1.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/pest_test2.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/pest_test3.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/pest_test3_Cintegrator.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/pest_test4_Cintegrator.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/phaseplane_HHtest.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/poly_interp_test.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/radau_event_test.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/run_all_tests.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/saveload_test.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/sloppycell_example.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/splinetest.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/test_bd_containment.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/test_context_spikes.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/test_find_nearby_ball.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/test_hybrid_extinputs.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/test_hybrid_extinputs_Cintegrator.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/test_interval.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/test_pointsets.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/test_variable_traj.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/traj_gt0_test.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/vode_event_test1.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/vode_event_test2.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/vode_withJac_test.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Events.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/FuncSpec.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Interval.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/MProject.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Model.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/ModelConstructor.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/ModelSpec.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Points.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Redirector.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Symbolic.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Trajectory.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Variable.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/__init__.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/common.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/conf.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/errors.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/fixedpickle.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/integrator.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/matplotlib_import.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/parseUtils.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/scipy_ode.py compile /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/utils.py Hardlinking identical .pyc and .opt-?.pyc files './usr/lib/python3/site-packages/PyDSTool/__pycache__/scipy_ode.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/__pycache__/scipy_ode.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/__pycache__/matplotlib_import.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/__pycache__/matplotlib_import.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/__pycache__/integrator.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/__pycache__/integrator.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/__pycache__/errors.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/__pycache__/errors.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/__pycache__/errors.cpython-38.opt-2.pyc' => './usr/lib/python3/site-packages/PyDSTool/__pycache__/errors.cpython-38.opt-1.pyc' './usr/lib/python3/site-packages/PyDSTool/__pycache__/conf.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/__pycache__/conf.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/__pycache__/conf.cpython-38.opt-2.pyc' => './usr/lib/python3/site-packages/PyDSTool/__pycache__/conf.cpython-38.opt-1.pyc' './usr/lib/python3/site-packages/PyDSTool/__pycache__/Redirector.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/__pycache__/Redirector.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/vode_withJac_test.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/vode_withJac_test.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/traj_gt0_test.cpython-38.opt-2.pyc' => './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/traj_gt0_test.cpython-38.opt-1.pyc' './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/test_variable_traj.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/test_variable_traj.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/test_hybrid_extinputs_Cintegrator.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/test_hybrid_extinputs_Cintegrator.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/test_find_nearby_ball.cpython-38.opt-2.pyc' => './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/test_find_nearby_ball.cpython-38.opt-1.pyc' './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/test_context_spikes.cpython-38.opt-2.pyc' => './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/test_context_spikes.cpython-38.opt-1.pyc' './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/splinetest.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/splinetest.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/sloppycell_example.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/sloppycell_example.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/sloppycell_example.cpython-38.opt-2.pyc' => './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/sloppycell_example.cpython-38.opt-1.pyc' './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/run_all_tests.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/run_all_tests.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/phaseplane_HHtest.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/phaseplane_HHtest.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/pest_test2.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/pest_test2.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/pest_test1.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/pest_test1.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/objectdelete_test.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/objectdelete_test.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/joe_pest.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/joe_pest.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/interp_vode_test.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/interp_vode_test.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/imprecise_event_test.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/imprecise_event_test.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/freefinger_noforce_radau.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/freefinger_noforce_radau.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/fingermodel_vode.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/fingermodel_vode.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/embedded_map_test.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/embedded_map_test.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/basic_gen_tests_C.cpython-38.opt-2.pyc' => './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/basic_gen_tests_C.cpython-38.opt-1.pyc' './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/basic_gen_tests.cpython-38.opt-2.pyc' => './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/basic_gen_tests.cpython-38.opt-1.pyc' './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/Tutorial_linear.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/Tutorial_linear.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/Tutorial_linear.cpython-38.opt-2.pyc' => './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/Tutorial_linear.cpython-38.opt-1.pyc' './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/Tutorial_compneuro.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/Tutorial_compneuro.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/Tutorial_VdP.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/Tutorial_VdP.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/Tutorial_VdP.cpython-38.opt-2.pyc' => './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/Tutorial_VdP.cpython-38.opt-1.pyc' './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/Tutorial_SymbolicJac.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/Tutorial_SymbolicJac.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/Tutorial_PredatorPrey.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/Tutorial_PredatorPrey.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/Tutorial_LorenzMap.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/Tutorial_LorenzMap.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/Tutorial_LorenzMap.cpython-38.opt-2.pyc' => './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/Tutorial_LorenzMap.cpython-38.opt-1.pyc' './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/Tutorial_Calcium.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/Tutorial_Calcium.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/Tutorial_Calcium.cpython-38.opt-2.pyc' => './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/Tutorial_Calcium.cpython-38.opt-1.pyc' './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/Symbolic_test.cpython-38.opt-2.pyc' => './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/Symbolic_test.cpython-38.opt-1.pyc' './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/SLIP_plot.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/SLIP_plot.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PySCes_import_test.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PySCes_import_test.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_vanDerPol.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_vanDerPol.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_hybrid_osc.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_hybrid_osc.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_SaddleNode.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_SaddleNode.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_PredPrey.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_PredPrey.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_NewLorenz.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_NewLorenz.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_MorrisLecar_TypeII.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_MorrisLecar_TypeII.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_MorrisLecar_TypeI.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_MorrisLecar_TypeI.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_Lorenz.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_Lorenz.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_LevelCurve.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_LevelCurve.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_LPNeuron.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_LPNeuron.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_Hopfield.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_Hopfield.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_HindmarshRose.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_HindmarshRose.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_Hamiltonian.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_Hamiltonian.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_DiscPredPrey.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_DiscPredPrey.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_Catalytic_demo.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_Catalytic_demo.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_Catalytic.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_Catalytic.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_Brusselator.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_Brusselator.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_ABReaction.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_ABReaction.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_ABCReaction.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_ABCReaction.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/NineML_import_test.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/NineML_import_test.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/MultiCompartments2.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/MultiCompartments2.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/MultiCompartments.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/MultiCompartments.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/ModelSpec_test.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/ModelSpec_test.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/IF_model_test.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/IF_model_test.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/HH_model_Cintegrator.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/HH_model_Cintegrator.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/HH_loaded_Cintegrator.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/HH_loaded_Cintegrator.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/HH_DSSRTtest.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/HH_DSSRTtest.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/Dopri_backwards_test.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/Dopri_backwards_test.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/DAE_example.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/DAE_example.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/test_protocols.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/test_protocols.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/test_protocols.cpython-38.opt-2.pyc' => './usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/test_protocols.cpython-38.opt-1.pyc' './usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/prep_boxplot.cpython-38.opt-2.pyc' => './usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/prep_boxplot.cpython-38.opt-1.pyc' './usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/model_primitives.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/model_primitives.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/makeSloppyModel.cpython-38.opt-2.pyc' => './usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/makeSloppyModel.cpython-38.opt-1.pyc' './usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/__init__.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/__init__.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/InputProfile.cpython-38.opt-2.pyc' => './usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/InputProfile.cpython-38.opt-1.pyc' './usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/FSM.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/FSM.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/FR.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/FR.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/ActivationFuncs.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/ActivationFuncs.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/ActivationFuncs.cpython-38.opt-2.pyc' => './usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/ActivationFuncs.cpython-38.opt-1.pyc' './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/__pycache__/defaults.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/__pycache__/defaults.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/__pycache__/__init__.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/__pycache__/__init__.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/tests/__pycache__/test_rosenbrock.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/tests/__pycache__/test_rosenbrock.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/tests/__pycache__/test_quadratic.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/tests/__pycache__/test_quadratic.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/tests/__pycache__/test_powell.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/tests/__pycache__/test_powell.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/tests/__pycache__/__init__.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/tests/__pycache__/__init__.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/tests/__pycache__/__init__.cpython-38.opt-2.pyc' => './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/tests/__pycache__/__init__.cpython-38.opt-1.pyc' './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/__pycache__/restart_conjugate_gradient.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/__pycache__/restart_conjugate_gradient.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/__pycache__/quasi_newton_step.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/__pycache__/quasi_newton_step.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/__pycache__/partial_step.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/__pycache__/partial_step.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/__pycache__/newton_step.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/__pycache__/newton_step.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/__pycache__/marquardt_step.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/__pycache__/marquardt_step.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/__pycache__/gradient_step.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/__pycache__/gradient_step.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/__pycache__/goldstein_price_step.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/__pycache__/goldstein_price_step.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/__pycache__/goldfeld_step.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/__pycache__/goldfeld_step.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/__pycache__/conjugate_gradient_step.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/__pycache__/conjugate_gradient_step.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/__pycache__/__init__.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/__pycache__/__init__.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/tests/__pycache__/test_restart_conjugate_gradient.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/tests/__pycache__/test_restart_conjugate_gradient.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/tests/__pycache__/test_restart_conjugate_gradient.cpython-38.opt-2.pyc' => './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/tests/__pycache__/test_restart_conjugate_gradient.cpython-38.opt-1.pyc' './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/tests/__pycache__/test_quasi_newton_step.cpython-38.opt-2.pyc' => './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/tests/__pycache__/test_quasi_newton_step.cpython-38.opt-1.pyc' './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/tests/__pycache__/test_partial_step.cpython-38.opt-2.pyc' => './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/tests/__pycache__/test_partial_step.cpython-38.opt-1.pyc' './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/tests/__pycache__/test_newton_step.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/tests/__pycache__/test_newton_step.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/tests/__pycache__/test_newton_step.cpython-38.opt-2.pyc' => './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/tests/__pycache__/test_newton_step.cpython-38.opt-1.pyc' './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/tests/__pycache__/test_marquardt_step.cpython-38.opt-2.pyc' => './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/tests/__pycache__/test_marquardt_step.cpython-38.opt-1.pyc' './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/tests/__pycache__/test_gradient_step.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/tests/__pycache__/test_gradient_step.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/tests/__pycache__/test_gradient_step.cpython-38.opt-2.pyc' => './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/tests/__pycache__/test_gradient_step.cpython-38.opt-1.pyc' './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/tests/__pycache__/test_goldstein_price_step.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/tests/__pycache__/test_goldstein_price_step.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/tests/__pycache__/test_goldstein_price_step.cpython-38.opt-2.pyc' => './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/tests/__pycache__/test_goldstein_price_step.cpython-38.opt-1.pyc' './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/tests/__pycache__/test_conjugate_gradient_step.cpython-38.opt-2.pyc' => './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/tests/__pycache__/test_conjugate_gradient_step.cpython-38.opt-1.pyc' './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/optimizer/__pycache__/standard_optimizer_modifying.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/optimizer/__pycache__/standard_optimizer_modifying.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/optimizer/__pycache__/standard_optimizer.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/optimizer/__pycache__/standard_optimizer.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/optimizer/__pycache__/optimizer.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/optimizer/__pycache__/optimizer.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/optimizer/__pycache__/__init__.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/optimizer/__pycache__/__init__.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/wolfe_powell_rule.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/wolfe_powell_rule.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/strong_wolfe_powell_rule.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/strong_wolfe_powell_rule.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/simple_line_search.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/simple_line_search.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/scaled_line_search.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/scaled_line_search.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/quadratic_interpolation.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/quadratic_interpolation.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/hyperbolic_line_search.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/hyperbolic_line_search.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/goldstein_rule.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/goldstein_rule.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/golden_section.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/golden_section.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/fixed_last_step_modifier.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/fixed_last_step_modifier.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/fibonacci_section.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/fibonacci_section.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/damped_line_search.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/damped_line_search.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/cubic_interpolation.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/cubic_interpolation.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/barzilai_borwein_search.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/barzilai_borwein_search.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/barzilai_borwein_search.cpython-38.opt-2.pyc' => './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/barzilai_borwein_search.cpython-38.opt-1.pyc' './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/barzilai_borwein_non_monotone_search.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/barzilai_borwein_non_monotone_search.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/barzilai_borwein_non_monotone_search.cpython-38.opt-2.pyc' => './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/barzilai_borwein_non_monotone_search.cpython-38.opt-1.pyc' './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/backtracking_search.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/backtracking_search.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/adaptive_last_step_modifier.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/adaptive_last_step_modifier.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/__init__.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/__init__.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/__pycache__/test_wolfe_powell_rule.cpython-38.opt-2.pyc' => './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/__pycache__/test_wolfe_powell_rule.cpython-38.opt-1.pyc' './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/__pycache__/test_strong_wolfe_powell_rule.cpython-38.opt-2.pyc' => './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/__pycache__/test_strong_wolfe_powell_rule.cpython-38.opt-1.pyc' './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/__pycache__/test_simple_line_search.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/__pycache__/test_simple_line_search.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/__pycache__/test_simple_line_search.cpython-38.opt-2.pyc' => './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/__pycache__/test_simple_line_search.cpython-38.opt-1.pyc' './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/__pycache__/test_quadratic_interpolation.cpython-38.opt-2.pyc' => './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/__pycache__/test_quadratic_interpolation.cpython-38.opt-1.pyc' './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/__pycache__/test_goldstein_rule.cpython-38.opt-2.pyc' => './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/__pycache__/test_goldstein_rule.cpython-38.opt-1.pyc' './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/__pycache__/test_golden_section.cpython-38.opt-2.pyc' => './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/__pycache__/test_golden_section.cpython-38.opt-1.pyc' './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/__pycache__/test_fixed_last_step_modifier.cpython-38.opt-2.pyc' => './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/__pycache__/test_fixed_last_step_modifier.cpython-38.opt-1.pyc' './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/__pycache__/test_fibonacci_section.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/__pycache__/test_fibonacci_section.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/__pycache__/test_fibonacci_section.cpython-38.opt-2.pyc' => './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/__pycache__/test_fibonacci_section.cpython-38.opt-1.pyc' './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/__pycache__/test_damped_line_search.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/__pycache__/test_damped_line_search.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/__pycache__/test_damped_line_search.cpython-38.opt-2.pyc' => './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/__pycache__/test_damped_line_search.cpython-38.opt-1.pyc' './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/__pycache__/test_cubic_interpolation.cpython-38.opt-2.pyc' => './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/__pycache__/test_cubic_interpolation.cpython-38.opt-1.pyc' './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/__pycache__/test_backtracking_search.cpython-38.opt-2.pyc' => './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/__pycache__/test_backtracking_search.cpython-38.opt-1.pyc' './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/__pycache__/test_adaptive_last_step_modifier.cpython-38.opt-2.pyc' => './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/__pycache__/test_adaptive_last_step_modifier.cpython-38.opt-1.pyc' './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/helpers/__pycache__/quadratic.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/helpers/__pycache__/quadratic.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/helpers/__pycache__/levenberg_marquardt.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/helpers/__pycache__/levenberg_marquardt.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/helpers/__pycache__/finite_difference.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/helpers/__pycache__/finite_difference.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/helpers/__pycache__/__init__.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/helpers/__pycache__/__init__.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/helpers/tests/__pycache__/test_quadratic.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/helpers/tests/__pycache__/test_quadratic.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/helpers/tests/__pycache__/test_quadratic.cpython-38.opt-2.pyc' => './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/helpers/tests/__pycache__/test_quadratic.cpython-38.opt-1.pyc' './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/helpers/tests/__pycache__/test_levenberg_marquardt.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/helpers/tests/__pycache__/test_levenberg_marquardt.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/helpers/tests/__pycache__/test_levenberg_marquardt.cpython-38.opt-2.pyc' => './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/helpers/tests/__pycache__/test_levenberg_marquardt.cpython-38.opt-1.pyc' './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/helpers/tests/__pycache__/test_finite_difference.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/helpers/tests/__pycache__/test_finite_difference.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/helpers/tests/__pycache__/test_finite_difference.cpython-38.opt-2.pyc' => './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/helpers/tests/__pycache__/test_finite_difference.cpython-38.opt-1.pyc' './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/criterion/__pycache__/information_criteria.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/criterion/__pycache__/information_criteria.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/criterion/__pycache__/facilities.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/criterion/__pycache__/facilities.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/criterion/__pycache__/criteria.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/criterion/__pycache__/criteria.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/criterion/__pycache__/composite_criteria.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/criterion/__pycache__/composite_criteria.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/criterion/__pycache__/__init__.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/criterion/__pycache__/__init__.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/criterion/tests/__pycache__/test_information_criteria.cpython-38.opt-2.pyc' => './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/criterion/tests/__pycache__/test_information_criteria.cpython-38.opt-1.pyc' './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/criterion/tests/__pycache__/test_facilities.cpython-38.opt-2.pyc' => './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/criterion/tests/__pycache__/test_facilities.cpython-38.opt-1.pyc' './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/criterion/tests/__pycache__/test_criteria.cpython-38.opt-2.pyc' => './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/criterion/tests/__pycache__/test_criteria.cpython-38.opt-1.pyc' './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/criterion/tests/__pycache__/test_composite_criteria.cpython-38.opt-2.pyc' => './usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/criterion/tests/__pycache__/test_composite_criteria.cpython-38.opt-1.pyc' './usr/lib/python3/site-packages/PyDSTool/PyCont/__pycache__/__init__.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/PyCont/__pycache__/__init__.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/PyCont/__pycache__/__init__.cpython-38.opt-2.pyc' => './usr/lib/python3/site-packages/PyDSTool/PyCont/__pycache__/__init__.cpython-38.opt-1.pyc' './usr/lib/python3/site-packages/PyDSTool/PyCont/__pycache__/TestFunc.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/PyCont/__pycache__/TestFunc.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/PyCont/__pycache__/Plotting.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/PyCont/__pycache__/Plotting.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/PyCont/__pycache__/BifPoint.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/PyCont/__pycache__/BifPoint.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/PyCont/auto/dev/__pycache__/setup.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/PyCont/auto/dev/__pycache__/setup.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/PyCont/auto/dev/__pycache__/setup.cpython-38.opt-2.pyc' => './usr/lib/python3/site-packages/PyDSTool/PyCont/auto/dev/__pycache__/setup.cpython-38.opt-1.pyc' './usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/messagecodes.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/messagecodes.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/allimports.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/allimports.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/allimports.cpython-38.opt-2.pyc' => './usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/allimports.cpython-38.opt-1.pyc' './usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/Vode_ODEsystem.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/Vode_ODEsystem.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/Euler_ODEsystem.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/Euler_ODEsystem.cpython-38.pyc' './usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/DDEsystem.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/DDEsystem.cpython-38.pyc' Hardlinking identical .pyc and .pyo files Processing files: python3-module-PyDSTool-0.88.121202-alt4 Finding Provides (using /usr/lib/rpm/find-provides) Executing: /bin/sh -e /usr/src/tmp/rpm-tmp.BJ7R8c find-provides: running scripts (alternatives,debuginfo,lib,pam,perl,pkgconfig,python,python3,shell) Finding Requires (using /usr/lib/rpm/find-requires) Executing: /bin/sh -e /usr/src/tmp/rpm-tmp.fh3q4a find-requires: running scripts (cpp,debuginfo,files,lib,pam,perl,pkgconfig,pkgconfiglib,python,python3,rpmlib,shebang,shell,static,symlinks,systemd-services) In file included from /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/integrator/memory.h:4: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/integrator/integration.h:7:10: fatal error: Python.h: No such file or directory 7 | #include "Python.h" | ^~~~~~~~~~ compilation terminated. cpp.req: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/integrator/memory.h: cpp failed, trying c++ mode i586-alt-linux-cpp: fatal error: cannot execute 'cc1plus': execvp: No such file or directory compilation terminated. cpp.req: WARNING: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/integrator/memory.h: cpp failed In file included from /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/integrator/memory.h:4, from /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/integrator/dop853mod.h:9: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/integrator/integration.h:7:10: fatal error: Python.h: No such file or directory 7 | #include "Python.h" | ^~~~~~~~~~ compilation terminated. cpp.req: WARNING: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/integrator/dop853mod.h: cpp failed In file included from /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/integrator/memory.h:4, from /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/integrator/interface.h:8: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/integrator/integration.h:7:10: fatal error: Python.h: No such file or directory 7 | #include "Python.h" | ^~~~~~~~~~ compilation terminated. cpp.req: WARNING: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/integrator/interface.h: cpp failed In file included from /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/integrator/memory.h:4, from /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/integrator/radau5mod.h:9: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/integrator/integration.h:7:10: fatal error: Python.h: No such file or directory 7 | #include "Python.h" | ^~~~~~~~~~ compilation terminated. cpp.req: WARNING: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/integrator/radau5mod.h: cpp failed /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/integrator/integration.h:7:10: fatal error: Python.h: No such file or directory 7 | #include "Python.h" | ^~~~~~~~~~ compilation terminated. cpp.req: WARNING: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/integrator/integration.h: cpp failed In file included from /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/integrator/eventFinding.h:6: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/integrator/integration.h:7:10: fatal error: Python.h: No such file or directory 7 | #include "Python.h" | ^~~~~~~~~~ compilation terminated. cpp.req: WARNING: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/integrator/eventFinding.h: cpp failed /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/auto/module/include/automod.h:4:10: fatal error: Python.h: No such file or directory 4 | #include "Python.h" | ^~~~~~~~~~ compilation terminated. cpp.req: WARNING: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/auto/module/include/automod.h: cpp failed /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/auto/module/include/interface.h:4:10: fatal error: auto_f2c.h: No such file or directory 4 | #include "auto_f2c.h" | ^~~~~~~~~~~~ compilation terminated. cpp.req: WARNING: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/auto/module/include/interface.h: cpp failed /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Events.py: line=12 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Events.py: line=13 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Events.py: line=14 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Events.py: line=15 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Events.py: line=16 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Events.py: line=17 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Events.py: line=18 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Events.py: line=19 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Events.py: line=20 possible relative import from ., UNIMPLEMENTED python3.req: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Events.py: skipping scipy python3.req: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Events.py: skipping scipy /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/FuncSpec.py: line=12 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/FuncSpec.py: line=13 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/FuncSpec.py: line=14 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/FuncSpec.py: line=15 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/FuncSpec.py: line=16 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/FuncSpec.py: line=17 possible relative import from ., UNIMPLEMENTED python3.req: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/FuncSpec.py: skipping scipy /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/ADMC_ODEsystem.py: line=4 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/ADMC_ODEsystem.py: line=6 possible relative import from ., UNIMPLEMENTED python3.req: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/ADMC_ODEsystem.py: skipping sys python3.req: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/ADMC_ODEsystem.py: skipping gc python3.req: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/ADMC_ODEsystem.py: skipping time /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/DDEsystem.py: line=3 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/DDEsystem.py: line=4 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/DDEsystem.py: line=14 IGNORE (for REQ=slight and deep=8) module=psyco /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/Dopri_ODEsystem.py: line=4 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/Dopri_ODEsystem.py: line=6 possible relative import from ., UNIMPLEMENTED python3.req: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/Dopri_ODEsystem.py: skipping sys python3.req: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/Dopri_ODEsystem.py: skipping gc python3.req: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/Dopri_ODEsystem.py: skipping time /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/Dopri_ODEsystem.py: line=49 UNABLE to determine the imported name at parse-time: modname /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/Dopri_ODEsystem.py: line=49 a form of __import__ was read which gave no deps: [274, [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, '__import__', 49]], [327, [7, '(', 49], [335, [336, [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, 'modname', 49]]]]]]]]]]]]]]]]], [12, ',', 49], [336, [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, 'globals', 49]], [327, [7, '(', 49], [8, ')', 49]]]]]]]]]]]]]]]]]], [8, ')', 49]]]]]]]]]]]]]]]]] /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/Dopri_ODEsystem.py: line=49 UNABLE to determine the imported name at parse-time: modname /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/Dopri_ODEsystem.py: line=49 a form of __import__ was read which gave no deps: [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, '__import__', 49]], [327, [7, '(', 49], [335, [336, [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, 'modname', 49]]]]]]]]]]]]]]]]], [12, ',', 49], [336, [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, 'globals', 49]], [327, [7, '(', 49], [8, ')', 49]]]]]]]]]]]]]]]]]], [8, ')', 49]]]]]]]]]]]]]]]] /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/Dopri_ODEsystem.py: line=49 UNABLE to determine the imported name at parse-time: modname /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/Dopri_ODEsystem.py: line=49 a form of __import__ was read which gave no deps: [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, '__import__', 49]], [327, [7, '(', 49], [335, [336, [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, 'modname', 49]]]]]]]]]]]]]]]]], [12, ',', 49], [336, [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, 'globals', 49]], [327, [7, '(', 49], [8, ')', 49]]]]]]]]]]]]]]]]]], [8, ')', 49]]]]]]]]]]]]]]] /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/Dopri_ODEsystem.py: line=49 UNABLE to determine the imported name at parse-time: modname /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/Dopri_ODEsystem.py: line=49 a form of __import__ was read which gave no deps: [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, '__import__', 49]], [327, [7, '(', 49], [335, [336, [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, 'modname', 49]]]]]]]]]]]]]]]]], [12, ',', 49], [336, [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, 'globals', 49]], [327, [7, '(', 49], [8, ')', 49]]]]]]]]]]]]]]]]]], [8, ')', 49]]]]]]]]]]]]]] /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/Dopri_ODEsystem.py: line=49 UNABLE to determine the imported name at parse-time: modname /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/Dopri_ODEsystem.py: line=49 a form of __import__ was read which gave no deps: [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, '__import__', 49]], [327, [7, '(', 49], [335, [336, [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, 'modname', 49]]]]]]]]]]]]]]]]], [12, ',', 49], [336, [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, 'globals', 49]], [327, [7, '(', 49], [8, ')', 49]]]]]]]]]]]]]]]]]], [8, ')', 49]]]]]]]]]]]]] /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/Dopri_ODEsystem.py: line=49 UNABLE to determine the imported name at parse-time: modname /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/Dopri_ODEsystem.py: line=49 a form of __import__ was read which gave no deps: [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, '__import__', 49]], [327, [7, '(', 49], [335, [336, [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, 'modname', 49]]]]]]]]]]]]]]]]], [12, ',', 49], [336, [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, 'globals', 49]], [327, [7, '(', 49], [8, ')', 49]]]]]]]]]]]]]]]]]], [8, ')', 49]]]]]]]]]]]] /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/Dopri_ODEsystem.py: line=49 UNABLE to determine the imported name at parse-time: modname /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/Dopri_ODEsystem.py: line=49 a form of __import__ was read which gave no deps: [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, '__import__', 49]], [327, [7, '(', 49], [335, [336, [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, 'modname', 49]]]]]]]]]]]]]]]]], [12, ',', 49], [336, [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, 'globals', 49]], [327, [7, '(', 49], [8, ')', 49]]]]]]]]]]]]]]]]]], [8, ')', 49]]]]]]]]]]] /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/Dopri_ODEsystem.py: line=49 UNABLE to determine the imported name at parse-time: modname /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/Dopri_ODEsystem.py: line=49 a form of __import__ was read which gave no deps: [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, '__import__', 49]], [327, [7, '(', 49], [335, [336, [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, 'modname', 49]]]]]]]]]]]]]]]]], [12, ',', 49], [336, [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, 'globals', 49]], [327, [7, '(', 49], [8, ')', 49]]]]]]]]]]]]]]]]]], [8, ')', 49]]]]]]]]]] /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/Dopri_ODEsystem.py: line=49 UNABLE to determine the imported name at parse-time: modname /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/Dopri_ODEsystem.py: line=49 a form of __import__ was read which gave no deps: [318, [319, [320, [321, [322, [323, [324, [325, [1, '__import__', 49]], [327, [7, '(', 49], [335, [336, [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, 'modname', 49]]]]]]]]]]]]]]]]], [12, ',', 49], [336, [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, 'globals', 49]], [327, [7, '(', 49], [8, ')', 49]]]]]]]]]]]]]]]]]], [8, ')', 49]]]]]]]]] /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/Dopri_ODEsystem.py: line=49 UNABLE to determine the imported name at parse-time: modname /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/Dopri_ODEsystem.py: line=49 a form of __import__ was read which gave no deps: [319, [320, [321, [322, [323, [324, [325, [1, '__import__', 49]], [327, [7, '(', 49], [335, [336, [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, 'modname', 49]]]]]]]]]]]]]]]]], [12, ',', 49], [336, [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, 'globals', 49]], [327, [7, '(', 49], [8, ')', 49]]]]]]]]]]]]]]]]]], [8, ')', 49]]]]]]]] /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/Dopri_ODEsystem.py: line=49 UNABLE to determine the imported name at parse-time: modname /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/Dopri_ODEsystem.py: line=49 a form of __import__ was read which gave no deps: [320, [321, [322, [323, [324, [325, [1, '__import__', 49]], [327, [7, '(', 49], [335, [336, [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, 'modname', 49]]]]]]]]]]]]]]]]], [12, ',', 49], [336, [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, 'globals', 49]], [327, [7, '(', 49], [8, ')', 49]]]]]]]]]]]]]]]]]], [8, ')', 49]]]]]]] /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/Dopri_ODEsystem.py: line=49 UNABLE to determine the imported name at parse-time: modname /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/Dopri_ODEsystem.py: line=49 a form of __import__ was read which gave no deps: [321, [322, [323, [324, [325, [1, '__import__', 49]], [327, [7, '(', 49], [335, [336, [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, 'modname', 49]]]]]]]]]]]]]]]]], [12, ',', 49], [336, [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, 'globals', 49]], [327, [7, '(', 49], [8, ')', 49]]]]]]]]]]]]]]]]]], [8, ')', 49]]]]]] /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/Dopri_ODEsystem.py: line=49 UNABLE to determine the imported name at parse-time: modname /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/Dopri_ODEsystem.py: line=49 a form of __import__ was read which gave no deps: [322, [323, [324, [325, [1, '__import__', 49]], [327, [7, '(', 49], [335, [336, [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, 'modname', 49]]]]]]]]]]]]]]]]], [12, ',', 49], [336, [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, 'globals', 49]], [327, [7, '(', 49], [8, ')', 49]]]]]]]]]]]]]]]]]], [8, ')', 49]]]]] /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/Dopri_ODEsystem.py: line=49 UNABLE to determine the imported name at parse-time: modname /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/Dopri_ODEsystem.py: line=49 a form of __import__ was read which gave no deps: [323, [324, [325, [1, '__import__', 49]], [327, [7, '(', 49], [335, [336, [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, 'modname', 49]]]]]]]]]]]]]]]]], [12, ',', 49], [336, [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, 'globals', 49]], [327, [7, '(', 49], [8, ')', 49]]]]]]]]]]]]]]]]]], [8, ')', 49]]]] /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/Dopri_ODEsystem.py: line=49 UNABLE to determine the imported name at parse-time: modname /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/Dopri_ODEsystem.py: line=49 a form of __import__ was read which gave no deps: [324, [325, [1, '__import__', 49]], [327, [7, '(', 49], [335, [336, [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, 'modname', 49]]]]]]]]]]]]]]]]], [12, ',', 49], [336, [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, 'globals', 49]], [327, [7, '(', 49], [8, ')', 49]]]]]]]]]]]]]]]]]], [8, ')', 49]]] /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/EmbeddedSysGen.py: line=4 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/EmbeddedSysGen.py: line=5 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/EmbeddedSysGen.py: line=17 IGNORE (for REQ=slight and deep=8) module=psyco /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/Euler_ODEsystem.py: line=5 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/Euler_ODEsystem.py: line=7 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/Euler_ODEsystem.py: line=15 IGNORE (for REQ=slight and deep=8) module=numpy /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/Euler_ODEsystem.py: line=18 IGNORE (for REQ=slight and deep=8) module=numpy python3.req: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/Euler_ODEsystem.py: skipping sys python3.req: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/Euler_ODEsystem.py: skipping gc /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/Euler_ODEsystem.py: line=26 IGNORE (for REQ=slight and deep=8) module=psyco /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/ExplicitFnGen.py: line=4 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/ExplicitFnGen.py: line=5 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/ExplicitFnGen.py: line=18 IGNORE (for REQ=slight and deep=8) module=psyco /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/ExtrapolateTable.py: line=4 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/ExtrapolateTable.py: line=5 possible relative import from ., UNIMPLEMENTED python3.req: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/ExtrapolateTable.py: skipping scipy /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/ImplicitFnGen.py: line=4 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/ImplicitFnGen.py: line=5 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/ImplicitFnGen.py: line=17 IGNORE (for REQ=slight and deep=8) module=psyco /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/InterpolateTable.py: line=4 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/InterpolateTable.py: line=5 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/LookupTable.py: line=4 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/LookupTable.py: line=5 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/MapSystem.py: line=8 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/MapSystem.py: line=9 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/MapSystem.py: line=24 IGNORE (for REQ=slight and deep=8) module=psyco /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/ODEsystem.py: line=3 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/ODEsystem.py: line=4 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/ODEsystem.py: line=20 IGNORE (for REQ=slight and deep=8) module=psyco /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/Radau_ODEsystem.py: line=4 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/Radau_ODEsystem.py: line=6 possible relative import from ., UNIMPLEMENTED python3.req: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/Radau_ODEsystem.py: skipping sys python3.req: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/Radau_ODEsystem.py: skipping gc /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/Radau_ODEsystem.py: line=49 UNABLE to determine the imported name at parse-time: modname /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/Radau_ODEsystem.py: line=49 a form of __import__ was read which gave no deps: [274, [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, '__import__', 49]], [327, [7, '(', 49], [335, [336, [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, 'modname', 49]]]]]]]]]]]]]]]]], [12, ',', 49], [336, [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, 'globals', 49]], [327, [7, '(', 49], [8, ')', 49]]]]]]]]]]]]]]]]]], [8, ')', 49]]]]]]]]]]]]]]]]] /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/Radau_ODEsystem.py: line=49 UNABLE to determine the imported name at parse-time: modname /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/Radau_ODEsystem.py: line=49 a form of __import__ was read which gave no deps: [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, '__import__', 49]], [327, [7, '(', 49], [335, [336, [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, 'modname', 49]]]]]]]]]]]]]]]]], [12, ',', 49], [336, [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, 'globals', 49]], [327, [7, '(', 49], [8, ')', 49]]]]]]]]]]]]]]]]]], [8, ')', 49]]]]]]]]]]]]]]]] /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/Radau_ODEsystem.py: line=49 UNABLE to determine the imported name at parse-time: modname /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/Radau_ODEsystem.py: line=49 a form of __import__ was read which gave no deps: [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, '__import__', 49]], [327, [7, '(', 49], [335, [336, [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, 'modname', 49]]]]]]]]]]]]]]]]], [12, ',', 49], [336, [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, 'globals', 49]], [327, [7, '(', 49], [8, ')', 49]]]]]]]]]]]]]]]]]], [8, ')', 49]]]]]]]]]]]]]]] /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/Radau_ODEsystem.py: line=49 UNABLE to determine the imported name at parse-time: modname /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/Radau_ODEsystem.py: line=49 a form of __import__ was read which gave no deps: [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, '__import__', 49]], [327, [7, '(', 49], [335, [336, [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, 'modname', 49]]]]]]]]]]]]]]]]], [12, ',', 49], [336, [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, 'globals', 49]], [327, [7, '(', 49], [8, ')', 49]]]]]]]]]]]]]]]]]], [8, ')', 49]]]]]]]]]]]]]] /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/Radau_ODEsystem.py: line=49 UNABLE to determine the imported name at parse-time: modname /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/Radau_ODEsystem.py: line=49 a form of __import__ was read which gave no deps: [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, '__import__', 49]], [327, [7, '(', 49], [335, [336, [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, 'modname', 49]]]]]]]]]]]]]]]]], [12, ',', 49], [336, [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, 'globals', 49]], [327, [7, '(', 49], [8, ')', 49]]]]]]]]]]]]]]]]]], [8, ')', 49]]]]]]]]]]]]] /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/Radau_ODEsystem.py: line=49 UNABLE to determine the imported name at parse-time: modname /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/Radau_ODEsystem.py: line=49 a form of __import__ was read which gave no deps: [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, '__import__', 49]], [327, [7, '(', 49], [335, [336, [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, 'modname', 49]]]]]]]]]]]]]]]]], [12, ',', 49], [336, [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, 'globals', 49]], [327, [7, '(', 49], [8, ')', 49]]]]]]]]]]]]]]]]]], [8, ')', 49]]]]]]]]]]]] /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/Radau_ODEsystem.py: line=49 UNABLE to determine the imported name at parse-time: modname /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/Radau_ODEsystem.py: line=49 a form of __import__ was read which gave no deps: [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, '__import__', 49]], [327, [7, '(', 49], [335, [336, [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, 'modname', 49]]]]]]]]]]]]]]]]], [12, ',', 49], [336, [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, 'globals', 49]], [327, [7, '(', 49], [8, ')', 49]]]]]]]]]]]]]]]]]], [8, ')', 49]]]]]]]]]]] /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/Radau_ODEsystem.py: line=49 UNABLE to determine the imported name at parse-time: modname /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/Radau_ODEsystem.py: line=49 a form of __import__ was read which gave no deps: [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, '__import__', 49]], [327, [7, '(', 49], [335, [336, [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, 'modname', 49]]]]]]]]]]]]]]]]], [12, ',', 49], [336, [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, 'globals', 49]], [327, [7, '(', 49], [8, ')', 49]]]]]]]]]]]]]]]]]], [8, ')', 49]]]]]]]]]] /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/Radau_ODEsystem.py: line=49 UNABLE to determine the imported name at parse-time: modname /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/Radau_ODEsystem.py: line=49 a form of __import__ was read which gave no deps: [318, [319, [320, [321, [322, [323, [324, [325, [1, '__import__', 49]], [327, [7, '(', 49], [335, [336, [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, 'modname', 49]]]]]]]]]]]]]]]]], [12, ',', 49], [336, [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, 'globals', 49]], [327, [7, '(', 49], [8, ')', 49]]]]]]]]]]]]]]]]]], [8, ')', 49]]]]]]]]] /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/Radau_ODEsystem.py: line=49 UNABLE to determine the imported name at parse-time: modname /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/Radau_ODEsystem.py: line=49 a form of __import__ was read which gave no deps: [319, [320, [321, [322, [323, [324, [325, [1, '__import__', 49]], [327, [7, '(', 49], [335, [336, [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, 'modname', 49]]]]]]]]]]]]]]]]], [12, ',', 49], [336, [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, 'globals', 49]], [327, [7, '(', 49], [8, ')', 49]]]]]]]]]]]]]]]]]], [8, ')', 49]]]]]]]] /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/Radau_ODEsystem.py: line=49 UNABLE to determine the imported name at parse-time: modname /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/Radau_ODEsystem.py: line=49 a form of __import__ was read which gave no deps: [320, [321, [322, [323, [324, [325, [1, '__import__', 49]], [327, [7, '(', 49], [335, [336, [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, 'modname', 49]]]]]]]]]]]]]]]]], [12, ',', 49], [336, [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, 'globals', 49]], [327, [7, '(', 49], [8, ')', 49]]]]]]]]]]]]]]]]]], [8, ')', 49]]]]]]] /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/Radau_ODEsystem.py: line=49 UNABLE to determine the imported name at parse-time: modname /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/Radau_ODEsystem.py: line=49 a form of __import__ was read which gave no deps: [321, [322, [323, [324, [325, [1, '__import__', 49]], [327, [7, '(', 49], [335, [336, [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, 'modname', 49]]]]]]]]]]]]]]]]], [12, ',', 49], [336, [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, 'globals', 49]], [327, [7, '(', 49], [8, ')', 49]]]]]]]]]]]]]]]]]], [8, ')', 49]]]]]] /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/Radau_ODEsystem.py: line=49 UNABLE to determine the imported name at parse-time: modname /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/Radau_ODEsystem.py: line=49 a form of __import__ was read which gave no deps: [322, [323, [324, [325, [1, '__import__', 49]], [327, [7, '(', 49], [335, [336, [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, 'modname', 49]]]]]]]]]]]]]]]]], [12, ',', 49], [336, [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, 'globals', 49]], [327, [7, '(', 49], [8, ')', 49]]]]]]]]]]]]]]]]]], [8, ')', 49]]]]] /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/Radau_ODEsystem.py: line=49 UNABLE to determine the imported name at parse-time: modname /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/Radau_ODEsystem.py: line=49 a form of __import__ was read which gave no deps: [323, [324, [325, [1, '__import__', 49]], [327, [7, '(', 49], [335, [336, [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, 'modname', 49]]]]]]]]]]]]]]]]], [12, ',', 49], [336, [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, 'globals', 49]], [327, [7, '(', 49], [8, ')', 49]]]]]]]]]]]]]]]]]], [8, ')', 49]]]] /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/Radau_ODEsystem.py: line=49 UNABLE to determine the imported name at parse-time: modname /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/Radau_ODEsystem.py: line=49 a form of __import__ was read which gave no deps: [324, [325, [1, '__import__', 49]], [327, [7, '(', 49], [335, [336, [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, 'modname', 49]]]]]]]]]]]]]]]]], [12, ',', 49], [336, [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, 'globals', 49]], [327, [7, '(', 49], [8, ')', 49]]]]]]]]]]]]]]]]]], [8, ')', 49]]] /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/Vode_ODEsystem.py: line=6 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/Vode_ODEsystem.py: line=8 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/Vode_ODEsystem.py: line=17 IGNORE (for REQ=slight and deep=8) module=numpy /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/Vode_ODEsystem.py: line=20 IGNORE (for REQ=slight and deep=8) module=numpy python3.req: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/Vode_ODEsystem.py: skipping sys python3.req: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/Vode_ODEsystem.py: skipping gc /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/__init__.py: line=6 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/__init__.py: line=7 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/__init__.py: line=8 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/__init__.py: line=9 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/__init__.py: line=10 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/__init__.py: line=11 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/__init__.py: line=12 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/__init__.py: line=13 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/__init__.py: line=14 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/__init__.py: line=15 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/__init__.py: line=16 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/__init__.py: line=17 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/__init__.py: line=18 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/__init__.py: line=19 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/allimports.py: line=13 possible relative import from ., UNIMPLEMENTED python3.req: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/allimports.py: skipping scipy /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/baseclasses.py: line=4 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Generator/baseclasses.py: line=21 IGNORE (for REQ=slight and deep=8) module=psyco /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Interval.py: line=20 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Interval.py: line=21 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Interval.py: line=22 possible relative import from ., UNIMPLEMENTED python3.req: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/MProject.py: skipping sys /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/MProject.py: line=13 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/MProject.py: line=15 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/MProject.py: line=16 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Model.py: line=39 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Model.py: line=40 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Model.py: line=41 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Model.py: line=42 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Model.py: line=43 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Model.py: line=44 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Model.py: line=45 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Model.py: line=46 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Model.py: line=47 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Model.py: line=48 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Model.py: line=49 possible relative import from ., UNIMPLEMENTED python3.req: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Model.py: skipping sys python3.req: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Model.py: skipping time /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/ModelConstructor.py: line=36 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/ModelConstructor.py: line=37 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/ModelConstructor.py: line=38 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/ModelConstructor.py: line=39 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/ModelConstructor.py: line=40 possible relative import from ., UNIMPLEMENTED python3.req: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/ModelConstructor.py: skipping scipy python3.req: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/ModelConstructor.py: skipping sys /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/ModelSpec.py: line=16 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/ModelSpec.py: line=17 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/ModelSpec.py: line=18 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/ModelSpec.py: line=19 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/ModelSpec.py: line=20 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/ModelSpec.py: line=23 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Points.py: line=13 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Points.py: line=14 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Points.py: line=15 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Points.py: line=16 possible relative import from ., UNIMPLEMENTED python3.req: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Points.py: skipping sys /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Points.py: line=2568 IGNORE (for REQ=slight and deep=8) module=csv /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/BifPoint.py: line=6 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/BifPoint.py: line=8 possible relative import from ., UNIMPLEMENTED python3.req: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/BifPoint.py: skipping scipy /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/ContClass.py: line=6 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/ContClass.py: line=8 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/ContClass.py: line=9 possible relative import from ., UNIMPLEMENTED python3.req: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/ContClass.py: skipping scipy python3.req: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/ContClass.py: skipping sys /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/ContClass.py: line=414 IGNORE (for REQ=slight and deep=16) module=auto /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/ContClass.py: line=414 IGNORE (for REQ=slight and deep=17) module=auto /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/ContClass.py: line=414 IGNORE (for REQ=slight and deep=18) module=auto /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/ContClass.py: line=414 IGNORE (for REQ=slight and deep=19) module=auto /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/ContClass.py: line=414 IGNORE (for REQ=slight and deep=20) module=auto /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/ContClass.py: line=414 IGNORE (for REQ=slight and deep=21) module=auto /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/ContClass.py: line=414 IGNORE (for REQ=slight and deep=22) module=auto /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/ContClass.py: line=414 IGNORE (for REQ=slight and deep=23) module=auto /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/ContClass.py: line=414 IGNORE (for REQ=slight and deep=24) module=auto /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/ContClass.py: line=414 IGNORE (for REQ=slight and deep=25) module=auto /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/ContClass.py: line=414 IGNORE (for REQ=slight and deep=26) module=auto /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/ContClass.py: line=414 IGNORE (for REQ=slight and deep=27) module=auto /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/ContClass.py: line=414 IGNORE (for REQ=slight and deep=28) module=auto /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/ContClass.py: line=414 IGNORE (for REQ=slight and deep=29) module=auto /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/ContClass.py: line=414 IGNORE (for REQ=slight and deep=30) module=auto /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/Continuation.py: line=12 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/Continuation.py: line=13 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/Continuation.py: line=14 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/Continuation.py: line=15 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/Continuation.py: line=22 IGNORE (for REQ=slight and deep=8) module=PyDSTool.matplotlib_import /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/Continuation.py: line=24 IGNORE (for REQ=slight and deep=8) module=PyDSTool.matplotlib_unavailable python3.req: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/Continuation.py: skipping scipy /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/TestFunc.py: line=22 possible relative import from ., UNIMPLEMENTED python3.req: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/TestFunc.py: skipping scipy /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/__init__.py: line=1 possible relative import from ., UNIMPLEMENTED python3.req: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/misc.py: skipping time python3.req: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/misc.py: skipping scipy python3.req: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Redirector.py: skipping sys python3.req: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Symbolic.py: skipping sys /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Symbolic.py: line=61 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Symbolic.py: line=62 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Symbolic.py: line=63 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Symbolic.py: line=64 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Symbolic.py: line=65 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Symbolic.py: line=68 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Symbolic.py: line=423 possible relative import from ., UNIMPLEMENTED python3.req: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/ActivationFuncs.py: skipping time /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/DSSRT_tools.py: line=15 possible relative import from ., UNIMPLEMENTED python3.req: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/ModelHelper.py: skipping time python3.req: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/NineML.py: skipping scipy python3.req: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/NineML.py: skipping sys /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/NineML.py: line=34 IGNORE (for REQ=slight and deep=8) module=nineml.abstraction_layer /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/ParamEst.py: line=22 IGNORE (for REQ=slight and deep=8) module=constraint python3.req: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/ParamEst.py: skipping sys /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/ParamEst.py: line=50 IGNORE (for REQ=slight and deep=8) module=psyco python3.req: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/PySCes_SBML.py: skipping scipy python3.req: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/PySCes_SBML.py: skipping sys /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/PySCes_SBML.py: line=34 IGNORE (for REQ=slight and deep=8) module=pysces /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/data_analysis.py: line=23 IGNORE (for REQ=slight and deep=8) module=mdp.nodes python3.req: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/dssrt.py: skipping scipy /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/dssrt.py: line=1898 IGNORE (for REQ=slight and deep=8) module=PyDSTool.matplotlib_import python3.req: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/fracdim.py: skipping matplotlib python3.req: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/fracdim.py: skipping time /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/__init__.py: line=11 IGNORE (for REQ=slight and deep=8) module=sys /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/__init__.py: line=12 IGNORE (for REQ=slight and deep=8) module=os.path /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/__init__.py: line=17 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/__init__.py: line=18 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/__init__.py: line=19 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/__init__.py: line=20 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/__init__.py: line=21 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/__init__.py: line=22 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/__init__.py: line=27 IGNORE (for REQ=slight and deep=8) module=numpy.testing /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/__init__.py: line=31 IGNORE (for REQ=slight and deep=8) module=numpy.testing /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/criterion/__init__.py: line=41 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/criterion/__init__.py: line=42 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/criterion/__init__.py: line=43 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/criterion/__init__.py: line=44 possible relative import from ., UNIMPLEMENTED python3.req: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/criterion/composite_criteria.py: skipping sys /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/criterion/facilities.py: line=11 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/criterion/facilities.py: line=12 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/helpers/__init__.py: line=18 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/helpers/__init__.py: line=20 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/helpers/levenberg_marquardt.py: line=5 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__init__.py: line=38 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__init__.py: line=39 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__init__.py: line=40 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__init__.py: line=41 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__init__.py: line=43 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__init__.py: line=44 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__init__.py: line=45 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__init__.py: line=47 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__init__.py: line=48 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__init__.py: line=49 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__init__.py: line=50 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__init__.py: line=52 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__init__.py: line=53 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__init__.py: line=55 possible relative import from ., UNIMPLEMENTED python3.req: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/barzilai_borwein_non_monotone_search.py: skipping sys python3.req: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/barzilai_borwein_search.py: skipping sys /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/optimizer/__init__.py: line=19 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/optimizer/__init__.py: line=20 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/optimizer/standard_optimizer.py: line=9 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/optimizer/standard_optimizer_modifying.py: line=9 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/__init__.py: line=46 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/__init__.py: line=47 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/__init__.py: line=49 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/__init__.py: line=50 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/__init__.py: line=51 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/__init__.py: line=52 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/__init__.py: line=53 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/__init__.py: line=55 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/__init__.py: line=56 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/__init__.py: line=58 possible relative import from ., UNIMPLEMENTED python3.req: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/phaseplane.py: skipping itertools /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/phaseplane.py: line=32 IGNORE (for REQ=slight and deep=8) module=numpy /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/phaseplane.py: line=35 IGNORE (for REQ=slight and deep=8) module=numpy python3.req: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/phaseplane.py: skipping scipy python3.req: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/phaseplane.py: skipping sys python3.req: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/prep_boxplot.py: skipping scipy /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Trajectory.py: line=9 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Trajectory.py: line=10 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Trajectory.py: line=11 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Trajectory.py: line=12 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Trajectory.py: line=13 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Trajectory.py: line=14 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Trajectory.py: line=15 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Trajectory.py: line=16 possible relative import from ., UNIMPLEMENTED python3.req: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Trajectory.py: skipping sys /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Variable.py: line=9 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Variable.py: line=10 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Variable.py: line=11 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Variable.py: line=12 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Variable.py: line=13 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Variable.py: line=14 possible relative import from ., UNIMPLEMENTED python3.req: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/__init__.py: skipping sys python3.req: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/__init__.py: skipping gc /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/__init__.py: line=53 IGNORE (for REQ=slight and deep=8) module=scipy python3.req: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/__init__.py: skipping time /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/__init__.py: line=86 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/__init__.py: line=87 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/__init__.py: line=88 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/__init__.py: line=89 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/__init__.py: line=90 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/__init__.py: line=91 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/__init__.py: line=93 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/__init__.py: line=94 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/__init__.py: line=95 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/__init__.py: line=97 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/__init__.py: line=98 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/__init__.py: line=99 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/__init__.py: line=102 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/__init__.py: line=103 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/__init__.py: line=104 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/__init__.py: line=105 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/__init__.py: line=106 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/__init__.py: line=107 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/__init__.py: line=108 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/__init__.py: line=110 possible relative import from ., UNIMPLEMENTED python3.req: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/__init__.py: skipping scipy python3.req: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/__init__.py: skipping matplotlib /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/__init__.py: line=128 possible relative import from ., UNIMPLEMENTED python3.req: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/__init__.py: skipping scipy /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/__init__.py: line=134 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/common.py: line=7 possible relative import from ., UNIMPLEMENTED python3.req: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/common.py: skipping sys python3.req: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/common.py: skipping scipy /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/common.py: line=25 IGNORE (for REQ=slight and deep=8) module=numpy /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/common.py: line=33 IGNORE (for REQ=slight and deep=8) module=numpy python3.req: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/common.py: skipping time /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/common.py: line=45 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/common.py: line=47 IGNORE (for REQ=slight and deep=8) module=pickle python3.req: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/conf.py: skipping sys python3.req: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/fixedpickle.py: skipping marshal python3.req: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/fixedpickle.py: skipping sys /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/fixedpickle.py: line=92 IGNORE (for REQ=slight and deep=8) module=org.python.core /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/fixedpickle.py: line=764 UNABLE to determine the imported name at parse-time: module /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/fixedpickle.py: line=764 a form of __import__ was read which gave no deps: [269, [270, [271, [272, [274, [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, '__import__', 764]], [327, [7, '(', 764], [335, [336, [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, 'module', 764]]]]]]]]]]]]]]]]]], [8, ')', 764]]]]]]]]]]]]]]]]]]], [4, '', 764]]] /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/fixedpickle.py: line=764 UNABLE to determine the imported name at parse-time: module /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/fixedpickle.py: line=764 a form of __import__ was read which gave no deps: [270, [271, [272, [274, [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, '__import__', 764]], [327, [7, '(', 764], [335, [336, [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, 'module', 764]]]]]]]]]]]]]]]]]], [8, ')', 764]]]]]]]]]]]]]]]]]]], [4, '', 764]] /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/fixedpickle.py: line=764 UNABLE to determine the imported name at parse-time: module /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/fixedpickle.py: line=764 a form of __import__ was read which gave no deps: [271, [272, [274, [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, '__import__', 764]], [327, [7, '(', 764], [335, [336, [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, 'module', 764]]]]]]]]]]]]]]]]]], [8, ')', 764]]]]]]]]]]]]]]]]]]] /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/fixedpickle.py: line=764 UNABLE to determine the imported name at parse-time: module /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/fixedpickle.py: line=764 a form of __import__ was read which gave no deps: [272, [274, [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, '__import__', 764]], [327, [7, '(', 764], [335, [336, [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, 'module', 764]]]]]]]]]]]]]]]]]], [8, ')', 764]]]]]]]]]]]]]]]]]] /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/fixedpickle.py: line=764 UNABLE to determine the imported name at parse-time: module /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/fixedpickle.py: line=764 a form of __import__ was read which gave no deps: [274, [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, '__import__', 764]], [327, [7, '(', 764], [335, [336, [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, 'module', 764]]]]]]]]]]]]]]]]]], [8, ')', 764]]]]]]]]]]]]]]]]] /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/fixedpickle.py: line=764 UNABLE to determine the imported name at parse-time: module /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/fixedpickle.py: line=764 a form of __import__ was read which gave no deps: [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, '__import__', 764]], [327, [7, '(', 764], [335, [336, [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, 'module', 764]]]]]]]]]]]]]]]]]], [8, ')', 764]]]]]]]]]]]]]]]] /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/fixedpickle.py: line=764 UNABLE to determine the imported name at parse-time: module /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/fixedpickle.py: line=764 a form of __import__ was read which gave no deps: [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, '__import__', 764]], [327, [7, '(', 764], [335, [336, [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, 'module', 764]]]]]]]]]]]]]]]]]], [8, ')', 764]]]]]]]]]]]]]]] /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/fixedpickle.py: line=764 UNABLE to determine the imported name at parse-time: module /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/fixedpickle.py: line=764 a form of __import__ was read which gave no deps: [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, '__import__', 764]], [327, [7, '(', 764], [335, [336, [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, 'module', 764]]]]]]]]]]]]]]]]]], [8, ')', 764]]]]]]]]]]]]]] /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/fixedpickle.py: line=764 UNABLE to determine the imported name at parse-time: module /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/fixedpickle.py: line=764 a form of __import__ was read which gave no deps: [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, '__import__', 764]], [327, [7, '(', 764], [335, [336, [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, 'module', 764]]]]]]]]]]]]]]]]]], [8, ')', 764]]]]]]]]]]]]] /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/fixedpickle.py: line=764 UNABLE to determine the imported name at parse-time: module /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/fixedpickle.py: line=764 a form of __import__ was read which gave no deps: [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, '__import__', 764]], [327, [7, '(', 764], [335, [336, [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, 'module', 764]]]]]]]]]]]]]]]]]], [8, ')', 764]]]]]]]]]]]] /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/fixedpickle.py: line=764 UNABLE to determine the imported name at parse-time: module /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/fixedpickle.py: line=764 a form of __import__ was read which gave no deps: [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, '__import__', 764]], [327, [7, '(', 764], [335, [336, [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, 'module', 764]]]]]]]]]]]]]]]]]], [8, ')', 764]]]]]]]]]]] /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/fixedpickle.py: line=764 UNABLE to determine the imported name at parse-time: module /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/fixedpickle.py: line=764 a form of __import__ was read which gave no deps: [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, '__import__', 764]], [327, [7, '(', 764], [335, [336, [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, 'module', 764]]]]]]]]]]]]]]]]]], [8, ')', 764]]]]]]]]]] /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/fixedpickle.py: line=764 UNABLE to determine the imported name at parse-time: module /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/fixedpickle.py: line=764 a form of __import__ was read which gave no deps: [318, [319, [320, [321, [322, [323, [324, [325, [1, '__import__', 764]], [327, [7, '(', 764], [335, [336, [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, 'module', 764]]]]]]]]]]]]]]]]]], [8, ')', 764]]]]]]]]] /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/fixedpickle.py: line=764 UNABLE to determine the imported name at parse-time: module /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/fixedpickle.py: line=764 a form of __import__ was read which gave no deps: [319, [320, [321, [322, [323, [324, [325, [1, '__import__', 764]], [327, [7, '(', 764], [335, [336, [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, 'module', 764]]]]]]]]]]]]]]]]]], [8, ')', 764]]]]]]]] /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/fixedpickle.py: line=764 UNABLE to determine the imported name at parse-time: module /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/fixedpickle.py: line=764 a form of __import__ was read which gave no deps: [320, [321, [322, [323, [324, [325, [1, '__import__', 764]], [327, [7, '(', 764], [335, [336, [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, 'module', 764]]]]]]]]]]]]]]]]]], [8, ')', 764]]]]]]] /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/fixedpickle.py: line=764 UNABLE to determine the imported name at parse-time: module /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/fixedpickle.py: line=764 a form of __import__ was read which gave no deps: [321, [322, [323, [324, [325, [1, '__import__', 764]], [327, [7, '(', 764], [335, [336, [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, 'module', 764]]]]]]]]]]]]]]]]]], [8, ')', 764]]]]]] /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/fixedpickle.py: line=764 UNABLE to determine the imported name at parse-time: module /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/fixedpickle.py: line=764 a form of __import__ was read which gave no deps: [322, [323, [324, [325, [1, '__import__', 764]], [327, [7, '(', 764], [335, [336, [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, 'module', 764]]]]]]]]]]]]]]]]]], [8, ')', 764]]]]] /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/fixedpickle.py: line=764 UNABLE to determine the imported name at parse-time: module /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/fixedpickle.py: line=764 a form of __import__ was read which gave no deps: [323, [324, [325, [1, '__import__', 764]], [327, [7, '(', 764], [335, [336, [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, 'module', 764]]]]]]]]]]]]]]]]]], [8, ')', 764]]]] /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/fixedpickle.py: line=764 UNABLE to determine the imported name at parse-time: module /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/fixedpickle.py: line=764 a form of __import__ was read which gave no deps: [324, [325, [1, '__import__', 764]], [327, [7, '(', 764], [335, [336, [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, 'module', 764]]]]]]]]]]]]]]]]]], [8, ')', 764]]] /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/fixedpickle.py: line=1159 UNABLE to determine the imported name at parse-time: module /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/fixedpickle.py: line=1159 a form of __import__ was read which gave no deps: [269, [270, [271, [272, [274, [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, '__import__', 1159]], [327, [7, '(', 1159], [335, [336, [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, 'module', 1159]]]]]]]]]]]]]]]]]], [8, ')', 1159]]]]]]]]]]]]]]]]]]], [4, '', 1159]]] /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/fixedpickle.py: line=1159 UNABLE to determine the imported name at parse-time: module /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/fixedpickle.py: line=1159 a form of __import__ was read which gave no deps: [270, [271, [272, [274, [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, '__import__', 1159]], [327, [7, '(', 1159], [335, [336, [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, 'module', 1159]]]]]]]]]]]]]]]]]], [8, ')', 1159]]]]]]]]]]]]]]]]]]], [4, '', 1159]] /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/fixedpickle.py: line=1159 UNABLE to determine the imported name at parse-time: module /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/fixedpickle.py: line=1159 a form of __import__ was read which gave no deps: [271, [272, [274, [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, '__import__', 1159]], [327, [7, '(', 1159], [335, [336, [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, 'module', 1159]]]]]]]]]]]]]]]]]], [8, ')', 1159]]]]]]]]]]]]]]]]]]] /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/fixedpickle.py: line=1159 UNABLE to determine the imported name at parse-time: module /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/fixedpickle.py: line=1159 a form of __import__ was read which gave no deps: [272, [274, [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, '__import__', 1159]], [327, [7, '(', 1159], [335, [336, [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, 'module', 1159]]]]]]]]]]]]]]]]]], [8, ')', 1159]]]]]]]]]]]]]]]]]] /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/fixedpickle.py: line=1159 UNABLE to determine the imported name at parse-time: module /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/fixedpickle.py: line=1159 a form of __import__ was read which gave no deps: [274, [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, '__import__', 1159]], [327, [7, '(', 1159], [335, [336, [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, 'module', 1159]]]]]]]]]]]]]]]]]], [8, ')', 1159]]]]]]]]]]]]]]]]] /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/fixedpickle.py: line=1159 UNABLE to determine the imported name at parse-time: module /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/fixedpickle.py: line=1159 a form of __import__ was read which gave no deps: [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, '__import__', 1159]], [327, [7, '(', 1159], [335, [336, [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, 'module', 1159]]]]]]]]]]]]]]]]]], [8, ')', 1159]]]]]]]]]]]]]]]] /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/fixedpickle.py: line=1159 UNABLE to determine the imported name at parse-time: module /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/fixedpickle.py: line=1159 a form of __import__ was read which gave no deps: [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, '__import__', 1159]], [327, [7, '(', 1159], [335, [336, [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, 'module', 1159]]]]]]]]]]]]]]]]]], [8, ')', 1159]]]]]]]]]]]]]]] /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/fixedpickle.py: line=1159 UNABLE to determine the imported name at parse-time: module /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/fixedpickle.py: line=1159 a form of __import__ was read which gave no deps: [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, '__import__', 1159]], [327, [7, '(', 1159], [335, [336, [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, 'module', 1159]]]]]]]]]]]]]]]]]], [8, ')', 1159]]]]]]]]]]]]]] /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/fixedpickle.py: line=1159 UNABLE to determine the imported name at parse-time: module /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/fixedpickle.py: line=1159 a form of __import__ was read which gave no deps: [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, '__import__', 1159]], [327, [7, '(', 1159], [335, [336, [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, 'module', 1159]]]]]]]]]]]]]]]]]], [8, ')', 1159]]]]]]]]]]]]] /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/fixedpickle.py: line=1159 UNABLE to determine the imported name at parse-time: module /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/fixedpickle.py: line=1159 a form of __import__ was read which gave no deps: [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, '__import__', 1159]], [327, [7, '(', 1159], [335, [336, [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, 'module', 1159]]]]]]]]]]]]]]]]]], [8, ')', 1159]]]]]]]]]]]] /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/fixedpickle.py: line=1159 UNABLE to determine the imported name at parse-time: module /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/fixedpickle.py: line=1159 a form of __import__ was read which gave no deps: [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, '__import__', 1159]], [327, [7, '(', 1159], [335, [336, [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, 'module', 1159]]]]]]]]]]]]]]]]]], [8, ')', 1159]]]]]]]]]]] /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/fixedpickle.py: line=1159 UNABLE to determine the imported name at parse-time: module /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/fixedpickle.py: line=1159 a form of __import__ was read which gave no deps: [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, '__import__', 1159]], [327, [7, '(', 1159], [335, [336, [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, 'module', 1159]]]]]]]]]]]]]]]]]], [8, ')', 1159]]]]]]]]]] /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/fixedpickle.py: line=1159 UNABLE to determine the imported name at parse-time: module /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/fixedpickle.py: line=1159 a form of __import__ was read which gave no deps: [318, [319, [320, [321, [322, [323, [324, [325, [1, '__import__', 1159]], [327, [7, '(', 1159], [335, [336, [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, 'module', 1159]]]]]]]]]]]]]]]]]], [8, ')', 1159]]]]]]]]] /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/fixedpickle.py: line=1159 UNABLE to determine the imported name at parse-time: module /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/fixedpickle.py: line=1159 a form of __import__ was read which gave no deps: [319, [320, [321, [322, [323, [324, [325, [1, '__import__', 1159]], [327, [7, '(', 1159], [335, [336, [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, 'module', 1159]]]]]]]]]]]]]]]]]], [8, ')', 1159]]]]]]]] /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/fixedpickle.py: line=1159 UNABLE to determine the imported name at parse-time: module /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/fixedpickle.py: line=1159 a form of __import__ was read which gave no deps: [320, [321, [322, [323, [324, [325, [1, '__import__', 1159]], [327, [7, '(', 1159], [335, [336, [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, 'module', 1159]]]]]]]]]]]]]]]]]], [8, ')', 1159]]]]]]] /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/fixedpickle.py: line=1159 UNABLE to determine the imported name at parse-time: module /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/fixedpickle.py: line=1159 a form of __import__ was read which gave no deps: [321, [322, [323, [324, [325, [1, '__import__', 1159]], [327, [7, '(', 1159], [335, [336, [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, 'module', 1159]]]]]]]]]]]]]]]]]], [8, ')', 1159]]]]]] /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/fixedpickle.py: line=1159 UNABLE to determine the imported name at parse-time: module /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/fixedpickle.py: line=1159 a form of __import__ was read which gave no deps: [322, [323, [324, [325, [1, '__import__', 1159]], [327, [7, '(', 1159], [335, [336, [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, 'module', 1159]]]]]]]]]]]]]]]]]], [8, ')', 1159]]]]] /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/fixedpickle.py: line=1159 UNABLE to determine the imported name at parse-time: module /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/fixedpickle.py: line=1159 a form of __import__ was read which gave no deps: [323, [324, [325, [1, '__import__', 1159]], [327, [7, '(', 1159], [335, [336, [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, 'module', 1159]]]]]]]]]]]]]]]]]], [8, ')', 1159]]]] /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/fixedpickle.py: line=1159 UNABLE to determine the imported name at parse-time: module /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/fixedpickle.py: line=1159 a form of __import__ was read which gave no deps: [324, [325, [1, '__import__', 1159]], [327, [7, '(', 1159], [335, [336, [306, [310, [311, [312, [313, [316, [317, [318, [319, [320, [321, [322, [323, [324, [325, [1, 'module', 1159]]]]]]]]]]]]]]]]]], [8, ')', 1159]]] /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/fixedpickle.py: line=1398 IGNORE (for REQ=slight and deep=8) module=io /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/fixedpickle.py: line=1400 IGNORE (for REQ=slight and deep=8) module=io /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/fixedpickle.py: line=1420 IGNORE (for REQ=slight and deep=8) module=doctest /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/integrator.py: line=5 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/integrator.py: line=6 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/integrator.py: line=7 possible relative import from ., UNIMPLEMENTED python3.req: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/integrator.py: skipping sys python3.req: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/matplotlib_import.py: skipping matplotlib /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/matplotlib_import.py: line=12 IGNORE (for REQ=slight and deep=12) module=matplotlib.matlab /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/matplotlib_import.py: line=13 IGNORE (for REQ=slight and deep=12) module=matplotlib.matlab /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/matplotlib_import.py: line=15 IGNORE (for REQ=slight and deep=12) module=matplotlib.pyplot /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/matplotlib_import.py: line=16 IGNORE (for REQ=slight and deep=12) module=matplotlib.pyplot /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/matplotlib_import.py: line=38 IGNORE (for REQ=slight and deep=8) module=os /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/matplotlib_import.py: line=39 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/matplotlib_import.py: line=40 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/parseUtils.py: line=12 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/parseUtils.py: line=13 possible relative import from ., UNIMPLEMENTED python3.req: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/scipy_ode.py: skipping scipy python3.req: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/scipy_ode.py: skipping sys /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/scipy_ode.py: line=252 IGNORE (for REQ=slight and deep=11) module=scipy.integrate.vode python3.req: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/CIN.py: skipping time python3.req: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/Dopri_backwards_test.py: skipping time python3.req: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/HH_DSSRTtest.py: skipping sys python3.req: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/HH_model.py: skipping time python3.req: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/HH_model_Cintegrator.py: skipping time python3.req: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/HH_model_Cintegrator_testbounds.py: skipping time python3.req: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/HH_model_testbounds.py: skipping time python3.req: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/IF_delaynet.py: skipping time python3.req: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/IF_delaynet_syn.py: skipping time python3.req: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/IF_model_test.py: skipping time python3.req: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/IF_squarespike_model.py: skipping time python3.req: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/PyCont_vanDerPol.py: skipping sys python3.req: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/SLIP_2D_pdc.py: skipping time python3.req: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/Tutorial_Calcium.py: skipping matplotlib python3.req: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/Tutorial_LorenzMap.py: skipping matplotlib python3.req: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/Tutorial_PredatorPrey.py: skipping matplotlib python3.req: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/Tutorial_PredatorPrey.py: skipping matplotlib python3.req: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/Tutorial_VdP.py: skipping matplotlib python3.req: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/freefinger_noforce_radau.py: skipping time python3.req: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/imprecise_event_test.py: skipping time python3.req: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/interp_dopri_test.py: skipping time python3.req: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/interp_vode_test.py: skipping time python3.req: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/joe_pest.py: skipping time python3.req: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/mapsystem_test.py: skipping time python3.req: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/pest_test1.py: skipping time python3.req: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/pest_test3.py: skipping time python3.req: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/pest_test3_Cintegrator.py: skipping time python3.req: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/pest_test4_Cintegrator.py: skipping time python3.req: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/phaseplane_HHtest.py: skipping time python3.req: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/run_all_tests.py: skipping time python3.req: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/sloppycell_example.py: skipping time python3.req: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/tests/splinetest.py: skipping sys /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/utils.py: line=5 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/utils.py: line=6 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/utils.py: line=7 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/utils.py: line=8 possible relative import from ., UNIMPLEMENTED python3.req: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/utils.py: skipping time python3.req: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/utils.py: skipping sys /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/utils.py: line=748 IGNORE (for REQ=slight and deep=8) module=scipy shebang.req.files: executable script /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/auto/dev/setup.py is not executable shebang.req.files: executable script /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/auto/dev/setup.py.lib is not executable shebang.req.files: executable script /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/PyCont/auto/dev/setup.py.works is not executable shebang.req.files: executable script /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/helpers/tests/test_finite_difference.py is not executable shebang.req.files: executable script /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/helpers/tests/test_levenberg_marquardt.py is not executable shebang.req.files: executable script /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/helpers/tests/test_quadratic.py is not executable shebang.req.files: executable script /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/tests/test_powell.py is not executable shebang.req.files: executable script /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/tests/test_quadratic.py is not executable shebang.req.files: executable script /usr/src/tmp/python3-module-PyDSTool-buildroot/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/tests/test_rosenbrock.py is not executable find-requires: FINDPACKAGE-COMMANDS: dos2unix Provides: python3(Events), python3(FuncSpec), python3(Generator), python3(Generator.ADMC_ODEsystem), python3(Generator.DDEsystem), python3(Generator.Dopri_ODEsystem), python3(Generator.EmbeddedSysGen), python3(Generator.Euler_ODEsystem), python3(Generator.ExplicitFnGen), python3(Generator.ExtrapolateTable), python3(Generator.ImplicitFnGen), python3(Generator.InterpolateTable), python3(Generator.LookupTable), python3(Generator.MapSystem), python3(Generator.ODEsystem), python3(Generator.Radau_ODEsystem), python3(Generator.Vode_ODEsystem), python3(Generator.allimports), python3(Generator.baseclasses), python3(Generator.messagecodes), python3(Interval), python3(MProject), python3(Model), python3(ModelConstructor), python3(ModelSpec), python3(Points), python3(PyCont), python3(PyCont.BifPoint), python3(PyCont.ContClass), python3(PyCont.Continuation), python3(PyCont.Plotting), python3(PyCont.TestFunc), python3(PyCont.misc), python3(PyDSTool), python3(PyDSTool.Events), python3(PyDSTool.FuncSpec), python3(PyDSTool.Generator), python3(PyDSTool.Generator.ADMC_ODEsystem), python3(PyDSTool.Generator.DDEsystem), python3(PyDSTool.Generator.Dopri_ODEsystem), python3(PyDSTool.Generator.EmbeddedSysGen), python3(PyDSTool.Generator.Euler_ODEsystem), python3(PyDSTool.Generator.ExplicitFnGen), python3(PyDSTool.Generator.ExtrapolateTable), python3(PyDSTool.Generator.ImplicitFnGen), python3(PyDSTool.Generator.InterpolateTable), python3(PyDSTool.Generator.LookupTable), python3(PyDSTool.Generator.MapSystem), python3(PyDSTool.Generator.ODEsystem), python3(PyDSTool.Generator.Radau_ODEsystem), python3(PyDSTool.Generator.Vode_ODEsystem), python3(PyDSTool.Generator.allimports), python3(PyDSTool.Generator.baseclasses), python3(PyDSTool.Generator.messagecodes), python3(PyDSTool.Interval), python3(PyDSTool.MProject), python3(PyDSTool.Model), python3(PyDSTool.ModelConstructor), python3(PyDSTool.ModelSpec), python3(PyDSTool.Points), python3(PyDSTool.PyCont), python3(PyDSTool.PyCont.BifPoint), python3(PyDSTool.PyCont.ContClass), python3(PyDSTool.PyCont.Continuation), python3(PyDSTool.PyCont.Plotting), python3(PyDSTool.PyCont.TestFunc), python3(PyDSTool.PyCont.misc), python3(PyDSTool.Redirector), python3(PyDSTool.Symbolic), python3(PyDSTool.Toolbox), python3(PyDSTool.Toolbox.ActivationFuncs), python3(PyDSTool.Toolbox.DSSRT_tools), python3(PyDSTool.Toolbox.FR), python3(PyDSTool.Toolbox.FSM), python3(PyDSTool.Toolbox.InputProfile), python3(PyDSTool.Toolbox.ModelEst), python3(PyDSTool.Toolbox.ModelHelper), python3(PyDSTool.Toolbox.NineML), python3(PyDSTool.Toolbox.PRCtools), python3(PyDSTool.Toolbox.ParamEst), python3(PyDSTool.Toolbox.PySCes_SBML), python3(PyDSTool.Toolbox.adjointPRC), python3(PyDSTool.Toolbox.data_analysis), python3(PyDSTool.Toolbox.dssrt), python3(PyDSTool.Toolbox.event_driven_simulator), python3(PyDSTool.Toolbox.fracdim), python3(PyDSTool.Toolbox.makeSloppyModel), python3(PyDSTool.Toolbox.mechmatlib), python3(PyDSTool.Toolbox.model_primitives), python3(PyDSTool.Toolbox.neuralcomp), python3(PyDSTool.Toolbox.neuro_data), python3(PyDSTool.Toolbox.optimizers), python3(PyDSTool.Toolbox.optimizers.criterion), python3(PyDSTool.Toolbox.optimizers.criterion.composite_criteria), python3(PyDSTool.Toolbox.optimizers.criterion.criteria), python3(PyDSTool.Toolbox.optimizers.criterion.facilities), python3(PyDSTool.Toolbox.optimizers.criterion.information_criteria), python3(PyDSTool.Toolbox.optimizers.defaults), python3(PyDSTool.Toolbox.optimizers.helpers), python3(PyDSTool.Toolbox.optimizers.helpers.finite_difference), python3(PyDSTool.Toolbox.optimizers.helpers.levenberg_marquardt), python3(PyDSTool.Toolbox.optimizers.helpers.quadratic), python3(PyDSTool.Toolbox.optimizers.line_search), python3(PyDSTool.Toolbox.optimizers.line_search.adaptive_last_step_modifier), python3(PyDSTool.Toolbox.optimizers.line_search.backtracking_search), python3(PyDSTool.Toolbox.optimizers.line_search.barzilai_borwein_non_monotone_search), python3(PyDSTool.Toolbox.optimizers.line_search.barzilai_borwein_search), python3(PyDSTool.Toolbox.optimizers.line_search.cubic_interpolation), python3(PyDSTool.Toolbox.optimizers.line_search.damped_line_search), python3(PyDSTool.Toolbox.optimizers.line_search.fibonacci_section), python3(PyDSTool.Toolbox.optimizers.line_search.fixed_last_step_modifier), python3(PyDSTool.Toolbox.optimizers.line_search.golden_section), python3(PyDSTool.Toolbox.optimizers.line_search.goldstein_rule), python3(PyDSTool.Toolbox.optimizers.line_search.hyperbolic_line_search), python3(PyDSTool.Toolbox.optimizers.line_search.quadratic_interpolation), python3(PyDSTool.Toolbox.optimizers.line_search.scaled_line_search), python3(PyDSTool.Toolbox.optimizers.line_search.simple_line_search), python3(PyDSTool.Toolbox.optimizers.line_search.strong_wolfe_powell_rule), python3(PyDSTool.Toolbox.optimizers.line_search.wolfe_powell_rule), python3(PyDSTool.Toolbox.optimizers.optimizer), python3(PyDSTool.Toolbox.optimizers.optimizer.optimizer), python3(PyDSTool.Toolbox.optimizers.optimizer.standard_optimizer), python3(PyDSTool.Toolbox.optimizers.optimizer.standard_optimizer_modifying), python3(PyDSTool.Toolbox.optimizers.step), python3(PyDSTool.Toolbox.optimizers.step.conjugate_gradient_step), python3(PyDSTool.Toolbox.optimizers.step.goldfeld_step), python3(PyDSTool.Toolbox.optimizers.step.goldstein_price_step), python3(PyDSTool.Toolbox.optimizers.step.gradient_step), python3(PyDSTool.Toolbox.optimizers.step.local_brute_force_1dstep), python3(PyDSTool.Toolbox.optimizers.step.marquardt_step), python3(PyDSTool.Toolbox.optimizers.step.newton_step), python3(PyDSTool.Toolbox.optimizers.step.partial_step), python3(PyDSTool.Toolbox.optimizers.step.quasi_newton_step), python3(PyDSTool.Toolbox.optimizers.step.restart_conjugate_gradient), python3(PyDSTool.Toolbox.optimizers.tests), python3(PyDSTool.Toolbox.optimizers.tests.test_powell), python3(PyDSTool.Toolbox.optimizers.tests.test_quadratic), python3(PyDSTool.Toolbox.optimizers.tests.test_rosenbrock), python3(PyDSTool.Toolbox.phaseplane), python3(PyDSTool.Toolbox.prep_boxplot), python3(PyDSTool.Toolbox.synthetic_data), python3(PyDSTool.Toolbox.syntheticdata), python3(PyDSTool.Toolbox.test_protocols), python3(PyDSTool.Trajectory), python3(PyDSTool.Variable), python3(PyDSTool.common), python3(PyDSTool.conf), python3(PyDSTool.errors), python3(PyDSTool.fixedpickle), python3(PyDSTool.integrator), python3(PyDSTool.matplotlib_import), python3(PyDSTool.parseUtils), python3(PyDSTool.scipy_ode), python3(PyDSTool.utils), python3(Redirector), python3(Symbolic), python3(Toolbox), python3(Toolbox.ActivationFuncs), python3(Toolbox.DSSRT_tools), python3(Toolbox.FR), python3(Toolbox.FSM), python3(Toolbox.InputProfile), python3(Toolbox.ModelEst), python3(Toolbox.ModelHelper), python3(Toolbox.NineML), python3(Toolbox.PRCtools), python3(Toolbox.ParamEst), python3(Toolbox.PySCes_SBML), python3(Toolbox.adjointPRC), python3(Toolbox.data_analysis), python3(Toolbox.dssrt), python3(Toolbox.event_driven_simulator), python3(Toolbox.fracdim), python3(Toolbox.makeSloppyModel), python3(Toolbox.mechmatlib), python3(Toolbox.model_primitives), python3(Toolbox.neuralcomp), python3(Toolbox.neuro_data), python3(Toolbox.optimizers), python3(Toolbox.optimizers.criterion), python3(Toolbox.optimizers.criterion.composite_criteria), python3(Toolbox.optimizers.criterion.criteria), python3(Toolbox.optimizers.criterion.facilities), python3(Toolbox.optimizers.criterion.information_criteria), python3(Toolbox.optimizers.defaults), python3(Toolbox.optimizers.helpers), python3(Toolbox.optimizers.helpers.finite_difference), python3(Toolbox.optimizers.helpers.levenberg_marquardt), python3(Toolbox.optimizers.helpers.quadratic), python3(Toolbox.optimizers.line_search), python3(Toolbox.optimizers.line_search.adaptive_last_step_modifier), python3(Toolbox.optimizers.line_search.backtracking_search), python3(Toolbox.optimizers.line_search.barzilai_borwein_non_monotone_search), python3(Toolbox.optimizers.line_search.barzilai_borwein_search), python3(Toolbox.optimizers.line_search.cubic_interpolation), python3(Toolbox.optimizers.line_search.damped_line_search), python3(Toolbox.optimizers.line_search.fibonacci_section), python3(Toolbox.optimizers.line_search.fixed_last_step_modifier), python3(Toolbox.optimizers.line_search.golden_section), python3(Toolbox.optimizers.line_search.goldstein_rule), python3(Toolbox.optimizers.line_search.hyperbolic_line_search), python3(Toolbox.optimizers.line_search.quadratic_interpolation), python3(Toolbox.optimizers.line_search.scaled_line_search), python3(Toolbox.optimizers.line_search.simple_line_search), python3(Toolbox.optimizers.line_search.strong_wolfe_powell_rule), python3(Toolbox.optimizers.line_search.wolfe_powell_rule), python3(Toolbox.optimizers.optimizer), python3(Toolbox.optimizers.optimizer.optimizer), python3(Toolbox.optimizers.optimizer.standard_optimizer), python3(Toolbox.optimizers.optimizer.standard_optimizer_modifying), python3(Toolbox.optimizers.step), python3(Toolbox.optimizers.step.conjugate_gradient_step), python3(Toolbox.optimizers.step.goldfeld_step), python3(Toolbox.optimizers.step.goldstein_price_step), python3(Toolbox.optimizers.step.gradient_step), python3(Toolbox.optimizers.step.local_brute_force_1dstep), python3(Toolbox.optimizers.step.marquardt_step), python3(Toolbox.optimizers.step.newton_step), python3(Toolbox.optimizers.step.partial_step), python3(Toolbox.optimizers.step.quasi_newton_step), python3(Toolbox.optimizers.step.restart_conjugate_gradient), python3(Toolbox.optimizers.tests), python3(Toolbox.optimizers.tests.test_powell), python3(Toolbox.optimizers.tests.test_quadratic), python3(Toolbox.optimizers.tests.test_rosenbrock), python3(Toolbox.phaseplane), python3(Toolbox.prep_boxplot), python3(Toolbox.synthetic_data), python3(Toolbox.syntheticdata), python3(Toolbox.test_protocols), python3(Trajectory), python3(Variable), python3(common), python3(conf), python3(errors), python3(fixedpickle), python3(integrator), python3(matplotlib_import), python3(parseUtils), python3(scipy_ode), python3(utils) Requires: /bin/sh, /usr/bin/dos2unix, /usr/lib/python3/site-packages, python3(binascii) < 0, python3(copy) < 0, python3(copyreg) < 0, python3(distutils) < 0, python3(distutils.core) < 0, python3(distutils.sysconfig) < 0, python3(functools) < 0, python3(io) < 0, python3(math) < 0, python3(matplotlib.font_manager) < 0, python3(matplotlib.pyplot) < 0, python3(mpl_toolkits.mplot3d) < 0, python3(nineml.abstraction_layer) < 0, python3(numpy) < 0, python3(numpy.distutils.core) < 0, python3(numpy.linalg) < 0, python3(numpy.random) < 0, python3(numpy.testing) < 0, python3(numpy.testing.utils) < 0, python3(operator) < 0, python3(os) < 0, python3(os.path) < 0, python3(parser) < 0, python3(pickle) < 0, python3(platform) < 0, python3(pprint) < 0, python3(random) < 0, python3(re) < 0, python3(scipy.interpolate) < 0, python3(scipy.io) < 0, python3(scipy.linalg) < 0, python3(scipy.optimize) < 0, python3(scipy.signal) < 0, python3(scipy.special) < 0, python3(shutil) < 0, python3(struct) < 0, python3(symbol) < 0, python3(tempfile) < 0, python3(token) < 0, python3(traceback) < 0, python3(types) < 0, python3(unittest) < 0, python3(warnings) < 0 Finding debuginfo files (using /usr/lib/rpm/find-debuginfo-files) Executing: /bin/sh -e /usr/src/tmp/rpm-tmp.yaArDb Wrote: /usr/src/RPM/RPMS/i586/python3-module-PyDSTool-0.88.121202-alt4.i586.rpm 144.94user 2.65system 3:00.90elapsed 81%CPU (0avgtext+0avgdata 52224maxresident)k 0inputs+0outputs (0major+863326minor)pagefaults 0swaps 151.98user 5.53system 3:15.92elapsed 80%CPU (0avgtext+0avgdata 108760maxresident)k 0inputs+0outputs (0major+1268722minor)pagefaults 0swaps --- python3-module-PyDSTool-0.88.121202-alt4.i586.rpm.repo 2019-11-14 11:29:48.000000000 +0000 +++ python3-module-PyDSTool-0.88.121202-alt4.i586.rpm.hasher 2020-05-01 14:41:32.981888166 +0000 @@ -30,56 +30,56 @@ /usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__ 40755 -/usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/ADMC_ODEsystem.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/ADMC_ODEsystem.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/ADMC_ODEsystem.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/DDEsystem.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/DDEsystem.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/DDEsystem.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/Dopri_ODEsystem.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/Dopri_ODEsystem.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/Dopri_ODEsystem.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/EmbeddedSysGen.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/EmbeddedSysGen.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/EmbeddedSysGen.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/Euler_ODEsystem.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/Euler_ODEsystem.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/Euler_ODEsystem.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/ExplicitFnGen.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/ExplicitFnGen.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/ExplicitFnGen.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/ExtrapolateTable.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/ExtrapolateTable.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/ExtrapolateTable.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/ImplicitFnGen.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/ImplicitFnGen.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/ImplicitFnGen.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/InterpolateTable.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/InterpolateTable.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/InterpolateTable.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/LookupTable.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/LookupTable.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/LookupTable.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/MapSystem.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/MapSystem.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/MapSystem.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/ODEsystem.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/ODEsystem.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/ODEsystem.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/Radau_ODEsystem.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/Radau_ODEsystem.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/Radau_ODEsystem.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/Vode_ODEsystem.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/Vode_ODEsystem.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/Vode_ODEsystem.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/__init__.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/__init__.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/__init__.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/allimports.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/allimports.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/allimports.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/baseclasses.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/baseclasses.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/baseclasses.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/messagecodes.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/messagecodes.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/messagecodes.cpython-37.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/ADMC_ODEsystem.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/ADMC_ODEsystem.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/ADMC_ODEsystem.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/DDEsystem.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/DDEsystem.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/DDEsystem.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/Dopri_ODEsystem.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/Dopri_ODEsystem.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/Dopri_ODEsystem.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/EmbeddedSysGen.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/EmbeddedSysGen.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/EmbeddedSysGen.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/Euler_ODEsystem.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/Euler_ODEsystem.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/Euler_ODEsystem.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/ExplicitFnGen.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/ExplicitFnGen.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/ExplicitFnGen.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/ExtrapolateTable.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/ExtrapolateTable.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/ExtrapolateTable.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/ImplicitFnGen.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/ImplicitFnGen.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/ImplicitFnGen.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/InterpolateTable.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/InterpolateTable.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/InterpolateTable.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/LookupTable.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/LookupTable.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/LookupTable.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/MapSystem.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/MapSystem.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/MapSystem.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/ODEsystem.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/ODEsystem.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/ODEsystem.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/Radau_ODEsystem.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/Radau_ODEsystem.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/Radau_ODEsystem.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/Vode_ODEsystem.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/Vode_ODEsystem.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/Vode_ODEsystem.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/__init__.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/__init__.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/__init__.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/allimports.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/allimports.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/allimports.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/baseclasses.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/baseclasses.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/baseclasses.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/messagecodes.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/messagecodes.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Generator/__pycache__/messagecodes.cpython-38.pyc 100644 /usr/lib/python3/site-packages/PyDSTool/Generator/allimports.py 100644 @@ -106,23 +106,23 @@ /usr/lib/python3/site-packages/PyDSTool/PyCont/__pycache__ 40755 -/usr/lib/python3/site-packages/PyDSTool/PyCont/__pycache__/BifPoint.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/PyCont/__pycache__/BifPoint.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/PyCont/__pycache__/BifPoint.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/PyCont/__pycache__/ContClass.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/PyCont/__pycache__/ContClass.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/PyCont/__pycache__/ContClass.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/PyCont/__pycache__/Continuation.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/PyCont/__pycache__/Continuation.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/PyCont/__pycache__/Continuation.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/PyCont/__pycache__/Plotting.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/PyCont/__pycache__/Plotting.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/PyCont/__pycache__/Plotting.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/PyCont/__pycache__/TestFunc.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/PyCont/__pycache__/TestFunc.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/PyCont/__pycache__/TestFunc.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/PyCont/__pycache__/__init__.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/PyCont/__pycache__/__init__.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/PyCont/__pycache__/__init__.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/PyCont/__pycache__/misc.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/PyCont/__pycache__/misc.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/PyCont/__pycache__/misc.cpython-37.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/PyCont/__pycache__/BifPoint.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/PyCont/__pycache__/BifPoint.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/PyCont/__pycache__/BifPoint.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/PyCont/__pycache__/ContClass.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/PyCont/__pycache__/ContClass.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/PyCont/__pycache__/ContClass.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/PyCont/__pycache__/Continuation.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/PyCont/__pycache__/Continuation.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/PyCont/__pycache__/Continuation.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/PyCont/__pycache__/Plotting.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/PyCont/__pycache__/Plotting.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/PyCont/__pycache__/Plotting.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/PyCont/__pycache__/TestFunc.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/PyCont/__pycache__/TestFunc.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/PyCont/__pycache__/TestFunc.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/PyCont/__pycache__/__init__.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/PyCont/__pycache__/__init__.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/PyCont/__pycache__/__init__.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/PyCont/__pycache__/misc.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/PyCont/__pycache__/misc.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/PyCont/__pycache__/misc.cpython-38.pyc 100644 /usr/lib/python3/site-packages/PyDSTool/PyCont/auto 40755 @@ -144,5 +144,5 @@ /usr/lib/python3/site-packages/PyDSTool/PyCont/auto/dev/__pycache__ 40755 -/usr/lib/python3/site-packages/PyDSTool/PyCont/auto/dev/__pycache__/setup.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/PyCont/auto/dev/__pycache__/setup.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/PyCont/auto/dev/__pycache__/setup.cpython-37.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/PyCont/auto/dev/__pycache__/setup.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/PyCont/auto/dev/__pycache__/setup.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/PyCont/auto/dev/__pycache__/setup.cpython-38.pyc 100644 /usr/lib/python3/site-packages/PyDSTool/PyCont/auto/dev/cflow.out 100644 @@ -220,83 +220,83 @@ /usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__ 40755 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/ActivationFuncs.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/ActivationFuncs.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/ActivationFuncs.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/DSSRT_tools.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/DSSRT_tools.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/DSSRT_tools.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/FR.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/FR.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/FR.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/FSM.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/FSM.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/FSM.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/InputProfile.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/InputProfile.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/InputProfile.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/ModelEst.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/ModelEst.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/ModelEst.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/ModelHelper.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/ModelHelper.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/ModelHelper.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/NineML.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/NineML.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/NineML.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/PRCtools.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/PRCtools.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/PRCtools.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/ParamEst.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/ParamEst.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/ParamEst.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/PySCes_SBML.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/PySCes_SBML.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/PySCes_SBML.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/__init__.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/__init__.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/__init__.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/adjointPRC.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/adjointPRC.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/adjointPRC.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/data_analysis.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/data_analysis.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/data_analysis.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/dssrt.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/dssrt.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/dssrt.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/event_driven_simulator.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/event_driven_simulator.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/event_driven_simulator.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/fracdim.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/fracdim.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/fracdim.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/makeSloppyModel.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/makeSloppyModel.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/makeSloppyModel.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/mechmatlib.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/mechmatlib.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/mechmatlib.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/model_primitives.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/model_primitives.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/model_primitives.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/neuralcomp.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/neuralcomp.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/neuralcomp.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/neuro_data.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/neuro_data.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/neuro_data.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/phaseplane.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/phaseplane.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/phaseplane.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/prep_boxplot.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/prep_boxplot.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/prep_boxplot.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/synthetic_data.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/synthetic_data.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/synthetic_data.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/syntheticdata.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/syntheticdata.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/syntheticdata.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/test_protocols.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/test_protocols.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/test_protocols.cpython-37.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/ActivationFuncs.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/ActivationFuncs.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/ActivationFuncs.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/DSSRT_tools.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/DSSRT_tools.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/DSSRT_tools.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/FR.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/FR.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/FR.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/FSM.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/FSM.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/FSM.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/InputProfile.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/InputProfile.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/InputProfile.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/ModelEst.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/ModelEst.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/ModelEst.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/ModelHelper.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/ModelHelper.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/ModelHelper.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/NineML.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/NineML.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/NineML.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/PRCtools.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/PRCtools.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/PRCtools.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/ParamEst.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/ParamEst.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/ParamEst.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/PySCes_SBML.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/PySCes_SBML.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/PySCes_SBML.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/__init__.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/__init__.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/__init__.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/adjointPRC.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/adjointPRC.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/adjointPRC.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/data_analysis.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/data_analysis.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/data_analysis.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/dssrt.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/dssrt.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/dssrt.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/event_driven_simulator.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/event_driven_simulator.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/event_driven_simulator.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/fracdim.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/fracdim.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/fracdim.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/makeSloppyModel.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/makeSloppyModel.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/makeSloppyModel.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/mechmatlib.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/mechmatlib.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/mechmatlib.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/model_primitives.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/model_primitives.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/model_primitives.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/neuralcomp.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/neuralcomp.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/neuralcomp.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/neuro_data.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/neuro_data.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/neuro_data.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/phaseplane.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/phaseplane.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/phaseplane.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/prep_boxplot.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/prep_boxplot.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/prep_boxplot.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/synthetic_data.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/synthetic_data.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/synthetic_data.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/syntheticdata.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/syntheticdata.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/syntheticdata.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/test_protocols.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/test_protocols.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/__pycache__/test_protocols.cpython-38.pyc 100644 /usr/lib/python3/site-packages/PyDSTool/Toolbox/adjointPRC.py 100644 @@ -314,8 +314,8 @@ /usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/__pycache__ 40755 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/__pycache__/__init__.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/__pycache__/__init__.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/__pycache__/__init__.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/__pycache__/defaults.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/__pycache__/defaults.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/__pycache__/defaults.cpython-37.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/__pycache__/__init__.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/__pycache__/__init__.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/__pycache__/__init__.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/__pycache__/defaults.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/__pycache__/defaults.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/__pycache__/defaults.cpython-38.pyc 100644 /usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/criterion 40755 @@ -323,17 +323,17 @@ /usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/criterion/__pycache__ 40755 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/criterion/__pycache__/__init__.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/criterion/__pycache__/__init__.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/criterion/__pycache__/__init__.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/criterion/__pycache__/composite_criteria.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/criterion/__pycache__/composite_criteria.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/criterion/__pycache__/composite_criteria.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/criterion/__pycache__/criteria.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/criterion/__pycache__/criteria.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/criterion/__pycache__/criteria.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/criterion/__pycache__/facilities.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/criterion/__pycache__/facilities.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/criterion/__pycache__/facilities.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/criterion/__pycache__/information_criteria.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/criterion/__pycache__/information_criteria.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/criterion/__pycache__/information_criteria.cpython-37.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/criterion/__pycache__/__init__.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/criterion/__pycache__/__init__.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/criterion/__pycache__/__init__.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/criterion/__pycache__/composite_criteria.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/criterion/__pycache__/composite_criteria.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/criterion/__pycache__/composite_criteria.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/criterion/__pycache__/criteria.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/criterion/__pycache__/criteria.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/criterion/__pycache__/criteria.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/criterion/__pycache__/facilities.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/criterion/__pycache__/facilities.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/criterion/__pycache__/facilities.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/criterion/__pycache__/information_criteria.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/criterion/__pycache__/information_criteria.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/criterion/__pycache__/information_criteria.cpython-38.pyc 100644 /usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/criterion/composite_criteria.py 100644 @@ -344,14 +344,14 @@ /usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/criterion/tests/__pycache__ 40755 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/criterion/tests/__pycache__/test_composite_criteria.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/criterion/tests/__pycache__/test_composite_criteria.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/criterion/tests/__pycache__/test_composite_criteria.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/criterion/tests/__pycache__/test_criteria.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/criterion/tests/__pycache__/test_criteria.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/criterion/tests/__pycache__/test_criteria.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/criterion/tests/__pycache__/test_facilities.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/criterion/tests/__pycache__/test_facilities.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/criterion/tests/__pycache__/test_facilities.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/criterion/tests/__pycache__/test_information_criteria.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/criterion/tests/__pycache__/test_information_criteria.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/criterion/tests/__pycache__/test_information_criteria.cpython-37.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/criterion/tests/__pycache__/test_composite_criteria.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/criterion/tests/__pycache__/test_composite_criteria.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/criterion/tests/__pycache__/test_composite_criteria.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/criterion/tests/__pycache__/test_criteria.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/criterion/tests/__pycache__/test_criteria.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/criterion/tests/__pycache__/test_criteria.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/criterion/tests/__pycache__/test_facilities.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/criterion/tests/__pycache__/test_facilities.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/criterion/tests/__pycache__/test_facilities.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/criterion/tests/__pycache__/test_information_criteria.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/criterion/tests/__pycache__/test_information_criteria.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/criterion/tests/__pycache__/test_information_criteria.cpython-38.pyc 100644 /usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/criterion/tests/test_composite_criteria.py 100644 @@ -364,14 +364,14 @@ /usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/helpers/__pycache__ 40755 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/helpers/__pycache__/__init__.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/helpers/__pycache__/__init__.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/helpers/__pycache__/__init__.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/helpers/__pycache__/finite_difference.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/helpers/__pycache__/finite_difference.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/helpers/__pycache__/finite_difference.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/helpers/__pycache__/levenberg_marquardt.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/helpers/__pycache__/levenberg_marquardt.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/helpers/__pycache__/levenberg_marquardt.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/helpers/__pycache__/quadratic.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/helpers/__pycache__/quadratic.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/helpers/__pycache__/quadratic.cpython-37.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/helpers/__pycache__/__init__.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/helpers/__pycache__/__init__.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/helpers/__pycache__/__init__.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/helpers/__pycache__/finite_difference.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/helpers/__pycache__/finite_difference.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/helpers/__pycache__/finite_difference.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/helpers/__pycache__/levenberg_marquardt.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/helpers/__pycache__/levenberg_marquardt.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/helpers/__pycache__/levenberg_marquardt.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/helpers/__pycache__/quadratic.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/helpers/__pycache__/quadratic.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/helpers/__pycache__/quadratic.cpython-38.pyc 100644 /usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/helpers/finite_difference.py 100644 @@ -381,11 +381,11 @@ /usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/helpers/tests/__pycache__ 40755 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/helpers/tests/__pycache__/test_finite_difference.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/helpers/tests/__pycache__/test_finite_difference.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/helpers/tests/__pycache__/test_finite_difference.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/helpers/tests/__pycache__/test_levenberg_marquardt.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/helpers/tests/__pycache__/test_levenberg_marquardt.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/helpers/tests/__pycache__/test_levenberg_marquardt.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/helpers/tests/__pycache__/test_quadratic.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/helpers/tests/__pycache__/test_quadratic.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/helpers/tests/__pycache__/test_quadratic.cpython-37.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/helpers/tests/__pycache__/test_finite_difference.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/helpers/tests/__pycache__/test_finite_difference.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/helpers/tests/__pycache__/test_finite_difference.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/helpers/tests/__pycache__/test_levenberg_marquardt.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/helpers/tests/__pycache__/test_levenberg_marquardt.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/helpers/tests/__pycache__/test_levenberg_marquardt.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/helpers/tests/__pycache__/test_quadratic.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/helpers/tests/__pycache__/test_quadratic.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/helpers/tests/__pycache__/test_quadratic.cpython-38.pyc 100644 /usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/helpers/tests/test_finite_difference.py 100644 @@ -396,53 +396,53 @@ /usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__ 40755 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/__init__.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/__init__.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/__init__.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/adaptive_last_step_modifier.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/adaptive_last_step_modifier.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/adaptive_last_step_modifier.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/backtracking_search.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/backtracking_search.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/backtracking_search.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/barzilai_borwein_non_monotone_search.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/barzilai_borwein_non_monotone_search.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/barzilai_borwein_non_monotone_search.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/barzilai_borwein_search.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/barzilai_borwein_search.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/barzilai_borwein_search.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/cubic_interpolation.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/cubic_interpolation.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/cubic_interpolation.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/damped_line_search.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/damped_line_search.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/damped_line_search.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/fibonacci_section.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/fibonacci_section.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/fibonacci_section.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/fixed_last_step_modifier.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/fixed_last_step_modifier.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/fixed_last_step_modifier.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/golden_section.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/golden_section.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/golden_section.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/goldstein_rule.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/goldstein_rule.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/goldstein_rule.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/hyperbolic_line_search.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/hyperbolic_line_search.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/hyperbolic_line_search.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/quadratic_interpolation.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/quadratic_interpolation.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/quadratic_interpolation.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/scaled_line_search.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/scaled_line_search.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/scaled_line_search.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/simple_line_search.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/simple_line_search.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/simple_line_search.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/strong_wolfe_powell_rule.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/strong_wolfe_powell_rule.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/strong_wolfe_powell_rule.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/wolfe_powell_rule.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/wolfe_powell_rule.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/wolfe_powell_rule.cpython-37.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/__init__.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/__init__.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/__init__.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/adaptive_last_step_modifier.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/adaptive_last_step_modifier.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/adaptive_last_step_modifier.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/backtracking_search.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/backtracking_search.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/backtracking_search.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/barzilai_borwein_non_monotone_search.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/barzilai_borwein_non_monotone_search.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/barzilai_borwein_non_monotone_search.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/barzilai_borwein_search.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/barzilai_borwein_search.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/barzilai_borwein_search.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/cubic_interpolation.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/cubic_interpolation.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/cubic_interpolation.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/damped_line_search.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/damped_line_search.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/damped_line_search.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/fibonacci_section.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/fibonacci_section.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/fibonacci_section.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/fixed_last_step_modifier.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/fixed_last_step_modifier.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/fixed_last_step_modifier.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/golden_section.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/golden_section.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/golden_section.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/goldstein_rule.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/goldstein_rule.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/goldstein_rule.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/hyperbolic_line_search.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/hyperbolic_line_search.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/hyperbolic_line_search.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/quadratic_interpolation.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/quadratic_interpolation.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/quadratic_interpolation.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/scaled_line_search.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/scaled_line_search.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/scaled_line_search.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/simple_line_search.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/simple_line_search.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/simple_line_search.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/strong_wolfe_powell_rule.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/strong_wolfe_powell_rule.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/strong_wolfe_powell_rule.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/wolfe_powell_rule.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/wolfe_powell_rule.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/__pycache__/wolfe_powell_rule.cpython-38.pyc 100644 /usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/adaptive_last_step_modifier.py 100644 @@ -464,38 +464,38 @@ /usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/__pycache__ 40755 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/__pycache__/test_adaptive_last_step_modifier.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/__pycache__/test_adaptive_last_step_modifier.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/__pycache__/test_adaptive_last_step_modifier.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/__pycache__/test_backtracking_search.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/__pycache__/test_backtracking_search.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/__pycache__/test_backtracking_search.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/__pycache__/test_cubic_interpolation.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/__pycache__/test_cubic_interpolation.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/__pycache__/test_cubic_interpolation.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/__pycache__/test_damped_line_search.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/__pycache__/test_damped_line_search.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/__pycache__/test_damped_line_search.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/__pycache__/test_fibonacci_section.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/__pycache__/test_fibonacci_section.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/__pycache__/test_fibonacci_section.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/__pycache__/test_fixed_last_step_modifier.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/__pycache__/test_fixed_last_step_modifier.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/__pycache__/test_fixed_last_step_modifier.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/__pycache__/test_golden_section.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/__pycache__/test_golden_section.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/__pycache__/test_golden_section.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/__pycache__/test_goldstein_rule.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/__pycache__/test_goldstein_rule.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/__pycache__/test_goldstein_rule.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/__pycache__/test_quadratic_interpolation.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/__pycache__/test_quadratic_interpolation.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/__pycache__/test_quadratic_interpolation.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/__pycache__/test_simple_line_search.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/__pycache__/test_simple_line_search.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/__pycache__/test_simple_line_search.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/__pycache__/test_strong_wolfe_powell_rule.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/__pycache__/test_strong_wolfe_powell_rule.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/__pycache__/test_strong_wolfe_powell_rule.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/__pycache__/test_wolfe_powell_rule.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/__pycache__/test_wolfe_powell_rule.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/__pycache__/test_wolfe_powell_rule.cpython-37.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/__pycache__/test_adaptive_last_step_modifier.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/__pycache__/test_adaptive_last_step_modifier.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/__pycache__/test_adaptive_last_step_modifier.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/__pycache__/test_backtracking_search.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/__pycache__/test_backtracking_search.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/__pycache__/test_backtracking_search.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/__pycache__/test_cubic_interpolation.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/__pycache__/test_cubic_interpolation.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/__pycache__/test_cubic_interpolation.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/__pycache__/test_damped_line_search.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/__pycache__/test_damped_line_search.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/__pycache__/test_damped_line_search.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/__pycache__/test_fibonacci_section.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/__pycache__/test_fibonacci_section.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/__pycache__/test_fibonacci_section.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/__pycache__/test_fixed_last_step_modifier.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/__pycache__/test_fixed_last_step_modifier.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/__pycache__/test_fixed_last_step_modifier.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/__pycache__/test_golden_section.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/__pycache__/test_golden_section.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/__pycache__/test_golden_section.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/__pycache__/test_goldstein_rule.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/__pycache__/test_goldstein_rule.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/__pycache__/test_goldstein_rule.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/__pycache__/test_quadratic_interpolation.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/__pycache__/test_quadratic_interpolation.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/__pycache__/test_quadratic_interpolation.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/__pycache__/test_simple_line_search.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/__pycache__/test_simple_line_search.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/__pycache__/test_simple_line_search.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/__pycache__/test_strong_wolfe_powell_rule.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/__pycache__/test_strong_wolfe_powell_rule.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/__pycache__/test_strong_wolfe_powell_rule.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/__pycache__/test_wolfe_powell_rule.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/__pycache__/test_wolfe_powell_rule.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/__pycache__/test_wolfe_powell_rule.cpython-38.pyc 100644 /usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/line_search/tests/test_adaptive_last_step_modifier.py 100644 @@ -516,14 +516,14 @@ /usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/optimizer/__pycache__ 40755 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/optimizer/__pycache__/__init__.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/optimizer/__pycache__/__init__.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/optimizer/__pycache__/__init__.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/optimizer/__pycache__/optimizer.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/optimizer/__pycache__/optimizer.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/optimizer/__pycache__/optimizer.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/optimizer/__pycache__/standard_optimizer.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/optimizer/__pycache__/standard_optimizer.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/optimizer/__pycache__/standard_optimizer.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/optimizer/__pycache__/standard_optimizer_modifying.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/optimizer/__pycache__/standard_optimizer_modifying.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/optimizer/__pycache__/standard_optimizer_modifying.cpython-37.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/optimizer/__pycache__/__init__.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/optimizer/__pycache__/__init__.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/optimizer/__pycache__/__init__.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/optimizer/__pycache__/optimizer.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/optimizer/__pycache__/optimizer.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/optimizer/__pycache__/optimizer.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/optimizer/__pycache__/standard_optimizer.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/optimizer/__pycache__/standard_optimizer.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/optimizer/__pycache__/standard_optimizer.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/optimizer/__pycache__/standard_optimizer_modifying.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/optimizer/__pycache__/standard_optimizer_modifying.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/optimizer/__pycache__/standard_optimizer_modifying.cpython-38.pyc 100644 /usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/optimizer/optimizer.py 100644 @@ -534,35 +534,35 @@ /usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/__pycache__ 40755 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/__pycache__/__init__.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/__pycache__/__init__.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/__pycache__/__init__.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/__pycache__/conjugate_gradient_step.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/__pycache__/conjugate_gradient_step.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/__pycache__/conjugate_gradient_step.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/__pycache__/goldfeld_step.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/__pycache__/goldfeld_step.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/__pycache__/goldfeld_step.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/__pycache__/goldstein_price_step.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/__pycache__/goldstein_price_step.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/__pycache__/goldstein_price_step.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/__pycache__/gradient_step.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/__pycache__/gradient_step.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/__pycache__/gradient_step.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/__pycache__/local_brute_force_1dstep.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/__pycache__/local_brute_force_1dstep.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/__pycache__/local_brute_force_1dstep.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/__pycache__/marquardt_step.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/__pycache__/marquardt_step.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/__pycache__/marquardt_step.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/__pycache__/newton_step.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/__pycache__/newton_step.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/__pycache__/newton_step.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/__pycache__/partial_step.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/__pycache__/partial_step.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/__pycache__/partial_step.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/__pycache__/quasi_newton_step.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/__pycache__/quasi_newton_step.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/__pycache__/quasi_newton_step.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/__pycache__/restart_conjugate_gradient.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/__pycache__/restart_conjugate_gradient.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/__pycache__/restart_conjugate_gradient.cpython-37.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/__pycache__/__init__.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/__pycache__/__init__.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/__pycache__/__init__.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/__pycache__/conjugate_gradient_step.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/__pycache__/conjugate_gradient_step.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/__pycache__/conjugate_gradient_step.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/__pycache__/goldfeld_step.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/__pycache__/goldfeld_step.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/__pycache__/goldfeld_step.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/__pycache__/goldstein_price_step.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/__pycache__/goldstein_price_step.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/__pycache__/goldstein_price_step.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/__pycache__/gradient_step.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/__pycache__/gradient_step.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/__pycache__/gradient_step.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/__pycache__/local_brute_force_1dstep.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/__pycache__/local_brute_force_1dstep.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/__pycache__/local_brute_force_1dstep.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/__pycache__/marquardt_step.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/__pycache__/marquardt_step.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/__pycache__/marquardt_step.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/__pycache__/newton_step.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/__pycache__/newton_step.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/__pycache__/newton_step.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/__pycache__/partial_step.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/__pycache__/partial_step.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/__pycache__/partial_step.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/__pycache__/quasi_newton_step.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/__pycache__/quasi_newton_step.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/__pycache__/quasi_newton_step.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/__pycache__/restart_conjugate_gradient.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/__pycache__/restart_conjugate_gradient.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/__pycache__/restart_conjugate_gradient.cpython-38.pyc 100644 /usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/conjugate_gradient_step.py 100644 @@ -579,26 +579,26 @@ /usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/tests/__pycache__ 40755 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/tests/__pycache__/test_conjugate_gradient_step.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/tests/__pycache__/test_conjugate_gradient_step.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/tests/__pycache__/test_conjugate_gradient_step.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/tests/__pycache__/test_goldstein_price_step.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/tests/__pycache__/test_goldstein_price_step.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/tests/__pycache__/test_goldstein_price_step.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/tests/__pycache__/test_gradient_step.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/tests/__pycache__/test_gradient_step.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/tests/__pycache__/test_gradient_step.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/tests/__pycache__/test_marquardt_step.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/tests/__pycache__/test_marquardt_step.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/tests/__pycache__/test_marquardt_step.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/tests/__pycache__/test_newton_step.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/tests/__pycache__/test_newton_step.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/tests/__pycache__/test_newton_step.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/tests/__pycache__/test_partial_step.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/tests/__pycache__/test_partial_step.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/tests/__pycache__/test_partial_step.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/tests/__pycache__/test_quasi_newton_step.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/tests/__pycache__/test_quasi_newton_step.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/tests/__pycache__/test_quasi_newton_step.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/tests/__pycache__/test_restart_conjugate_gradient.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/tests/__pycache__/test_restart_conjugate_gradient.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/tests/__pycache__/test_restart_conjugate_gradient.cpython-37.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/tests/__pycache__/test_conjugate_gradient_step.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/tests/__pycache__/test_conjugate_gradient_step.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/tests/__pycache__/test_conjugate_gradient_step.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/tests/__pycache__/test_goldstein_price_step.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/tests/__pycache__/test_goldstein_price_step.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/tests/__pycache__/test_goldstein_price_step.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/tests/__pycache__/test_gradient_step.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/tests/__pycache__/test_gradient_step.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/tests/__pycache__/test_gradient_step.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/tests/__pycache__/test_marquardt_step.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/tests/__pycache__/test_marquardt_step.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/tests/__pycache__/test_marquardt_step.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/tests/__pycache__/test_newton_step.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/tests/__pycache__/test_newton_step.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/tests/__pycache__/test_newton_step.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/tests/__pycache__/test_partial_step.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/tests/__pycache__/test_partial_step.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/tests/__pycache__/test_partial_step.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/tests/__pycache__/test_quasi_newton_step.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/tests/__pycache__/test_quasi_newton_step.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/tests/__pycache__/test_quasi_newton_step.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/tests/__pycache__/test_restart_conjugate_gradient.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/tests/__pycache__/test_restart_conjugate_gradient.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/tests/__pycache__/test_restart_conjugate_gradient.cpython-38.pyc 100644 /usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/step/tests/test_conjugate_gradient_step.py 100644 @@ -614,14 +614,14 @@ /usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/tests/__pycache__ 40755 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/tests/__pycache__/__init__.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/tests/__pycache__/__init__.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/tests/__pycache__/__init__.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/tests/__pycache__/test_powell.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/tests/__pycache__/test_powell.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/tests/__pycache__/test_powell.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/tests/__pycache__/test_quadratic.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/tests/__pycache__/test_quadratic.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/tests/__pycache__/test_quadratic.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/tests/__pycache__/test_rosenbrock.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/tests/__pycache__/test_rosenbrock.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/tests/__pycache__/test_rosenbrock.cpython-37.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/tests/__pycache__/__init__.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/tests/__pycache__/__init__.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/tests/__pycache__/__init__.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/tests/__pycache__/test_powell.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/tests/__pycache__/test_powell.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/tests/__pycache__/test_powell.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/tests/__pycache__/test_quadratic.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/tests/__pycache__/test_quadratic.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/tests/__pycache__/test_quadratic.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/tests/__pycache__/test_rosenbrock.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/tests/__pycache__/test_rosenbrock.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/tests/__pycache__/test_rosenbrock.cpython-38.pyc 100644 /usr/lib/python3/site-packages/PyDSTool/Toolbox/optimizers/tests/test_powell.py 100644 @@ -639,68 +639,68 @@ /usr/lib/python3/site-packages/PyDSTool/__pycache__ 40755 -/usr/lib/python3/site-packages/PyDSTool/__pycache__/Events.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/__pycache__/Events.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/__pycache__/Events.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/__pycache__/FuncSpec.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/__pycache__/FuncSpec.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/__pycache__/FuncSpec.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/__pycache__/Interval.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/__pycache__/Interval.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/__pycache__/Interval.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/__pycache__/MProject.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/__pycache__/MProject.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/__pycache__/MProject.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/__pycache__/Model.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/__pycache__/Model.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/__pycache__/Model.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/__pycache__/ModelConstructor.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/__pycache__/ModelConstructor.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/__pycache__/ModelConstructor.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/__pycache__/ModelSpec.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/__pycache__/ModelSpec.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/__pycache__/ModelSpec.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/__pycache__/Points.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/__pycache__/Points.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/__pycache__/Points.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/__pycache__/Redirector.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/__pycache__/Redirector.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/__pycache__/Redirector.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/__pycache__/Symbolic.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/__pycache__/Symbolic.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/__pycache__/Symbolic.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/__pycache__/Trajectory.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/__pycache__/Trajectory.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/__pycache__/Trajectory.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/__pycache__/Variable.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/__pycache__/Variable.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/__pycache__/Variable.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/__pycache__/__init__.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/__pycache__/__init__.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/__pycache__/__init__.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/__pycache__/common.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/__pycache__/common.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/__pycache__/common.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/__pycache__/conf.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/__pycache__/conf.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/__pycache__/conf.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/__pycache__/errors.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/__pycache__/errors.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/__pycache__/errors.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/__pycache__/fixedpickle.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/__pycache__/fixedpickle.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/__pycache__/fixedpickle.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/__pycache__/integrator.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/__pycache__/integrator.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/__pycache__/integrator.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/__pycache__/matplotlib_import.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/__pycache__/matplotlib_import.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/__pycache__/matplotlib_import.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/__pycache__/parseUtils.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/__pycache__/parseUtils.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/__pycache__/parseUtils.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/__pycache__/scipy_ode.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/__pycache__/scipy_ode.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/__pycache__/scipy_ode.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/__pycache__/utils.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/__pycache__/utils.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/__pycache__/utils.cpython-37.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/__pycache__/Events.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/__pycache__/Events.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/__pycache__/Events.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/__pycache__/FuncSpec.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/__pycache__/FuncSpec.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/__pycache__/FuncSpec.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/__pycache__/Interval.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/__pycache__/Interval.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/__pycache__/Interval.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/__pycache__/MProject.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/__pycache__/MProject.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/__pycache__/MProject.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/__pycache__/Model.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/__pycache__/Model.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/__pycache__/Model.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/__pycache__/ModelConstructor.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/__pycache__/ModelConstructor.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/__pycache__/ModelConstructor.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/__pycache__/ModelSpec.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/__pycache__/ModelSpec.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/__pycache__/ModelSpec.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/__pycache__/Points.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/__pycache__/Points.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/__pycache__/Points.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/__pycache__/Redirector.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/__pycache__/Redirector.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/__pycache__/Redirector.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/__pycache__/Symbolic.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/__pycache__/Symbolic.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/__pycache__/Symbolic.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/__pycache__/Trajectory.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/__pycache__/Trajectory.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/__pycache__/Trajectory.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/__pycache__/Variable.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/__pycache__/Variable.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/__pycache__/Variable.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/__pycache__/__init__.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/__pycache__/__init__.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/__pycache__/__init__.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/__pycache__/common.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/__pycache__/common.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/__pycache__/common.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/__pycache__/conf.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/__pycache__/conf.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/__pycache__/conf.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/__pycache__/errors.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/__pycache__/errors.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/__pycache__/errors.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/__pycache__/fixedpickle.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/__pycache__/fixedpickle.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/__pycache__/fixedpickle.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/__pycache__/integrator.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/__pycache__/integrator.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/__pycache__/integrator.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/__pycache__/matplotlib_import.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/__pycache__/matplotlib_import.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/__pycache__/matplotlib_import.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/__pycache__/parseUtils.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/__pycache__/parseUtils.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/__pycache__/parseUtils.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/__pycache__/scipy_ode.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/__pycache__/scipy_ode.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/__pycache__/scipy_ode.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/__pycache__/utils.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/__pycache__/utils.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/__pycache__/utils.cpython-38.pyc 100644 /usr/lib/python3/site-packages/PyDSTool/common.py 100755 @@ -1587,299 +1587,299 @@ /usr/lib/python3/site-packages/PyDSTool/tests/__pycache__ 40755 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/CIN.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/CIN.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/CIN.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/DAE_example.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/DAE_example.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/DAE_example.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/Dopri_backwards_test.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/Dopri_backwards_test.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/Dopri_backwards_test.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/HH_DSSRTtest.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/HH_DSSRTtest.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/HH_DSSRTtest.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/HH_adjointPRC.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/HH_adjointPRC.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/HH_adjointPRC.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/HH_loaded.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/HH_loaded.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/HH_loaded.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/HH_loaded_Cintegrator.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/HH_loaded_Cintegrator.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/HH_loaded_Cintegrator.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/HH_model.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/HH_model.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/HH_model.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/HH_model_Cintegrator.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/HH_model_Cintegrator.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/HH_model_Cintegrator.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/HH_model_Cintegrator_testbounds.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/HH_model_Cintegrator_testbounds.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/HH_model_Cintegrator_testbounds.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/HH_model_testbounds.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/HH_model_testbounds.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/HH_model_testbounds.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/IF_delaynet.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/IF_delaynet.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/IF_delaynet.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/IF_delaynet_syn.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/IF_delaynet_syn.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/IF_delaynet_syn.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/IF_model_test.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/IF_model_test.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/IF_model_test.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/IF_squarespike_model.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/IF_squarespike_model.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/IF_squarespike_model.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/ML_adjointPRC.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/ML_adjointPRC.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/ML_adjointPRC.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/ModelSpec_test.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/ModelSpec_test.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/ModelSpec_test.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/MultiCompartments.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/MultiCompartments.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/MultiCompartments.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/MultiCompartments2.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/MultiCompartments2.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/MultiCompartments2.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/NineML_import_test.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/NineML_import_test.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/NineML_import_test.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PointInfo_test.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PointInfo_test.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PointInfo_test.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_ABCReaction.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_ABCReaction.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_ABCReaction.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_ABReaction.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_ABReaction.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_ABReaction.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_Brusselator.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_Brusselator.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_Brusselator.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_Catalytic.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_Catalytic.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_Catalytic.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_Catalytic_demo.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_Catalytic_demo.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_Catalytic_demo.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_DiscPredPrey.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_DiscPredPrey.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_DiscPredPrey.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_Hamiltonian.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_Hamiltonian.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_Hamiltonian.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_HindmarshRose.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_HindmarshRose.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_HindmarshRose.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_Hopfield.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_Hopfield.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_Hopfield.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_LPNeuron.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_LPNeuron.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_LPNeuron.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_LevelCurve.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_LevelCurve.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_LevelCurve.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_Logistic.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_Logistic.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_Logistic.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_Lorenz.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_Lorenz.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_Lorenz.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_MorrisLecar_TypeI.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_MorrisLecar_TypeI.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_MorrisLecar_TypeI.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_MorrisLecar_TypeII.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_MorrisLecar_TypeII.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_MorrisLecar_TypeII.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_NewLorenz.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_NewLorenz.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_NewLorenz.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_PredPrey.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_PredPrey.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_PredPrey.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_SaddleNode.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_SaddleNode.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_SaddleNode.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_hybrid_osc.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_hybrid_osc.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_hybrid_osc.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_vanDerPol.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_vanDerPol.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_vanDerPol.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PySCes_import_test.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PySCes_import_test.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PySCes_import_test.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/SLIP_2D.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/SLIP_2D.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/SLIP_2D.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/SLIP_2D_maps.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/SLIP_2D_maps.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/SLIP_2D_maps.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/SLIP_2D_pdc.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/SLIP_2D_pdc.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/SLIP_2D_pdc.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/SLIP_plot.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/SLIP_plot.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/SLIP_plot.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/Symbolic_Diff_test.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/Symbolic_Diff_test.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/Symbolic_Diff_test.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/Symbolic_test.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/Symbolic_test.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/Symbolic_test.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/Tutorial_Calcium.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/Tutorial_Calcium.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/Tutorial_Calcium.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/Tutorial_LorenzMap.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/Tutorial_LorenzMap.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/Tutorial_LorenzMap.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/Tutorial_PredatorPrey.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/Tutorial_PredatorPrey.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/Tutorial_PredatorPrey.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/Tutorial_SymbolicJac.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/Tutorial_SymbolicJac.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/Tutorial_SymbolicJac.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/Tutorial_VdP.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/Tutorial_VdP.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/Tutorial_VdP.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/Tutorial_compneuro.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/Tutorial_compneuro.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/Tutorial_compneuro.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/Tutorial_linear.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/Tutorial_linear.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/Tutorial_linear.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/basic_gen_tests.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/basic_gen_tests.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/basic_gen_tests.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/basic_gen_tests_C.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/basic_gen_tests_C.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/basic_gen_tests_C.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/dopri_event_test.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/dopri_event_test.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/dopri_event_test.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/embedded_map_test.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/embedded_map_test.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/embedded_map_test.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/expfn_test.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/expfn_test.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/expfn_test.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/fingermodel_auxvartest.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/fingermodel_auxvartest.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/fingermodel_auxvartest.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/fingermodel_vode.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/fingermodel_vode.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/fingermodel_vode.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/forced_spring.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/forced_spring.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/forced_spring.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/freefinger_noforce_radau.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/freefinger_noforce_radau.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/freefinger_noforce_radau.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/funcspec_tests.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/funcspec_tests.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/funcspec_tests.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/imp_load_test.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/imp_load_test.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/imp_load_test.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/impfn_test.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/impfn_test.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/impfn_test.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/imprecise_event_test.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/imprecise_event_test.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/imprecise_event_test.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/interp_dopri_test.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/interp_dopri_test.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/interp_dopri_test.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/interp_piecewise_test.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/interp_piecewise_test.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/interp_piecewise_test.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/interp_vode_test.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/interp_vode_test.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/interp_vode_test.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/joe_pest.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/joe_pest.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/joe_pest.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/mapsystem_test.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/mapsystem_test.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/mapsystem_test.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/numeric_diff_test.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/numeric_diff_test.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/numeric_diff_test.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/objectdelete_test.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/objectdelete_test.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/objectdelete_test.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/pest_test1.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/pest_test1.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/pest_test1.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/pest_test2.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/pest_test2.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/pest_test2.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/pest_test3.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/pest_test3.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/pest_test3.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/pest_test3_Cintegrator.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/pest_test3_Cintegrator.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/pest_test3_Cintegrator.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/pest_test4_Cintegrator.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/pest_test4_Cintegrator.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/pest_test4_Cintegrator.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/phaseplane_HHtest.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/phaseplane_HHtest.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/phaseplane_HHtest.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/poly_interp_test.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/poly_interp_test.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/poly_interp_test.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/radau_event_test.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/radau_event_test.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/radau_event_test.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/run_all_tests.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/run_all_tests.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/run_all_tests.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/saveload_test.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/saveload_test.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/saveload_test.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/sloppycell_example.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/sloppycell_example.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/sloppycell_example.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/splinetest.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/splinetest.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/splinetest.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/test_bd_containment.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/test_bd_containment.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/test_bd_containment.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/test_context_spikes.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/test_context_spikes.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/test_context_spikes.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/test_find_nearby_ball.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/test_find_nearby_ball.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/test_find_nearby_ball.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/test_hybrid_extinputs.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/test_hybrid_extinputs.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/test_hybrid_extinputs.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/test_hybrid_extinputs_Cintegrator.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/test_hybrid_extinputs_Cintegrator.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/test_hybrid_extinputs_Cintegrator.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/test_interval.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/test_interval.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/test_interval.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/test_pointsets.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/test_pointsets.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/test_pointsets.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/test_variable_traj.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/test_variable_traj.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/test_variable_traj.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/traj_gt0_test.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/traj_gt0_test.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/traj_gt0_test.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/vode_event_test1.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/vode_event_test1.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/vode_event_test1.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/vode_event_test2.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/vode_event_test2.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/vode_event_test2.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/vode_withJac_test.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/vode_withJac_test.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/vode_withJac_test.cpython-37.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/CIN.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/CIN.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/CIN.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/DAE_example.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/DAE_example.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/DAE_example.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/Dopri_backwards_test.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/Dopri_backwards_test.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/Dopri_backwards_test.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/HH_DSSRTtest.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/HH_DSSRTtest.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/HH_DSSRTtest.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/HH_adjointPRC.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/HH_adjointPRC.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/HH_adjointPRC.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/HH_loaded.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/HH_loaded.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/HH_loaded.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/HH_loaded_Cintegrator.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/HH_loaded_Cintegrator.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/HH_loaded_Cintegrator.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/HH_model.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/HH_model.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/HH_model.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/HH_model_Cintegrator.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/HH_model_Cintegrator.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/HH_model_Cintegrator.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/HH_model_Cintegrator_testbounds.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/HH_model_Cintegrator_testbounds.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/HH_model_Cintegrator_testbounds.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/HH_model_testbounds.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/HH_model_testbounds.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/HH_model_testbounds.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/IF_delaynet.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/IF_delaynet.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/IF_delaynet.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/IF_delaynet_syn.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/IF_delaynet_syn.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/IF_delaynet_syn.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/IF_model_test.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/IF_model_test.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/IF_model_test.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/IF_squarespike_model.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/IF_squarespike_model.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/IF_squarespike_model.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/ML_adjointPRC.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/ML_adjointPRC.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/ML_adjointPRC.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/ModelSpec_test.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/ModelSpec_test.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/ModelSpec_test.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/MultiCompartments.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/MultiCompartments.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/MultiCompartments.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/MultiCompartments2.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/MultiCompartments2.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/MultiCompartments2.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/NineML_import_test.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/NineML_import_test.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/NineML_import_test.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PointInfo_test.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PointInfo_test.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PointInfo_test.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_ABCReaction.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_ABCReaction.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_ABCReaction.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_ABReaction.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_ABReaction.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_ABReaction.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_Brusselator.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_Brusselator.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_Brusselator.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_Catalytic.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_Catalytic.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_Catalytic.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_Catalytic_demo.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_Catalytic_demo.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_Catalytic_demo.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_DiscPredPrey.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_DiscPredPrey.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_DiscPredPrey.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_Hamiltonian.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_Hamiltonian.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_Hamiltonian.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_HindmarshRose.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_HindmarshRose.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_HindmarshRose.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_Hopfield.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_Hopfield.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_Hopfield.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_LPNeuron.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_LPNeuron.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_LPNeuron.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_LevelCurve.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_LevelCurve.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_LevelCurve.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_Logistic.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_Logistic.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_Logistic.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_Lorenz.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_Lorenz.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_Lorenz.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_MorrisLecar_TypeI.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_MorrisLecar_TypeI.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_MorrisLecar_TypeI.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_MorrisLecar_TypeII.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_MorrisLecar_TypeII.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_MorrisLecar_TypeII.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_NewLorenz.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_NewLorenz.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_NewLorenz.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_PredPrey.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_PredPrey.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_PredPrey.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_SaddleNode.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_SaddleNode.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_SaddleNode.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_hybrid_osc.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_hybrid_osc.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_hybrid_osc.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_vanDerPol.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_vanDerPol.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PyCont_vanDerPol.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PySCes_import_test.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PySCes_import_test.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/PySCes_import_test.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/SLIP_2D.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/SLIP_2D.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/SLIP_2D.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/SLIP_2D_maps.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/SLIP_2D_maps.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/SLIP_2D_maps.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/SLIP_2D_pdc.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/SLIP_2D_pdc.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/SLIP_2D_pdc.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/SLIP_plot.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/SLIP_plot.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/SLIP_plot.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/Symbolic_Diff_test.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/Symbolic_Diff_test.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/Symbolic_Diff_test.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/Symbolic_test.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/Symbolic_test.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/Symbolic_test.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/Tutorial_Calcium.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/Tutorial_Calcium.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/Tutorial_Calcium.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/Tutorial_LorenzMap.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/Tutorial_LorenzMap.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/Tutorial_LorenzMap.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/Tutorial_PredatorPrey.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/Tutorial_PredatorPrey.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/Tutorial_PredatorPrey.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/Tutorial_SymbolicJac.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/Tutorial_SymbolicJac.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/Tutorial_SymbolicJac.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/Tutorial_VdP.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/Tutorial_VdP.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/Tutorial_VdP.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/Tutorial_compneuro.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/Tutorial_compneuro.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/Tutorial_compneuro.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/Tutorial_linear.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/Tutorial_linear.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/Tutorial_linear.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/basic_gen_tests.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/basic_gen_tests.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/basic_gen_tests.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/basic_gen_tests_C.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/basic_gen_tests_C.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/basic_gen_tests_C.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/dopri_event_test.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/dopri_event_test.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/dopri_event_test.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/embedded_map_test.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/embedded_map_test.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/embedded_map_test.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/expfn_test.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/expfn_test.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/expfn_test.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/fingermodel_auxvartest.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/fingermodel_auxvartest.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/fingermodel_auxvartest.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/fingermodel_vode.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/fingermodel_vode.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/fingermodel_vode.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/forced_spring.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/forced_spring.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/forced_spring.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/freefinger_noforce_radau.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/freefinger_noforce_radau.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/freefinger_noforce_radau.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/funcspec_tests.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/funcspec_tests.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/funcspec_tests.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/imp_load_test.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/imp_load_test.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/imp_load_test.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/impfn_test.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/impfn_test.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/impfn_test.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/imprecise_event_test.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/imprecise_event_test.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/imprecise_event_test.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/interp_dopri_test.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/interp_dopri_test.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/interp_dopri_test.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/interp_piecewise_test.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/interp_piecewise_test.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/interp_piecewise_test.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/interp_vode_test.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/interp_vode_test.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/interp_vode_test.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/joe_pest.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/joe_pest.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/joe_pest.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/mapsystem_test.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/mapsystem_test.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/mapsystem_test.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/numeric_diff_test.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/numeric_diff_test.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/numeric_diff_test.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/objectdelete_test.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/objectdelete_test.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/objectdelete_test.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/pest_test1.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/pest_test1.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/pest_test1.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/pest_test2.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/pest_test2.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/pest_test2.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/pest_test3.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/pest_test3.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/pest_test3.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/pest_test3_Cintegrator.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/pest_test3_Cintegrator.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/pest_test3_Cintegrator.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/pest_test4_Cintegrator.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/pest_test4_Cintegrator.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/pest_test4_Cintegrator.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/phaseplane_HHtest.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/phaseplane_HHtest.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/phaseplane_HHtest.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/poly_interp_test.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/poly_interp_test.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/poly_interp_test.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/radau_event_test.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/radau_event_test.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/radau_event_test.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/run_all_tests.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/run_all_tests.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/run_all_tests.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/saveload_test.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/saveload_test.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/saveload_test.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/sloppycell_example.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/sloppycell_example.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/sloppycell_example.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/splinetest.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/splinetest.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/splinetest.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/test_bd_containment.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/test_bd_containment.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/test_bd_containment.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/test_context_spikes.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/test_context_spikes.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/test_context_spikes.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/test_find_nearby_ball.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/test_find_nearby_ball.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/test_find_nearby_ball.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/test_hybrid_extinputs.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/test_hybrid_extinputs.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/test_hybrid_extinputs.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/test_hybrid_extinputs_Cintegrator.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/test_hybrid_extinputs_Cintegrator.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/test_hybrid_extinputs_Cintegrator.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/test_interval.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/test_interval.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/test_interval.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/test_pointsets.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/test_pointsets.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/test_pointsets.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/test_variable_traj.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/test_variable_traj.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/test_variable_traj.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/traj_gt0_test.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/traj_gt0_test.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/traj_gt0_test.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/vode_event_test1.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/vode_event_test1.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/vode_event_test1.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/vode_event_test2.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/vode_event_test2.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/vode_event_test2.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/vode_withJac_test.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/vode_withJac_test.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/PyDSTool/tests/__pycache__/vode_withJac_test.cpython-38.pyc 100644 /usr/lib/python3/site-packages/PyDSTool/tests/basic_gen_tests.py 100644