From 93f8efc60a4ae1a3ab8d745e7dd33cbd80dfa591 Mon Sep 17 00:00:00 2001 From: 284km Date: Wed, 4 Nov 2020 12:16:28 +0900 Subject: [PATCH] Output \n as a string in example code Current output is: $ echo "from numpy import random;" \ > "n = random.randn(10000);" \ > "print('\n'.join(str(i) for i in n))" from numpy import random; n = random.randn(10000); print(' '.join(str(i) for i in n)) After this change, I think it is originally expected string: $ echo "from numpy import random;" \ > "n = random.randn(10000);" \ > "print('\\\n'.join(str(i) for i in n))" from numpy import random; n = random.randn(10000); print('\n'.join(str(i) for i in n)) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0cd53c8..03a47e7 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ ruby -r numo/narray -e "puts Numo::DFloat.new(1000).rand_norm.to_a" \ ```sh echo "from numpy import random;" \ "n = random.randn(10000);" \ - "print('\n'.join(str(i) for i in n))" \ + "print('\\\n'.join(str(i) for i in n))" \ | python \ | uplot hist --nbins 20 ```