From c8c376731d06770e39e616ab924532b8ec5548ef Mon Sep 17 00:00:00 2001
From: Chris Cooling
Date: Tue, 3 Dec 2019 17:44:20 +0000
Subject: [PATCH] 02-numpy.md: Clarification of 1.0 v 1. (#760)
* Clarification of 1.0 v 1.
The previous explanation implies that Python will always print 1.0 as "1." when there's nothing after the decimal point. However, this is specific to numpy. For example, the statement "print(1.0)" will print "1.0" and not "1.". I also clarified the space saved was on the screen (rather than in memory for example).
* Update 02-numpy.md
* Update 02-numpy.md
* Update 02-numpy.md
---
_episodes/02-numpy.md | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/_episodes/02-numpy.md b/_episodes/02-numpy.md
index 30cfe74..34753c3 100644
--- a/_episodes/02-numpy.md
+++ b/_episodes/02-numpy.md
@@ -89,9 +89,7 @@ that output is the data we just loaded.
By default,
only a few rows and columns are shown
(with `...` to omit elements when displaying big arrays).
-To save space,
-Python displays numbers as `1.` instead of `1.0`
-when there's nothing interesting after the decimal point.
+Note that, to save space when displaying NumPy arrays, Python does not show us trailing zeros, so `1.0` becomes `1.`.
> ## Importing libraries with shortcuts
>
--
GitLab