From 340cb224b71a3ba2159e98fd5a1efc3cbf47264a Mon Sep 17 00:00:00 2001 From: satyajit91 Date: Tue, 2 Oct 2018 04:20:39 +0000 Subject: [PATCH 1/3] Done --- q01_zeros_array/build.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/q01_zeros_array/build.py b/q01_zeros_array/build.py index 5501f7a..95b7a54 100644 --- a/q01_zeros_array/build.py +++ b/q01_zeros_array/build.py @@ -1,8 +1,16 @@ +# %load q01_zeros_array/build.py # Default Imports import sys, os sys.path.append(os.path.join(os.path.dirname(os.curdir), '..' )) import numpy as np # Your solution +def array_zeros(): + zeros_array = np.zeros(((3,4,2))) + return zeros_array + + + + From 047b17e76628247daae02aa7e8b6c7583d320d85 Mon Sep 17 00:00:00 2001 From: satyajit91 Date: Tue, 2 Oct 2018 05:36:27 +0000 Subject: [PATCH 2/3] Done --- q02_zeros_reshaped/build.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/q02_zeros_reshaped/build.py b/q02_zeros_reshaped/build.py index ed629c7..a15ffc9 100644 --- a/q02_zeros_reshaped/build.py +++ b/q02_zeros_reshaped/build.py @@ -1,5 +1,14 @@ +# %load q02_zeros_reshaped/build.py # Default imports import numpy as np from greyatomlib.python_intermediate.q01_zeros_array.build import array_zeros # Write your code + +arr1 = np.arange(0,9).reshape((3,3)) +arr1 +def array_reshaped_zeros(arr = array_zeros()): + return arr.reshape(((2,3,4))) +array_reshaped_zeros() + + From d78731ecaa440351cddce02edae7f8143180fe82 Mon Sep 17 00:00:00 2001 From: satyajit91 Date: Tue, 2 Oct 2018 05:44:28 +0000 Subject: [PATCH 3/3] Done --- q03_create_3d_array/build.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/q03_create_3d_array/build.py b/q03_create_3d_array/build.py index 7bb6e2f..092385b 100644 --- a/q03_create_3d_array/build.py +++ b/q03_create_3d_array/build.py @@ -1,4 +1,11 @@ +# %load q03_create_3d_array/build.py # Default Imports import numpy as np -# Enter solution here \ No newline at end of file +# Enter solution here +def create_3d_array(): + N=3*3*3 + return np.arange(0,N).reshape(((3,3,3))) +create_3d_array() + +