Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

Commit a959ae6

Browse files
committed
Merge branch 'master' of https://github.com/AllenDowney/ModSimPy
2 parents 0d3b714 + fbc364b commit a959ae6

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

code/modsim.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
# make sure we have Python 3.6 or better
1515
import sys
1616
if sys.version_info < (3, 6):
17-
logger.warn('modsim.py depends on Python 3.6 features.')
17+
logger.warning('modsim.py depends on Python 3.6 features.')
1818

1919
import inspect
2020
import matplotlib.pyplot as plt
@@ -385,7 +385,7 @@ def run_odeint(system, slope_func, **options):
385385
solution will be computed:"""
386386
raise ValueError(msg)
387387

388-
# make sure `system` contains `ts`
388+
# make sure `system` contains `init`
389389
if not hasattr(system, 'init'):
390390
msg = """It looks like `system` does not contain `init`
391391
as a system variable. `init` should be a State
@@ -729,10 +729,10 @@ def contour(df, **options):
729729
730730
df: DataFrame
731731
"""
732-
x = results.columns
733-
y = results.index
732+
x = df.columns
733+
y = df.index
734734
X, Y = np.meshgrid(x, y)
735-
cs = plt.contour(X, Y, results, **options)
735+
cs = plt.contour(X, Y, df, **options)
736736
plt.clabel(cs, inline=1, fontsize=10)
737737

738738

@@ -812,13 +812,13 @@ def __init__(self, fig, axes_seq):
812812
self.axes_seq = axes_seq
813813
self.current_axes_index = 0
814814

815-
def current_axes():
815+
def current_axes(self):
816816
return self.axes_seq(self.current_axes_index)
817817

818818
# TODO: consider making SubPlots iterable
819819
def next_axes(self):
820820
self.current_axes_index += 1
821-
return current_axes()
821+
return self.current_axes()
822822

823823

824824
def subplots(*args, **options):

code/test_install.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
# make sure we have Python 3.6 or better
1515
import sys
1616
if sys.version_info < (3, 6):
17-
logger.warn('modsim.py depends on Python 3.6 features.')
17+
logger.warning('modsim.py depends on Python 3.6 features.')
1818

1919
import inspect
2020
import matplotlib.pyplot as plt

0 commit comments

Comments
 (0)