diff --git a/episodes/02-numpy.md b/episodes/02-numpy.md
index f281834b79..8ff0011b4f 100644
--- a/episodes/02-numpy.md
+++ b/episodes/02-numpy.md
@@ -340,15 +340,15 @@ We'll also use multiple assignment,
a convenient Python feature that will enable us to do this all in one line.
```python
-maxval, minval, stdval = numpy.amax(data), numpy.amin(data), numpy.std(data)
+maxval, minval, stdval = numpy.max(data), numpy.min(data), numpy.std(data)
print('maximum inflammation:', maxval)
print('minimum inflammation:', minval)
print('standard deviation:', stdval)
```
-Here we've assigned the return value from `numpy.amax(data)` to the variable `maxval`, the value
-from `numpy.amin(data)` to `minval`, and so on.
+Here we've assigned the return value from `numpy.max(data)` to the variable `maxval`, the value
+from `numpy.min(data)` to `minval`, and so on.
```output
maximum inflammation: 20.0
@@ -374,18 +374,6 @@ and press the Tab key twice for a listing of what is available. You c
for example: `help(numpy.cumprod)`.
-::::::::::::::::::::::::::::::::::::::::::::::::::
-
-::::::::::::::::::::::::::::::::::::::::: callout
-
-## Confusing Function Names
-
-One might wonder why the functions are called `amax` and `amin` and not `max` and `min` or why the other is called `mean` and not `amean`.
-The package `numpy` does provide functions `max` and `min` that are fully equivalent to `amax` and `amin`, but they share a name with standard library functions `max` and `min` that come with Python itself.
-Referring to the functions like we did above, that is `numpy.max` for example, does not cause problems, but there are other ways to refer to them that could.
-In addition, text editors might highlight (color) these functions like standard library function, even though they belong to NumPy, which can be confusing and lead to errors.
-Since there is no function called `mean` in the standard library, there is no function called `amean`.
-
::::::::::::::::::::::::::::::::::::::::::::::::::
When analyzing data, though,
@@ -397,7 +385,7 @@ then ask it to do the calculation:
```python
patient_0 = data[0, :] # 0 on the first axis (rows), everything on the second (columns)
-print('maximum inflammation for patient 0:', numpy.amax(patient_0))
+print('maximum inflammation for patient 0:', numpy.max(patient_0))
```
```output
@@ -408,7 +396,7 @@ We don't actually need to store the row in a variable of its own.
Instead, we can combine the selection and the function call:
```python
-print('maximum inflammation for patient 2:', numpy.amax(data[2, :]))
+print('maximum inflammation for patient 2:', numpy.max(data[2, :]))
```
```output
@@ -420,11 +408,11 @@ next diagram on the left) or the average for each day (as in the
diagram on the right)? As the diagram below shows, we want to perform the
operation across an axis:
-{alt="Per-patient maximum inflammation is computed row-wise across all columns usingnumpy.amax(data, axis=1). Per-day average inflammation is computed column-wise across all rows usingnumpy.mean(data, axis=0)."}
+{alt="Per-patient maximum inflammation is computed row-wise across all columns usingnumpy.max(data, axis=1). Per-day average inflammation is computed column-wise across all rows usingnumpy.mean(data, axis=0)."}
-To find the **maximum inflammation reported for each patient**, you would apply the `max` function moving across the columns (axis 1). To find the **daily average inflammation reported across patients**, you would apply the `mean` function moving down the rows (axis 0).
+To find the **maximum inflammation reported for each patient**, you would apply the `max` function moving across the columns (axis 1). To find the **daily average inflammation reported across patients**, you would apply the `mean` function moving down the rows (axis 0).
-To support this functionality, most array functions allow us to specify the axis we want to work on. If we ask for the max across axis 1 (columns in our 2D example), we get:
+To support this functionality, most array functions allow us to specify the axis we want to work on. If we ask for the maximum across axis 1 (columns in our 2D example), we get:
```python
print(numpy.max(data, axis=1))
@@ -437,7 +425,7 @@ print(numpy.max(data, axis=1))
17. 16. 17. 19. 18. 18.]
```
-As a quick check, we can ask this array what its shape is. We expect 60 patient maximums:
+As a quick check, we can ask this array what its shape is. We expect 60 patient maxima:
```python
print(numpy.max(data, axis=1).shape)
@@ -779,11 +767,11 @@ it matter if the change in inflammation is an increase or a decrease?
## Solution
-By using the `numpy.amax()` function after you apply the `numpy.diff()`
+By using the `numpy.max()` function after you apply the `numpy.diff()`
function, you will get the largest difference between days.
```python
-numpy.amax(numpy.diff(data, axis=1), axis=1)
+numpy.max(numpy.diff(data, axis=1), axis=1)
```
```python
@@ -804,7 +792,7 @@ Notice the difference if you get the largest *absolute* difference
between readings.
```python
-numpy.amax(numpy.absolute(numpy.diff(data, axis=1)), axis=1)
+numpy.max(numpy.absolute(numpy.diff(data, axis=1)), axis=1)
```
```python
@@ -831,7 +819,7 @@ array([ 12., 14., 11., 13., 11., 13., 10., 12., 10., 10., 10.,
- Array indices start at 0, not 1.
- Use `low:high` to specify a `slice` that includes the indices from `low` to `high-1`.
- Use `# some kind of explanation` to add comments to programs.
-- Use `numpy.mean(array)`, `numpy.amax(array)`, and `numpy.amin(array)` to calculate simple statistics.
+- Use `numpy.mean(array)`, `numpy.max(array)`, and `numpy.min(array)` to calculate simple statistics.
- Use `numpy.mean(array, axis=0)` or `numpy.mean(array, axis=1)` to calculate statistics across the specified axis.
::::::::::::::::::::::::::::::::::::::::::::::::::
diff --git a/episodes/03-matplotlib.md b/episodes/03-matplotlib.md
index af0e5faa07..4ab1c432b2 100644
--- a/episodes/03-matplotlib.md
+++ b/episodes/03-matplotlib.md
@@ -79,14 +79,14 @@ the medication takes 3 weeks to take effect. But a good data scientist doesn't
average of a dataset, so let's have a look at two other statistics:
```python
-max_plot = matplotlib.pyplot.plot(numpy.amax(data, axis=0))
+max_plot = matplotlib.pyplot.plot(numpy.max(data, axis=0))
matplotlib.pyplot.show()
```
{alt='A line graph showing the maximum inflammation across all patients over a 40-day period.'}
```python
-min_plot = matplotlib.pyplot.plot(numpy.amin(data, axis=0))
+min_plot = matplotlib.pyplot.plot(numpy.min(data, axis=0))
matplotlib.pyplot.show()
```
@@ -127,10 +127,10 @@ axes1.set_ylabel('average')
axes1.plot(numpy.mean(data, axis=0))
axes2.set_ylabel('max')
-axes2.plot(numpy.amax(data, axis=0))
+axes2.plot(numpy.max(data, axis=0))
axes3.set_ylabel('min')
-axes3.plot(numpy.amin(data, axis=0))
+axes3.plot(numpy.min(data, axis=0))
fig.tight_layout()
@@ -215,7 +215,7 @@ Update your plotting code to automatically set a more appropriate scale.
```python
# One method
axes3.set_ylabel('min')
-axes3.plot(numpy.amin(data, axis=0))
+axes3.plot(numpy.min(data, axis=0))
axes3.set_ylim(0, 6)
```
@@ -227,10 +227,10 @@ axes3.set_ylim(0, 6)
```python
# A more automated approach
-min_data = numpy.amin(data, axis=0)
+min_data = numpy.min(data, axis=0)
axes3.set_ylabel('min')
axes3.plot(min_data)
-axes3.set_ylim(numpy.amin(min_data), numpy.amax(min_data) * 1.1)
+axes3.set_ylim(numpy.min(min_data), numpy.max(min_data) * 1.1)
```
:::::::::::::::::::::::::
@@ -269,10 +269,10 @@ axes1.set_ylabel('average')
axes1.plot(numpy.mean(data, axis=0), drawstyle='steps-mid')
axes2.set_ylabel('max')
-axes2.plot(numpy.amax(data, axis=0), drawstyle='steps-mid')
+axes2.plot(numpy.max(data, axis=0), drawstyle='steps-mid')
axes3.set_ylabel('min')
-axes3.plot(numpy.amin(data, axis=0), drawstyle='steps-mid')
+axes3.plot(numpy.min(data, axis=0), drawstyle='steps-mid')
fig.tight_layout()
@@ -336,10 +336,10 @@ axes1.set_ylabel('average')
axes1.plot(numpy.mean(data, axis=0))
axes2.set_ylabel('max')
-axes2.plot(numpy.amax(data, axis=0))
+axes2.plot(numpy.max(data, axis=0))
axes3.set_ylabel('min')
-axes3.plot(numpy.amin(data, axis=0))
+axes3.plot(numpy.min(data, axis=0))
fig.tight_layout()
diff --git a/episodes/06-files.md b/episodes/06-files.md
index e3330943f0..0ba85f6820 100644
--- a/episodes/06-files.md
+++ b/episodes/06-files.md
@@ -74,10 +74,10 @@ for filename in filenames:
axes1.plot(numpy.mean(data, axis=0))
axes2.set_ylabel('max')
- axes2.plot(numpy.amax(data, axis=0))
+ axes2.plot(numpy.max(data, axis=0))
axes3.set_ylabel('min')
- axes3.plot(numpy.amin(data, axis=0))
+ axes3.plot(numpy.min(data, axis=0))
fig.tight_layout()
matplotlib.pyplot.show()
@@ -199,10 +199,10 @@ axes1.set_ylabel('average')
axes1.plot(numpy.mean(composite_data, axis=0))
axes2.set_ylabel('max')
-axes2.plot(numpy.amax(composite_data, axis=0))
+axes2.plot(numpy.max(composite_data, axis=0))
axes3.set_ylabel('min')
-axes3.plot(numpy.amin(composite_data, axis=0))
+axes3.plot(numpy.min(composite_data, axis=0))
fig.tight_layout()
diff --git a/episodes/07-cond.md b/episodes/07-cond.md
index 8f46e15714..dd0f44fa0d 100644
--- a/episodes/07-cond.md
+++ b/episodes/07-cond.md
@@ -174,8 +174,8 @@ if maximum inflammation in the beginning (day 0) and in the middle (day 20) of
the study are equal to the corresponding day numbers.
```python
-max_inflammation_0 = numpy.amax(data, axis=0)[0]
-max_inflammation_20 = numpy.amax(data, axis=0)[20]
+max_inflammation_0 = numpy.max(data, axis=0)[0]
+max_inflammation_20 = numpy.max(data, axis=0)[20]
if max_inflammation_0 == 0 and max_inflammation_20 == 20:
print('Suspicious looking maxima!')
@@ -186,7 +186,7 @@ the minima per day were all zero (looks like a healthy person snuck into our stu
We can also check for this with an `elif` condition:
```python
-elif numpy.sum(numpy.amin(data, axis=0)) == 0:
+elif numpy.sum(numpy.min(data, axis=0)) == 0:
print('Minima add up to zero!')
```
@@ -202,12 +202,12 @@ Let's test that out:
```python
data = numpy.loadtxt(fname='inflammation-01.csv', delimiter=',')
-max_inflammation_0 = numpy.amax(data, axis=0)[0]
-max_inflammation_20 = numpy.amax(data, axis=0)[20]
+max_inflammation_0 = numpy.max(data, axis=0)[0]
+max_inflammation_20 = numpy.max(data, axis=0)[20]
if max_inflammation_0 == 0 and max_inflammation_20 == 20:
print('Suspicious looking maxima!')
-elif numpy.sum(numpy.amin(data, axis=0)) == 0:
+elif numpy.sum(numpy.min(data, axis=0)) == 0:
print('Minima add up to zero!')
else:
print('Seems OK!')
@@ -220,12 +220,12 @@ Suspicious looking maxima!
```python
data = numpy.loadtxt(fname='inflammation-03.csv', delimiter=',')
-max_inflammation_0 = numpy.amax(data, axis=0)[0]
-max_inflammation_20 = numpy.amax(data, axis=0)[20]
+max_inflammation_0 = numpy.max(data, axis=0)[0]
+max_inflammation_20 = numpy.max(data, axis=0)[20]
if max_inflammation_0 == 0 and max_inflammation_20 == 20:
print('Suspicious looking maxima!')
-elif numpy.sum(numpy.amin(data, axis=0)) == 0:
+elif numpy.sum(numpy.min(data, axis=0)) == 0:
print('Minima add up to zero!')
else:
print('Seems OK!')
diff --git a/episodes/08-func.md b/episodes/08-func.md
index cbbd4353d5..7a5dc2f82d 100644
--- a/episodes/08-func.md
+++ b/episodes/08-func.md
@@ -217,10 +217,10 @@ def visualize(filename):
axes1.plot(numpy.mean(data, axis=0))
axes2.set_ylabel('max')
- axes2.plot(numpy.amax(data, axis=0))
+ axes2.plot(numpy.max(data, axis=0))
axes3.set_ylabel('min')
- axes3.plot(numpy.amin(data, axis=0))
+ axes3.plot(numpy.min(data, axis=0))
fig.tight_layout()
matplotlib.pyplot.show()
@@ -234,9 +234,9 @@ def detect_problems(filename):
data = numpy.loadtxt(fname=filename, delimiter=',')
- if numpy.amax(data, axis=0)[0] == 0 and numpy.amax(data, axis=0)[20] == 20:
+ if numpy.max(data, axis=0)[0] == 0 and numpy.max(data, axis=0)[20] == 20:
print('Suspicious looking maxima!')
- elif numpy.sum(numpy.amin(data, axis=0)) == 0:
+ elif numpy.sum(numpy.min(data, axis=0)) == 0:
print('Minima add up to zero!')
else:
print('Seems OK!')
@@ -317,12 +317,12 @@ It's hard to tell from the default output whether the result is correct,
but there are a few tests that we can run to reassure us:
```python
-print('original min, mean, and max are:', numpy.amin(data), numpy.mean(data), numpy.amax(data))
+print('original min, mean, and max are:', numpy.min(data), numpy.mean(data), numpy.max(data))
offset_data = offset_mean(data, 0)
print('min, mean, and max of offset data are:',
- numpy.amin(offset_data),
+ numpy.min(offset_data),
numpy.mean(offset_data),
- numpy.amax(offset_data))
+ numpy.max(offset_data))
```
```output
@@ -779,8 +779,8 @@ then the replacement for a value `v` should be `(v-L) / (H-L)`.)
```python
def rescale(input_array):
- L = numpy.amin(input_array)
- H = numpy.amax(input_array)
+ L = numpy.min(input_array)
+ H = numpy.max(input_array)
output_array = (input_array - L) / (H - L)
return output_array
```
@@ -836,8 +836,8 @@ do the two functions always behave the same way?
```python
def rescale(input_array, low_val=0.0, high_val=1.0):
"""rescales input array values to lie between low_val and high_val"""
- L = numpy.amin(input_array)
- H = numpy.amax(input_array)
+ L = numpy.min(input_array)
+ H = numpy.max(input_array)
intermed_array = (input_array - L) / (H - L)
output_array = intermed_array * (high_val - low_val) + low_val
return output_array
diff --git a/episodes/10-defensive.md b/episodes/10-defensive.md
index 3e13d44c8d..897fd5ac13 100644
--- a/episodes/10-defensive.md
+++ b/episodes/10-defensive.md
@@ -527,7 +527,7 @@ can you think of a function that will pass your tests but not his/hers or vice v
# a possible pre-condition:
assert len(input_array) > 0, 'Array length must be non-zero'
# a possible post-condition:
-assert numpy.amin(input_array) <= average <= numpy.amax(input_array),
+assert numpy.min(input_array) <= average <= numpy.max(input_array),
'Average should be between min and max of input values (inclusive)'
```
diff --git a/episodes/12-cmdline.md b/episodes/12-cmdline.md
index 9779c98495..4c7ee70b3d 100644
--- a/episodes/12-cmdline.md
+++ b/episodes/12-cmdline.md
@@ -450,11 +450,11 @@ def main():
data = numpy.loadtxt(filename, delimiter=',')
if action == '--min':
- values = numpy.amin(data, axis=1)
+ values = numpy.min(data, axis=1)
elif action == '--mean':
values = numpy.mean(data, axis=1)
elif action == '--max':
- values = numpy.amax(data, axis=1)
+ values = numpy.max(data, axis=1)
for val in values:
print(val)
@@ -513,11 +513,11 @@ def process(filename, action):
data = numpy.loadtxt(filename, delimiter=',')
if action == '--min':
- values = numpy.amin(data, axis=1)
+ values = numpy.min(data, axis=1)
elif action == '--mean':
values = numpy.mean(data, axis=1)
elif action == '--max':
- values = numpy.amax(data, axis=1)
+ values = numpy.max(data, axis=1)
for val in values:
print(val)
@@ -611,11 +611,11 @@ def process(filename, action):
data = numpy.loadtxt(filename, delimiter=',')
if action == '--min':
- values = numpy.amin(data, axis=1)
+ values = numpy.min(data, axis=1)
elif action == '--mean':
values = numpy.mean(data, axis=1)
elif action == '--max':
- values = numpy.amax(data, axis=1)
+ values = numpy.max(data, axis=1)
for val in values:
print(val)
@@ -780,11 +780,11 @@ def process(filename, action):
data = numpy.loadtxt(filename, delimiter=',')
if action == '-n':
- values = numpy.amin(data, axis=1)
+ values = numpy.min(data, axis=1)
elif action == '-m':
values = numpy.mean(data, axis=1)
elif action == '-x':
- values = numpy.amax(data, axis=1)
+ values = numpy.max(data, axis=1)
for val in values:
print(val)
@@ -839,11 +839,11 @@ def process(filename, action):
data = numpy.loadtxt(filename, delimiter=',')
if action == '--min':
- values = numpy.amin(data, axis=1)
+ values = numpy.min(data, axis=1)
elif action == '--mean':
values = numpy.mean(data, axis=1)
elif action == '--max':
- values = numpy.amax(data, axis=1)
+ values = numpy.max(data, axis=1)
for val in values:
print(val)
@@ -893,11 +893,11 @@ def process(filename, action):
data = numpy.loadtxt(filename, delimiter=',')
if action == '--min':
- values = numpy.amin(data, axis=1)
+ values = numpy.min(data, axis=1)
elif action == '--mean':
values = numpy.mean(data, axis=1)
elif action == '--max':
- values = numpy.amax(data, axis=1)
+ values = numpy.max(data, axis=1)
for val in values:
print(val)
diff --git a/episodes/fig/generate_figures.py b/episodes/fig/generate_figures.py
index 137676fa37..0ec35fa6d7 100755
--- a/episodes/fig/generate_figures.py
+++ b/episodes/fig/generate_figures.py
@@ -29,11 +29,11 @@
matplotlib.pyplot.savefig("inflammation-01-average.svg")
matplotlib.pyplot.close()
-matplotlib.pyplot.plot(numpy.amax(data, axis=0))
+matplotlib.pyplot.plot(numpy.max(data, axis=0))
matplotlib.pyplot.savefig("inflammation-01-maximum.svg")
matplotlib.pyplot.close()
-matplotlib.pyplot.plot(numpy.amin(data, axis=0))
+matplotlib.pyplot.plot(numpy.min(data, axis=0))
matplotlib.pyplot.savefig("inflammation-01-minimum.svg")
matplotlib.pyplot.close()
@@ -48,10 +48,10 @@
axes1.plot(numpy.mean(data, axis=0))
axes2.set_ylabel('max')
-axes2.plot(numpy.amax(data, axis=0))
+axes2.plot(numpy.max(data, axis=0))
axes3.set_ylabel('min')
-axes3.plot(numpy.amin(data, axis=0))
+axes3.plot(numpy.min(data, axis=0))
fig.tight_layout()
matplotlib.pyplot.savefig("inflammation-01-group-plot.svg")
@@ -69,10 +69,10 @@
axes1.plot(numpy.mean(data, axis=0), drawstyle='steps-mid')
axes2.set_ylabel('max')
-axes2.plot(numpy.amax(data, axis=0), drawstyle='steps-mid')
+axes2.plot(numpy.max(data, axis=0), drawstyle='steps-mid')
axes3.set_ylabel('min')
-axes3.plot(numpy.amin(data, axis=0), drawstyle='steps-mid')
+axes3.plot(numpy.min(data, axis=0), drawstyle='steps-mid')
fig.tight_layout()
matplotlib.pyplot.savefig("inflammation-01-line-styles.svg")
diff --git a/episodes/fig/python-operations-across-axes.odg b/episodes/fig/python-operations-across-axes.odg
deleted file mode 100644
index d4aed89076..0000000000
Binary files a/episodes/fig/python-operations-across-axes.odg and /dev/null differ
diff --git a/episodes/fig/python-operations-across-axes.png b/episodes/fig/python-operations-across-axes.png
deleted file mode 100644
index 873a1afee4..0000000000
Binary files a/episodes/fig/python-operations-across-axes.png and /dev/null differ
diff --git a/episodes/fig/python-operations-across-axes.svg b/episodes/fig/python-operations-across-axes.svg
new file mode 100644
index 0000000000..fc8a731e4c
--- /dev/null
+++ b/episodes/fig/python-operations-across-axes.svg
@@ -0,0 +1,79 @@
+
diff --git a/episodes/files/code/readings_04.py b/episodes/files/code/readings_04.py
index ec4b524095..4fa93b2e18 100644
--- a/episodes/files/code/readings_04.py
+++ b/episodes/files/code/readings_04.py
@@ -11,11 +11,11 @@ def main():
data = numpy.loadtxt(filename, delimiter=',')
if action == '--min':
- values = numpy.amin(data, axis=1)
+ values = numpy.min(data, axis=1)
elif action == '--mean':
values = numpy.mean(data, axis=1)
elif action == '--max':
- values = numpy.amax(data, axis=1)
+ values = numpy.max(data, axis=1)
for val in values:
print(val)
diff --git a/episodes/files/code/readings_05.py b/episodes/files/code/readings_05.py
index f4a85d1b41..f51c19ddbf 100644
--- a/episodes/files/code/readings_05.py
+++ b/episodes/files/code/readings_05.py
@@ -14,11 +14,11 @@ def process(filename, action):
data = numpy.loadtxt(filename, delimiter=',')
if action == '--min':
- values = numpy.amin(data, axis=1)
+ values = numpy.min(data, axis=1)
elif action == '--mean':
values = numpy.mean(data, axis=1)
elif action == '--max':
- values = numpy.amax(data, axis=1)
+ values = numpy.max(data, axis=1)
for val in values:
print(val)
diff --git a/episodes/files/code/readings_06.py b/episodes/files/code/readings_06.py
index 066ae3908d..0bb33d2ad1 100644
--- a/episodes/files/code/readings_06.py
+++ b/episodes/files/code/readings_06.py
@@ -17,11 +17,11 @@ def process(filename, action):
data = numpy.loadtxt(filename, delimiter=',')
if action == '--min':
- values = numpy.amin(data, axis=1)
+ values = numpy.min(data, axis=1)
elif action == '--mean':
values = numpy.mean(data, axis=1)
elif action == '--max':
- values = numpy.amax(data, axis=1)
+ values = numpy.max(data, axis=1)
for val in values:
print(val)
diff --git a/episodes/files/code/readings_07.py b/episodes/files/code/readings_07.py
index beb166128c..6e003a5024 100644
--- a/episodes/files/code/readings_07.py
+++ b/episodes/files/code/readings_07.py
@@ -17,11 +17,11 @@ def process(filename, action):
data = numpy.loadtxt(filename, delimiter=',')
if action == '-n':
- values = numpy.amin(data, axis=1)
+ values = numpy.min(data, axis=1)
elif action == '-m':
values = numpy.mean(data, axis=1)
elif action == '-x':
- values = numpy.amax(data, axis=1)
+ values = numpy.max(data, axis=1)
for val in values:
print(val)
diff --git a/episodes/files/code/readings_08.py b/episodes/files/code/readings_08.py
index 2dad1c8749..9563d5141e 100644
--- a/episodes/files/code/readings_08.py
+++ b/episodes/files/code/readings_08.py
@@ -26,11 +26,11 @@ def process(filename, action):
data = numpy.loadtxt(filename, delimiter=',')
if action == '--min':
- values = numpy.amin(data, axis=1)
+ values = numpy.min(data, axis=1)
elif action == '--mean':
values = numpy.mean(data, axis=1)
elif action == '--max':
- values = numpy.amax(data, axis=1)
+ values = numpy.max(data, axis=1)
for val in values:
print(val)
diff --git a/episodes/files/code/readings_09.py b/episodes/files/code/readings_09.py
index a987567909..cf264688e4 100644
--- a/episodes/files/code/readings_09.py
+++ b/episodes/files/code/readings_09.py
@@ -21,11 +21,11 @@ def process(filename, action):
data = numpy.loadtxt(filename, delimiter=',')
if action == '--min':
- values = numpy.amin(data, axis=1)
+ values = numpy.min(data, axis=1)
elif action == '--mean':
values = numpy.mean(data, axis=1)
elif action == '--max':
- values = numpy.amax(data, axis=1)
+ values = numpy.max(data, axis=1)
for val in values:
print(val)
diff --git a/learners/discuss.md b/learners/discuss.md
index f8ac3afaad..2cccdc406e 100644
--- a/learners/discuss.md
+++ b/learners/discuss.md
@@ -114,7 +114,7 @@ the minimum and maximum values in an array:
import numpy
def span(a):
- diff = numpy.amax(a) - numpy.amin(a)
+ diff = numpy.max(a) - numpy.min(a)
return diff
data = numpy.loadtxt(fname='inflammation-01.csv', delimiter=',')